18 Commits

Author SHA1 Message Date
cmx
f6e4562ce2 Merge pull request 'cmx' (#15) from cmx into master
Reviewed-on: http://git.luyuan.tk/luyuan/demingshangjia/pulls/15
2020-07-30 19:52:16 +08:00
cmxdd
22ea59f5c5 update about api 2020-07-30 19:49:12 +08:00
b9e15c1b02 Merge pull request 'xbx' (#14) from xbx into master
Reviewed-on: http://git.luyuan.tk/luyuan/demingshangjia/pulls/14
2020-07-30 15:56:03 +08:00
5520e7ab7c 添加进度条 2020-07-30 15:55:16 +08:00
1d9edefd7f 直播完成 2020-07-30 15:54:32 +08:00
cmxdd
5094efd41e fixed v-toast 2020-07-30 10:12:27 +08:00
cmxdd
70e848cbbb update api abput mine 2020-07-30 09:41:08 +08:00
b605f68e72 Merge branch 'master' of http://git.luyuan.tk/luyuan/demingshangjia into xbx 2020-07-30 09:33:13 +08:00
2525db391c Merge pull request 'update api' (#13) from cmx into master
Reviewed-on: http://git.luyuan.tk/luyuan/demingshangjia/pulls/13
2020-07-30 09:32:16 +08:00
dbffca53c8 Merge branch 'master' into cmx 2020-07-30 09:32:11 +08:00
519ec0abe8 直播修改 2020-07-30 08:46:35 +08:00
cmxdd
243e1f93bd update api 2020-07-29 20:35:33 +08:00
74fbd629d6 Merge branch 'master' of http://git.luyuan.tk/luyuan/demingshangjia into xbx 2020-07-29 15:28:31 +08:00
cmx
e71a43eb85 Merge pull request 'cmx' (#12) from cmx into master
Reviewed-on: http://git.luyuan.tk/luyuan/demingshangjia/pulls/12
2020-07-29 15:26:56 +08:00
cmxdd
fef56d1b52 update two login style 2020-07-29 15:21:40 +08:00
cmxdd
cc7a293e18 update 2020-07-29 10:42:37 +08:00
cmxdd
8660e95d02 test 2020-07-29 10:40:55 +08:00
96adf9e6a9 修正了错误弹窗 2020-07-29 09:37:59 +08:00
37 changed files with 2707 additions and 1486 deletions

3
.gitignore vendored
View File

@@ -1,2 +1,3 @@
.vscode
node_modules
node_modules
unpackage

26
App.vue
View File

@@ -1,18 +1,18 @@
<script>
export default {
onLaunch: function() {
console.log('App Launch')
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
export default {
onLaunch: function() {
console.log('App Launch');
},
onShow: function() {
console.log('App Show');
},
onHide: function() {
console.log('App Hide');
}
};
</script>
<style lang="scss">
/*每个页面公共css */
@import "uview-ui/index.scss";
</style>
/*每个页面公共css */
@import 'uview-ui/index.scss';
</style>

View File

@@ -8,7 +8,7 @@ const install = (Vue, vm) => {
return vm.$u.get("Streaming/getLiveSpec")
},
login({member_name,member_password}){
return vm.$u.post("Login/login",{member_name,member_password})
return vm.$u.get("/Login/expertLogin",{member_name,member_password})
},
createLivesp({spec_name}){
return vm.$u.post("Streaming/createLivesp",{spec_name})
@@ -21,7 +21,80 @@ const install = (Vue, vm) => {
},
liveStreamList(){
return vm.$u.post("Streaming/liveStreamList")
}
},
// 获取订单列表
getorderlist({type,page}){
return vm.$u.get("/Order/orderList",{type,page})
},
// 获取试穿订单列表
getshiftlist(){
return vm.$u.get("/order/goodsTryOrderList")
},
// 获取轮播图列表
getswiper(){
return vm.$u.get("/Order/orderList")
},
// 商家登陆
shoplogin({member_name,member_password}){
return vm.$u.get("/Login/storeLogin",{member_name,member_password})
},
// 获取个人信息
getshopinfo(){
return vm.$u.post("/member/memberInfo")
},
// 获取粉丝列表
myfanlist(){
return vm.$u.post("/member/myFansList")
},
// 修改个人信息
changeinfo({nickname,avatar,signature}){
return vm.$u.post("/Member/changeMemberInfo",{nickname,avatar,signature})
},
// 获取内容列表
articlelist({type,page}){
return vm.$u.post("/Article/articleList",{type,page})
},
// 删除文章
delarticle({article_id}){
return vm.$u.post("/article/articleDelete",{article_id})
},
// 骑手列表
takeawayerlist(){
return vm.$u.get("/Order/getTakeawayerList")
},
// 投诉列表
reportlist(){
return vm.$u.post("/takeawayer/complaintTKList")
},
// 投诉详情
reportdetail({id}){
return vm.$u.post("/takeawayer/complaintInfo",{id})
},
// 可以投诉的订单
canreportorder(){
return vm.$u.post("/Takeawayer/tryOrderSnList")
},
// 投诉骑手
reportorder({order_id,takeawayer_id,order_list,content}){
return vm.$u.post("/takeawayer/complaintTakeawayer",{order_id,takeawayer_id,order_list,content})
},
// 文章详情
getdetail({article_id}){
return vm.$u.post("/article/articleInfo",{article_id})
},
// 回复评论
reply({article_id,pid,content}){
return vm.$u.post("/article/articleAddComment",{article_id,pid,content})
},
// 达人是否可以直播
canlive(){
return vm.$u.post("/Streaming/expt_live")
},
// 可选择直播商品列表
canselectgood(){
return vm.$u.post("/article/getStoreGoodsList")
},
}
// 将各个定义的接口名称统一放进对象挂载到vm.$u.api(因为vm就是this也即this.$u.api)下
vm.$u.api = api;

View File

@@ -1,20 +1,21 @@
const install = (Vue, vm) => {
// 此为自定义配置参数,具体参数见上方说明
Vue.prototype.$u.http.setConfig({
baseUrl: 'https://dmmall.sdbairui.com//storeapi',
baseUrl: 'https://dmmall.sdbairui.com/storeapi',
loadingText: '努力加载中~',
loadingTime: 800,
// 设置自定义头部content-type
// header: {
// "Authorization" : "122"
// }
// ......
originalData: true,
});
Vue.prototype.$u.http.interceptor.request = (config) => {
const token = uni.getStorageSync('token');
config.header.Authorization = 'Bearer' + " " + token;
return config;
}
}
Vue.prototype.$u.http.interceptor.response = (res) => {
// todo 判断状态码
return res.data;
}
}
export default {

View File

@@ -1,12 +1,12 @@
<template>
<view class="item">
<image></image>
<image :src="info.complain_goods_image"></image>
<view class="people">
<view class="status">已受理</view>
<view class="goods-name u-line-1">心机小黑裙连衣裙赫本风夏季爆款...</view>
<view class="status">{{info.complain_status==0?"未受理":"已审核"}}</view>
<view class="goods-name u-line-1">{{info.complain_goods_name}}</view>
<view class="info">
<view class="name">骑手李先生</view>
<view class="price">199.9</view>
<view class="name">骑手{{info.takeawayer_name}}</view>
<view class="price">{{info.complain_goods_price*info.complain_goods_num}}</view>
</view>
</view>
</view>
@@ -16,8 +16,14 @@ export default {
data() {
return {}
},
methods: {
props: {
info:{
type: Object,
default: null
}
},
methods: {
}
};
</script>
<style lang="scss" scoped>
@@ -35,7 +41,6 @@ export default {
height: 160rpx;
flex-shrink: 0;
margin-right: 25rpx;
background-color: aqua;
}
.people {
.status {

View File

@@ -1,24 +1,24 @@
<template>
<view class="content-item">
<view class="image">
<image class="cover"></image>
<image src="/static/image/user/5.png" class="play-icon" v-if="cur==1"></image>
<image class="cover" :src="info.article_pic" alt="没有图片"></image>
<image src="/static/image/user/5.png" class="play-icon" v-if="type==2"></image>
</view>
<view class="right" @click="toDetailsPage">
<u-icon name="close" color="#999999" size="27" @click.stop="showPopup"></u-icon>
<view class="tags u-line-2">#配饰就该这么搭#</view>
<view class="right" >
<u-icon name="close" color="#999999" size="27" @click="showPopup(info.article_id)"></u-icon>
<view class="tags u-line-2" @click="toDetailsPage">{{info.article_title}}</view>
<view class="data">
<view>
<image src="/static/image/user/2.png"></image>
<text>2.5w</text>
<text>{{info.comment_num}}</text>
</view>
<view>
<image src="/static/image/user/3.png"></image>
<text>2.5w</text>
<text>{{info.collect_num}}</text>
</view>
<view>
<image src="/static/image/user/4.png"></image>
<text>2.5w</text>
<text>{{info.like_num}}</text>
</view>
</view>
</view>
@@ -30,19 +30,27 @@ export default {
return {}
},
props: {
cur: [Number, String],
info:{
type: Object,
default: null
},
type:{
type: Number,
default: 1
},
delItem: {
type: Function,
default: null
}
},
methods: {
showPopup() {
this.delItem();
showPopup(id) {
console.log(12345,id)
this.$emit("del",id)
},
toDetailsPage() {
uni.navigateTo({
url: '/pages/user/contentDetails?current=' + this.cur
url: '/pages/user/contentDetails?current=' + this.type+'&id=' + this.info.article_id
});
}
},
@@ -61,7 +69,7 @@ export default {
width: 160rpx;
height: 160rpx;
border-radius: 10rpx;
background-color: aqua;
// background-color: aqua;
flex-shrink: 0;
}
.play-icon {

View File

@@ -1,15 +1,18 @@
<template>
<view class="fans-item">
<image></image>
<view class="name">兽兽</view>
<view class="date">2017-10-14</view>
<image :src="info.friend_frommavatar"></image>
<view class="name">{{info.fromMemberNickname}}</view>
<view class="date">{{info.fromMemberFriendAddtime}}</view>
</view>
</template>
<script>
export default {
data() {
return {}
}
},
props: {
info: Object
},
};
</script>
<style lang="scss" scoped>

View File

@@ -1,19 +1,23 @@
<template>
<view class="item" @click="toDetailsPage">
<image></image>
<image :src="info.extend_order_goods[0].goods_image"></image>
<view class="goods">
<view class="goods_num">
<view class="number">
编号:1234567890123456
<view class="box">
<view class="">
编号{{info.order_sn}}
</view>
<view class="order" v-if="cur==4">已完成订单</view>
<view class="order" v-else>待处理订单</view>
<!-- 1待处理 2已发货 3已完成 4申请退款 5已退款 -->
<view class="status" v-if="info.view_type==1">待处理订单</view>
<view class="status" v-else-if="info.view_type==2">已发货订单</view>
<view class="status" v-else-if="info.view_type==3">已完成订单</view>
<view class="status" v-else-if="info.view_type==4">申请退款订单</view>
<view class="status" v-else-if="info.view_type==5">已退款订单</view>
</view>
<view class="name u-line-1">心机小黑裙连衣裙赫本风夏季爆款...</view>
<view class="name u-line-1">{{info.extend_order_goods[0].goods_name}}</view>
<view class="info">
<view class="num">件商品</view>
<view class="price">实付<span>199.9</span></view>
<view class="num">{{info.extend_order_goods[0].goods_num}}件商品</view>
<view class="price">实付<span>{{info.extend_order_goods[0].goods_pay_price}}</span></view>
</view>
</view>
</view>
@@ -24,12 +28,13 @@ export default {
return {}
},
props: {
cur: [Number, String]
cur: [Number, String],
info: Object
},
methods: {
toDetailsPage() {
uni.navigateTo({
url: '/pages/index/details?current=' + this.cur
url: '/pages/index/details?id=' + this.info.order_id
});
},
},
@@ -50,36 +55,22 @@ export default {
height: 160rpx;
flex-shrink: 0;
margin-right: 25rpx;
background-color: aqua;
}
.goods {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
.goods_num{
.box{
width: 100%;
display: flex;
justify-content: space-between;
width: 100%;
margin-bottom: 18rpx;
.number{
font-size:22rpx;
font-family:PingFang SC;
font-weight:400;
color:rgba(153,153,153,1);
line-height:36rpx;
}
.order{
font-size:26rpx;
font-family:PingFang SC;
font-weight:400;
color:rgba(255,49,49,1);
line-height:36rpx;
}
font-size: 24rpx;
}
.status {
width: 120rpx;
align-self: flex-end;
font-size: 26rpx;
font-size: 24rpx;
color: rgba(255,49,49,1);
margin-bottom: 30rpx;
}

View File

@@ -0,0 +1,87 @@
<template>
<view class="item" @click="toDetailsPage">
<image :src="info.goods_pic"></image>
<view class="goods">
<view class="">
<!-- 0:待处理订单 20:同意 40:拒绝此订单 -->
<view class="status" v-if="info.goods_try_order_status==0">待处理订单</view>
<view class="status" v-if="info.goods_try_order_status==20">已接单订单</view>
<view class="status" v-if="info.goods_try_order_status==40">已拒绝订单</view>
<view class="status" v-if="info.goods_try_order_status==50">已完成订单</view>
</view>
<view class="name u-line-1">{{info.goods_name}}</view>
<view class="info">
<view class="num">{{info.goods_try_num}}件商品</view>
<view class="price">实付<span>{{info.price}}</span></view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {}
},
props: {
cur: [Number, String],
info: Object
},
methods: {
toDetailsPage() {
uni.navigateTo({
url: '/pages/index/details?id=' + this.info.order_id
});
},
},
};
</script>
<style lang="scss" scoped>
.item {
margin: 0 auto 20rpx;
width: 690rpx;
height: 220rpx;
background: rgba(255,255,255,1);
border-radius: 10rpx;
padding: 30rpx;
display: flex;
align-items: center;
> image {
width: 160rpx;
height: 160rpx;
flex-shrink: 0;
margin-right: 25rpx;
}
.goods {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
.status {
align-self: flex-end;
font-size: 26rpx;
color: rgba(255,49,49,1);
margin-bottom: 30rpx;
}
.name {
width: 439rpx;
font-size: 28rpx;
color: rgba(51,51,51,1);
margin-bottom: 30rpx;
}
.info {
width: 100%;
display: flex;
align-items: center;
font-size: 26rpx;
color: rgba(102,102,102,1);
.price {
margin-left: 10rpx;
> span {
color: #FF780F;
}
}
}
}
}
</style>

4
package-lock.json generated
View File

@@ -6,8 +6,8 @@
"dependencies": {
"uview-ui": {
"version": "1.5.2",
"resolved": "https://registry.npm.taobao.org/uview-ui/download/uview-ui-1.5.2.tgz?cache=0&sync_timestamp=1594781920423&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fuview-ui%2Fdownload%2Fuview-ui-1.5.2.tgz",
"integrity": "sha1-4jDud0TIBjMJe74GU+IyvJSyAwk="
"resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-1.5.2.tgz",
"integrity": "sha512-FV9G+gZTAZKEE2m85ahIbIRiC/fdzTl+eNXDIMBoyc9b+fQWQhEtmAfu6huu7AtKuTI6gfqaYn6WGcmqYvr76w=="
}
}
}

View File

@@ -2,8 +2,7 @@
"easycom": {
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
},
"pages": [
{
"pages": [{
"path": "pages/login/login",
"style": {
"navigationBarTitleText": "",
@@ -31,9 +30,9 @@
"style": {
"navigationBarTitleText": "消息",
"app-plus": {
"titleNView": {
"titleNView": {
"backgroundColor": "#FFFFFF",
"titleColor": "#333333"
"titleColor": "#333333"
}
}
}
@@ -43,9 +42,9 @@
"style": {
"navigationBarTitleText": "德铭阳光在线",
"app-plus": {
"titleNView": {
"titleNView": {
"backgroundColor": "#FFFFFF",
"titleColor": "#333333"
"titleColor": "#333333"
}
}
}
@@ -55,8 +54,8 @@
"style": {
"navigationBarTitleText": "订单详情",
"app-plus": {
"titleNView": {
"titleColor": "#333333"
"titleNView": {
"titleColor": "#333333"
}
}
}
@@ -86,17 +85,30 @@
}
}
}
},
{
"path": "pages/user/index",
"style": {
"navigationBarTitleText": "个人中心",
"app-plus": {
"titleNView": {
"titleNView": {
"backgroundColor": "#FFFFFF",
"titleColor": "#333333"
"titleColor": "#333333"
}
}
}
},
{
"path": "pages/user/myinfo",
"style": {
"navigationBarTitleText": "达人中心",
"app-plus": {
"titleNView": {
"backgroundColor": "#FFFFFF",
"titleColor": "#333333"
}
}
}
@@ -118,9 +130,15 @@
"style": {
"navigationBarTitleText": "个人资料",
"app-plus": {
"titleNView": {
"titleNView": {
"backgroundColor": "#FFFFFF",
"titleColor": "#333333"
"titleColor": "#333333",
"buttons": [ //原生标题栏按钮配置,
{
"text": "保存",
"fontSize":"14px"
}
]
}
}
}
@@ -130,9 +148,9 @@
"style": {
"navigationBarTitleText": "修改密码",
"app-plus": {
"titleNView": {
"titleNView": {
"backgroundColor": "#FFFFFF",
"titleColor": "#333333"
"titleColor": "#333333"
}
}
}
@@ -142,9 +160,9 @@
"style": {
"navigationBarTitleText": "我的粉丝",
"app-plus": {
"titleNView": {
"titleNView": {
"backgroundColor": "#FFFFFF",
"titleColor": "#333333"
"titleColor": "#333333"
}
}
}
@@ -154,9 +172,9 @@
"style": {
"navigationBarTitleText": "内容管理",
"app-plus": {
"titleNView": {
"titleNView": {
"backgroundColor": "#FFFFFF",
"titleColor": "#333333"
"titleColor": "#333333"
}
}
}
@@ -165,9 +183,9 @@
"path": "pages/user/contentDetails",
"style": {
"app-plus": {
"titleNView": {
"titleNView": {
"backgroundColor": "#FFFFFF",
"titleColor": "#333333"
"titleColor": "#333333"
}
}
}
@@ -177,9 +195,9 @@
"style": {
"navigationBarTitleText": "骑手投诉",
"app-plus": {
"titleNView": {
"titleNView": {
"backgroundColor": "#FFFFFF",
"titleColor": "#333333"
"titleColor": "#333333"
}
}
}
@@ -189,9 +207,9 @@
"style": {
"navigationBarTitleText": "骑手投诉详情",
"app-plus": {
"titleNView": {
"titleNView": {
"backgroundColor": "#FFFFFF",
"titleColor": "#333333"
"titleColor": "#333333"
}
}
}
@@ -201,9 +219,9 @@
"style": {
"navigationBarTitleText": "选择商品",
"app-plus": {
"titleNView": {
"titleNView": {
"backgroundColor": "#2D2D2D",
"titleColor": "#FFFFFF"
"titleColor": "#FFFFFF"
}
}
}
@@ -226,28 +244,34 @@
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"tabBar":{
"tabBar": {
"color": "#7A7E83",
"selectedColor": "#3cc51f",
"borderStyle": "black",
"backgroundColor": "#ffffff",
"height": "50px",
"fontSize": "10px",
"iconWidth": "24px",
"spacing": "3px",
"list": [{
"pagePath": "pages/index/index",
"iconPath": "",
"selectedIconPath": "",
"selectedColor": "#3cc51f",
"borderStyle": "black",
"backgroundColor": "#ffffff",
"height": "50px",
"fontSize": "10px",
"iconWidth": "24px",
"spacing": "3px",
"list": [{
"pagePath": "pages/index/index",
"iconPath": "",
"selectedIconPath": "",
"text": "首页",
"selectedColor":"#FBFBFB"
}, {
"pagePath": "pages/user/index",
"iconPath": "",
"selectedIconPath": "",
"selectedColor": "#FBFBFB"
}, {
"pagePath": "pages/messages/messagesList",
"iconPath": "",
"selectedIconPath": "",
"text": "消息",
"selectedColor": "#FBFBFB"
}, {
"pagePath": "pages/user/index",
"iconPath": "",
"selectedIconPath": "",
"text": "我的",
"selectedColor":"#FBFBFB"
}]
"selectedColor": "#FBFBFB"
}]
}
}
}

View File

@@ -81,6 +81,7 @@
<view class="determine">确定</view>
</view>
</u-popup>
<u-toast ref="uToast" />
</view>
</template>
<script>

File diff suppressed because it is too large Load Diff

View File

@@ -2,353 +2,424 @@
<!-- login页面 -->
<view>
<view class="login">
<image class="images" src=""></image>
<image class="images" :src="url"></image>
<view class="backes"></view>
<view class="title_top">德铭阳光在线-商家端</view>
<view class="content">
<view class="title_top">德铭阳光在线-商家端</view>
<view class="title">账号登录</view>
<view class="labales">
<image src=""></image>
<input v-model="zhanghao" type="tel" placeholder="请输入账号" />
<view class="title">
<view v-bind:class="[state==0 ? 'show' : '']" @click="changetab(0)">
商家登录
</view>
<view v-bind:class="[state==1 ? 'show' : '']" @click="changetab(1)">
达人登录
</view>
</view>
<view class="labales">
<image src=""></image>
<input v-model="mima" type="password" placeholder="请输入密码" />
<view class="" v-if="state==0">
<view class="labales">
<image src="../../static/image/login/login(3).png"></image>
<input v-model="zhanghao" type="text" placeholder="请输入账号" />
</view>
<view class="labales">
<image src="../../static/image/login/login(1).png"></image>
<input v-model="mima" type="password" placeholder="请输入密码" />
</view>
</view>
<view class="" v-else>
<view class="labales">
<image src="../../static/image/login/login(3).png"></image>
<input v-model="zhanghaoA" type="text" placeholder="请输入账号" />
</view>
<view class="labales">
<image src="../../static/image/login/login(1).png"></image>
<input v-model="mimaA" type="password" placeholder="请输入密码" />
</view>
</view>
</view>
<!-- denglu QQ weixin -->
<u-button @click="logins">{{login}}</u-button>
<button @click="logins">{{ login }}</button>
<!-- <u-button :custom-style="customStyle" ></u-button> -->
<u-toast ref="uToast" />
</view>
</view>
</template>
<script>
export default {
data() {
return {
list: [{
export default {
data() {
return {
list: [
{
checked: false,
disabled: false
}],
value: '',
login: '登录',
show: false,
zhanghao:"",
mima:""
};
}
],
value: '',
login: '登录',
show: false,
zhanghao: 'seller',
mima: '123456789',
zhanghaoA: '18953829598 ',
mimaA: '123456',
url: '',
state:0
};
},
methods: {
// 改变登陆类型
changetab(num){
this.state = num
},
methods: {
// 选中某个复选框时由checkbox时触发
checkboxChange(e) {
//console.log(e);
},
// 选中任一checkbox时由checkbox-group触发
checkboxGroupChange(e) {
// console.log(e);
},
mask_u(){
this.show = !this.show
},
// 获取验证码倒计时
getCode(){
console.log("11")
this.loading()
},
loading(){
},
logins(){
this.$u.api.login({member_name:this.zhanghao,member_password:this.mima}).then((res)=>{
console.log(res)
if(res.errCode != 0){
// 选中某个复选框时由checkbox时触发
checkboxChange(e) {
//console.log(e);
},
// 选中任一checkbox时由checkbox-group触发
checkboxGroupChange(e) {
// console.log(e);
},
mask_u() {
this.show = !this.show;
},
// 获取验证码倒计时
getCode() {
console.log('11');
this.loading();
},
loading() {},
logins() {
// 清除本地存储才可以正常登陆(具体原因没有仔细检查)
uni.clearStorage();
// 账号登录1达人0商家
if(this.state==1){
this.$u.api.login({ member_name: this.zhanghaoA, member_password: this.mimaA }).then(res => {
console.log(res);
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
})
}else{
uni.setStorageSync("token",res.data.token)
uni.setStorageSync("userinfo",res.data)
uni.setStorageSync('rongyun',res.data.rongcloud_token)
});
} else {
uni.setStorageSync('token', res.data.token);
uni.setStorageSync('userinfo', res.data);
uni.setStorageSync('rongyun', res.data.rongcloud_token);
this.$u.route({
url:"/pages/index/index",
type:"switchTab"
})
url: '/pages/user/myinfo'
});
}
})
});
}else{
this.$u.api.shoplogin({ member_name: this.zhanghao, member_password: this.mima }).then(res => {
console.log(res);
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
uni.setStorageSync('token', res.data.token);
uni.setStorageSync('userinfo', res.data);
uni.setStorageSync('rongyun', res.data.rongcloud_token);
this.$u.route({
url: '/pages/index/index',
type: 'switchTab'
});
}
});
}
},
onLoad(){
let token = uni.getStorageSync('token');
if(token != undefined && token){
this.$u.route({
url:"/pages/index/index"
})
}
}
};
},
onLoad() {
let token = uni.getStorageSync('token');
if (token != undefined && token) {
this.$u.route({
url: '/pages/index/index'
});
}
}
};
</script>
<style lang="scss" scoped>
.login {
// background: url(../../static/pageA/loginbackground.png) no-repeat!important;
.images {
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: -1;
}
.backes {
background: rgba(0, 0, 0, 0.4);
position: fixed;
width: 100%;
height: 100%;
z-index: -1;
}
text {
z-index: 9;
color: #fff;
}
.more_Login {
overflow: hidden;
zoom: 1;
width: 630rpx;
margin: 0 auto;
}
.more_Login text {
display: inline-block;
width: 50%;
float: left;
font-size: 30rpx;
color: rgba(255, 255, 255, 1);
line-height: 36px;
margin: 97rpx 0;
}
.more_Login .other {
text-align: right;
}
.login {
// background: url(../../static/pageA/loginbackground.png) no-repeat!important;
.images {
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: -1;
}
.title {
font-size: 36rpx;
font-weight: bold;
margin-bottom: 150rpx;
.backes {
background: rgba(0, 0, 0, 0.4);
position: fixed;
width: 100%;
height: 100%;
z-index: -1;
}
text {
z-index: 9;
color: #fff;
letter-spacing: 3rpx;
}
.content {
.more_Login {
overflow: hidden;
zoom: 1;
width: 630rpx;
z-index: 99999;
margin: 0 auto;
padding-top: 300rpx;
.labales text {
font-size: 30rpx;
}
.labales {
border-bottom: 1px #fff solid;
margin-bottom: 180rpx;
height: 70rpx;
line-height: 70rpx;
position: relative;
input{
width: 80%;
margin-left: 60rpx;
color: #fff;
letter-spacing: 2rpx;
background-color: none;
}
}
.labales image{
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 39rpx;
height: 40rpx;
}
.labales:nth-child(3) {
position: relative;
margin-bottom: 60rpx;
}
.identifying {
position: absolute;
right: 0;
top: 0;
bottom: 0;
margin: auto;
font-size: 30rpx;
font-weight: 500;
color: rgba(255, 120, 15, 1);
line-height: 20px;
}
}
.uni-input-input, .uni-input-placeholder{
color:#fff!important;
letter-spacing: 2rpx;
}
.pact text {
font-size: 22rpx;
font-weight: 400;
.more_Login text {
display: inline-block;
width: 50%;
float: left;
font-size: 30rpx;
color: rgba(255, 255, 255, 1);
line-height: 36px;
margin: 97rpx 0;
}
.pact_text {
font-size: 22px;
font-weight: 400;
color: rgba(129, 188, 253, 1) !important;
line-height: 36px;
.more_Login .other {
text-align: right;
}
}
.title {
font-size: 36rpx;
font-weight: bold;
margin-bottom: 150rpx;
color: #fff;
display: flex;
justify-content: flex-start;
}
.title view{
height: 100rpx;
line-height: 100rpx;
font-size: 24rpx;
padding: 0 20rpx;
}
.title .show{
font-size: 34rpx;
font-weight: bold;
}
.content {
width: 630rpx;
z-index: 99999;
margin: 0 auto;
padding-top: 300rpx;
.labales text {
font-size: 30rpx;
}
//单选框的样式
.pact {
.labales {
border-bottom: 1px #fff solid;
margin-bottom: 180rpx;
height: 70rpx;
line-height: 70rpx;
position: relative;
padding-left: 40rpx;
overflow:hidden; //超出的文本隐藏
text-overflow:ellipsis; //溢出用省略号显示
white-space:nowrap; //溢出不换行
input {
width: 80%;
margin-left: 60rpx;
color: #fff;
letter-spacing: 2rpx;
background-color: none;
}
}
.u-checkbox-group {
.labales image {
position: absolute;
left: 0;
top: 0;
bottom: 0;
margin: auto;
width: 39rpx;
height: 40rpx;
}
.u-checkbox__icon--square {
border-radius: 50rpx !important;
width: 22rpx;
height: 22rpx;
}
.u-btn {
width: 628rpx;
height: 98rpx;
background: rgba(255, 120, 15, 1) !important;
border-radius: 49rpx;
margin: 0 auto;
font-size: 36rpx;
color: rgba(255, 255, 255, 1) !important;
line-height: 36px;
border: 1px #ff780f solid;
outline: none;
border-color: rgba(255, 120, 15, 1) !important;
}
.warp {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
.rect {
width: 558rpx;
height: 300rpx;
background-color: #fff;
border-radius: 20rpx;
overflow: hidden;
zoom: 1;
.labales:nth-child(3) {
position: relative;
display: flex;
flex-wrap:wrap;
display: -webkit-flex; /* Safari */
.rect_view{
width: 100rpx;
height: 100rpx;
.image{
margin-bottom: 60rpx;
}
.identifying {
position: absolute;
right: 0;
top: 0;
bottom: 0;
margin: auto;
font-size: 30rpx;
font-weight: 500;
color: rgba(255, 120, 15, 1);
line-height: 20px;
}
}
.uni-input-input,
.uni-input-placeholder {
color: #fff !important;
letter-spacing: 2rpx;
}
.pact text {
font-size: 22rpx;
font-weight: 400;
color: rgba(255, 255, 255, 1);
line-height: 36px;
}
.pact_text {
font-size: 22px;
font-weight: 400;
color: rgba(129, 188, 253, 1) !important;
line-height: 36px;
}
//单选框的样式
.pact {
position: relative;
padding-left: 40rpx;
overflow: hidden; //超出的文本隐藏
text-overflow: ellipsis; //溢出用省略号显示
white-space: nowrap; //溢出不换行
}
.u-checkbox-group {
position: absolute;
left: 0;
top: 0;
bottom: 0;
margin: auto;
}
.u-checkbox__icon--square {
border-radius: 50rpx !important;
width: 22rpx;
height: 22rpx;
}
.u-btn {
width: 628rpx;
height: 98rpx;
background: rgba(255, 120, 15, 1) !important;
border-radius: 49rpx;
margin: 0 auto;
font-size: 36rpx;
color: rgba(255, 255, 255, 1) !important;
line-height: 36px;
border: 1px #ff780f solid;
outline: none;
border-color: rgba(255, 120, 15, 1) !important;
}
.warp {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
.rect {
width: 558rpx;
height: 300rpx;
background-color: #fff;
border-radius: 20rpx;
overflow: hidden;
zoom: 1;
position: relative;
display: flex;
flex-wrap: wrap;
display: -webkit-flex; /* Safari */
.rect_view {
width: 100rpx;
height: 100rpx;
.image {
width: 45rpx;
height: 53rpx;
display: inline-block;
}
flex:1;
margin-top: 77rpx;
}
.rect_view:nth-child(2) image{
width: 57rpx;
height: 45rpx;
}
.rect_butoon{
width: 100%;
position: absolute;
bottom: 0;
height: 85rpx;
text-align: center;
line-height: 85rpx;
border-top: 1px #999999 solid;
}
view{
color: #666;
font-size:24rpx;
margin-top: 30rpx;
}
flex: 1;
margin-top: 77rpx;
}
.rect_view:nth-child(1) image,.rect_view:nth-child(1) view{
float: right;
.rect_view:nth-child(2) image {
width: 57rpx;
height: 45rpx;
}
.rect_view:nth-child(1) image{
margin-right: 20rpx;
}
.rect_view:nth-child(1){
position: relative;
margin-right: 79rpx;
}
.rect_view:nth-child(1) view{
.rect_butoon {
width: 100%;
position: absolute;
bottom: 0;
right: 0;
height: 85rpx;
text-align: center;
line-height: 85rpx;
border-top: 1px #999999 solid;
}
.rect_view:nth-child(2) image,.rect_view:nth-child(2) view{
float: left;
view {
color: #666;
font-size: 24rpx;
margin-top: 30rpx;
}
.rect_view:nth-child(2) image{
margin-left: 20rpx;
}
.rect_view:nth-child(2){
position: relative;
}
.rect_view:nth-child(2) view{
position: absolute;
bottom: 0;
left: 0;
}
.title_top {
position: fixed;
top: 36rpx;
left: 0;
right: 0;
margin: auto;
font-size:36rpx;
color:rgba(255,255,255,1);
text-align: center;
width: 100%;
/* 如果您想让slot内容占满整个导航栏的宽度 */
/* flex: 1; */
/* 如果您想让slot内容与导航栏左右有空隙 */
/* padding: 0 30rpx; */
background: none;
letter-spacing: 4rpx;
}
}
.rect_view:nth-child(1) image,
.rect_view:nth-child(1) view {
float: right;
}
.rect_view:nth-child(1) image {
margin-right: 20rpx;
}
.rect_view:nth-child(1) {
position: relative;
margin-right: 79rpx;
}
.rect_view:nth-child(1) view {
position: absolute;
bottom: 0;
right: 0;
}
.rect_view:nth-child(2) image,
.rect_view:nth-child(2) view {
float: left;
}
.rect_view:nth-child(2) image {
margin-left: 20rpx;
}
.rect_view:nth-child(2) {
position: relative;
}
.rect_view:nth-child(2) view {
position: absolute;
bottom: 0;
left: 0;
}
.title_top {
position: fixed;
top: calc(var(--status-bar-height) + 18px);
left: 0;
right: 0;
margin: auto;
font-size: 36rpx;
color: rgba(255, 255, 255, 1);
text-align: center;
width: 100%;
/* 如果您想让slot内容占满整个导航栏的宽度 */
/* flex: 1; */
/* 如果您想让slot内容与导航栏左右有空隙 */
/* padding: 0 30rpx; */
background: none;
letter-spacing: 4rpx;
}
button{
width: 670rpx;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
border-radius: 50rpx;
height: 100rpx;
padding: 0 40rpx;
background-color: #ff780f;
color: #FFFFFF;
}
</style>

View File

@@ -15,6 +15,7 @@
<view class="content">{{item.content}}</view>
<view class="times">{{item.time}}</view>
</view>
<u-toast ref="uToast" />
</view>
</template>
<script>

View File

@@ -1,370 +1,357 @@
<template>
<view id="release">
<u-form :model="form" ref="uForm">
<u-form-item label="标题" label-position="right">
<u-input v-model="form.name" placeholder="请输入标题" />
</u-form-item>
<u-form-item label="标题" label-position="right"><u-input v-model="form.name" placeholder="请输入标题" /></u-form-item>
<view class="titles">图片</view>
<u-upload :action="action" del-color="#ececec" upload-text="选择图片" del-bg-color="#fff" :file-list="fileList"></u-upload>
<!-- 标签 -->
<view>
<view class="titles">标签</view>
<view class="form-view" @click="show_add()">+ 新建标签</view>
<view class="form-view" v-for="(item,index) in fileListes" :key="index">{{item}}</view>
<view class="form-view" v-for="(item, index) in fileListes" :key="index">{{ item }}</view>
</view>
<!-- 简介 -->
<view class="titles">简介</view>
<view class="titles_border">
<textarea placeholder="请输入内容..."></textarea>
</view>
<view class="titles_border"><textarea placeholder="请输入内容..."></textarea></view>
<!-- 底部弹框 商品选择 -->
<view class="show_two">
<u-popup v-model="show_two" mode="bottom" :closeable="true">
<view class="title">
<text>选择商品</text>
</view>
<view class="title"><text>选择商品</text></view>
<!-- 商品列表 -->
<view class="listes_shoping" v-for="(item, index) in list" :key="index">
<view>
<u-checkbox-group @change="checkboxGroupChange">
<u-checkbox @change="checkboxChange" shape="circle" active-color="#FF780F" v-model="item.checked" :name="item.id"></u-checkbox>
</u-checkbox-group>
<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll" >
<view class="listes_shoping" v-for="(item, index) in list" :key="index">
<view>
<u-checkbox-group>
<u-checkbox @change="checkboxChange" shape="circle" active-color="#FF780F" v-model="item.checked" :name="item.goods_id"></u-checkbox>
</u-checkbox-group>
</view>
<view><image :src="item.goods_image" mode="widthFix"></image></view>
<view class="contentes">{{ item.goods_name }}</view>
</view>
<view>
<image :src="item.url" mode="widthFix"></image>
</view>
<view class="contentes">{{item.content}}</view>
</view>
</scroll-view>
<!-- 提交按钮 -->
<view class="u-button" @click="changes()">确定</view>
</u-popup>
<!-- 底部选择商品列表 -->
<view @click="show_two = true">选择商品
<view @click="show_two = true">
选择商品
<image class="images" src="../../static/image/tosign/bhottom.png"></image>
</view>
<!-- 选择后的列表 -->
<view class="List_tosign" v-if="List_tosign != ''">
<view>
<image src="../../static/image/tosign/tosigin(5).png" mode="scaleToFill"></image>
</view>
<view>
木糖少女小紫薯西装领连衣裙夏季新款女装夏收腰格子格纹裙子
</view>
<view>
<image src="../../static/image/tosign/delete.png" mode="widthFix"></image>
</view>
<view><image src="../../static/image/tosign/tosigin(5).png" mode="scaleToFill"></image></view>
<view>木糖少女小紫薯西装领连衣裙夏季新款女装夏收腰格子格纹裙子</view>
<view><image src="../../static/image/tosign/delete.png" mode="widthFix"></image></view>
</view>
</view>
<!-- 提交 -->
<u-button class="custom-style" shape="circle" size="default">发表</u-button>
</u-form>
<!-- 添加标签的按钮 -->
<u-popup v-model="show" mode="center" border-radius="14">
<view class="text">
创建属于你的标签吧
</view>
<view class="u-inputes">
<u-input v-model="form.name" />
</view>
<view class="text">创建属于你的标签吧</view>
<view class="u-inputes"><u-input v-model="form.name" /></view>
<u-button class="custom-style-button" shape="circle" size="default">确定</u-button>
</u-popup>
</view>
</template>
<script>
export default {
data() {
return {
form: {
name: '',
intro: '',
sex: ''
},
// 演示地址,请勿直接使用
action: 'http://www.example.com/upload',
fileList: [],
fileListes: ["美妆", "博主穿搭", "美妆", "美妆", "美妆", "美妆", "美妆", "博主穿搭"],
show: false,
show_two: false,
filesList: [],
arres_list : [],
checked: false,
list: [{
name: 'apple',
checked: false,
disabled: false,
content: "木糖少女小紫薯西装领连衣裙夏季新款女装装领连衣裙夏季装领连衣裙夏季装领连衣裙夏季夏收腰格子格纹裙子",
url: '../../static/image/tosign/tosigin(5).png',
id : '1'
},
{
name: 'apple2',
checked: false,
disabled: false,
content: "木糖少女小紫薯西装领连衣裙夏季新款女装夏收腰格子格纹裙子",
url: '../../static/image/tosign/tosigin(5).png',
id : '2'
},
{
name: 'appl3e',
checked: false,
disabled: false,
content: "木糖少女小紫薯西装领连衣裙夏季新款女装夏收腰格子格纹裙子",
url: '../../static/image/tosign/tosigin(5).png',
id : '3'
},
],
List_tosign : []
export default {
data() {
return {
form: {
name: '',
intro: '',
sex: ''
},
// 演示地址,请勿直接使用
action: 'http://www.example.com/upload',
fileList: [],
fileListes: ['美妆', '博主穿搭', '美妆', '美妆', '美妆', '美妆', '美妆', '博主穿搭'],
show: false,
show_two: false,
filesList: [],
arres_list: [],
checked: false,
list: [],
List_tosign: [],
scrollTop: 0
};
},
onLoad() {
// 定义删除数组的方法
Array.prototype.remove = function(val) {
var index = this.indexOf(val);
if (index > -1) {
this.splice(index, 1);
}
};
// 缓存取选择好的数据
this.tosign();
},
methods: {
changes() {
let that = this;
that.show_two = false;
console.log(that.arres_list);
// 过滤数组
that.arres_list = [...new Set(that.arres_list)];
console.log(that.arres_list);
},
show_add() {
console.log(this.show);
this.show = !this.show;
},
// 选中某个复选框时由checkbox时触发
checkboxChange(e) {
let id = e.name;
if (e.value == true) {
this.pushes(id);
}else{
this.delarr(id)
}
console.log(this.arres_list)
},
onLoad(){
// 缓存取选择好的数据
this.tosign()
},
methods: {
changes() {
let that = this;
that.show_two = false;
console.log(that.arres_list);
// 过滤数组
that.arres_list = [...new Set(that.arres_list)];
console.log(that.arres_list)
},
show_add() {
console.log(this.show)
this.show = !this.show
},
// 选中某个复选框时由checkbox时触发
checkboxChange(e) {
console.log(e);
if(e.value == true){
let id = e.name;
this.pushes(id)
}
},
pushes(id){
var that = this;
console.log(id)
if(id == ''){
console.log("为空")
}else{
that.arres_list.push(id);
}
},
// 选中任一checkbox时由checkbox-group触发
checkboxGroupChange(e) {
console.log(e);
},
tosign(){
console.log("111")
this.$u.api.documentInfo({
document_code: 'privacy'
}).then((res)=>{
console.log(res)
})
try {
const value = uni.getStorageSync('list_tosign');
if (value) {
console.log(value);
}
} catch (e) {
// error
}
// 删除直播商品
delarr(id) {
var that = this;
if (id == '') {
console.log('为空');
} else {
that.arres_list.remove(id);
}
},
// 增加直播商品
pushes(id) {
var that = this;
if (id == '') {
console.log('为空');
} else {
that.arres_list.push(id);
}
},
tosign() {
console.log('111');
this.$u.api.canselectgood({}).then(res => {
console.log(res);
if(res.data.live_stataes==0){
this.$u.route({
url: `/pages/${url}`
});
}else{
let arr = res.data.list
for(let index in arr){
arr[index].checked=false
}
this.list = arr
}
});
// try {
// const value = uni.getStorageSync('list_tosign');
// if (value) {
// console.log(value);
// }
// } catch (e) {
// // error
// }
}
}
};
</script>
<style lang="scss" scoped>
#release {
width: 690rpx;
margin: 0 auto;
#release {
width: 690rpx;
margin: 0 auto;
.form-view {
background: rgba(255, 120, 15, 1);
border-radius: 6rpx;
margin-right: 20rpx;
font-size: 24rpx;
padding: 8rpx 20rpx;
display: inline-block;
margin-bottom: 28rpx;
color: #fff;
}
.titles {
font-size: 30rpx;
font-weight: 400;
color: rgba(51, 51, 51, 1);
margin: 30rpx 0;
}
textarea {
font-size: 26rpx;
}
.custom-style {
background: rgba(255, 120, 15, 1) !important;
color: #fff !important;
font-size: 36rpx;
}
.custom-style-button {
background: rgba(255, 120, 15, 1) !important;
color: #fff !important;
font-size: 28rpx;
width: 200rpx;
margin-bottom: 23rpx;
line-height: 60rpx;
height: 60rpx;
}
.show_two .title {
width: 100%;
border-bottom: solid 1px #ECECEC;
margin-bottom: 30rpx;
}
.show_two .title>text {
font-size: 30rpx;
padding: 30rpx;
display: block;
}
.listes_shoping {
overflow: hidden;
zoom: 1;
margin-bottom: 30rpx;
height: 160rpx;
position: relative;
}
.listes_shoping>view {
float: left;
}
.listes_shoping>view:nth-child(1) {
width: 36rpx;
height: 36rpx;
margin-top: 62rpx;
margin-left: 30rpx;
}
.listes_shoping>view:nth-child(2) {
width: 180rpx;
height: 160rpx;
margin: 0 31rpx 0 19rpx;
}
.listes_shoping>view:nth-child(2) image {
width: 100%;
}
.listes_shoping>view:nth-child(3) {
width: 425rpx;
margin-top: 43rpx;
overflow: hidden;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.u-button {
background: #FF780F;
width: 690rpx;
height: 98rpx;
line-height: 98rpx;
background: rgba(255, 120, 15, 1);
border-radius: 49px;
font-size: 36rpx;
color: #FFFFFF;
text-align: center;
margin: 0 auto 20rpx;
}
.form-view {
background: rgba(255, 120, 15, 1);
border-radius: 6rpx;
margin-right: 20rpx;
font-size: 24rpx;
padding: 8rpx 20rpx;
display: inline-block;
margin-bottom: 28rpx;
color: #fff;
}
.u-mode-center-box {
padding: 120rpx;
.text {
font-size: 30rpx;
margin-top: 74rpx;
text-align: center;
font-weight: 500;
color: #333;
}
.scroll {
width: 100%;
height: 400px;
}
.titles_border,
.uni-textarea-compute {
border: 1px #BABABA solid !important;
padding: 10rpx;
border-radius: 10rpx;
}
.u-inputes {
margin: 30rpx 0;
border: 1px #ececec solid;
padding-left: 14rpx;
width: 420rpx;
}
.show_two {
padding: 30rpx 0 70rpx 0;
}
.show_two>view {
.titles {
font-size: 30rpx;
font-weight: 400;
color: rgba(51, 51, 51, 1);
margin: 30rpx 0;
}
.show_two .images {
width: 22rpx;
height: 12rpx;
float: right;
top: 14rpx;
textarea {
font-size: 26rpx;
}
.List_tosign {
.custom-style {
background: rgba(255, 120, 15, 1) !important;
color: #fff !important;
font-size: 36rpx;
}
.custom-style-button {
background: rgba(255, 120, 15, 1) !important;
color: #fff !important;
font-size: 28rpx;
width: 200rpx;
margin-bottom: 23rpx;
line-height: 60rpx;
height: 60rpx;
}
.show_two .title {
width: 100%;
border-bottom: solid 1px #ececec;
margin-bottom: 30rpx;
}
.show_two .title > text {
font-size: 30rpx;
padding: 30rpx;
display: block;
}
.listes_shoping {
overflow: hidden;
zoom: 1;
margin-top: 21rpx;
margin-bottom: 30rpx;
height: 160rpx;
position: relative;
}
.List_tosign > view{
.listes_shoping > view {
float: left;
}
.List_tosign> view:nth-child(1) {
.listes_shoping > view:nth-child(1) {
width: 36rpx;
height: 36rpx;
margin-top: 62rpx;
margin-left: 30rpx;
}
.listes_shoping > view:nth-child(2) {
width: 180rpx;
height: 160rpx;
margin-bottom: 30rpx;
image{
border-radius: 15rpx;
width: 100%;
height: 100%;
}
margin: 0 31rpx 0 19rpx;
}
.List_tosign> view:nth-child(2) {
width: 420rpx;
height: 76rpx;
margin: 43rpx 43rpx 0 21rpx;
.listes_shoping > view:nth-child(2) image {
width: 100%;
}
.List_tosign> view:nth-child(3) {
width: 26rpx;
height: 27rpx;
position: absolute;
top: 0;
right: 0;
bottom: 0;
margin: auto;
image{
width: 100%;
height: 100%;
display: block;
}
.listes_shoping > view:nth-child(3) {
width: 425rpx;
margin-top: 43rpx;
overflow: hidden;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.u-button {
background: #ff780f;
width: 690rpx;
height: 98rpx;
line-height: 98rpx;
background: rgba(255, 120, 15, 1);
border-radius: 49px;
font-size: 36rpx;
color: #ffffff;
text-align: center;
margin: 0 auto 20rpx;
}
}
.u-mode-center-box {
padding: 120rpx;
.text {
font-size: 30rpx;
margin-top: 74rpx;
text-align: center;
font-weight: 500;
color: #333;
}
}
.titles_border,
.uni-textarea-compute {
border: 1px #bababa solid !important;
padding: 10rpx;
border-radius: 10rpx;
}
.u-inputes {
margin: 30rpx 0;
border: 1px #ececec solid;
padding-left: 14rpx;
width: 420rpx;
}
.show_two {
padding: 30rpx 0 70rpx 0;
}
.show_two > view {
font-size: 30rpx;
font-weight: 400;
color: rgba(51, 51, 51, 1);
}
.show_two .images {
width: 22rpx;
height: 12rpx;
float: right;
top: 14rpx;
}
.List_tosign {
overflow: hidden;
zoom: 1;
margin-top: 21rpx;
position: relative;
}
.List_tosign > view {
float: left;
}
.List_tosign > view:nth-child(1) {
width: 180rpx;
height: 160rpx;
margin-bottom: 30rpx;
image {
border-radius: 15rpx;
width: 100%;
height: 100%;
}
}
.List_tosign > view:nth-child(2) {
width: 420rpx;
height: 76rpx;
margin: 43rpx 43rpx 0 21rpx;
}
.List_tosign > view:nth-child(3) {
width: 26rpx;
height: 27rpx;
position: absolute;
top: 0;
right: 0;
bottom: 0;
margin: auto;
image {
width: 100%;
height: 100%;
display: block;
}
}
</style>

View File

@@ -28,7 +28,7 @@
<!-- 标签的引入 -->
<tap_tosign :fileListes="fileListes" @chuangjian="chuangjian" @qiehuan="qiehuan"></tap_tosign>
<view class="titles">直播封面图</view>
<u-upload :form-data="{'name':'article_cover'}" action='https://dmmall.sdbairui.com/storeapi/Upload/uploadFile' name="article_cover" :max-count="1" :show-progress="false" @on-change="tupian" del-color="#ececec" upload-text="上传" del-bg-color="#fff"></u-upload>
<u-upload :form-data="{'name':'article_cover'}" action='https://dmmall.sdbairui.com/storeapi/Upload/uploadFile' name="article_cover" :header="{'Authorization' : 'Bearer' + ' ' + token}" :max-count="1" :show-progress="true" @on-change="tupian" del-color="#ececec" upload-text="上传" del-bg-color="#fff"></u-upload>
</view>
<view class="button-uview">
<u-button @click="kaibo">{{relerest}}</u-button>
@@ -60,7 +60,8 @@
relerest: '开始直播',
fileListes:[],
rSelect:[],
image:""
image:"",
token:""
};
},
methods: {
@@ -90,7 +91,7 @@
this.init()
},
tupian(a){
console.log(JSON.parse(a.data).data)
console.log(JSON.parse(a.data))
this.image = JSON.parse(a.data).data.file_name
},
navto(url){
@@ -111,7 +112,8 @@
url:"/pages/release/zhibo",
params:{
url:res.data.url.replace("&","*"),
id:res.data.chat_id
id:res.data.chat_id,
live_id: res.data.live_id
}
})
})
@@ -137,6 +139,14 @@
onLoad(){
this.init()
uni.removeStorageSync('gouwudai')
//
this.token = uni.getStorageSync('token');
var config = {
appkey: 'mgb7ka1',
debug:true
};
}
};
</script>
@@ -472,5 +482,6 @@
left: 0;
right: 0;
margin: auto;
z-index: 10;
}
</style>

View File

@@ -15,6 +15,37 @@
<!-- 简介 -->
<view class="titles">正文</view>
<textarea placeholder="请输入内容..."></textarea>
<view class="show_two">
<u-popup v-model="show_two" mode="bottom" :closeable="true">
<view class="title"><text>选择商品</text></view>
<!-- 商品列表 -->
<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll" >
<view class="listes_shoping" v-for="(item, index) in list" :key="index">
<view>
<u-checkbox-group>
<u-checkbox @change="checkboxChange" shape="circle" active-color="#FF780F" v-model="item.checked" :name="item.goods_id"></u-checkbox>
</u-checkbox-group>
</view>
<view><image :src="item.goods_image" mode="widthFix"></image></view>
<view class="contentes">{{ item.goods_name }}</view>
</view>
</scroll-view>
<!-- 提交按钮 -->
<view class="u-button" @click="changes()">确定</view>
</u-popup>
<!-- 底部选择商品列表 -->
<view @click="show_two = true">
选择商品
<image class="images" src="../../static/image/tosign/bhottom.png"></image>
</view>
<!-- 选择后的列表 -->
<view class="List_tosign">
<view><image src="../../static/image/tosign/tosigin(5).png" mode="scaleToFill"></image></view>
<view>木糖少女小紫薯西装领连衣裙夏季新款女装夏收腰格子格纹裙子</view>
<view><image src="../../static/image/tosign/delete.png" mode="widthFix"></image></view>
</view>
</view>
<!-- 提交 -->
<u-button class="custom-style" shape="circle" size="default">发表</u-button>
</u-form>
@@ -44,17 +75,65 @@
action: 'http://www.example.com/upload',
fileList: [],
fileListes:["美妆","博主穿搭","美妆","美妆","美妆","美妆","美妆","博主穿搭"],
show: false
show: false,
show_two: false,
arres_list: [],
list: [],
scrollTop: 0
}
},
onLoad() {
// 定义删除数组的方法
Array.prototype.remove = function(val) {
var index = this.indexOf(val);
if (index > -1) {
this.splice(index, 1);
}
};
},
methods:{
show_add(){
console.log(this.show)
this.show = !this.show
}
},
// 选择直播商品点击确定
changes() {
let that = this;
that.show_two = false;
console.log(that.arres_list);
},
// 选中某个复选框时由checkbox时触发
checkboxChange(e) {
let id = e.name;
if (e.value == true) {
this.pushes(id);
}else{
this.delarr(id)
}
console.log(this.arres_list)
},
// 删除直播商品
delarr(id) {
var that = this;
if (id == '') {
console.log('为空');
} else {
that.arres_list.remove(id);
}
},
// 增加直播商品
pushes(id) {
var that = this;
if (id == '') {
console.log('为空');
} else {
that.arres_list.push(id);
}
},
},
components: {
}
}
}
</script>
@@ -62,6 +141,125 @@
#release{
width: 690rpx;
margin: 0 auto;
.show_two {
padding: 30rpx 0 70rpx 0;
}
.scroll {
width: 100%;
height: 400px;
}
.u-button {
background: #ff780f;
width: 690rpx;
height: 98rpx;
line-height: 98rpx;
background: rgba(255, 120, 15, 1);
border-radius: 49px;
font-size: 36rpx;
color: #ffffff;
text-align: center;
margin: 0 auto 20rpx;
}
.show_two .title {
width: 100%;
border-bottom: solid 1px #ececec;
margin-bottom: 30rpx;
}
.show_two .title > text {
font-size: 30rpx;
padding: 30rpx;
display: block;
}
.show_two > view {
font-size: 30rpx;
font-weight: 400;
color: rgba(51, 51, 51, 1);
}
.show_two .images {
width: 22rpx;
height: 12rpx;
float: right;
top: 14rpx;
}
.List_tosign {
overflow: hidden;
zoom: 1;
margin-top: 21rpx;
position: relative;
}
.List_tosign > view {
float: left;
}
.List_tosign > view:nth-child(1) {
width: 180rpx;
height: 160rpx;
margin-bottom: 30rpx;
image {
border-radius: 15rpx;
width: 100%;
height: 100%;
}
}
.List_tosign > view:nth-child(2) {
width: 420rpx;
height: 76rpx;
margin: 43rpx 43rpx 0 21rpx;
}
.List_tosign > view:nth-child(3) {
width: 26rpx;
height: 27rpx;
position: absolute;
top: 0;
right: 0;
bottom: 0;
margin: auto;
image {
width: 100%;
height: 100%;
display: block;
}
}
.listes_shoping {
overflow: hidden;
zoom: 1;
margin-bottom: 30rpx;
height: 160rpx;
position: relative;
}
.listes_shoping > view {
float: left;
}
.listes_shoping > view:nth-child(1) {
width: 36rpx;
height: 36rpx;
margin-top: 62rpx;
margin-left: 30rpx;
}
.listes_shoping > view:nth-child(2) {
width: 180rpx;
height: 160rpx;
margin: 0 31rpx 0 19rpx;
}
.listes_shoping > view:nth-child(2) image {
width: 100%;
}
.listes_shoping > view:nth-child(3) {
width: 425rpx;
margin-top: 43rpx;
overflow: hidden;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.form-view{
background:rgba(255,120,15,1);
border-radius:6rpx;

View File

@@ -1,7 +1,7 @@
<template>
<div>
<live-pusher id='livePusher' ref="livePusher" class="livePusher" :url="url"
mode="SD" :muted="true" :enable-camera="true" :auto-focus="true" :beauty="1" whiteness="2"
mode="SD" :muted="false" :enable-camera="true" :auto-focus="true" :beauty="meiyan + 1" whiteness="2"
aspect="9:16" @statechange="statechange" @netstatus="netstatus" @error = "error"
:style="{'height':height + 'px'}"
></live-pusher>
@@ -41,9 +41,33 @@
<image class="userhead" :src="info.member_avatar"></image>
<div class="userinfo">
<text class="username">{{info.member_name}}</text>
<text class="username" style="font-size:20rpx">asdasdsa | sadasdas</text>
<text class="username" style="font-size:20rpx">{{time}} | sadasdas</text>
</div>
</div>
<image class="closeimg" src="../../static/image/close.png" @click="closes"></image>
<image class="menuimg" src="../../static/image/menu.png" @click="tool = true"></image>
<image class="shoptapimg" @click="xianshi" src="../../static/image/shop.png"></image>
<text style="font-size:26rpx;color:#fff;width:512rpx;position:fixed;left:30rpx;top:793rpx">德铭阳光在线绿色直播请遵循相关法律法规警察叔叔24小时巡查哦。为了保障直播系统稳定现将全局开放防主播沉迷功能。主播积累直播16小时将自动下播休息2小时后方可继续开播。请大家注意休息/避免空播。
</text>
<div class="bottom" :style="{'height':height + 'px'}" v-if="tool" @click="tool = false">
<view class="menu" @click="zuzhi">
<view class="menuback"></view>
<text class="menutitle">直播工具</text>
<view class="menutool">
<view class="menutoolitem" @click="switchCamera">
<image class="menutoolitemimg"></image>
<text class="menutoolitemtitle">翻转</text>
</view>
<picker @change="bindPickerChange" :value="meiyan" :range="[1,2,3,4,5,6,7,8,9]">
<view class="menutoolitem">
<image class="menutoolitemimg"></image>
<text class="menutoolitemtitle">美颜</text>
</view>
</picker>
</view>
</view>
</div>
<!-- <button class="btn" @click="start">开始推流1</button>
<button class="btn" @click="pause">暂停推流</button>
<button class="btn" @click="resume">resume</button>
@@ -56,6 +80,27 @@
</div>
</template>
<style lang="scss" scoped>
.shoptapimg{
width: 65rpx;
height: 65rpx;
position: fixed;
right: 26rpx;
bottom: 24rpx;
}
.menuimg{
width: 60rpx;
height: 55rpx;
position: fixed;
left: 26rpx;
bottom: 24rpx;
}
.closeimg{
position: fixed;
top: 70rpx;
right: 31rpx;
width: 31rpx;
height: 31rpx;
}
.username{
font-size: 24rpx;
color: #fff;
@@ -97,7 +142,6 @@
.shopimg{
width: 160rpx;
height: 160rpx;
background-color: #0f0;
}
@@ -164,18 +208,67 @@
z-index: 20;
}
.menu{
width: 750rpx;
height: 335rpx;
border-top-left-radius: 20rpx;
border-top-right-radius: 20rpx;
overflow: hidden;
position: fixed;
bottom: 0;
left: 0;
}
.menuback{
background-color: #000;
opacity: 0.8;
position: absolute;
border-top-left-radius: 20rpx;
border-top-right-radius: 20rpx;
overflow: hidden;
top: 0;
left: 0;
}
.menutitle{
font-size: 30rpx;
color: #fff;
margin-left: 30rpx;
margin-top: 30rpx;
}
.menutool{
flex-direction: row;
margin-top: 59rpx;
margin-left: 30rpx;
}
.menutoolitem{
align-items: center;
margin-right: 60rpx;
}
.menutoolitemtitle{
margin-top: 30rpx;
font-size: 28rpx;
color: #fff;
}
.menutoolitemimg{
width: 100rpx;
height: 100rpx;
}
</style>
<script>
const RongIMLib = require('../../static/rongyun.js');
const RongIMLib = require('../../static/rongyun.js');
export default {
data: {
fil: true,
url:'',
height:0,
show:true,
show:false,
list:[],
info:{},
im:{}
im:{},
chatroom_id:0,
live_id:0,
tool:false,
meiyan:0,
time:'00:00:00'
},
onReady() {
// 注意需要在onReady中 或 onLoad 延时
@@ -195,10 +288,13 @@ const RongIMLib = require('../../static/rongyun.js');
this.url = a.url.replace("*","&")
let that = this
const token = uni.getStorageSync('token');
console.log('Bearer' + " " + token)
this.chatroom_id = a.id
this.live_id = a.live_id
uni.request({
url:"https://dmmall.sdbairui.com//storeapi/Streaming/liveStreamList",
url:"https://dmmall.sdbairui.com/storeapi/Streaming/liveStreamList",
method:"POST",
headers:{
header:{
'Authorization' : 'Bearer' + " " + token
},
success(res){
@@ -209,56 +305,130 @@ const RongIMLib = require('../../static/rongyun.js');
uni.request({
url:"https://dmmall.sdbairui.com/storeapi/member/memberInfo",
method:"POST",
headers:{
header:{
'Authorization' : 'Bearer' + " " + token
},
success(res){
console.log(res.data.data.memberInfo)
console.log(res.data)
that.info = res.data.data.memberInfo
}
})
var config = {
appkey: 'mgb7ka1',
debug:true
};
var im = RongIMLib.init(config);
var conversationList = []; // 当前已存在的会话列表
im.watch({
conversation: function(event){
var updatedConversationList = event.updatedConversationList; // 更新的会话列表
console.log('更新会话汇总:', updatedConversationList);
console.log('最新会话列表:', im.Conversation.merge({
conversationList,
updatedConversationList
}));
},
message: function(event){
var message = event.message;
console.log('收到新消息:', message);
},
status: function(event){
var status = event.status;
console.log('连接状态码:', status);
let shi = 0;
let fen = 0;
let miao = 0;
setInterval(() => {
shi = parseInt(shi)
fen = parseInt(fen)
miao = parseInt(miao)
miao = miao + 1
console.log(miao)
if(miao == 60){
miao = 0;
fen +=1
}
});
var user = {
token: uni.getStorageSync('rongyun')
};
im.connect(user).then(function(user) {
console.log('链接成功, 链接用户 id 为: ', user.id);
}).catch(function(error) {
console.log('链接失败: ', error.code, error.msg);
});
var chatRoom = im.ChatRoom.get({
id: a.id
});
chatRoom.join({
count: 20 // 进入后, 自动拉取 20 条聊天室最新消息
}).then(function() {
console.log('加入聊天室成功');
});
if(fen == 60){
shi += 1
fen = 0
}
if(shi < 10){
shi = '0' + shi
}
if(fen < 10){
fen = '0' + fen
}
if(miao < 10){
miao = '0' + miao
}
that.time = shi + ":" + fen + ":" + miao
}, 1000);
// var config = {
// appkey: 'mgb7ka1',
// debug:true
// };
// var im = RongIMLib.init(config);
// var conversationList = []; // 当前已存在的会话列表
// im.watch({
// conversation: function(event){
// var updatedConversationList = event.updatedConversationList; // 更新的会话列表
// console.log('更新会话汇总:', updatedConversationList);
// console.log('最新会话列表:', im.Conversation.merge({
// conversationList,
// updatedConversationList
// }));
// },
// message: function(event){
// var message = event.message;
// console.log('收到新消息:', message);
// },
// status: function(event){
// var status = event.status;
// console.log('连接状态码:', status);
// }
// });
// var user = {
// token: uni.getStorageSync('rongyun')
// };
// console.log(user,123)
// im.connect(user).then(function(user) {
// console.log('链接成功, 链接用户 id 为: ', user.id);
// }).catch(function(error) {
// console.log('链接失败: ', error.code, error);
// });
// var chatRoom = im.ChatRoom.get({
// id: a.id
// })
// chatRoom.join({
// count: 20 // 进入后, 自动拉取 20 条聊天室最新消息
// }).then(function() {
// console.log('加入聊天室成功');
// }).catch((err)=>{
// console.log(err,262)
// })
},
methods: {
bindPickerChange(a){
console.log(a.detail.value)
this.meiyan = a.detail.value
uni.showToast({
title: '切换成功',
duration: 2000
});
},
closes(){
const token = uni.getStorageSync('token');
let that = this
console.log(that.url)
uni.showModal({
title: '提示',
content: '是否关闭直播',
success: function (res) {
if (res.confirm) {
uni.request({
url:"https://dmmall.sdbairui.com/storeapi/Streaming/destroyChatRoom",
data:{
chatroom_id:that.chatroom_id,
live_id:that.live_id,
url: that.url
},
method:"POST",
header:{
"Authorization" : 'Bearer' + " " + token
},
success(res){
console.log(res)
uni.navigateBack({
delta: 1
});
// that.list= res.data.data
}
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
statechange(e) {
console.log("statechange:" + JSON.stringify(e));
},
@@ -338,6 +508,10 @@ const RongIMLib = require('../../static/rongyun.js');
}
});
},
xianshi(){
this.show = true;
console.log(111)
},
guanbi(){
this.show = false
console.log(123)
@@ -361,7 +535,7 @@ const RongIMLib = require('../../static/rongyun.js');
data:{
goods_id:arr.join(',')
},
headers:{
header:{
'Authorization' : 'Bearer' + " " + token
},
success(res){
@@ -369,7 +543,7 @@ const RongIMLib = require('../../static/rongyun.js');
uni.request({
url:"https://dmmall.sdbairui.com//storeapi/Streaming/liveStreamList",
method:"POST",
headers:{
header:{
'Authorization' : 'Bearer' + " " + token
},
success(res){

View File

@@ -1,23 +1,47 @@
<template>
<view class="complaint">
<view class="complaint-item" v-for="(item, index) in 4" :key="index" @click="toDetailsPage">
<ComplaintItem></ComplaintItem>
<view class="complaint-item" v-for="(item, index) in list" :key="index" @click="toDetailsPage(item.complain_id)">
<ComplaintItem :info="item"></ComplaintItem>
</view>
<u-toast ref="uToast" />
</view>
</template>
<script>
import ComplaintItem from '@/components/complaint-item/index'
export default {
data() {
return {}
return {
list:[]
}
},
components: {
ComplaintItem
},
onLoad() {
this.getlist()
},
methods: {
toDetailsPage() {
// 获取投诉列表
getlist(){
this.$u.api.reportlist({}).then(res => {
console.log(res)
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
let arr = res.data.dataList
for(let index in arr){
this.list.push(arr[index])
}
}
});
},
toDetailsPage(id) {
uni.navigateTo({
url: '/pages/user/complaintDetails'
url: '/pages/user/complaintDetails?id='+id
});
}
},

View File

@@ -1,10 +1,10 @@
<template>
<view class="details">
<view class="goods-info">
<image></image>
<image :src="info.complain_goods_image"></image>
<view class="text">
<view class="name u-line-1">心机小黑裙连衣裙赫本风夏季爆款dlk...</view>
<view class="num">件商品</view>
<view class="name u-line-1">{{info.complain_goods_name}}</view>
<view class="num">{{info.complain_goods_num}}件商品</view>
</view>
</view>
<view class="worker-info">
@@ -12,28 +12,51 @@
<view class="item">
<view>
<view class="item-title">姓名</view>
<view class="value">李先生</view>
<view class="value">{{info.takeawayer_name}}</view>
</view>
<view>
<view class="item-title">手机号</view>
<view class="value">1561</view>
<view class="value">{{info.takeawayer_mobile}}</view>
</view>
<view>
<view class="item-title">公司名称</view>
<view class="value">申通快递公司</view>
<view class="value">{{info.company}}</view>
</view>
</view>
</view>
<view class="reason">
<view class="title">投诉原因</view>
<view class="value u-line-4">太慢了太慢了</view>
<view class="value u-line-4">{{info.complain_desc}}</view>
</view>
<u-toast ref="uToast" />
</view>
</template>
<script>
export default {
data() {
return {}
return {
info:{}
}
},
onLoad(option) {
this.getinfo(option.id)
},
methods:{
getinfo(id){
let that = this;
this.$u.api.reportdetail({
id: id
}).then(res => {
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
this.info = res.data.info;
}
});
}
}
};
</script>

View File

@@ -1,94 +1,167 @@
<template>
<view class="content">
<view class="tab-swiper">
<u-tabs-swiper ref="uTabs" :list="list" :current="current" @change="tabsChange" active-color="#FF780F" inactive-color="#333333" font-size="30" gutter="317" height="98" :show-bar="false" swiperWidth="750" :is-scroll=false></u-tabs-swiper>
<u-tabs-swiper
ref="uTabs"
:list="list"
:current="current"
@change="tabsChange"
active-color="#FF780F"
inactive-color="#333333"
font-size="30"
gutter="317"
height="98"
:show-bar="false"
swiperWidth="750"
:is-scroll="false"
></u-tabs-swiper>
</view>
<view class="box">
<view v-for="(item, index) in newlist" :key="index"><ContentItem :info="item" :type="type" @del="del"></ContentItem></view>
</view>
<swiper :current="swiperCurrent" @animationfinish="animationfinish">
<swiper-item class="swiper-item">
<scroll-view scroll-y style="height: 100%;width: 100%;" class="list">
<view v-for="(item, index) in 5" :key="index">
<ContentItem :cur="current" :delItem="showPopup"></ContentItem>
</view>
</scroll-view>
</swiper-item>
<swiper-item class="swiper-item">
<scroll-view scroll-y style="height: 100%;width: 100%;" class="video-list">
<view v-for="(item, index) in 5" :key="index">
<ContentItem :cur="current" :delItem="showPopup"></ContentItem>
</view>
</scroll-view>
</swiper-item>
</swiper>
<u-popup v-model="show" mode="center">
<view class="close-popup">
<view class="tips">确定要删除该视频吗</view>
<view class="tips">{{msg}}</view>
<view class="btn">
<view class="cancel" @click="show=false">取消</view>
<view class="confirm">确定</view>
<view class="cancel" @click="show = false">取消</view>
<view class="confirm" @click="delarticle">确定</view>
</view>
</view>
</u-popup>
<u-toast ref="uToast" />
</view>
</template>
<script>
import ContentItem from '@/components/content-item/index'
import ContentItem from '@/components/content-item/index';
export default {
data() {
return {
show: false,
current: 0,
swiperCurrent: 0,
list: [{
name: '图文'
}, {
name: '视频'
}],
}
list: [
{
name: '图文'
},
{
name: '视频'
}
],
type: 1,
num: 1,
newlist: [],
delid:null,
msg:""
};
},
components: {
ContentItem
},
onLoad() {
this.getlist();
},
onReachBottom() {
this.num++;
this.getlist();
},
methods: {
showPopup() {
getlist() {
let that = this;
this.$u.api.articlelist({
type: that.type,
page: that.num
}).then(res => {
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
let arr = res.data.articleList;
for (let index in arr) {
that.newlist.push(arr[index]);
}
}
});
},
del(e) {
// 提示是否删除弹窗
if(this.type==1){
this.msg="确定要删除该图文吗?"
}else{
this.msg="确定要删除该视频吗?"
}
this.show = true;
this.delid = e
},
// 删除文章
delarticle(){
let that = this;
that.show = false;
this.$u.api.delarticle({
article_id: that.delid
}).then(res => {
console.log(res)
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
this.$refs.uToast.show({
title: res.message,
type: 'success'
});
// 删除后更新页面
this.delid = null
this.newlist = [];
that.num=1
that.getlist()
}
});
},
tabsChange(index) {
this.swiperCurrent = index;
},
animationfinish(e) {
let current = e.detail.current;
// this.$refs.uTabs.setFinishCurrent(current);
this.swiperCurrent = current;
this.current = current;
},
},
this.current = index;
this.type = index + 1;
this.num = 0;
this.newlist = [];
this.getlist();
}
}
};
</script>
<style lang="scss" scoped>
.tab-swiper {
width: 100%;
position: fixed;
top: 0;
margin-bottom: 20rpx;
z-index: 1000;
}
.content {
min-height: calc(100vh - var(--window-top));
background-color: #ECECEC;
background-color: #ececec;
display: flex;
flex-direction: column;
> uni-swiper {
flex: 1;
}
.tab-swiper {
margin: 2rpx 0 20rpx 0;
.box{
padding-top: 120rpx;
}
.close-popup {
background:rgba(255,255,255,1);
background: rgba(255, 255, 255, 1);
border-radius: 10rpx;
.tips {
width: 420rpx;
font-size: 28rpx;
color: rgba(102,102,102,1);
color: rgba(102, 102, 102, 1);
text-align: center;
padding: 38rpx 0;
}
.btn {
width: 420rpx;
border-top: 2rpx #ECECEC solid;
border-top: 2rpx #ececec solid;
display: flex;
> view {
font-size: 26rpx;
@@ -98,12 +171,12 @@ export default {
}
.cancel {
color: #333333;
border-right: 2rpx #ECECEC solid;
border-right: 2rpx #ececec solid;
}
.confirm {
color: #FF780F;
color: #ff780f;
}
}
}
}
</style>
</style>

View File

@@ -1,77 +1,179 @@
<template>
<view class="details">
<view class="main"></view>
<view></view>
<view class="main">
<view class="title">{{ info.article_title }}</view>
<view class="detail">{{ info.article_content }}</view>
</view>
<view class="imgbox">
<view v-if="type==1">
<image :src="list" mode="" v-for="list in info.article_image"></image>
</view>
<view v-else>
<video :src="info.video_path" controls></video>
</view>
</view>
<view class="data-list">
<view>
<image src="/static/image/user/2.png"></image>
<text>2.5w</text>
<text>{{ info.comment_num }}</text>
</view>
<view>
<image src="/static/image/user/3.png" v-if="0"></image>
<image src="/static/image/user/7.png" v-else></image>
<text>2.5w</text>
<text>{{ info.collect_num }}</text>
</view>
<view>
<image src="/static/image/user/4.png" v-if="0"></image>
<image src="/static/image/user/6.png" v-else></image>
<text>2.5w</text>
<text>{{ info.like_num }}</text>
</view>
</view>
<view class="comment-list">
<view class="item" v-for="(item, index) in 4" :key="index">
<view class="item" v-for="(item, index) in info.articlecomment" :key="index">
<view class="info">
<image></image>
<view class="center">
<view class="name">用户1</view>
<view class="time">6小时前</view>
<view class="name">{{item.member_nickname}}</view>
<view class="time">{{item.create_time}}</view>
</view>
<view class="btn" @click="showChat=true">回复</view>
<view class="btn" @click="showreply(item.id)">回复</view>
</view>
<view class="content u-line-1">德铭阳光赞德铭阳光赞德铭阳光赞</view>
<view class="content u-line-1">{{item.content}}</view>
</view>
</view>
<u-popup v-model="showChat" mode="bottom" :mask=false>
<u-popup v-model="showChat" mode="bottom" :mask="false">
<view class="chat">
<view class="input-box">
<input type="text">
<view class="btn">发送</view>
<input type="text" v-model="content"/>
<view class="btn" @click="reply">发送</view>
</view>
</view>
</u-popup>
<u-toast ref="uToast" />
</view>
</template>
<script>
export default {
data() {
return {
showChat: false
}
showChat: false,
id: 0,
info: {
article_image: []
},
type:1,
content:"",
pid:null
};
},
onLoad(option) {
this.setNavTitle(option.current);
this.type = option.current
this.id = option.id;
this.getdetail();
},
methods: {
// 展示回复弹框
showreply(id){
this.showChat = true
this.pid = id
},
// 回复评论
reply(){
if(this.content==""){
this.$refs.uToast.show({
title:"内容不能为空",
type: 'error'
});
return
}
let that = this;
this.$u.api.reply({
pid:that.pid,
content:that.content,
article_id: that.id
}).then(res => {
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
this.pid = "";
this.content = "";
this.$refs.uToast.show({
title: res.message,
type: 'success'
});
}
});
},
// 设置顶部标题
setNavTitle(current) {
uni.setNavigationBarTitle({
title: current == 0 ? "图文详情" : "视频详情"
title: current == 1 ? '图文详情' : '视频详情'
});
},
// 获取文章详情
getdetail() {
let that = this;
this.$u.api.getdetail({
article_id: that.id
}).then(res => {
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
this.info = res.data.article[0];
}
});
}
},
}
};
</script>
<style lang="scss" scoped>
.details {
min-height: calc(100vh - var(--window-top));
background-color: #ECECEC;
background-color: #ececec;
.main {
height: 740rpx;
margin: 2rpx 0rpx;
margin: 2rpx 0rpx 0;
background-color: #ffffff;
.title {
width: 100%;
text-align: center;
font-weight: bold;
font-size: 34rpx;
padding: 30rpx 0;
}
.detail {
width: 100%;
text-indent: 40rpx;
font-size: 26rpx;
text-align: justify;
padding: 0 30rpx 85rpx;
}
}
.imgbox {
width: 750rpx;
display: flex;
justify-content: flex-start;
background-color: #FFFFFF;
image {
width: 210rpx;
height: 210rpx;
margin: 10rpx 15rpx;
}
video {
width: 210rpx;
height: 210rpx;
margin: 10rpx 15rpx;
}
}
.comment-list {
.item {
background-color: #FFFFFF;
background-color: #ffffff;
padding: 30rpx;
margin-bottom: 2rpx;
.info {
@@ -89,17 +191,17 @@ export default {
margin-right: auto;
.name {
font-size: 26rpx;
color: rgba(51,51,51,1);
color: rgba(51, 51, 51, 1);
margin-bottom: auto;
}
.time {
font-size: 22rpx;
color: rgba(153,153,153,1);
color: rgba(153, 153, 153, 1);
}
}
.btn {
font-size: 26rpx;
color: rgba(51,51,51,1);
color: rgba(51, 51, 51, 1);
}
}
.content {
@@ -109,7 +211,7 @@ export default {
}
}
.data-list {
background-color: #FFFFFF;
background-color: #ffffff;
display: flex;
height: 88rpx;
padding: 0 30rpx;
@@ -136,20 +238,20 @@ export default {
}
> text {
font-size: 28rpx;
color: rgba(51,51,51,1);
color: rgba(51, 51, 51, 1);
}
}
}
.chat {
background-color: #ECECEC;
background-color: #ececec;
width: 100%;
height: 98rpx;
padding: 19rpx 30rpx;
.input-box {
background-color: #FFFFFF;
background-color: #ffffff;
width: 690rpx;
height: 60rpx;
background: rgba(255,255,255,1);
background: rgba(255, 255, 255, 1);
border-radius: 30rpx;
display: flex;
align-items: center;
@@ -159,10 +261,10 @@ export default {
}
.btn {
width: 90rpx;
background: rgba(255,120,15,1);
background: rgba(255, 120, 15, 1);
border-radius: 25rpx;
font-size: 26rpx;
color: rgba(255,255,255,1);
color: rgba(255, 255, 255, 1);
line-height: 50rpx;
text-align: center;
margin-right: 5rpx;
@@ -170,4 +272,4 @@ export default {
}
}
}
</style>
</style>

View File

@@ -3,29 +3,54 @@
<view class="lately">
<view class="title">最新</view>
<view class="items">
<view v-for="(item, index) in 3" :key="index">
<FansItem></FansItem>
<view v-for="(item, index) in newfans" :key="index">
<FansItem :info="item"></FansItem>
</view>
</view>
</view>
<view class="before">
<view class="title">早前</view>
<view class="items">
<view v-for="(item, index) in 13" :key="index">
<FansItem></FansItem>
<view v-for="(item, index) in myfans" :key="index">
<FansItem :info="item"></FansItem>
</view>
</view>
</view>
<u-toast ref="uToast" />
</view>
</template>
<script>
import FansItem from '@/components/fans-item/index'
export default {
data() {
return {}
return {
myfans:[],
newfans:[]
}
},
components: {
FansItem
},
onLoad() {
this.fans()
},
methods:{
fans(){
let that = this;
this.$u.api.myfanlist({}).then(res => {
console.log(res);
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
that.myfans = res.data.fans
that.newfans = res.data.fansNewest
console.log(that.myfans,that.newfans)
}
});
}
}
};
</script>

View File

@@ -2,11 +2,11 @@
<view class="user">
<view class="head" @click="toOthersPage('info')">
<view class="info">
<image></image>
<image :src="info.member_avatar"></image>
<view class="name">
<text>萨大赛</text>
<text>账号123456789</text>
<text>个性签名为梦努力</text>
<text>{{info.member_nickname==null?"新用户":info.member_nickname}}</text>
<text>账号{{info.member_name}}</text>
<text>个性签名{{info.signature==""?"该用户很懒没有签名!":info.signature}}</text>
</view>
</view>
<image src="/static/image/user/1.png"></image>
@@ -23,12 +23,36 @@
<text>骑手投诉</text>
<image src="/static/image/user/1.png"></image>
</view>
<u-toast ref="uToast" />
</view>
</template>
<script>
export default {
name:"user",
data() {
return {
info:{}
}
},
onLoad() {
this.getmyinfo()
},
methods: {
// 获取个人信息
getmyinfo(){
let that = this;
this.$u.api.getshopinfo({}).then(res => {
console.log(res);
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
this.info = res.data.memberInfo
}
});
},
toOthersPage(url) {
uni.navigateTo({
url: '/pages/user/' + url
@@ -57,7 +81,6 @@ export default {
width: 110rpx;
height: 110rpx;
border-radius: 50%;
background-color: #0f0;
}
.name{
font-size: 24rpx;

View File

@@ -1,45 +1,105 @@
<template>
<view class="info">
<view class="head" @click="showImage=true">
<image></image>
<text>更换头像</text>
</view>
<view class="item">
<text class="title">用户名</text>
<text class="value">兽兽</text>
</view>
<view class="info">
<view class="head" @click="chooseImage">
<image :src="fileurl" :key="num"></image>
<text>更换头像</text>
</view>
<view class="item">
<text class="title">个性签</text>
<text class="value">变瘦变高变有钱</text>
</view>
<text class="title">用户</text>
<input type="text" value="" v-model="info.member_nickname" placeholder="请输入用户名"/>
</view>
<view class="item">
<text class="title">个性签名</text>
<input type="text" value="" v-model="info.signature" placeholder="请输入个性签名"/>
</view>
<view class="password" @click="updatePwd">
<text>修改密码</text>
<image src="/static/image/user/1.png"></image>
</view>
<u-popup v-model="showImage" mode="bottom">
<view class="image-popup">
<view @click="chooseImage('camera')">拍摄新照片</view>
<view @click="chooseImage('album')">从相册选取</view>
</view>
</u-popup>
</view>
<u-toast ref="uToast" />
</view>
</template>
<script>
export default {
name:"info",
name: 'info',
data() {
return {
showImage: false
}
fileurl: "",
filename:"",
info:{},
num:0
};
},
onLoad() {
this.getmyinfo()
},
onNavigationBarButtonTap() {
let that = this;
this.$u.api.changeinfo({
nickname:that.info.member_nickname,
avatar:that.filename,
signature:that.info.signature
}).then(res => {
console.log(res);
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
this.$refs.uToast.show({
title: res.message,
type: 'success'
});
}
});
},
methods: {
// 获取个人信息
getmyinfo(){
let that = this;
this.$u.api.getshopinfo({}).then(res => {
console.log(res);
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
this.info = res.data.memberInfo
this.fileurl = res.data.memberInfo.member_avatar
}
});
},
// 获取图片,上传图片
chooseImage(sourceType) {
let that = this
const token = uni.getStorageSync('token');
uni.chooseImage({
count: 1,
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
sourceType: [sourceType],
success: function (res) {
success: function(res) {
console.log(JSON.stringify(res.tempFilePaths));
const tempFilePaths = res.tempFilePaths;
that.fileurl = tempFilePaths[0]
uni.uploadFile({
url: 'https://dmmall.sdbairui.com/storeapi/Upload/uploadFile',
filePath: tempFilePaths[0],
name: 'avatar',
formData:{
name:"avatar"
},
header:{
Authorization:'Bearer' + " " + token
},
success: uploadFileRes => {
let obj = JSON.parse(uploadFileRes.data)
that.fileurl = obj.data.file_path
that.filename = obj.data.file_name
that.num++
console.log(that.fileurl,that.filename)
}
});
}
});
},
@@ -48,50 +108,49 @@ export default {
url: '/pages/user/updatePassword'
});
}
},
}
}
};
</script>
<style lang="scss" scoped>
.info{
.info {
min-height: calc(100vh - var(--window-top));
background: #ececec;
.head{
height: 202rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-color: #fff;
background: #ececec;
.head {
height: 202rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-color: #fff;
margin-bottom: 2rpx;
>image{
width: 120rpx;
height: 120rpx;
border-radius: 50%;
background-color: #0f0;
}
>text{
font-size: 24rpx;
color: #FF780F;
margin-top: 20rpx;
}
margin-bottom: 2rpx;
}
> image {
width: 120rpx;
height: 120rpx;
border-radius: 50%;
}
> text {
font-size: 24rpx;
color: #ff780f;
margin-top: 20rpx;
}
margin-bottom: 2rpx;
}
.item {
display: flex;
align-items: center;
height: 98rpx;
background: rgba(255,255,255,1);
background: rgba(255, 255, 255, 1);
padding: 0 30rpx;
margin-bottom: 2rpx;
.title {
width: 120rpx;
font-size: 30rpx;
color: rgba(51,51,51,1);
color: rgba(51, 51, 51, 1);
margin-right: 120rpx;
}
.value {
font-size: 30rpx;
color: rgba(101,101,101,1);
color: rgba(101, 101, 101, 1);
}
}
.password {
@@ -101,10 +160,10 @@ export default {
display: flex;
align-items: center;
justify-content: space-between;
background: rgba(255,255,255,1);
background: rgba(255, 255, 255, 1);
> text {
font-size: 30rpx;
color: rgba(51,51,51,1);
color: rgba(51, 51, 51, 1);
}
> image {
width: 11rpx;
@@ -114,14 +173,14 @@ export default {
.image-popup {
padding: 0 30rpx;
> view {
font-size: 28rpx;
color: rgba(51,51,51,1);
font-size: 28rpx;
color: rgba(51, 51, 51, 1);
line-height: 98rpx;
text-align: center;
&:first-child {
border-bottom: 2rpx solid #EBEBEB;
border-bottom: 2rpx solid #ebebeb;
}
}
}
}
</style>
</style>

244
pages/user/myinfo.vue Normal file
View File

@@ -0,0 +1,244 @@
<template>
<view class="user">
<view class="head" @click="toOthersPage('info')">
<view class="info">
<image :src="info.member_avatar"></image>
<view class="name">
<text>{{info.member_nickname==null?"新用户":info.member_nickname}}</text>
<text>账号{{info.member_name}}</text>
<text>个性签名{{info.signature==""?"该用户很懒没有签名!":info.signature}}</text>
</view>
</view>
<image src="/static/image/user/1.png"></image>
</view>
<view class="nav" @click="toOthersPage('fans')">
<text>我的粉丝</text>
<image src="/static/image/user/1.png"></image>
</view>
<view class="nav" @click="toOthersPage('content')">
<text>内容管理</text>
<image src="/static/image/user/1.png"></image>
</view>
<view class="release-btn" @click="publish">
<image src="../../static/image/index/publish.png"></image>
<view class="text">发布</view>
</view>
<u-popup v-model="publishstate" mode="bottom">
<view class="publish">
<view class="list">
<view @click="navto('release/tosign')">
<image src="../../static/image/index/live.png"></image>
<text>直播</text>
</view>
<view @click="navto('release/index')">
<image src="../../static/image/index/photo.png"></image>
<text>图文</text>
</view>
<view @click="navto('release/video')">
<image src="../../static/image/index/video.png"></image>
<text>视频</text>
</view>
</view>
<image src="../../static/image/index/close.png" class="off" @click="close"></image>
</view>
</u-popup>
<u-toast ref="uToast" />
</view>
</template>
<script>
export default {
name:"user",
data() {
return {
publishstate:false,
info:{},
}
},
onLoad() {
this.getmyinfo()
},
methods: {
// 获取个人信息
getmyinfo(){
let that = this;
this.$u.api.getshopinfo({
}).then(res => {
console.log(res);
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
this.info = res.data.memberInfo
}
});
},
toOthersPage(url) {
uni.navigateTo({
url: '/pages/user/' + url
});
},
// 打开发布弹窗
publish() {
this.publishstate = true;
},
// 关闭发布弹窗
close() {
this.publishstate = false;
},
// 跳转发布页面
navto(url) {
// 判断直播权限
if(url=="release/tosign"){
this.$u.api.canlive({}).then(res => {
console.log(res);
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
if(res.data.live_stataes==0){
this.$u.route({
url: `/pages/${url}`
});
}else{
this.$refs.uToast.show({
title: "当前用户没有直播权限",
type: 'error'
});
}
}
});
}else{
this.$u.route({
url: `/pages/${url}`
});
}
}
},
}
</script>
<style lang="scss" scoped>
.release-btn {
position: fixed;
bottom: 475rpx;
right: 30rpx;
width: 100rpx;
height: 100rpx;
background: rgba(255, 120, 15, 1);
box-shadow: 0rpx 6rpx 6rpx 0rpx rgba(255, 120, 15, 0.22);
border-radius: 50%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
> image {
width: 36rpx;
height: 36rpx;
flex-shrink: 0;
margin-bottom: 2rpx;
}
.text {
font-size: 20rpx;
color: rgba(255, 255, 255, 1);
}
}
.publish {
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
padding: 50rpx 84rpx 31rpx 78rpx;
image {
}
.list {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
> view {
display: flex;
flex-direction: column;
align-items: center;
> image {
width: 94rpx;
height: 80rpx;
}
> text {
margin-top: 10rpx;
font-size: 28rpx;
color: #333;
font-weight: 400;
}
}
}
.off {
margin-top: 81rpx;
width: 37rpx;
height: 37rpx;
}
}
.user{
min-height: calc(100vh - var(--window-top));
background: #ececec;
.head{
width: 100%;
height: 220rpx;
background-color: #FF780F;
padding: 0 30rpx;
display: flex;
align-items: center;
justify-content: space-between;
.info{
display: flex;
align-items: center;
>image{
width: 110rpx;
height: 110rpx;
border-radius: 50%;
background-color: #0f0;
}
.name{
font-size: 24rpx;
color: #fff;
display: flex;
flex-direction: column;
margin-left: 26rpx;
>text{
margin-top: 14rpx;
}
>text:first-child{
font-size: 28rpx;
margin-top: 0;
}
}
}
>image{
width: 12rpx;
height: 20rpx;
}
}
.nav{
width: 100%;
height: 100rpx;
display: flex;
padding: 30rpx;
align-items: center;
justify-content: space-between;
font-size: 30rpx;
margin-bottom: 2rpx;
color:#333;
background-color: #fff;
>image{
width: 13rpx;
height: 25rpx;
}
}
}
</style>

View File

@@ -15,7 +15,8 @@
</u-form>
</view>
<text class="tips">密码必须是8-16至少含数字/字母/字符两种组合</text>
<view class="btn">确定</view>
<view class="btn" @click="update">确定</view>
<u-toast ref="uToast" />
</view>
</template>
<script>
@@ -28,6 +29,29 @@ export default {
rePassword: ''
},
}
},
methods:{
update(){
let that = this;
this.$u.api.editpassword({
old_password:that.model.password,
password:that.model.newPassword,
repassword:that.model.rePassword
}).then(res => {
console.log(res);
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
this.$refs.uToast.show({
title: res.message,
type: 'success'
});
}
});
},
}
};
</script>

BIN
static/image/close.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 753 B

BIN
static/image/index/live.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
static/image/menu.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
static/image/shop.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB