Compare commits
206 Commits
Author | SHA1 | Date | |
---|---|---|---|
3c154f1416 | |||
|
3325704faa | ||
|
125c198f5d | ||
|
1e06c5067f | ||
aad77ed2cb | |||
365c797e28 | |||
a50daa3326 | |||
d47a2b7740 | |||
e405a2bd2b | |||
|
42b5488a52 | ||
|
99ab0696ba | ||
|
02d289b31d | ||
ab87f8822b | |||
6945c21f10 | |||
|
1529dcb6e6 | ||
|
da02e25fd1 | ||
|
005ae548a8 | ||
|
c330638827 | ||
|
812bb07e1e | ||
|
b139bf1224 | ||
|
5757c4bce3 | ||
|
8aab721c0e | ||
|
2d76a8ea63 | ||
|
dfd9fb1b67 | ||
ee6e4102b6 | |||
9e8d4d4b58 | |||
055cdb654a | |||
|
e2e5cf8b42 | ||
2f1b89c6a6 | |||
|
841dc290b2 | ||
0610a0b157 | |||
|
49fe886234 | ||
0f26f6737b | |||
fb5c8aa476 | |||
a732778481 | |||
|
2d7922ff96 | ||
5b3dbd1dc2 | |||
880ce7487b | |||
a6a65153ea | |||
c77a7a4d5b | |||
32bcfb92e1 | |||
100d4d67b9 | |||
a1d9339948 | |||
a4fee4682f | |||
f74c8a8776 | |||
2f62fde4f6 | |||
|
905ae3b9da | ||
341d733a16 | |||
|
c02acd7259 | ||
aa0d7a4a06 | |||
45b6086398 | |||
f81ce05547 | |||
fb81800253 | |||
1f6d2b4ab3 | |||
52277be0c9 | |||
391fda5abc | |||
f770b05dcd | |||
6d3d176cd8 | |||
909082f7ca | |||
|
dadb891236 | ||
42e3c7d6a7 | |||
8434b1e611 | |||
a0ccf26c99 | |||
541d8f9f6e | |||
5f56b7a27c | |||
0c41f85630 | |||
0087c0c3cd | |||
|
c270f238bd | ||
5add00c60a | |||
c236af5986 | |||
d86dc49da2 | |||
4c8309ca66 | |||
e173f3c2a8 | |||
d0107c5729 | |||
1309fec9c3 | |||
b2d7ae4ec5 | |||
|
75e02e0228 | ||
|
3e8caffe19 | ||
571489743a | |||
|
f7f3fee4ad | ||
1f70d8dfcb | |||
|
8c89864beb | ||
af908a3dda | |||
9ee97373bc | |||
|
388daaa901 | ||
0f85f77520 | |||
23916ea7fa | |||
539309b370 | |||
|
0824d97080 | ||
b98baa39aa | |||
0619bbd901 | |||
60cb9294fc | |||
cd89acf38c | |||
c4114bcfc5 | |||
|
f2e3427260 | ||
dbf18d4091 | |||
|
7d066ca67d | ||
22901579b9 | |||
|
3ecaac3190 | ||
|
c5b3505dcd | ||
b9eceb6ecf | |||
2bdd8e2b7f | |||
5017534a24 | |||
f9f6bba08b | |||
2f103eafbe | |||
64824a8fb7 | |||
721087e372 | |||
164b7f8e4c | |||
a80c2e53b8 | |||
f7da2d452c | |||
e91b35d1e3 | |||
115400353f | |||
|
dd5a59cccb | ||
c9b9dc1610 | |||
a6328358e2 | |||
7c839816d4 | |||
13524dcefc | |||
784cd1ec89 | |||
aac975e921 | |||
1305931e3b | |||
0562cfd830 | |||
|
14b0d68ce4 | ||
40e252c400 | |||
5dd01ffa93 | |||
06bbd3d600 | |||
|
3097bf8b91 | ||
c5305c5a72 | |||
4e02daa854 | |||
022192c9d6 | |||
|
94c22fdef1 | ||
8ce148950a | |||
|
e58a1a6ef6 | ||
6d4c9dc5a4 | |||
9361f5bffe | |||
3fe8f15aad | |||
|
84c02f90f7 | ||
93dfeaa36d | |||
fc4c187702 | |||
84240fedb8 | |||
4c3808d2ff | |||
|
32d23e4bb0 | ||
380bd7dc9c | |||
|
b35222853d | ||
e07c2288dc | |||
2f4e938a2b | |||
baf39b01e2 | |||
79990e56d2 | |||
19187b67fc | |||
5fd62e4010 | |||
22bc2a4b89 | |||
7090635886 | |||
87c321be99 | |||
4f7fc23c23 | |||
3641264d19 | |||
|
cf7d689ce0 | ||
1cc6fc56d1 | |||
|
d1aaa525ed | ||
|
8ff58e1a31 | ||
b1c7f612f1 | |||
4bf837d53e | |||
5fc375e589 | |||
3d04824b83 | |||
960f0453ec | |||
1cc3f289fe | |||
3884f93ad8 | |||
e759f15852 | |||
|
3e7165ef19 | ||
|
2bf46d983a | ||
fd78ec19db | |||
f57ebac022 | |||
8276bf358f | |||
67edac985e | |||
74b10f4620 | |||
12d095dc05 | |||
|
c9c714d4e3 | ||
17e336f0fc | |||
bfa4ed6edb | |||
0e33599174 | |||
7755f54f07 | |||
0b5892cfbd | |||
ff4c3982ba | |||
36080fd730 | |||
81ec6586e3 | |||
|
150c3337e4 | ||
fbdd3f20b4 | |||
0b0ac462a7 | |||
7c16e8c190 | |||
1f54899b66 | |||
7e37f71d56 | |||
3c44ad2811 | |||
186f1cdb27 | |||
209cb7d9fb | |||
e4f917a9cf | |||
06092fb183 | |||
252e4b7deb | |||
5b2745051e | |||
f58cc207c4 | |||
192bd462d4 | |||
efde545104 | |||
b1e5b24319 | |||
2ea72995a9 | |||
5500dc9f73 | |||
d97b749a0a | |||
cf76518bc9 | |||
8d7e4b2ce4 | |||
7bfce17816 |
20
App.vue
@ -4,14 +4,28 @@ export default {
|
|||||||
im: {}
|
im: {}
|
||||||
},
|
},
|
||||||
onLaunch: function() {
|
onLaunch: function() {
|
||||||
|
// 禁止旋转
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
plus.screen.lockOrientation('portrait-primary');
|
||||||
|
// #endif
|
||||||
|
|
||||||
getApp().globalData.im = this.imService
|
getApp().globalData.im = this.imService
|
||||||
console.log('App Launch');
|
// console.log('App Launch');
|
||||||
|
// 缓存token
|
||||||
|
uni.getStorage({
|
||||||
|
key: "token",
|
||||||
|
success: (res) => {
|
||||||
|
// uni.switchTab({
|
||||||
|
// url: "/pages/index/index"
|
||||||
|
// })
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
onShow: function() {
|
onShow: function() {
|
||||||
console.log('App Show');
|
// console.log('App Show');
|
||||||
},
|
},
|
||||||
onHide: function() {
|
onHide: function() {
|
||||||
console.log('App Hide');
|
// console.log('App Hide');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -77,7 +77,6 @@ const install = (Vue, vm) => {
|
|||||||
return vm.$u.post("/Takeawayer/tryOrderSnList")
|
return vm.$u.post("/Takeawayer/tryOrderSnList")
|
||||||
},
|
},
|
||||||
// 投诉骑手
|
// 投诉骑手
|
||||||
|
|
||||||
reportorder({order_id,takeawayer_id,order_list,content}){
|
reportorder({order_id,takeawayer_id,order_list,content}){
|
||||||
return vm.$u.post("/takeawayer/complaintTakeawayer",{order_id,takeawayer_id,order_list,content})
|
return vm.$u.post("/takeawayer/complaintTakeawayer",{order_id,takeawayer_id,order_list,content})
|
||||||
},
|
},
|
||||||
@ -114,13 +113,17 @@ const install = (Vue, vm) => {
|
|||||||
return vm.$u.post("/order/goodsTryOrderInfo",{goods_try_id})
|
return vm.$u.post("/order/goodsTryOrderInfo",{goods_try_id})
|
||||||
},
|
},
|
||||||
// 绑定物流订单
|
// 绑定物流订单
|
||||||
bindpushid({order_id,shipping_code,shipping_express_id}){
|
bindpushid({store_deliver_type,order_id,shipping_code,shipping_express_id}){
|
||||||
return vm.$u.post("/order/send",{order_id,shipping_code,shipping_express_id})
|
return vm.$u.post("/order/send",{store_deliver_type,order_id,shipping_code,shipping_express_id})
|
||||||
},
|
},
|
||||||
// 绑定骑手
|
// 绑定骑手
|
||||||
bindcarer({order_id,takeawayer_id}){
|
bindcarer({store_deliver_type,order_id,takeawayer_id}){
|
||||||
return vm.$u.post("/order/orderRider",{order_id,takeawayer_id})
|
return vm.$u.post("/order/send",{store_deliver_type,order_id,takeawayer_id})
|
||||||
},
|
},
|
||||||
|
// 自提
|
||||||
|
bindmention({store_deliver_type,shipping_express_id,deliver_explain,order_id,sendimg}) {
|
||||||
|
return vm.$u.post("/order/send",{store_deliver_type,shipping_express_id,deliver_explain,order_id,sendimg})
|
||||||
|
},
|
||||||
// 发货物流公司
|
// 发货物流公司
|
||||||
pushcompany(){
|
pushcompany(){
|
||||||
return vm.$u.post("/order/getExpress")
|
return vm.$u.post("/order/getExpress")
|
||||||
@ -132,9 +135,35 @@ const install = (Vue, vm) => {
|
|||||||
// 试穿
|
// 试穿
|
||||||
agreetest({goods_try_id,type,takeawayer_id}){
|
agreetest({goods_try_id,type,takeawayer_id}){
|
||||||
return vm.$u.post("/order/goodsTryAgree",{goods_try_id,type,takeawayer_id})
|
return vm.$u.post("/order/goodsTryAgree",{goods_try_id,type,takeawayer_id})
|
||||||
|
},
|
||||||
|
// 物流
|
||||||
|
getcarinfo({order_id}) {
|
||||||
|
return vm.$u.post("/Order/orderLogistics",{order_id})
|
||||||
|
},
|
||||||
|
|
||||||
|
messageList({page = 1}){
|
||||||
|
return vm.$u.post("/message/messageList",{page})
|
||||||
|
},
|
||||||
|
isread(){
|
||||||
|
return vm.$u.post("/message/isread")
|
||||||
|
},
|
||||||
|
messageInfo({id}){
|
||||||
|
return vm.$u.post("/message/messageInfo",{id})
|
||||||
|
},
|
||||||
|
// 达人验证码
|
||||||
|
getCode({member_mobile,smslog_type=2}) {
|
||||||
|
return vm.$u.post("/Sms/sendSmsCode",{member_mobile,smslog_type})
|
||||||
|
},
|
||||||
|
// 达人登录
|
||||||
|
starLogin({member_mobile,sms_code}) {
|
||||||
|
return vm.$u.post("/Login/platformExpertPhoneLogin",{member_mobile,sms_code})
|
||||||
|
},
|
||||||
|
//上传直播间人数
|
||||||
|
//https://mall.dmygkeji.com/storeapi/Streaming/changeLiveRealtimeNumber?live_id=1&realtime_number=10
|
||||||
|
changeLiveRealtimeNumber({id,number}){
|
||||||
|
return vm.$u.post("Streaming/changeLiveRealtimeNumber",{live_id:id,realtime_number:number})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
|
// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
|
||||||
vm.$u.api = api;
|
vm.$u.api = api;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
const install = (Vue, vm) => {
|
const install = (Vue, vm) => {
|
||||||
// 此为自定义配置参数,具体参数见上方说明
|
// 此为自定义配置参数,具体参数见上方说明
|
||||||
Vue.prototype.$u.http.setConfig({
|
Vue.prototype.$u.http.setConfig({
|
||||||
baseUrl: 'https://dmmall.sdbairui.com/storeapi',
|
baseUrl: 'https://mall.dmygkeji.com/storeapi',
|
||||||
loadingText: '努力加载中~',
|
loadingText: '努力加载中~',
|
||||||
loadingTime: 800,
|
loadingTime: 800,
|
||||||
originalData: true,
|
originalData: true,
|
||||||
|
@ -40,11 +40,12 @@
|
|||||||
padding: 6rpx 10rpx;
|
padding: 6rpx 10rpx;
|
||||||
height: 72rpx;
|
height: 72rpx;
|
||||||
line-height: 72rpx;
|
line-height: 72rpx;
|
||||||
background: #D02129;
|
background: #FF780F;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
border-radius: 14rpx;
|
border-radius: 14rpx;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-direction: row-reverse;
|
||||||
}
|
}
|
||||||
.audio-facade-bg{
|
.audio-facade-bg{
|
||||||
background: url("./images/voice.png") no-repeat center;
|
background: url("./images/voice.png") no-repeat center;
|
||||||
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.2 KiB |
BIN
components/GoEasyAudioPlayer/images/play.gif.7z
Normal file
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="content-item">
|
<view class="content-item">
|
||||||
<view class="image">
|
<view class="image" @click="toDetailsPage">
|
||||||
<image class="cover" :src="info.article_pic" alt="没有图片"></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>
|
<image src="/static/image/user/5.png" class="play-icon" v-if="type==2"></image>
|
||||||
</view>
|
</view>
|
||||||
|
@ -14,11 +14,13 @@
|
|||||||
<view class="status" v-else-if="info.view_type==5">已退款订单</view>
|
<view class="status" v-else-if="info.view_type==5">已退款订单</view>
|
||||||
<view class="status" v-else-if="info.view_type==6">商家同意</view>
|
<view class="status" v-else-if="info.view_type==6">商家同意</view>
|
||||||
<view class="status" v-else-if="info.view_type==7">商家拒绝</view>
|
<view class="status" v-else-if="info.view_type==7">商家拒绝</view>
|
||||||
|
<view class="status" v-else-if="info.view_type==10">待支付订单</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="name u-line-1">{{info.extend_order_goods[0].goods_name}}</view>
|
<view class="name u-line-1">{{info.extend_order_goods[0].goods_name}}</view>
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<view class="num">共{{info.count_number}}件商品</view>
|
<view class="num">共{{info.count_number}}件商品</view>
|
||||||
<view class="price">实付<span>¥{{info.order_amount}}</span></view>
|
<view class="price">{{ info.view_type==10 ? "待支付" : "实付" }}<span>¥{{info.order_amount}}</span></view>
|
||||||
|
<view class="time">{{ info.view_type==10 ? info.add_time.slice(5,16) : info.payment_time.slice(5,16) }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -48,14 +50,14 @@ export default {
|
|||||||
height: 220rpx;
|
height: 220rpx;
|
||||||
background: rgba(255,255,255,1);
|
background: rgba(255,255,255,1);
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
padding: 30rpx;
|
padding: 20rpx 10rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
> image {
|
> image {
|
||||||
width: 160rpx;
|
width: 160rpx;
|
||||||
height: 160rpx;
|
height: 160rpx;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
margin-right: 25rpx;
|
margin-right: 20rpx;
|
||||||
}
|
}
|
||||||
.goods {
|
.goods {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -82,9 +84,10 @@ export default {
|
|||||||
margin-bottom: 30rpx;
|
margin-bottom: 30rpx;
|
||||||
}
|
}
|
||||||
.info {
|
.info {
|
||||||
width: 100%;
|
width: 470rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color: rgba(102,102,102,1);
|
color: rgba(102,102,102,1);
|
||||||
.price {
|
.price {
|
||||||
@ -94,6 +97,9 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.time {
|
||||||
|
font-size: 20rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -16,6 +16,7 @@
|
|||||||
<view class="info">
|
<view class="info">
|
||||||
<view class="num">共{{info.goods_try_num}}件商品</view>
|
<view class="num">共{{info.goods_try_num}}件商品</view>
|
||||||
<view class="price">实付<span>¥{{info.price}}</span></view>
|
<view class="price">实付<span>¥{{info.price}}</span></view>
|
||||||
|
<!-- <view class="time">{{ info.payment_time.slice(5,16) }}</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -33,6 +34,9 @@ export default {
|
|||||||
toDetailsPage() {
|
toDetailsPage() {
|
||||||
let type =0
|
let type =0
|
||||||
let info = this.info
|
let info = this.info
|
||||||
|
if(info.is_delete == 1){
|
||||||
|
return ;
|
||||||
|
}
|
||||||
if(info.goods_try_order_status==0){
|
if(info.goods_try_order_status==0){
|
||||||
type=1
|
type=1
|
||||||
}else if(info.goods_try_order_status==20){
|
}else if(info.goods_try_order_status==20){
|
||||||
|
@ -2,10 +2,16 @@
|
|||||||
<view id="release">
|
<view id="release">
|
||||||
<!-- 标签 -->
|
<!-- 标签 -->
|
||||||
<view>
|
<view>
|
||||||
<view class="titles">标签</view>
|
<view class="titles flex-title">
|
||||||
|
<text>标签</text>
|
||||||
|
<text @click="editing">{{ is_edit ? "取消编辑" : "编辑" }}</text>
|
||||||
|
</view>
|
||||||
<view class="form-view" @click="show_add()">+ 新建标签</view>
|
<view class="form-view" @click="show_add()">+ 新建标签</view>
|
||||||
<view class="form-view" :class=" {'cur': rSelect.indexOf(item.id)!=-1} " @tap="tapInfo(item.id)" v-for="(item,index) in fileListes"
|
<view class="form-view" :class=" {'cur': rSelect.indexOf(item.id)!=-1} " @tap="tapInfo(item.id)" v-for="(item,index) in fileListes"
|
||||||
:key="index">{{item.name}}</view>
|
:key="index">
|
||||||
|
{{item.name}}
|
||||||
|
<u-icon v-show="is_edit && item.user_id != 0" class="close" name="close" color="#666" size="18" @click="isTable(item.id,index)"></u-icon>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 添加标签的按钮 -->
|
<!-- 添加标签的按钮 -->
|
||||||
<u-popup v-model="show" mode="center" border-radius="14" :closeable="true">
|
<u-popup v-model="show" mode="center" border-radius="14" :closeable="true">
|
||||||
@ -35,7 +41,8 @@
|
|||||||
action: 'http://www.example.com/upload',
|
action: 'http://www.example.com/upload',
|
||||||
fileList: [],
|
fileList: [],
|
||||||
show: false,
|
show: false,
|
||||||
rSelect: []
|
rSelect: [],
|
||||||
|
is_edit: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props:['fileListes'],
|
props:['fileListes'],
|
||||||
@ -44,6 +51,10 @@
|
|||||||
console.log(this.show)
|
console.log(this.show)
|
||||||
this.show = !this.show
|
this.show = !this.show
|
||||||
},
|
},
|
||||||
|
// 编辑标签
|
||||||
|
editing() {
|
||||||
|
this.is_edit = !this.is_edit;
|
||||||
|
},
|
||||||
// 颜色切换
|
// 颜色切换
|
||||||
tapInfo(e) {
|
tapInfo(e) {
|
||||||
if (this.rSelect.indexOf(e) == -1) {
|
if (this.rSelect.indexOf(e) == -1) {
|
||||||
@ -54,6 +65,31 @@
|
|||||||
}
|
}
|
||||||
this.$emit("qiehuan",this.rSelect)
|
this.$emit("qiehuan",this.rSelect)
|
||||||
},
|
},
|
||||||
|
// 删除标签
|
||||||
|
isTable(id,index) {
|
||||||
|
uni.showModal({
|
||||||
|
title: "提示",
|
||||||
|
content: "是否删除此标签?",
|
||||||
|
success: (res) => {
|
||||||
|
console.log();
|
||||||
|
if (res.confirm) {
|
||||||
|
this.delTable(id,index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
delTable(id,index) {
|
||||||
|
let me = this;
|
||||||
|
this.$u.post("Streaming/deltLabel", {label_id: id}).then(res => {
|
||||||
|
if (res.errCode == 0) {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: res.message,
|
||||||
|
type: 'success'
|
||||||
|
});
|
||||||
|
this.fileListes.splice(index,1);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
chuangjian(){
|
chuangjian(){
|
||||||
this.$u.api.createLivesp({spec_name:this.form.name}).then((res)=>{
|
this.$u.api.createLivesp({spec_name:this.form.name}).then((res)=>{
|
||||||
if(res.errCode != 0){
|
if(res.errCode != 0){
|
||||||
@ -62,7 +98,8 @@
|
|||||||
type: 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
this.show_add()
|
this.show_add();
|
||||||
|
this.fileListes.push(res.data);
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
type: 'success'
|
type: 'success'
|
||||||
@ -80,7 +117,12 @@
|
|||||||
#release {
|
#release {
|
||||||
width: 690rpx;
|
width: 690rpx;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
|
||||||
|
.flex-title {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
.form-view {
|
.form-view {
|
||||||
background: rgba(255, 255, 255, 1);
|
background: rgba(255, 255, 255, 1);
|
||||||
border-radius: 6rpx;
|
border-radius: 6rpx;
|
||||||
@ -90,6 +132,10 @@
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-bottom: 28rpx;
|
margin-bottom: 28rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
|
.close {
|
||||||
|
margin-left: 10rpx;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.titles {
|
.titles {
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
"name" : "德铭阳光商家",
|
"name" : "德铭阳光商家",
|
||||||
"appid" : "__UNI__EA895BE",
|
"appid" : "__UNI__EA895BE",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.0.0",
|
"versionName" : "1.0.1",
|
||||||
"versionCode" : "100",
|
"versionCode" : 103,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
@ -16,6 +16,13 @@
|
|||||||
"autoclose" : true,
|
"autoclose" : true,
|
||||||
"delay" : 0
|
"delay" : 0
|
||||||
},
|
},
|
||||||
|
"safearea" : {
|
||||||
|
//安全区域配置,仅iOS平台生效
|
||||||
|
"bottom" : {
|
||||||
|
// 底部安全区域配置
|
||||||
|
"offset" : "none" // 底部安全区域偏移,"none"表示不空出安全区域,"auto"自动计算空出安全区域,默认值为"none"
|
||||||
|
}
|
||||||
|
},
|
||||||
/* 模块配置 */
|
/* 模块配置 */
|
||||||
"modules" : {
|
"modules" : {
|
||||||
"Push" : {},
|
"Push" : {},
|
||||||
@ -54,7 +61,13 @@
|
|||||||
"abiFilters" : [ "armeabi-v7a", "x86" ]
|
"abiFilters" : [ "armeabi-v7a", "x86" ]
|
||||||
},
|
},
|
||||||
/* ios打包配置 */
|
/* ios打包配置 */
|
||||||
"ios" : {},
|
"ios" : {
|
||||||
|
"privacyDescription" : {
|
||||||
|
"NSPhotoLibraryUsageDescription" : "应用将在您上传图文视频等服务中使用您的相册。",
|
||||||
|
"NSMicrophoneUsageDescription" : "应用将会在您开启直播时使用您的麦克风。",
|
||||||
|
"NSCameraUsageDescription" : "应用将会在您开启直播时使用您的摄像头。"
|
||||||
|
}
|
||||||
|
},
|
||||||
/* SDK配置 */
|
/* SDK配置 */
|
||||||
"sdkConfigs" : {
|
"sdkConfigs" : {
|
||||||
"ad" : {},
|
"ad" : {},
|
||||||
@ -97,7 +110,13 @@
|
|||||||
"splashscreen" : {
|
"splashscreen" : {
|
||||||
"iosStyle" : "storyboard",
|
"iosStyle" : "storyboard",
|
||||||
"ios" : {
|
"ios" : {
|
||||||
"storyboard" : "E:/Source-code/deming/static/CustomStoryboard.zip"
|
"storyboard" : "/Users/xf/workspace/wwwroot/deming-uniapp/static/CustomStoryboard.zip"
|
||||||
|
},
|
||||||
|
"androidStyle" : "default",
|
||||||
|
"android" : {
|
||||||
|
"hdpi" : "/Users/xf/workspace/wwwroot/deming-uniapp/static/app/start/480x762.png",
|
||||||
|
"xhdpi" : "/Users/xf/workspace/wwwroot/deming-uniapp/static/app/start/720x1242.png",
|
||||||
|
"xxhdpi" : "/Users/xf/workspace/wwwroot/deming-uniapp/static/app/start/1080x1882.png"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
63
pages.json
@ -13,6 +13,30 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/login/agreements",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "用户协议",
|
||||||
|
"app-plus": {
|
||||||
|
"titleNView": {
|
||||||
|
"backgroundColor": "#FFFFFF",
|
||||||
|
"titleColor": "#333333"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/login/privacy_policy",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "隐私政策",
|
||||||
|
"app-plus": {
|
||||||
|
"titleNView": {
|
||||||
|
"backgroundColor": "#FFFFFF",
|
||||||
|
"titleColor": "#333333"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/release/tosign",
|
"path": "pages/release/tosign",
|
||||||
"style": {
|
"style": {
|
||||||
@ -49,7 +73,7 @@
|
|||||||
{
|
{
|
||||||
"path": "pages/index/index",
|
"path": "pages/index/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "德铭阳光在线",
|
"navigationBarTitleText": "德铭阳光商家",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleNView": {
|
"titleNView": {
|
||||||
"backgroundColor": "#FFFFFF",
|
"backgroundColor": "#FFFFFF",
|
||||||
@ -222,6 +246,18 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/user/feedback",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "用户反馈",
|
||||||
|
"app-plus": {
|
||||||
|
"titleNView": {
|
||||||
|
"backgroundColor": "#FFFFFF",
|
||||||
|
"titleColor": "#333333"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/user/complaintDetails",
|
"path": "pages/user/complaintDetails",
|
||||||
"style": {
|
"style": {
|
||||||
@ -256,8 +292,30 @@
|
|||||||
"animationType": "slide-in-bottom"
|
"animationType": "slide-in-bottom"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/messages/list",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "活动列表",
|
||||||
|
"app-plus": {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/messages/info",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "活动详情",
|
||||||
|
"app-plus": {
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
,{
|
||||||
|
"path" : "pages/index/mention",
|
||||||
|
"style" : {
|
||||||
|
"navigationBarTitleText": "上传凭证"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
"navigationBarTextStyle": "black",
|
"navigationBarTextStyle": "black",
|
||||||
"navigationBarTitleText": "uni-app",
|
"navigationBarTitleText": "uni-app",
|
||||||
@ -291,6 +349,5 @@
|
|||||||
"text": "我的",
|
"text": "我的",
|
||||||
"selectedColor": "#FBFBFB"
|
"selectedColor": "#FBFBFB"
|
||||||
}]
|
}]
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,19 +16,19 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-radio-group class="box" v-model="value" v-if="type>3">
|
<u-radio-group class="box" v-model="value" v-if="type>3">
|
||||||
<view class="goods-info" v-for="list in info.refund_list">
|
<view class="goods-info" v-for="list in info.goods_list">
|
||||||
<image :src="list.goods_image"></image>
|
<image :src="list.image_480_url"></image>
|
||||||
<view class="info-right">
|
<view class="info-right">
|
||||||
<view class="name u-line-1">{{ list.goods_name }}</view>
|
<view class="name u-line-1">{{ list.goods_name }}</view>
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<view class="num">共{{ list.goods_num }}件商品</view>
|
<view class="num">共{{ list.goods_num }}件商品</view>
|
||||||
<view class="price">
|
<view class="price">
|
||||||
实付
|
{{ type == 10 ? "待支付" : "实付" }}
|
||||||
<span>¥{{ list.refund_amount }}</span>
|
<span>¥{{ list.goods_pay_price }}</span>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-radio :name="list.refund_id" v-if="type==4" shape="circle" @change="radioGroupChange">
|
<!-- <u-radio :name="list.refund_id" v-if="type==4" shape="circle" @change="radioGroupChange"> -->
|
||||||
</u-radio >
|
</u-radio >
|
||||||
</view>
|
</view>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
@ -43,12 +43,27 @@
|
|||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<view class="title">手机号</view>
|
<view class="title">手机号</view>
|
||||||
<view class="value">{{ info.extend_order_common.reciver_info.mob_phone }}</view>
|
<view class="value" @longtap="longtap(info.extend_order_common.reciver_info.mob_phone)">{{ info.extend_order_common.reciver_info.mob_phone }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<view class="title">收货地址</view>
|
<view class="title">收货地址</view>
|
||||||
<view class="value u-line-1">{{ info.extend_order_common.reciver_info.address }}</view>
|
<view class="value u-line-2" @longtap="longtap(info.extend_order_common.reciver_info.address)">{{ info.extend_order_common.reciver_info.address }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view>
|
||||||
|
<view class="title">派送方式</view>
|
||||||
|
<view class="value u-line-1">{{ users_type == 0 ? "-" : users_type == 1 ? "快递" : users_type == 2 ? "骑手" : "自提" }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="remark">
|
||||||
|
<view class="title">订单备注</view>
|
||||||
|
<view class="value" @longtap="longtap(info.extend_order_common.order_message)">{{ info.extend_order_common.order_message }}</view>
|
||||||
|
</view>
|
||||||
|
<view @click="showInvoice">
|
||||||
|
<view class="title">开具发票</view>
|
||||||
|
<view class="invoice">
|
||||||
|
<text>{{ is_invoice ? "是" : "否" }}</text>
|
||||||
|
<u-icon name="arrow-right" color="#999" size="20" style="margin-left: 10rpx;"></u-icon>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 待处理之后的 -->
|
<!-- 待处理之后的 -->
|
||||||
@ -69,22 +84,57 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 待处理 -->
|
<!-- 待处理 -->
|
||||||
<view class="delivery" v-if="type == 1">
|
<view class="delivery" v-if="type == 1 && cur != -1">
|
||||||
<view class="title">派送方式</view>
|
<view class="title">派送方式</view>
|
||||||
<view class="methods">
|
<view class="methods">
|
||||||
<view :class="{ active: cur == 0 }" @click="pushstyleA">快递</view>
|
<view :style="{'color': this.cur == -1 ? '#333' : '' }" :class="{ active: cur == 0 }" @click="pushstyleA">快递</view>
|
||||||
<view :class="{ active: cur == 1 }" @click="pushstyleB">骑手</view>
|
<view :style="{'color': this.cur == -1 ? '#333' : '' }" :class="{ active: cur == 1 }" @click="pushstyleB">骑手</view>
|
||||||
|
<view :class="{ active: cur == 2 }" @click="pushstyleC">自提</view>
|
||||||
|
</view>
|
||||||
|
<view v-if="pushstyleBshow && (pushid || selctcar)" >
|
||||||
|
<view class="title">{{cur == 0 ? '快递单号':'骑手信息'}}</view>
|
||||||
|
<view class="value">{{ cur == 0 ? pushid ? companyidA.express_name + ": " + pushid : '' : selctcar ? selctcar.label : '' }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn" @click="confirmpushstyle">确认</view>
|
<view class="btn" @click="confirmpushstyle">确认</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 已发货 -->
|
<!-- 已发货 -->
|
||||||
<view class="pushtimeline" v-if="type == 2">
|
<view class="pushtimeline" v-if="type == 2">
|
||||||
<view class="timelinetitle">物流信息</view>
|
<view v-if="ordered_type == 1">
|
||||||
<view class="timelineid">订单单号: {{ info.order_sn }}</view>
|
<view class="timelinetitle">物流信息</view>
|
||||||
<view class="timelinebox" v-for="list in info.express_list">
|
<view class="timelineid">订单单号: {{ info.order_sn }}</view>
|
||||||
<view class="timelinecontent">{{list.content}}</view>
|
<view class="timelinebox" v-for="(list,index) in info.express_list" :key="index">
|
||||||
<view class="timelinetime">{{list.kd_time}}</view>
|
<view class="timelinecontent">{{list.content}}</view>
|
||||||
</view>
|
<view class="timelinetime">{{list.kd_time}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-else-if="ordered_type == 2">
|
||||||
|
<view class="timelinetitle">骑手信息</view>
|
||||||
|
<view class="refunds-user-two">
|
||||||
|
<view>
|
||||||
|
<image src="/static/image/home/2.png"></image>
|
||||||
|
<view>{{ takeawayer_info.takeawayer_name }}</view>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<image src="/static/image/home/3.png"></image>
|
||||||
|
<view>{{ takeawayer_info.takeawayer_mobile }}</view>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<image src="/static/image/home/4.png"></image>
|
||||||
|
<view class="address u-line-1">{{ takeawayer_info.company_name }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-else style="padding-bottom: 20rpx;">
|
||||||
|
<view class="timelinetitle">自提信息</view>
|
||||||
|
<view>
|
||||||
|
<view class="ziti-title">凭证图片</view>
|
||||||
|
<image class="certificate-img" :src="mineBy_img" @tap="viewImage" mode="aspectFill"></image>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<view class="ziti-title">备注:</view>
|
||||||
|
<view class="u-line-5">{{ mineBy_text }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 已完成 -->
|
<!-- 已完成 -->
|
||||||
<!-- 退款处理 -->
|
<!-- 退款处理 -->
|
||||||
@ -96,6 +146,38 @@
|
|||||||
<view class="refund" v-if="type == 5 ">退款状态:同意退款,请注意查收!</view>
|
<view class="refund" v-if="type == 5 ">退款状态:同意退款,请注意查收!</view>
|
||||||
<view class="refund" v-if="type == 6 ">退款状态:商家同意退款,等待后台处理!</view>
|
<view class="refund" v-if="type == 6 ">退款状态:商家同意退款,等待后台处理!</view>
|
||||||
<view class="refund" v-if="type == 7 ">退款状态:商家拒绝退款,请等待客服联系!</view>
|
<view class="refund" v-if="type == 7 ">退款状态:商家拒绝退款,请等待客服联系!</view>
|
||||||
|
<view class="pain-box" v-if="type == 10 ">
|
||||||
|
<view class="info-container">
|
||||||
|
<view>
|
||||||
|
<view class="title">姓名</view>
|
||||||
|
<view class="value">{{ info.extend_order_common.reciver_name }}</view>
|
||||||
|
<image src="/static/image/home/chat.png" @click="tochat(info.buyer_id)"></image>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<view class="title">手机号</view>
|
||||||
|
<view class="value" @longtap="longtap(info.extend_order_common.reciver_info.mob_phone)">{{ info.extend_order_common.reciver_info.mob_phone }}</view>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<view class="title">收货地址</view>
|
||||||
|
<view class="value u-line-2" @longtap="longtap(info.extend_order_common.reciver_info.address)">{{ info.extend_order_common.reciver_info.address }}</view>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<view class="title">派送方式</view>
|
||||||
|
<view class="value u-line-1">{{ users_type == 0 ? "-" : users_type == 1 ? "快递" : users_type == 2 ? "骑手" : "自提" }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="remark">
|
||||||
|
<view class="title">订单备注</view>
|
||||||
|
<view class="value" @longtap="longtap(info.extend_order_common.order_message)">{{ info.extend_order_common.order_message }}</view>
|
||||||
|
</view>
|
||||||
|
<view @click="showInvoice">
|
||||||
|
<view class="title">开具发票</view>
|
||||||
|
<view class="invoice">
|
||||||
|
<text>{{ is_invoice ? "是" : "否" }}</text>
|
||||||
|
<u-icon name="arrow-right" color="#999" size="20" style="margin-left: 10rpx;"></u-icon>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<u-popup v-model="showDelivery" mode="center" border-radius="10" class="delivery-popup">
|
<u-popup v-model="showDelivery" mode="center" border-radius="10" class="delivery-popup">
|
||||||
<view class="title">骑手信息</view>
|
<view class="title">骑手信息</view>
|
||||||
<view class="input-info">
|
<view class="input-info">
|
||||||
@ -118,10 +200,10 @@
|
|||||||
title="请选择公司"
|
title="请选择公司"
|
||||||
confirm-text="下一步"
|
confirm-text="下一步"
|
||||||
></u-picker>
|
></u-picker>
|
||||||
<u-popup v-model="showExpress" mode="center" border-radius="10" class="delivery-popup">
|
<u-popup v-model="showExpress" :mask-close-able="false" mode="center" border-radius="10" class="delivery-popup">
|
||||||
<view class="title">填写快递单号</view>
|
<view class="title">填写快递单号</view>
|
||||||
<view class="input-info"><input type="text" placeholder="请输入快递单号" v-model="pushid" /></view>
|
<view class="input-info"><input type="text" style="color: #333; line-height: 1;" placeholder="请输入快递单号" v-model="pushid" /></view>
|
||||||
<view class="btn" @click="showExpress = false">确认</view>
|
<view class="btn" @click="saveDelivery">确认</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
<u-popup v-model="showRefunds" mode="center" border-radius="10" class="refunds-popup">
|
<u-popup v-model="showRefunds" mode="center" border-radius="10" class="refunds-popup">
|
||||||
<view v-if="cur == 1" class="popup-tips">
|
<view v-if="cur == 1" class="popup-tips">
|
||||||
@ -139,6 +221,42 @@
|
|||||||
<view class="determine" @click="confirm">确定</view>
|
<view class="determine" @click="confirm">确定</view>
|
||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
|
<u-popup class="invoice-box" v-model="show_invoice" :mask-close-able="false" mode="center" length="540rpx" border-radius="10">
|
||||||
|
<view class="title">
|
||||||
|
<text>发票信息</text>
|
||||||
|
<u-icon class="close" name="close" @click="show_invoice=false"></u-icon>
|
||||||
|
</view>
|
||||||
|
<view class="info">
|
||||||
|
<view>
|
||||||
|
<text>发票抬头:</text>
|
||||||
|
<view class="u-line-2">{{ invoiceList.invoice_title }}</view>
|
||||||
|
</view>
|
||||||
|
<view v-if="invoice_type==2">
|
||||||
|
<text>税号:</text>
|
||||||
|
<text>{{ invoiceList.invoice_code }}</text>
|
||||||
|
</view>
|
||||||
|
<view v-if="invoice_type==2">
|
||||||
|
<text>单位地址:</text>
|
||||||
|
<view class="u-line-3">{{ invoiceList.invoice_goto_addr }}</view>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<text>电话号码:</text>
|
||||||
|
<text>{{ invoiceList.invoice_rec_mobphone }}</text>
|
||||||
|
</view>
|
||||||
|
<view v-if="invoice_type==2">
|
||||||
|
<text>开户银行:</text>
|
||||||
|
<view class="u-line-3">{{ invoiceList.invoice_reg_bname }}</view>
|
||||||
|
</view>
|
||||||
|
<view v-if="invoice_type==2">
|
||||||
|
<text>银行账户:</text>
|
||||||
|
<text>{{ invoiceList.invoice_reg_baccount }}</text>
|
||||||
|
</view>
|
||||||
|
<view v-if="invoice_type==1">
|
||||||
|
<text>身份证号:</text>
|
||||||
|
<text>{{ invoiceList.invoice_code }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
<u-toast ref="uToast" />
|
<u-toast ref="uToast" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -147,7 +265,8 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
status: 1, // 订单状态
|
status: 1, // 订单状态
|
||||||
cur: Number,
|
cur: null,
|
||||||
|
show_invoice: false, // 发票
|
||||||
showDelivery: false, // 填写骑手信息
|
showDelivery: false, // 填写骑手信息
|
||||||
showExpress: false, // 填写快递单号
|
showExpress: false, // 填写快递单号
|
||||||
showRefunds: false, // 平台退货处理
|
showRefunds: false, // 平台退货处理
|
||||||
@ -177,13 +296,23 @@ export default {
|
|||||||
companyidA: null, //物流派送公司id
|
companyidA: null, //物流派送公司id
|
||||||
companyidB: null, //骑手派送公司id
|
companyidB: null, //骑手派送公司id
|
||||||
value:"",
|
value:"",
|
||||||
refundid:null
|
refundid:null,
|
||||||
|
is_invoice: 0, // 判断发票
|
||||||
|
invoice_type: null,
|
||||||
|
invoiceList: {}, // 发票数据
|
||||||
|
users_type: "", // 用户选择发货type
|
||||||
|
ordered_type: 0, // 发货方式的状态
|
||||||
|
takeawayer_info: {}, // 骑手信息
|
||||||
|
mineBy_img: "", // 自提图片
|
||||||
|
mineBy_text: "", // 自提备注
|
||||||
|
pushstyleBshow: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
this.type = option.type;
|
this.type = option.type;
|
||||||
console.log(this.type)
|
// console.log(this.type)
|
||||||
this.orderid = option.id;
|
this.orderid = option.id;
|
||||||
|
|
||||||
this.resetinfo();
|
this.resetinfo();
|
||||||
if (this.type == 1) {
|
if (this.type == 1) {
|
||||||
// 获取快递公司
|
// 获取快递公司
|
||||||
@ -191,7 +320,7 @@ export default {
|
|||||||
}
|
}
|
||||||
if (this.type == 2) {
|
if (this.type == 2) {
|
||||||
// 获取物流信息
|
// 获取物流信息
|
||||||
this.getcarinfo();
|
// this.getcarinfo();
|
||||||
}
|
}
|
||||||
// 订单状态: 0:全部 1已付款未发货 2已发货 3已完成 4申请退款/退货 5已退款/退货 6拒绝退款/退货
|
// 订单状态: 0:全部 1已付款未发货 2已发货 3已完成 4申请退款/退货 5已退款/退货 6拒绝退款/退货
|
||||||
},
|
},
|
||||||
@ -212,7 +341,7 @@ export default {
|
|||||||
const token = uni.getStorageSync('token');
|
const token = uni.getStorageSync('token');
|
||||||
let that = this
|
let that = this
|
||||||
uni.request({
|
uni.request({
|
||||||
url:"https://dmmall.sdbairui.com/api/Specialci/getAtwillUserInfo",
|
url:"https://mall.dmygkeji.com/api/Specialci/getAtwillUserInfo",
|
||||||
data:{
|
data:{
|
||||||
userId: ID
|
userId: ID
|
||||||
},
|
},
|
||||||
@ -238,16 +367,41 @@ export default {
|
|||||||
this.refundid = e
|
this.refundid = e
|
||||||
console.log(e);
|
console.log(e);
|
||||||
},
|
},
|
||||||
|
pushstyle(index) {
|
||||||
|
// console.log(this.users_type);
|
||||||
|
if (this.users_type == 1 && index == 1) {
|
||||||
|
this.showcompany = true;
|
||||||
|
} else if (this.users_type == 2 && index == 2) {
|
||||||
|
this.show = true;
|
||||||
|
} else if (this.users_type == 3 && index == 3) {
|
||||||
|
this.cur = 2;
|
||||||
|
}
|
||||||
|
},
|
||||||
// 人工配送
|
// 人工配送
|
||||||
pushstyleA() {
|
pushstyleA() {
|
||||||
|
console.log(this.cur)
|
||||||
|
if(this.cur != 0 && this.cur != -1){
|
||||||
|
return ;
|
||||||
|
}
|
||||||
this.cur = 0;
|
this.cur = 0;
|
||||||
this.showcompany = true;
|
this.showcompany = true;
|
||||||
},
|
},
|
||||||
// 选择骑手
|
// 选择骑手
|
||||||
pushstyleB() {
|
pushstyleB() {
|
||||||
|
if(this.cur != 1 && this.cur != -1){
|
||||||
|
return ;
|
||||||
|
}
|
||||||
this.cur = 1;
|
this.cur = 1;
|
||||||
this.show = true;
|
this.show = true;
|
||||||
},
|
},
|
||||||
|
// 自提
|
||||||
|
pushstyleC() {
|
||||||
|
if(this.cur != 2 && this.cur != -1){
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
this.cur = 2;
|
||||||
|
this.pushstyleBshow = true
|
||||||
|
},
|
||||||
// 获取物流公司列表
|
// 获取物流公司列表
|
||||||
getcompanyinfo() {
|
getcompanyinfo() {
|
||||||
let that = this;
|
let that = this;
|
||||||
@ -258,6 +412,26 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 查询物流
|
||||||
|
// getcarinfo() {
|
||||||
|
// this.$u.api.getcarinfo({
|
||||||
|
// order_id: this.orderid
|
||||||
|
// }).then(res => {
|
||||||
|
// console.log(res);
|
||||||
|
// })
|
||||||
|
// },
|
||||||
|
// 保存订单号
|
||||||
|
saveDelivery() {
|
||||||
|
if (!this.pushid) {
|
||||||
|
uni.showToast({
|
||||||
|
title: "请填写快递单号!",
|
||||||
|
icon: "none"
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.showExpress = false;
|
||||||
|
this.pushstyleBshow = true
|
||||||
|
},
|
||||||
// 取消退款
|
// 取消退款
|
||||||
cancel() {
|
cancel() {
|
||||||
this.showRefunds = false;
|
this.showRefunds = false;
|
||||||
@ -266,12 +440,20 @@ export default {
|
|||||||
//
|
//
|
||||||
confirm() {
|
confirm() {
|
||||||
this.showRefunds = false;
|
this.showRefunds = false;
|
||||||
|
// if (!this.refundid) {
|
||||||
|
// this.$refs.uToast.show({
|
||||||
|
// title: "请选择商品",
|
||||||
|
// type: "warning"
|
||||||
|
// });
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
if (this.cur == 0) {
|
if (this.cur == 0) {
|
||||||
|
console.log(this.refundid);
|
||||||
// 确定退款
|
// 确定退款
|
||||||
this.$u.api.refund({
|
this.$u.api.refund({
|
||||||
refund_id: this.refundid,
|
refund_id: this.refundid,
|
||||||
seller_state:2,
|
seller_state: 3,
|
||||||
seller_message:""
|
seller_message: ""
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.errCode != 0) {
|
if (res.errCode != 0) {
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
@ -283,18 +465,21 @@ export default {
|
|||||||
title: res.message,
|
title: res.message,
|
||||||
type: 'success'
|
type: 'success'
|
||||||
});
|
});
|
||||||
|
let pages = getCurrentPages();
|
||||||
|
let prePage = pages[pages.length - 2];
|
||||||
|
console.log(prePage.$vm);
|
||||||
|
prePage.$vm.del_id = this.orderid;
|
||||||
uni.navigateBack({
|
uni.navigateBack({
|
||||||
delta: 1
|
delta: 1
|
||||||
});
|
});
|
||||||
console.log(res);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// 不进行退款
|
// 不进行退款
|
||||||
this.$u.api.refund({
|
this.$u.api.refund({
|
||||||
refund_id: this.refundid,
|
refund_id: this.refundid,
|
||||||
seller_state:3,
|
seller_state: 2,
|
||||||
seller_message:""
|
seller_message: ""
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.errCode != 0) {
|
if (res.errCode != 0) {
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
@ -327,17 +512,33 @@ export default {
|
|||||||
// 选择快递公司
|
// 选择快递公司
|
||||||
getselectcompany(e) {
|
getselectcompany(e) {
|
||||||
let obj = this.companylist[e[0]];
|
let obj = this.companylist[e[0]];
|
||||||
this.companyidA = obj.express_id;
|
this.companyidA = obj;
|
||||||
this.showExpress = true;
|
this.showExpress = true;
|
||||||
},
|
},
|
||||||
// 绑定配送方式
|
// 绑定配送方式
|
||||||
confirmpushstyle() {
|
confirmpushstyle() {
|
||||||
|
// console.log(this.cur);
|
||||||
|
if (this.cur < 0) {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: '请选择派送方式!',
|
||||||
|
type: 'warning ',
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (this.cur == 0) {
|
if (this.cur == 0) {
|
||||||
console.log(this.pushid);
|
if (!this.companyidA) {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: '请选择派送方式!',
|
||||||
|
type: 'warning ',
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// console.log(this.pushid);
|
||||||
this.$u.api.bindpushid({
|
this.$u.api.bindpushid({
|
||||||
|
store_deliver_type: 1,
|
||||||
order_id: this.orderid,
|
order_id: this.orderid,
|
||||||
shipping_code: this.pushid,
|
shipping_code: this.pushid,
|
||||||
shipping_express_id: this.companyidA
|
shipping_express_id: this.companyidA.express_id
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.errCode != 0) {
|
if (res.errCode != 0) {
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
@ -354,8 +555,16 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else if (this.cur == 1) {
|
||||||
|
if (!this.selctcar) {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: '请选择派送方式!',
|
||||||
|
type: 'warning ',
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.$u.api.bindcarer({
|
this.$u.api.bindcarer({
|
||||||
|
store_deliver_type: 2,
|
||||||
order_id: this.orderid,
|
order_id: this.orderid,
|
||||||
takeawayer_id: this.selctcar.takeawayer_id
|
takeawayer_id: this.selctcar.takeawayer_id
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
@ -375,11 +584,22 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "mention?id=" + this.orderid
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 显示发票
|
||||||
|
showInvoice() {
|
||||||
|
if (this.is_invoice) {
|
||||||
|
this.show_invoice = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 选择骑手
|
// 选择骑手
|
||||||
getselect(e) {
|
getselect(e) {
|
||||||
this.selctcar = this.list[e[0].value];
|
this.selctcar = this.list[e[0].value];
|
||||||
|
this.pushstyleBshow = true
|
||||||
},
|
},
|
||||||
// 获取订单信息
|
// 获取订单信息
|
||||||
resetinfo() {
|
resetinfo() {
|
||||||
@ -394,6 +614,21 @@ export default {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.info = res.data;
|
this.info = res.data;
|
||||||
|
this.cur = res.data.member_deliver_type - 1;
|
||||||
|
this.users_type = res.data.member_deliver_type; // 用户选择发货方式
|
||||||
|
this.invoiceList = res.data.extend_order_common.invoice_info;
|
||||||
|
this.is_invoice = this.invoiceList.invoice_id || false;
|
||||||
|
this.invoice_type = this.invoiceList.invoice_type;
|
||||||
|
this.ordered_type = res.data.store_deliver_type; // 发货方式
|
||||||
|
// console.log(this.users_type,this.cur);
|
||||||
|
// 骑手
|
||||||
|
this.takeawayer_info = res.data.takeawayer || {}; // 骑手信息
|
||||||
|
// 自提
|
||||||
|
this.mineBy_img = res.data.extend_order_common.sendimg; // 自提图片
|
||||||
|
this.mineBy_text = res.data.extend_order_common.deliver_explain; // 自提备注
|
||||||
|
// 退款id
|
||||||
|
this.refundid = res.data.refund_list[0].refund_id;
|
||||||
|
// console.log(this.invoiceList,this.is_invoice,this.invoice_type);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.$u.api.takeawayerlist({}).then(res => {
|
this.$u.api.takeawayerlist({}).then(res => {
|
||||||
@ -412,7 +647,24 @@ export default {
|
|||||||
this.list = arr;
|
this.list = arr;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
|
// 预览图片
|
||||||
|
viewImage() {
|
||||||
|
console.log(this.mineBy_img);
|
||||||
|
uni.previewImage({
|
||||||
|
urls: this.mineBy_img,
|
||||||
|
current: 1
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 复制到粘贴板
|
||||||
|
longtap(text) {
|
||||||
|
console.log(text);
|
||||||
|
uni.setClipboardData({
|
||||||
|
data: text,
|
||||||
|
success: (res) => {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@ -499,6 +751,51 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.refunds-user-two {
|
||||||
|
padding: 25rpx 0;
|
||||||
|
background-color: #ffffff;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
> view {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
@mixin image-class($width, $right) {
|
||||||
|
> image {
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: $width;
|
||||||
|
height: 40rpx;
|
||||||
|
margin-right: $right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&:first-child {
|
||||||
|
@include image-class($width: 40rpx, $right: 20rpx);
|
||||||
|
}
|
||||||
|
&:nth-child(2) {
|
||||||
|
margin-left: 4rpx;
|
||||||
|
@include image-class($width: 32rpx, $right: 24rpx);
|
||||||
|
}
|
||||||
|
&:last-child {
|
||||||
|
margin-left: 2rpx;
|
||||||
|
@include image-class($width: 36rpx, $right: 22rpx);
|
||||||
|
}
|
||||||
|
> view {
|
||||||
|
flex: 1;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: rgba(51, 51, 51, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.ziti-title {
|
||||||
|
margin: 20rpx 0 10rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
.certificate-img {
|
||||||
|
width: 320rpx;
|
||||||
|
height: 240rpx;
|
||||||
|
border-radius: 4rpx;
|
||||||
|
}
|
||||||
.user-info {
|
.user-info {
|
||||||
.info-title {
|
.info-title {
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
@ -513,10 +810,16 @@ export default {
|
|||||||
padding: 0 30rpx;
|
padding: 0 30rpx;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
|
.remark {
|
||||||
|
padding: 10rpx 0;
|
||||||
|
height: 100%;
|
||||||
|
min-height: 88rpx;
|
||||||
|
}
|
||||||
> view {
|
> view {
|
||||||
height: 88rpx;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
height: 88rpx;
|
||||||
|
padding: 10rpx 0;
|
||||||
color: rgba(51, 51, 51, 1);
|
color: rgba(51, 51, 51, 1);
|
||||||
&:not(:last-child) {
|
&:not(:last-child) {
|
||||||
border-bottom: 2rpx solid #ececec;
|
border-bottom: 2rpx solid #ececec;
|
||||||
@ -530,6 +833,11 @@ export default {
|
|||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
.invoice {
|
||||||
|
margin-left: auto;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
image{
|
image{
|
||||||
width: 40rpx;
|
width: 40rpx;
|
||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
@ -537,6 +845,46 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.pain-box {
|
||||||
|
.info-container {
|
||||||
|
padding: 0 30rpx;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
.remark {
|
||||||
|
padding: 10rpx 0;
|
||||||
|
height: 100%;
|
||||||
|
min-height: 88rpx;
|
||||||
|
}
|
||||||
|
> view {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
height: 88rpx;
|
||||||
|
padding: 10rpx 0;
|
||||||
|
color: rgba(51, 51, 51, 1);
|
||||||
|
&:not(:last-child) {
|
||||||
|
border-bottom: 2rpx solid #ececec;
|
||||||
|
}
|
||||||
|
.title {
|
||||||
|
width: 150rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
margin-right: 10rpx;
|
||||||
|
}
|
||||||
|
.value {
|
||||||
|
font-size: 26rpx;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
.invoice {
|
||||||
|
margin-left: auto;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
image{
|
||||||
|
width: 40rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
.delivery {
|
.delivery {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
@ -551,10 +899,11 @@ export default {
|
|||||||
.methods {
|
.methods {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-around;
|
||||||
> view {
|
> view {
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: rgba(0, 0, 51, 1);
|
color: #999;
|
||||||
width: 335rpx;
|
width: 30%;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
border: 1rpx solid rgba(236, 236, 236, 1);
|
border: 1rpx solid rgba(236, 236, 236, 1);
|
||||||
background: rgba(236, 236, 236, 1);
|
background: rgba(236, 236, 236, 1);
|
||||||
@ -562,9 +911,6 @@ export default {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 80rpx;
|
line-height: 80rpx;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
&:nth-child(2n-1) {
|
|
||||||
margin-right: 20rpx;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.active {
|
.active {
|
||||||
border: 1rpx solid #ff780f;
|
border: 1rpx solid #ff780f;
|
||||||
@ -574,11 +920,11 @@ export default {
|
|||||||
}
|
}
|
||||||
.btn {
|
.btn {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 40rpx;
|
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translate(-50%, 0);
|
transform: translate(-50%, 0);
|
||||||
width: 690rpx;
|
width: 690rpx;
|
||||||
height: 98rpx;
|
height: 98rpx;
|
||||||
|
margin: 40rpx 0;
|
||||||
background: rgba(255, 120, 15, 1);
|
background: rgba(255, 120, 15, 1);
|
||||||
border-radius: 49rpx;
|
border-radius: 49rpx;
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
@ -600,6 +946,7 @@ export default {
|
|||||||
color: rgba(51, 51, 51, 1);
|
color: rgba(51, 51, 51, 1);
|
||||||
}
|
}
|
||||||
.timelineid {
|
.timelineid {
|
||||||
|
margin: 18rpx 0;
|
||||||
min-height: 40rpx;
|
min-height: 40rpx;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
@ -706,5 +1053,35 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.invoice-box {
|
||||||
|
.title {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
padding: 20rpx 20rpx 0 20rpx;
|
||||||
|
text-align: center;
|
||||||
|
.close {
|
||||||
|
margin-left: 180rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.info {
|
||||||
|
padding: 30rpx;
|
||||||
|
& > view {
|
||||||
|
display: flex;
|
||||||
|
margin: 10rpx 0;
|
||||||
|
& > text:first-child {
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: 140rpx !important;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
& > text:last-child {
|
||||||
|
width: 320rpx !important;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -4,17 +4,24 @@
|
|||||||
<view class="tab-swiper">
|
<view class="tab-swiper">
|
||||||
<u-tabs :list="list" font-size="26" gutter="10" item-width="130" bar-width="120" active-color="#FF780F" :current="current" @change="tabsChange"></u-tabs>
|
<u-tabs :list="list" font-size="26" gutter="10" item-width="130" bar-width="120" active-color="#FF780F" :current="current" @change="tabsChange"></u-tabs>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="order-list" v-if="current == 0">
|
<view class="order-list" v-if="current == 0">
|
||||||
<view v-for="(item, index) in allorder" :key="index"><OrderItem :info="item"></OrderItem></view>
|
<view v-for="(item, index) in allorder" :key="index"><OrderItem :info="item"></OrderItem></view>
|
||||||
|
<u-empty margin-top="20" v-if="!allorder.length" mode="order"></u-empty>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view v-else-if="current == 1">
|
<view v-else-if="current == 1">
|
||||||
<view v-for="(item, index) in testlist" :key="index"><testList :info="item"></testList></view>
|
<view v-for="(item, index) in testlist" :key="index"><testList :info="item"></testList></view>
|
||||||
|
<u-empty margin-top="20" v-if="!testlist.length" mode="order"></u-empty>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view v-else-if="current == 2">
|
<view v-else-if="current == 2">
|
||||||
<view v-for="(item, index) in worklist" :key="index"><OrderItem :info="item"></OrderItem></view>
|
<view v-for="(item, index) in worklist" :key="index"><OrderItem :info="item"></OrderItem></view>
|
||||||
|
<u-empty margin-top="20" v-if="!worklist.length" mode="order"></u-empty>
|
||||||
</view>
|
</view>
|
||||||
<view v-else-if="current == 3">
|
<view v-else-if="current == 3">
|
||||||
<view v-for="(item, index) in translist" :key="index"><OrderItem :info="item"></OrderItem></view>
|
<view v-for="(item, index) in translist" :key="index"><OrderItem :info="item"></OrderItem></view>
|
||||||
|
<u-empty margin-top="20" v-if="!translist.length" mode="order"></u-empty>
|
||||||
</view>
|
</view>
|
||||||
<view v-else-if="current == 4">
|
<view v-else-if="current == 4">
|
||||||
<view class="complaint">
|
<view class="complaint">
|
||||||
@ -41,12 +48,20 @@
|
|||||||
<view v-for="(item, index) in finshlist" :key="index">
|
<view v-for="(item, index) in finshlist" :key="index">
|
||||||
<OrderItem :info="item"></OrderItem>
|
<OrderItem :info="item"></OrderItem>
|
||||||
</view>
|
</view>
|
||||||
|
<u-empty margin-top="20" v-if="!finshlist.length" mode="order"></u-empty>
|
||||||
</view>
|
</view>
|
||||||
<view v-else-if="current == 6">
|
<view v-else-if="current == 6">
|
||||||
<view v-for="(item, index) in badlist" :key="index">
|
<view v-for="(item, index) in badlist" :key="index">
|
||||||
<OrderItem :info="item"></OrderItem>
|
<OrderItem :info="item"></OrderItem>
|
||||||
</view>
|
</view>
|
||||||
|
<u-empty margin-top="20" v-if="!badlist.length" mode="order"></u-empty>
|
||||||
</view>
|
</view>
|
||||||
|
<view v-else-if="current == 7">
|
||||||
|
<view v-for="(item, index) in paidList" :key="index">
|
||||||
|
<OrderItem :info="item"></OrderItem>
|
||||||
|
</view>
|
||||||
|
<u-empty margin-top="20" v-if="!paidList.length" mode="order"></u-empty>
|
||||||
|
</view>
|
||||||
<view class="release-btn" @click="publish">
|
<view class="release-btn" @click="publish">
|
||||||
<image src="../../static/image/index/publish.png"></image>
|
<image src="../../static/image/index/publish.png"></image>
|
||||||
<view class="text">发布</view>
|
<view class="text">发布</view>
|
||||||
@ -115,7 +130,10 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '退货订单'
|
name: '退货订单'
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
name: '待支付订单'
|
||||||
|
}
|
||||||
],
|
],
|
||||||
imageList: [],
|
imageList: [],
|
||||||
showSelect: false,
|
showSelect: false,
|
||||||
@ -133,8 +151,10 @@ export default {
|
|||||||
finshlist: [], //已完成列表
|
finshlist: [], //已完成列表
|
||||||
badlist: [], //退货列表
|
badlist: [], //退货列表
|
||||||
carlist: [], //可投诉订单列表
|
carlist: [], //可投诉订单列表
|
||||||
|
paidList: [], // 待支付订单
|
||||||
reportinfo: null, //投诉信息
|
reportinfo: null, //投诉信息
|
||||||
reportcontent: '' //投诉内容
|
reportcontent: '', //投诉内容
|
||||||
|
del_id: 0, // 删除id
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
@ -146,12 +166,13 @@ export default {
|
|||||||
this.getallorder(0);
|
this.getallorder(0);
|
||||||
const user = uni.getStorageSync('userinfo');
|
const user = uni.getStorageSync('userinfo');
|
||||||
console.log(user)
|
console.log(user)
|
||||||
this.imService.login(user.userId,user.member_avatar,"")
|
this.imService.login(user.member_id,user.member_nickname,user.member_avatar)
|
||||||
this.imService.connectIM()
|
this.imService.connectIM()
|
||||||
// 订单状态: 0:全部 1已付款未发货 2已发货 3已完成 4申请退款/退货 5已退款/退货 6拒绝退款/退货
|
// 订单状态: 0:全部 1已付款未发货 2已发货 3已完成 4申请退款/退货 5已退款/退货 6拒绝退款/退货
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.publishstate = false;
|
this.publishstate = false;
|
||||||
|
this.tabsChange(this.current);
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
this.num++;
|
this.num++;
|
||||||
@ -167,6 +188,7 @@ export default {
|
|||||||
this.badlist = [];
|
this.badlist = [];
|
||||||
this.badlist = [];
|
this.badlist = [];
|
||||||
this.testlist = [];
|
this.testlist = [];
|
||||||
|
this.paidList = [];
|
||||||
},
|
},
|
||||||
// 根据current请求不同的接口
|
// 根据current请求不同的接口
|
||||||
reset() {
|
reset() {
|
||||||
@ -191,7 +213,10 @@ export default {
|
|||||||
} else if (current == 6) {
|
} else if (current == 6) {
|
||||||
// 退货订单
|
// 退货订单
|
||||||
this.getallorder(4);
|
this.getallorder(4);
|
||||||
}
|
} else if (current == 7) {
|
||||||
|
// 待支付订单
|
||||||
|
this.getallorder(10);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 关闭发布弹窗
|
// 关闭发布弹窗
|
||||||
close() {
|
close() {
|
||||||
@ -283,7 +308,7 @@ export default {
|
|||||||
getshiftlist() {
|
getshiftlist() {
|
||||||
let that = this;
|
let that = this;
|
||||||
this.$u.api.getshiftlist({}).then(res => {
|
this.$u.api.getshiftlist({}).then(res => {
|
||||||
console.log(res);
|
// console.log(JSON.stringify(res));
|
||||||
if (res.errCode != 0) {
|
if (res.errCode != 0) {
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
@ -321,24 +346,28 @@ export default {
|
|||||||
this.badlist.push(arr[index]);
|
this.badlist.push(arr[index]);
|
||||||
} else if (type == 5) {
|
} else if (type == 5) {
|
||||||
this.badlist.push(arr[index]);
|
this.badlist.push(arr[index]);
|
||||||
}
|
} else if (type == 10) {
|
||||||
|
this.paidList.push(arr[index]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 获取轮播图
|
// 获取轮播图
|
||||||
getswiper() {
|
getswiper() {
|
||||||
this.imageList = [
|
this.$u.post("adv/indexAdv").then(res => {
|
||||||
{
|
let item = res.data;
|
||||||
image: '../../static/image/index/swiper.png'
|
let arr;
|
||||||
},
|
arr = item.map(data => {
|
||||||
{
|
console.log(data);
|
||||||
image: '../../static/image/index/swiper.png'
|
return {
|
||||||
},
|
image: data.adv_code,
|
||||||
{
|
adv_id: data.adv_id,
|
||||||
image: '../../static/image/index/swiper.png'
|
adv_link: data.adv_link,
|
||||||
}
|
}
|
||||||
];
|
})
|
||||||
|
this.imageList = arr;
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 打开发布弹窗
|
// 打开发布弹窗
|
||||||
publish() {
|
publish() {
|
||||||
@ -530,7 +559,7 @@ export default {
|
|||||||
.list {
|
.list {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-around;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
> view {
|
> view {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
147
pages/index/mention.vue
Normal file
@ -0,0 +1,147 @@
|
|||||||
|
<template>
|
||||||
|
<view class="container">
|
||||||
|
<view class="upload">
|
||||||
|
<view class="title">
|
||||||
|
<text>上传凭证</text>
|
||||||
|
<text class="tips">(仅可上传1张凭证)</text>
|
||||||
|
</view>
|
||||||
|
<u-upload class="upload-box" :form-data="coverformdata" upload-text="" :action="action" :header="header" name="common" :max-count="1" @on-success="uploadSuc"></u-upload>
|
||||||
|
</view>
|
||||||
|
<view class="remarks">
|
||||||
|
<view>备注:</view>
|
||||||
|
<textarea class="textarea-box" v-model="textareaVal" placeholder="请输入内容..." placeholder-class="placeholder-style" />
|
||||||
|
</view>
|
||||||
|
<u-button class="btn-submit" @click="submitInfo">提交</u-button>
|
||||||
|
<u-toast ref="uToast" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
header: {
|
||||||
|
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||||
|
},
|
||||||
|
action: "https://mall.dmygkeji.com/api/Upload/uploadfile",
|
||||||
|
coverformdata: {
|
||||||
|
name: 'common'
|
||||||
|
},
|
||||||
|
img_url: "", // 图片路径
|
||||||
|
textareaVal: "", // 备注
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
// console.log(option);
|
||||||
|
this.order_id = option.id;
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 上传成功
|
||||||
|
uploadSuc(e) {
|
||||||
|
if (e.errCode == 0) {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: e.message,
|
||||||
|
type: "success"
|
||||||
|
})
|
||||||
|
// console.log(e.data);
|
||||||
|
this.img_url = e.data.file_path;
|
||||||
|
} else {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: e.message,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 自提提交
|
||||||
|
submitInfo() {
|
||||||
|
if (!this.img_url) {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: "请上传凭证!",
|
||||||
|
type: "warning"
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!this.$u.trim(this.textareaVal)) {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: "请填写备注!",
|
||||||
|
type: "warning"
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 提交
|
||||||
|
this.$u.api.bindmention({
|
||||||
|
store_deliver_type: 3,
|
||||||
|
shipping_express_id: "e1000",
|
||||||
|
deliver_explain: this.textareaVal,
|
||||||
|
order_id: this.order_id,
|
||||||
|
sendimg: this.img_url,
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res);
|
||||||
|
if (res.errCode == 0) {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: res.message,
|
||||||
|
type: "success",
|
||||||
|
isTab: "true",
|
||||||
|
url: "/pages/index/index"
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: res.message,
|
||||||
|
type: "warning"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.container {
|
||||||
|
padding: 30rpx;
|
||||||
|
}
|
||||||
|
::v-deep.uicon-plus {
|
||||||
|
font-size: 50rpx !important;
|
||||||
|
}
|
||||||
|
.upload {
|
||||||
|
.title {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #333;
|
||||||
|
.tips {
|
||||||
|
font-size: 20rpx;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.upload-box {
|
||||||
|
margin: 20rpx 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.remarks {
|
||||||
|
.textarea-box {
|
||||||
|
width: calc(100% - 42rpx);
|
||||||
|
padding: 20rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
border: 1px solid #BABABA;
|
||||||
|
}
|
||||||
|
.placeholder-style {
|
||||||
|
color: #999;
|
||||||
|
font-size: 26rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.btn-submit {
|
||||||
|
width: 690rpx;
|
||||||
|
height: 98rpx !important;
|
||||||
|
margin-top: 70rpx;
|
||||||
|
font-size: 36rpx !important;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 98rpx !important;
|
||||||
|
color: #fff !important;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
background-color: #FF780F !important;
|
||||||
|
}
|
||||||
|
</style>
|
@ -165,7 +165,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.$u.api.agreetest({
|
this.$u.api.agreetest({
|
||||||
goods_try_id: this.orderid,
|
goods_try_id: this.orderid,
|
||||||
type: 1,
|
type: 2,
|
||||||
takeawayer_id: this.selctcar.takeawayer_id
|
takeawayer_id: this.selctcar.takeawayer_id
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
|
506
pages/login/agreements.vue
Normal file
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- login页面 -->
|
<!-- login页面 -->
|
||||||
<view>
|
<view>
|
||||||
<view class="login">
|
<view class="login" @touchmove.stop.prevent="moveHandle">
|
||||||
<!-- <image class="images" :src="url"></image> -->
|
<!-- <image class="images" :src="url"></image> -->
|
||||||
<view class="backes"></view>
|
<view class="backes"></view>
|
||||||
<view class="title_top">德铭阳光在线-商家端</view>
|
<view class="title_top">德铭阳光在线-商家端</view>
|
||||||
@ -11,33 +11,57 @@
|
|||||||
商家登录
|
商家登录
|
||||||
</view>
|
</view>
|
||||||
<view v-bind:class="[state==1 ? 'show' : '']" @click="changetab(1)">
|
<view v-bind:class="[state==1 ? 'show' : '']" @click="changetab(1)">
|
||||||
达人登录
|
商家达人
|
||||||
</view>
|
</view>
|
||||||
|
<view v-bind:class="[state==2 ? 'show' : '']" @click="changetab(2)">
|
||||||
|
平台达人
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="" v-if="state==0">
|
<view class="" v-if="state==0">
|
||||||
<view class="labales">
|
<view class="labales">
|
||||||
<image src="../../static/image/login/login(3).png"></image>
|
<image src="../../static/image/login/login(3).png"></image>
|
||||||
<input v-model="zhanghao" type="text" placeholder="请输入账号" />
|
<input v-model="zhanghao" type="text" @blur="getBlurVal" placeholder="请输入账号" />
|
||||||
</view>
|
</view>
|
||||||
<view class="labales">
|
<view class="labales">
|
||||||
<image src="../../static/image/login/login(1).png"></image>
|
<image src="../../static/image/login/login(1).png"></image>
|
||||||
<input v-model="mima" type="password" placeholder="请输入密码" />
|
<input v-model="mima" type="password" placeholder="请输入密码" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="" v-else>
|
<view class="" v-else-if="state==1">
|
||||||
<view class="labales">
|
<view class="labales">
|
||||||
<image src="../../static/image/login/login(3).png"></image>
|
<image src="../../static/image/login/login(3).png"></image>
|
||||||
<input v-model="zhanghaoA" type="text" placeholder="请输入账号" />
|
<input v-model="zhanghaoA" type="text" @blur="getBlurVal1" placeholder="请输入账号" />
|
||||||
</view>
|
</view>
|
||||||
<view class="labales">
|
<view class="labales">
|
||||||
<image src="../../static/image/login/login(1).png"></image>
|
<image src="../../static/image/login/login(1).png"></image>
|
||||||
<input v-model="mimaA" type="password" placeholder="请输入密码" />
|
<input v-model="mimaA" type="password" placeholder="请输入密码" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view v-else>
|
||||||
|
<view class="labales">
|
||||||
|
<image src="../../static/image/login/login(3).png"></image>
|
||||||
|
<input v-model="phone" type="number" maxlength="11" placeholder="请输入手机号" />
|
||||||
|
</view>
|
||||||
|
<view class="labales">
|
||||||
|
<image src="../../static/image/login/safe.png"></image>
|
||||||
|
<input v-model="code" type="number" placeholder="请输入验证码" />
|
||||||
|
<u-button class="get-code" :class=" is_sendcode ? 'stopClick' : '' " :disabled="is_sendcode" @click="getCode">
|
||||||
|
{{ is_sendcode ? time_count + "后可以重新发送" : "发送验证码" }}
|
||||||
|
</u-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 服务协议 -->
|
||||||
|
<view class="pact">
|
||||||
|
<view class="pact-container">
|
||||||
|
<u-checkbox v-model="consentPact" shape="circle" size="30" label-size="26" icon-size="12" active-color="#ff780f">
|
||||||
|
<text>我已详细阅读并同意</text>
|
||||||
|
</u-checkbox>
|
||||||
|
<text class="pact-items" v-for="item in pactList" :key="item.id" @click="viewAgreement(item.id)"> {{ item.text }}</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- denglu QQ weixin -->
|
<!-- denglu QQ weixin -->
|
||||||
<button @click="logins">{{ login }}</button>
|
<button @click="logins">{{ login }}</button>
|
||||||
<!-- <u-button :custom-style="customStyle" ></u-button> -->
|
<!-- <u-button :custom-style="customStyle" ></u-button> -->
|
||||||
<u-toast ref="uToast" />
|
<u-toast ref="uToast" />
|
||||||
</view>
|
</view>
|
||||||
@ -56,13 +80,25 @@ export default {
|
|||||||
value: '',
|
value: '',
|
||||||
login: '登录',
|
login: '登录',
|
||||||
show: false,
|
show: false,
|
||||||
zhanghao: 'seller',
|
zhanghao: '',
|
||||||
mima: '123456',
|
mima: '',
|
||||||
zhanghaoA: '18953829598 ',
|
zhanghaoA: '',
|
||||||
mimaA: '123456',
|
mimaA: '',
|
||||||
url: '',
|
url: '',
|
||||||
|
phone: "",
|
||||||
|
code: "",
|
||||||
state:0,
|
state:0,
|
||||||
clickstate:false
|
clickstate:false,
|
||||||
|
// 时间
|
||||||
|
timer: null,
|
||||||
|
is_sendcode: false, // 60s
|
||||||
|
time_count: 60,
|
||||||
|
consentPact: true,
|
||||||
|
pactList: [{
|
||||||
|
"text": "《用户协议》"
|
||||||
|
},{
|
||||||
|
"text":"《隐私政策》"
|
||||||
|
}]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -70,34 +106,73 @@ export default {
|
|||||||
changetab(num){
|
changetab(num){
|
||||||
this.state = num
|
this.state = num
|
||||||
},
|
},
|
||||||
// 选中某个复选框时,由checkbox时触发
|
|
||||||
checkboxChange(e) {
|
|
||||||
//console.log(e);
|
|
||||||
},
|
|
||||||
// 选中任一checkbox时,由checkbox-group触发
|
|
||||||
checkboxGroupChange(e) {
|
|
||||||
// console.log(e);
|
|
||||||
},
|
|
||||||
mask_u() {
|
mask_u() {
|
||||||
this.show = !this.show;
|
this.show = !this.show;
|
||||||
},
|
},
|
||||||
// 获取验证码倒计时
|
// 获取验证码倒计时
|
||||||
getCode() {
|
getCode() {
|
||||||
console.log('11');
|
if (!this.$u.test.mobile(this.phone)) {
|
||||||
this.loading();
|
this.$refs.uToast.show({
|
||||||
|
title: '手机号码有误!',
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$u.api.getCode({
|
||||||
|
member_mobile: this.phone,
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res);
|
||||||
|
if (res.errCode == 0) {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: res.message,
|
||||||
|
type: 'success',
|
||||||
|
})
|
||||||
|
this.getSendCode();
|
||||||
|
} else {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: res.message,
|
||||||
|
type: "warning"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
loading() {},
|
// 失去焦点获取数据
|
||||||
|
getBlurVal(e) {
|
||||||
|
// console.log(e.detail.value);
|
||||||
|
this.zhanghao = this.$u.trim(e.detail.value,"all");
|
||||||
|
},
|
||||||
|
getBlurVal1(e) {
|
||||||
|
this.zhanghaoA = this.$u.trim(e.detail.value,"all");
|
||||||
|
// console.log(this.$u.trim(this.zhanghaoA));
|
||||||
|
},
|
||||||
logins() {
|
logins() {
|
||||||
|
// 检查网络
|
||||||
|
uni.getNetworkType({
|
||||||
|
success: (res) => {
|
||||||
|
console.log(res.networkType);
|
||||||
|
if (res.networkType == 'none') {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: '网络似乎断开了,请检查网络后重试',
|
||||||
|
type: 'error'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
// 不同意协议不让登录
|
||||||
|
if(!this.consentPact) return false;
|
||||||
|
|
||||||
// 判断是否可以点击
|
// 判断是否可以点击
|
||||||
if(this.clickstate==false){
|
// console.log(this.zhanghao);
|
||||||
this.clickstate=true
|
// if(this.clickstate==false){
|
||||||
}else{
|
// this.clickstate=true
|
||||||
this.$refs.uToast.show({
|
// }else{
|
||||||
title: "不能重复提交",
|
// 此验证存在逻辑问题,会出现卡死在这里的情况
|
||||||
type: 'error'
|
// this.$refs.uToast.show({
|
||||||
});
|
// title: "不能重复提交",
|
||||||
return
|
// type: 'error'
|
||||||
}
|
// });
|
||||||
|
// return
|
||||||
|
// }
|
||||||
// 清除本地存储才可以正常登陆(具体原因没有仔细检查)
|
// 清除本地存储才可以正常登陆(具体原因没有仔细检查)
|
||||||
// uni.clearStorage();
|
// uni.clearStorage();
|
||||||
// 账号登录1达人0商家
|
// 账号登录1达人0商家
|
||||||
@ -106,27 +181,58 @@ export default {
|
|||||||
console.log(JSON.stringify(res))
|
console.log(JSON.stringify(res))
|
||||||
if (res.errCode != 0) {
|
if (res.errCode != 0) {
|
||||||
// 恢复按钮可点击状态
|
// 恢复按钮可点击状态
|
||||||
this.clickstate=false
|
// this.clickstate=false
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
type: 'error'
|
type: 'error'
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
uni.setStorageSync('token', res.data.token);
|
uni.setStorageSync('token', res.data.token);
|
||||||
uni.setStorageSync('userinfo', res.data);
|
uni.setStorageSync('userinfo', res.data);
|
||||||
uni.setStorageSync('rongyun', res.data.rongcloud_token);
|
uni.setStorageSync('rongyun', res.data.rongcloud_token);
|
||||||
this.$u.route({
|
this.$u.route({
|
||||||
url: '/pages/user/myinfo'
|
url: '/pages/user/myinfo',
|
||||||
|
type:"redirect"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}else{
|
}else if (this.state == 2) {
|
||||||
|
if (!this.$u.test.mobile(this.phone)) {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: '手机号码有误!',
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.code.length < 4) {}
|
||||||
|
this.$u.api.starLogin({
|
||||||
|
member_mobile: this.phone,
|
||||||
|
sms_code: this.code,
|
||||||
|
}).then(res => {
|
||||||
|
if (res.errCode == 0) {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: res.message,
|
||||||
|
type: 'success',
|
||||||
|
})
|
||||||
|
uni.setStorageSync('token', res.data.token);
|
||||||
|
uni.setStorageSync('userinfo', res.data);
|
||||||
|
uni.setStorageSync('rongyun', res.data.rongcloud_token);
|
||||||
|
this.$u.route({
|
||||||
|
url: '/pages/user/myinfo',
|
||||||
|
type:"redirect"
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: res.message,
|
||||||
|
type: "warning"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else{
|
||||||
this.$u.api.shoplogin({ member_name: this.zhanghao, member_password: this.mima }).then(res => {
|
this.$u.api.shoplogin({ member_name: this.zhanghao, member_password: this.mima }).then(res => {
|
||||||
console.log(JSON.stringify(res))
|
console.log(JSON.stringify(res))
|
||||||
if (res.errCode != 0) {
|
if (res.errCode != 0) {
|
||||||
// 恢复按钮可点击状态
|
// 恢复按钮可点击状态
|
||||||
this.clickstate=false
|
// this.clickstate=false
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
type: 'error'
|
type: 'error'
|
||||||
@ -135,25 +241,70 @@ export default {
|
|||||||
uni.setStorageSync('token', res.data.token);
|
uni.setStorageSync('token', res.data.token);
|
||||||
uni.setStorageSync('userinfo', res.data);
|
uni.setStorageSync('userinfo', res.data);
|
||||||
uni.setStorageSync('rongyun', res.data.rongcloud_token);
|
uni.setStorageSync('rongyun', res.data.rongcloud_token);
|
||||||
this.$u.route({
|
// this.$u.route({
|
||||||
url: '/pages/index/index',
|
// url: '/pages/index/index',
|
||||||
type: 'switchTab'
|
// type: 'switchTab'
|
||||||
});
|
// });
|
||||||
|
uni.switchTab({
|
||||||
|
url: '/pages/index/index',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 60s
|
||||||
|
getSendCode() {
|
||||||
|
const TIME_COUNT = 60;
|
||||||
|
if (!this.timer) {
|
||||||
|
this.time_count = TIME_COUNT;
|
||||||
|
this.is_sendcode = true;
|
||||||
|
this.timer = setInterval(() => {
|
||||||
|
if (this.time_count > 0 && this.time_count <= TIME_COUNT) {
|
||||||
|
this.time_count--;
|
||||||
|
} else {
|
||||||
|
this.is_sendcode = false;
|
||||||
|
clearInterval(this.timer);
|
||||||
|
this.timer = null;
|
||||||
|
}
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
moveHandle(){
|
||||||
|
return;
|
||||||
|
},
|
||||||
|
viewAgreement(index) {
|
||||||
|
console.log(index);
|
||||||
|
if (index == 0) {
|
||||||
|
this.$u.route({
|
||||||
|
url: '/pages/login/agreements',
|
||||||
|
params: {
|
||||||
|
title: "用户协议"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (index == 1) {
|
||||||
|
this.$u.route({
|
||||||
|
url: '/pages/login/privacy_policy',
|
||||||
|
params: {
|
||||||
|
title: "隐私政策"
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
let token = uni.getStorageSync('token');
|
let token = uni.getStorageSync('token');
|
||||||
|
let user = uni.getStorageSync('userinfo');
|
||||||
|
console.log( user.role == 2 ? '/pages/index/index' : '/pages/user/myinfo')
|
||||||
if (token != undefined && token) {
|
if (token != undefined && token) {
|
||||||
this.$u.route({
|
this.$u.route({
|
||||||
url: '/pages/index/index'
|
url: user.role == 2 ? '/pages/index/index' : '/pages/user/myinfo',
|
||||||
|
type: user.role == 2 ? 'tab' : 'to'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -168,6 +319,7 @@ export default {
|
|||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
z-index: -1;/*-1 可以当背景*/
|
z-index: -1;/*-1 可以当背景*/
|
||||||
|
transform: scale(1.1);
|
||||||
-webkit-filter: blur(3px);
|
-webkit-filter: blur(3px);
|
||||||
filter: blur(3px);
|
filter: blur(3px);
|
||||||
}
|
}
|
||||||
@ -219,7 +371,7 @@ export default {
|
|||||||
.title {
|
.title {
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-bottom: 150rpx;
|
margin-bottom: 120rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
@ -244,27 +396,44 @@ export default {
|
|||||||
.labales text {
|
.labales text {
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.get-code {
|
||||||
|
width: auto !important;
|
||||||
|
height: 60rpx !important;
|
||||||
|
padding: 0 30rpx !important;
|
||||||
|
font-size: 24rpx !important;
|
||||||
|
line-height: 60rpx !important;
|
||||||
|
color: #fff !important;
|
||||||
|
border: none !important;
|
||||||
|
border-radius: 10rpx !important;
|
||||||
|
&::after {
|
||||||
|
border: none !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.labales {
|
.labales {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
height: 90rpx;
|
||||||
|
line-height: 90rpx;
|
||||||
border-bottom: 1px #fff solid;
|
border-bottom: 1px #fff solid;
|
||||||
margin-bottom: 180rpx;
|
&:first-child {
|
||||||
height: 70rpx;
|
margin-bottom: 100rpx;
|
||||||
line-height: 70rpx;
|
}
|
||||||
position: relative;
|
&:nth-child(2) {
|
||||||
|
margin-bottom: 80rpx;
|
||||||
|
}
|
||||||
input {
|
input {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
margin-left: 60rpx;
|
margin-left: 30rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
letter-spacing: 2rpx;
|
letter-spacing: 2rpx;
|
||||||
background-color: none;
|
background-color: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.labales image {
|
.labales image {
|
||||||
position: absolute;
|
flex-shrink: 0;
|
||||||
left: 0;
|
width: 38rpx;
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
width: 39rpx;
|
|
||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
}
|
}
|
||||||
.labales:nth-child(3) {
|
.labales:nth-child(3) {
|
||||||
@ -290,27 +459,27 @@ export default {
|
|||||||
letter-spacing: 2rpx;
|
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 {
|
.pact {
|
||||||
position: relative;
|
width: 670rpx;
|
||||||
padding-left: 40rpx;
|
margin: 0 auto 40rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
overflow: hidden; //超出的文本隐藏
|
overflow: hidden; //超出的文本隐藏
|
||||||
text-overflow: ellipsis; //溢出用省略号显示
|
text-overflow: ellipsis; //溢出用省略号显示
|
||||||
white-space: nowrap; //溢出不换行
|
white-space: nowrap; //溢出不换行
|
||||||
|
.pact-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
/deep/ .u-checkbox {
|
||||||
|
.u-checkbox__label {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.pact-items {
|
||||||
|
color: rgba(255, 120, 15, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.u-checkbox-group {
|
.u-checkbox-group {
|
||||||
|
37
pages/login/privacy_policy.vue
Normal file
70
pages/messages/info.vue
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<image :src="list.picture" class="picture" mode="widthFix"></image>
|
||||||
|
<view class="box">
|
||||||
|
<view class="info">
|
||||||
|
<text class="title u-line-2">{{ list.title }}</text>
|
||||||
|
<u-divider class="time">{{ list.addtime }}</u-divider>
|
||||||
|
<!-- <text class="time"></text> -->
|
||||||
|
</view>
|
||||||
|
<view class="content">{{ list.summary }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
id: 0,
|
||||||
|
list: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
// console.log(option);
|
||||||
|
this.id = option.id;
|
||||||
|
// 获取数据
|
||||||
|
this.informationList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
informationList(){
|
||||||
|
console.log(this.id)
|
||||||
|
this.$u.api.messageInfo({id:this.id}).then((res)=>{
|
||||||
|
this.list = res.data
|
||||||
|
console.log(res);
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
page {
|
||||||
|
}
|
||||||
|
.picture {
|
||||||
|
width: 750rpx;
|
||||||
|
}
|
||||||
|
.box {
|
||||||
|
width: 100%;
|
||||||
|
padding: 20rpx;
|
||||||
|
.info {
|
||||||
|
.title {
|
||||||
|
font-size: 38rpx;
|
||||||
|
color: rgba(0,0,0,.84);
|
||||||
|
line-height: 1.2;
|
||||||
|
}
|
||||||
|
.time {
|
||||||
|
padding: 40rpx 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.content {
|
||||||
|
padding: 0 6rpx;
|
||||||
|
font-size: 34rpx;
|
||||||
|
color: rgba(0,0,0,.6);
|
||||||
|
line-height: 1.4;
|
||||||
|
letter-spacing: 1rpx;
|
||||||
|
text-indent: 2rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
92
pages/messages/list.vue
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
<template>
|
||||||
|
<view class="box">
|
||||||
|
<view class="item" v-for="(item,index) in list" :key="index" @click="navto(item.id)">
|
||||||
|
<view class="time">{{item.addtime}}</view>
|
||||||
|
<view class="info">
|
||||||
|
<image class="img" :src="item.picture"></image>
|
||||||
|
<view class="title u-line-2">{{item.title}}</view>
|
||||||
|
<view class="next">
|
||||||
|
<text>查看详情</text>
|
||||||
|
<image class="right" src="@/static/image/user/1.png"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.box{
|
||||||
|
min-height: 100vh;
|
||||||
|
background-color: #EAEAEA;
|
||||||
|
.item{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
.time{
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #666;
|
||||||
|
padding: 30rpx 0;
|
||||||
|
}
|
||||||
|
.info{
|
||||||
|
width: 690rpx;
|
||||||
|
// height: 489rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
background-color: #fff;
|
||||||
|
.img{
|
||||||
|
width: 100%;
|
||||||
|
height: 280rpx;
|
||||||
|
}
|
||||||
|
.title{
|
||||||
|
height: 80rpx;
|
||||||
|
margin: 30rpx 25rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
line-height: 40rpx;
|
||||||
|
}
|
||||||
|
.next{
|
||||||
|
display: flex;
|
||||||
|
height: 84rpx;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 0 25rpx;
|
||||||
|
border-top: 1rpx solid #ebebeb;
|
||||||
|
>text{
|
||||||
|
font-size: 26rpx;
|
||||||
|
color:#666;
|
||||||
|
}
|
||||||
|
>image{
|
||||||
|
width: 9rpx;
|
||||||
|
height: 17rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data(){
|
||||||
|
return {
|
||||||
|
list:[]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(){
|
||||||
|
this.$u.api.messageList({page:1}).then((res)=>{
|
||||||
|
console.log(res)
|
||||||
|
this.list = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
navto(id){
|
||||||
|
console.log(id)
|
||||||
|
this.$u.route({
|
||||||
|
url:"/pages/messages/info",
|
||||||
|
params:{
|
||||||
|
id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
@ -7,7 +7,16 @@
|
|||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<!-- 消息列表 -->
|
<!-- 消息列表 -->
|
||||||
<u-empty text="并没有什么消息" mode="message" v-if="Object.keys(list).length == 0" style="margin: auto"></u-empty>
|
<view class="massage_list" @click="navto()">
|
||||||
|
<view class="images">
|
||||||
|
<image src="@/static/image/7.png" ></image>
|
||||||
|
</view>
|
||||||
|
<view class="names">活动消息</view>
|
||||||
|
<view class="content u-line-1">{{huodong.data.title}}</view>
|
||||||
|
<view class="times">{{huodong.data.addtime}}</view>
|
||||||
|
<view class="tishi" v-if="huodong.count != 0"></view>
|
||||||
|
</view>
|
||||||
|
<!-- <u-empty text="并没有什么消息" mode="message" v-if="Object.keys(list).length == 0" style="margin: auto"></u-empty> -->
|
||||||
<view class="massage_list" v-for="(item,index) in list" :key="index" @click="gochat(item)">
|
<view class="massage_list" v-for="(item,index) in list" :key="index" @click="gochat(item)">
|
||||||
<view class="images">
|
<view class="images">
|
||||||
<image :src="item.avatar" ></image>
|
<image :src="item.avatar" ></image>
|
||||||
@ -28,6 +37,11 @@
|
|||||||
list: [
|
list: [
|
||||||
|
|
||||||
],
|
],
|
||||||
|
huodong:{
|
||||||
|
data:{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -49,6 +63,12 @@
|
|||||||
|
|
||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
},
|
},
|
||||||
|
navto(){
|
||||||
|
console.log(1212)
|
||||||
|
this.$u.route({
|
||||||
|
url:"/pages/messages/list"
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onShow(){
|
onShow(){
|
||||||
// this.list = this.imService.friends;
|
// this.list = this.imService.friends;
|
||||||
@ -58,6 +78,10 @@
|
|||||||
const res = uni.getSystemInfoSync();
|
const res = uni.getSystemInfoSync();
|
||||||
this.swiperHeight = res.windowHeight;
|
this.swiperHeight = res.windowHeight;
|
||||||
this.list = this.imService.friends;
|
this.list = this.imService.friends;
|
||||||
|
this.$u.api.isread().then((res)=>{
|
||||||
|
console.log(res)
|
||||||
|
this.huodong = res.data
|
||||||
|
})
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@ -113,10 +137,7 @@
|
|||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
height: 30rpx;
|
height: 30rpx;
|
||||||
height: 30rpx;
|
line-height: 30rpx;
|
||||||
overflow:hidden; //超出的文本隐藏
|
|
||||||
text-overflow:ellipsis; //用省略号显示
|
|
||||||
white-space:nowrap; //不换行
|
|
||||||
}
|
}
|
||||||
.times{
|
.times{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -126,6 +126,7 @@
|
|||||||
this.friend = JSON.parse(options.id);
|
this.friend = JSON.parse(options.id);
|
||||||
this.currentUser = this.imService.currentUser;
|
this.currentUser = this.imService.currentUser;
|
||||||
let privateMessages = this.imService.getPrivateMessages(this.friend.uuid);
|
let privateMessages = this.imService.getPrivateMessages(this.friend.uuid);
|
||||||
|
this.imService.uid = this.friend.uuid;
|
||||||
this.messages = privateMessages.sentMessages;
|
this.messages = privateMessages.sentMessages;
|
||||||
this.pendingMessages = privateMessages.pendingMessages;
|
this.pendingMessages = privateMessages.pendingMessages;
|
||||||
|
|
||||||
@ -151,6 +152,7 @@
|
|||||||
this.imService.onPrivateHistoryLoad = (friendId, messages) =>{};
|
this.imService.onPrivateHistoryLoad = (friendId, messages) =>{};
|
||||||
//将未读消息数清零
|
//将未读消息数清零
|
||||||
this.imService.resetFriendUnReadMessage(this.friend);
|
this.imService.resetFriendUnReadMessage(this.friend);
|
||||||
|
this.imService.uid = 0;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initialListeners () {
|
initialListeners () {
|
||||||
@ -312,7 +314,7 @@
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
.chatInterface .top{
|
.chatInterface .top{
|
||||||
font-size: 24rpx;
|
font-size: 20rpx;
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@ -322,7 +324,7 @@
|
|||||||
color: blue;
|
color: blue;
|
||||||
}
|
}
|
||||||
.chatInterface .top .description{
|
.chatInterface .top .description{
|
||||||
text-decoration: underline;
|
/* text-decoration: underline; */
|
||||||
}
|
}
|
||||||
|
|
||||||
.chatInterface .message-item{
|
.chatInterface .message-item{
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<u-form :model="form" ref="uForm">
|
<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>
|
||||||
<!-- form-data -->
|
<!-- form-data -->
|
||||||
<view class="titles">封面</view>
|
<view class="titles">封面<text>(建议图片尺寸为334*334)</text></view>
|
||||||
<u-upload
|
<u-upload
|
||||||
:form-data="coverformdata"
|
:form-data="coverformdata"
|
||||||
:max-count="1"
|
:max-count="1"
|
||||||
@ -16,7 +16,7 @@
|
|||||||
:file-list="fileListA"
|
:file-list="fileListA"
|
||||||
@on-success="uploadcover"
|
@on-success="uploadcover"
|
||||||
></u-upload>
|
></u-upload>
|
||||||
<view class="titles">图片</view>
|
<view class="titles">图片<text>(最多选择5张图片,建议图片尺寸为750*700)</text></view>
|
||||||
<u-upload
|
<u-upload
|
||||||
:form-data="imgformdata"
|
:form-data="imgformdata"
|
||||||
name="article_image"
|
name="article_image"
|
||||||
@ -31,10 +31,14 @@
|
|||||||
></u-upload>
|
></u-upload>
|
||||||
<!-- 标签 -->
|
<!-- 标签 -->
|
||||||
<view>
|
<view>
|
||||||
<view class="titles">标签</view>
|
<view class="titles flex-title">
|
||||||
|
<text>标签</text>
|
||||||
|
<text @click="editing">{{ is_edit ? "取消编辑" : "编辑" }}</text>
|
||||||
|
</view>
|
||||||
<view class="form-view active" @click="show_add()">+ 新建标签</view>
|
<view class="form-view active" @click="show_add()">+ 新建标签</view>
|
||||||
<view :class="['form-view', item.state == true ? 'active' : '']" v-for="(item, index) in fileListes" :key="index" @click="changeselect(index)">
|
<view :class="['form-view', item.state == true ? 'active' : '']" v-for="(item, index) in fileListes" :key="index" @click="changeselect(index)">
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
|
<u-icon v-show="is_edit && item.user_id != 0" class="close" name="close" color="#666" size="18" @click="isTable(item.id,index)"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 简介 -->
|
<!-- 简介 -->
|
||||||
@ -68,7 +72,7 @@
|
|||||||
<view class="u-button" @click="changes()">确定</view>
|
<view class="u-button" @click="changes()">确定</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
<!-- 底部选择商品列表 -->
|
<!-- 底部选择商品列表 -->
|
||||||
<view @click="show_two = true">
|
<view @click="show_two = true" v-if="userinfo.role != 4">
|
||||||
选择商品
|
选择商品
|
||||||
<image class="images" src="../../static/image/tosign/bhottom.png"></image>
|
<image class="images" src="../../static/image/tosign/bhottom.png"></image>
|
||||||
</view>
|
</view>
|
||||||
@ -80,13 +84,13 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 提交 -->
|
<!-- 提交 -->
|
||||||
<u-button class="custom-style" shape="circle" size="default" @click="publish">发表</u-button>
|
<u-button :hair-line="false" class="custom-style" shape="circle" size="default" @click="publish">发表</u-button>
|
||||||
</u-form>
|
</u-form>
|
||||||
<!-- 添加标签的按钮 -->
|
<!-- 添加标签的按钮 -->
|
||||||
<u-popup v-model="show" mode="center" border-radius="14">
|
<u-popup v-model="show" mode="center" border-radius="14">
|
||||||
<view class="text">创建属于你的标签吧</view>
|
<view class="text">创建属于你的标签吧</view>
|
||||||
<view class="u-inputes"><u-input v-model="tagcontent" /></view>
|
<view class="u-inputes"><u-input v-model="tagcontent" /></view>
|
||||||
<u-button class="custom-style-button" shape="circle" size="default" @click="addLiveSpec">确定</u-button>
|
<u-button :hair-line="false" class="custom-style-button" shape="circle" size="default" @click="addLiveSpec">确定</u-button>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
<u-toast ref="uToast" />
|
<u-toast ref="uToast" />
|
||||||
</view>
|
</view>
|
||||||
@ -102,7 +106,7 @@ export default {
|
|||||||
sex: ''
|
sex: ''
|
||||||
},
|
},
|
||||||
// 演示地址,请勿直接使用
|
// 演示地址,请勿直接使用
|
||||||
action: 'https://dmmall.sdbairui.com/storeapi/Upload/uploadFile',
|
action: 'https://mall.dmygkeji.com/storeapi/Upload/uploadFile',
|
||||||
coverformdata: {
|
coverformdata: {
|
||||||
name: 'article_cover'
|
name: 'article_cover'
|
||||||
},
|
},
|
||||||
@ -131,13 +135,20 @@ export default {
|
|||||||
imgarr: [], //上传图片数组
|
imgarr: [], //上传图片数组
|
||||||
cover: '', //图文封面
|
cover: '', //图文封面
|
||||||
selectarr: [], //选中标签
|
selectarr: [], //选中标签
|
||||||
tagcontent: ''
|
tagcontent: '',
|
||||||
|
is_edit: false, // 编辑
|
||||||
|
userinfo:{},
|
||||||
|
device: null, // 手机信息
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
// 缓存取选择好的数据
|
// 缓存取选择好的数据\
|
||||||
|
this.userinfo = uni.getStorageSync("userinfo")
|
||||||
|
|
||||||
this.tosign();
|
this.tosign();
|
||||||
this.getLiveSpec();
|
this.getLiveSpec();
|
||||||
|
|
||||||
|
this.device = uni.getSystemInfoSync(); // 获取信息
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
publish() {
|
publish() {
|
||||||
@ -146,7 +157,7 @@ export default {
|
|||||||
for (let index in arr) {
|
for (let index in arr) {
|
||||||
newarr.push(arr[index].file_id);
|
newarr.push(arr[index].file_id);
|
||||||
}
|
}
|
||||||
console.log(this.imgarrA);
|
console.log(this.imgarrA,newarr);
|
||||||
this.$u.api
|
this.$u.api
|
||||||
.publishphoto({
|
.publishphoto({
|
||||||
article_title: this.form.name,
|
article_title: this.form.name,
|
||||||
@ -233,6 +244,8 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.tagcontent = '';
|
this.tagcontent = '';
|
||||||
this.show = false;
|
this.show = false;
|
||||||
|
res.data.state = false;
|
||||||
|
this.fileListes.push(res.data);
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
type: 'success'
|
type: 'success'
|
||||||
@ -240,9 +253,45 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 删除标签
|
||||||
|
isTable(id,index) {
|
||||||
|
uni.showModal({
|
||||||
|
title: "提示",
|
||||||
|
content: "是否删除此标签?",
|
||||||
|
success: (res) => {
|
||||||
|
console.log();
|
||||||
|
if (res.confirm) {
|
||||||
|
this.delTable(id,index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
delTable(id,index) {
|
||||||
|
let me = this;
|
||||||
|
this.$u.post("Streaming/deltLabel", {label_id: id}).then(res => {
|
||||||
|
if (res.errCode == 0) {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: res.message,
|
||||||
|
type: 'success'
|
||||||
|
});
|
||||||
|
this.fileListes.splice(index,1);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
// 上传封面
|
// 上传封面
|
||||||
uploadcover(data) {
|
uploadcover(data) {
|
||||||
console.log(data);
|
// console.log(data.data);
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
plus.io.getImageInfo({
|
||||||
|
src: data.data.file_path,
|
||||||
|
success: (res) => {
|
||||||
|
console.log(res);
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
console.log(err);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// #endif
|
||||||
if (data.errCode != 0) {
|
if (data.errCode != 0) {
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: '上传失败',
|
title: '上传失败',
|
||||||
@ -274,6 +323,10 @@ export default {
|
|||||||
show_add() {
|
show_add() {
|
||||||
this.show = !this.show;
|
this.show = !this.show;
|
||||||
},
|
},
|
||||||
|
// 编辑标签
|
||||||
|
editing() {
|
||||||
|
this.is_edit = !this.is_edit;
|
||||||
|
},
|
||||||
// 选中某个复选框时,由checkbox时触发
|
// 选中某个复选框时,由checkbox时触发
|
||||||
checkboxChange(e) {
|
checkboxChange(e) {
|
||||||
let that = this;
|
let that = this;
|
||||||
@ -338,19 +391,27 @@ export default {
|
|||||||
#release {
|
#release {
|
||||||
width: 690rpx;
|
width: 690rpx;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
padding-bottom:20rpx;
|
||||||
|
.flex-title {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
.form-view {
|
.form-view {
|
||||||
background: #cdc7c8;
|
|
||||||
border-radius: 6rpx;
|
|
||||||
margin-right: 20rpx;
|
|
||||||
font-size: 24rpx;
|
|
||||||
padding: 8rpx 20rpx;
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
padding: 8rpx 20rpx;
|
||||||
|
margin-right: 20rpx;
|
||||||
margin-bottom: 28rpx;
|
margin-bottom: 28rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
border-radius: 6rpx;
|
||||||
|
background-color: #cdc7c8;
|
||||||
|
.close {
|
||||||
|
margin-left: 10rpx;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.active {
|
.active {
|
||||||
background: #ff780f;
|
background-color: #ff780f;
|
||||||
}
|
}
|
||||||
.scroll {
|
.scroll {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -361,6 +422,10 @@ export default {
|
|||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: rgba(51, 51, 51, 1);
|
color: rgba(51, 51, 51, 1);
|
||||||
margin: 30rpx 0;
|
margin: 30rpx 0;
|
||||||
|
>text{
|
||||||
|
font-size: 20rpx;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
textarea {
|
textarea {
|
||||||
@ -460,6 +525,28 @@ export default {
|
|||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
|
||||||
.titles_border,
|
.titles_border,
|
||||||
.uni-textarea-compute {
|
.uni-textarea-compute {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- tosign页面 -->
|
<!-- tosign页面 -->
|
||||||
<view>
|
<view>
|
||||||
<view class="tosign" style="padding-bottom:180rpx">
|
<view class="tosign" style="">
|
||||||
<image class="images" src="../../static/image/login/login(2).png"></image>
|
<image class="images" src="../../static/image/login/login(2).png"></image>
|
||||||
<view class="backes"></view>
|
<view class="backes"></view>
|
||||||
<!-- z自定义导航卡 -->
|
<!-- z自定义导航卡 -->
|
||||||
@ -13,14 +13,14 @@
|
|||||||
<view id="content_tosign">
|
<view id="content_tosign">
|
||||||
<u-form :model="form" ref="uForm">
|
<u-form :model="form" ref="uForm">
|
||||||
<u-form-item label-position="right">
|
<u-form-item label-position="right">
|
||||||
<u-input v-model="max" placeholder="优秀的标题可以卖的更好哦~" />
|
<u-input v-model="max" :placeholder="userinfo.role != 4 ? '优秀的标题可以卖的更好哦~' : '优秀的标题可以吸引更多人观看哦~'" />
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<view class="values"><text>{{this.titleMaxLength - this.max.length}}</text>/20</view>
|
<view class="values"><text>{{this.titleMaxLength - this.max.length}}</text>/20</view>
|
||||||
<u-form-item label-position="right">
|
<u-form-item label-position="right">
|
||||||
<u-input v-model="form.text" placeholder="请填写直播简介" />
|
<u-input v-model="form.text" placeholder="请填写直播简介" />
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<view class="values"><text>{{20 - form.text.length}}</text>/20</view>
|
<view class="values"><text>{{20 - form.text.length}}</text>/20</view>
|
||||||
<u-form-item label-position="right" >
|
<u-form-item label-position="right" v-if="userinfo.role != 4">
|
||||||
<u-input :disabled="true" v-model="form.values" placeholder="我的售货袋" @click="navto('selectshop')"/>
|
<u-input :disabled="true" v-model="form.values" placeholder="我的售货袋" @click="navto('selectshop')"/>
|
||||||
<view class="rightes" @click="navto('selectshop')">售货袋</view>
|
<view class="rightes" @click="navto('selectshop')">售货袋</view>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
@ -28,7 +28,7 @@
|
|||||||
<!-- 标签的引入 -->
|
<!-- 标签的引入 -->
|
||||||
<tap_tosign :fileListes="fileListes" @chuangjian="chuangjian" @qiehuan="qiehuan"></tap_tosign>
|
<tap_tosign :fileListes="fileListes" @chuangjian="chuangjian" @qiehuan="qiehuan"></tap_tosign>
|
||||||
<view class="titles">直播封面图</view>
|
<view class="titles">直播封面图</view>
|
||||||
<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" @on-success="sccg" del-color="#ececec" upload-text="上传" del-bg-color="#fff" :before-upload="shangchuan"></u-upload>
|
<u-upload ref="upload" :form-data="{'name':'article_cover'}" action='https://mall.dmygkeji.com/storeapi/Upload/uploadFile' name="article_cover" :header="{'Authorization' : 'Bearer' + ' ' + token}" :max-count="1" :show-progress="true" @on-change="tupian" @on-success="sccg" del-color="#ececec" upload-text="上传" del-bg-color="#fff" :before-upload="shangchuan"></u-upload>
|
||||||
</view>
|
</view>
|
||||||
<view class="button-uview">
|
<view class="button-uview">
|
||||||
<u-button :hair-line="false" @click="kaibo">{{relerest}}</u-button>
|
<u-button :hair-line="false" @click="kaibo">{{relerest}}</u-button>
|
||||||
@ -63,7 +63,8 @@
|
|||||||
rSelect:[],
|
rSelect:[],
|
||||||
image:"",
|
image:"",
|
||||||
token:"",
|
token:"",
|
||||||
tiaozhuan:false
|
tiaozhuan:false,
|
||||||
|
userinfo:{}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -75,7 +76,8 @@
|
|||||||
},
|
},
|
||||||
shangchuan(){
|
shangchuan(){
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '上传中'
|
title: '上传中',
|
||||||
|
mask:true
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
tupian(){
|
tupian(){
|
||||||
@ -110,9 +112,19 @@
|
|||||||
tupian(a){
|
tupian(a){
|
||||||
// console.log(JSON.parse(a.data));
|
// console.log(JSON.parse(a.data));
|
||||||
let info = JSON.parse(a.data);
|
let info = JSON.parse(a.data);
|
||||||
console.log(info.data.file_path);
|
console.log(info);
|
||||||
// console.log(JSON.stringify(a.data))
|
// console.log(JSON.stringify(a.data))
|
||||||
this.image = info.data.file_path;
|
if(info.errCode == 1){
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: info.message,
|
||||||
|
type: 'error'
|
||||||
|
});
|
||||||
|
this.$refs.upload.clear()
|
||||||
|
return ;
|
||||||
|
|
||||||
|
}
|
||||||
|
this.image = info.data.file_name;
|
||||||
|
|
||||||
},
|
},
|
||||||
navto(url){
|
navto(url){
|
||||||
this.$u.route({
|
this.$u.route({
|
||||||
@ -124,6 +136,7 @@
|
|||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
this.tiaozhuan = true
|
this.tiaozhuan = true
|
||||||
|
console.log(this.image)
|
||||||
this.$u.api.createChatRoom({
|
this.$u.api.createChatRoom({
|
||||||
chat_name:this.max,
|
chat_name:this.max,
|
||||||
live_desc:this.form.text,
|
live_desc:this.form.text,
|
||||||
@ -131,7 +144,7 @@
|
|||||||
goods_id:uni.getStorageSync("gouwudai"),
|
goods_id:uni.getStorageSync("gouwudai"),
|
||||||
cover_img:this.image
|
cover_img:this.image
|
||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
console.log(res)
|
console.log(JSON.stringify(res))
|
||||||
if(res.errCode == 1){
|
if(res.errCode == 1){
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
@ -141,12 +154,14 @@
|
|||||||
}
|
}
|
||||||
this.$u.route({
|
this.$u.route({
|
||||||
url:"/pages/release/zhibo",
|
url:"/pages/release/zhibo",
|
||||||
|
type:"redirectTo",
|
||||||
params:{
|
params:{
|
||||||
url:res.data.url.replace("&","*"),
|
url:res.data.url.replace("&","*"),
|
||||||
id:res.data.chat_id,
|
id:res.data.chat_id,
|
||||||
live_id: res.data.live_id
|
live_id: res.data.live_id
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.tiaozhuan = true
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
init(){
|
init(){
|
||||||
@ -173,6 +188,8 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
this.token = uni.getStorageSync('token');
|
this.token = uni.getStorageSync('token');
|
||||||
|
this.userinfo = uni.getStorageSync("userinfo")
|
||||||
|
console.log(this.userinfo)
|
||||||
var config = {
|
var config = {
|
||||||
appkey: 'mgb7ka1',
|
appkey: 'mgb7ka1',
|
||||||
debug:true
|
debug:true
|
||||||
@ -508,11 +525,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.button-uview {
|
.button-uview {
|
||||||
position: fixed;
|
// position: fixed;
|
||||||
bottom: 40rpx;
|
// bottom: 40rpx;
|
||||||
left: 0;
|
// left: 0;
|
||||||
right: 0;
|
// right: 0;
|
||||||
margin: auto;
|
margin: 20rpx auto;
|
||||||
z-index: 10;
|
// z-index: 10;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<view id="release">
|
<view id="release" >
|
||||||
<u-form :model="form" ref="uForm">
|
<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>
|
<view class="titles">封面<text>(建议图片尺寸为334*334)</text></view>
|
||||||
<u-upload
|
<u-upload
|
||||||
:form-data="coverformdata"
|
:form-data="coverformdata"
|
||||||
:max-count="1"
|
:max-count="1"
|
||||||
@ -15,25 +15,34 @@
|
|||||||
:file-list="fileListA"
|
:file-list="fileListA"
|
||||||
@on-success="uploadcover"
|
@on-success="uploadcover"
|
||||||
></u-upload>
|
></u-upload>
|
||||||
<view class="titles">视频</view>
|
<view class="titles">视频<text>(建议视频时长在5分钟内,视频大小不超过100M)</text></view>
|
||||||
<view class="videobox" v-if="videostate == false" @click="uploadvideo">
|
<view class="videobox video-flex" v-if="videostate == false" @click="uploadvideo">
|
||||||
<u-icon name="plus" class="u-add-btn" size="40"></u-icon>
|
<u-icon name="plus" class="u-add-btn" size="40"></u-icon>
|
||||||
<view class="videotext">选择视频</view>
|
<view class="videotext">选择视频</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="videobox" v-else @click="uploadvideo"><video :src="videopath" controls></video></view>
|
<view class="videobox" v-else @click="uploadvideo">
|
||||||
|
<video v-if="!is_video" :src="videopath" controls></video>
|
||||||
|
<view v-else class="video-mode">
|
||||||
|
<image src="../../static/videoPlay.png" mode=""></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<!-- 标签 -->
|
<!-- 标签 -->
|
||||||
<view>
|
<view>
|
||||||
<view class="titles">标签</view>
|
<view class="titles flex-title">
|
||||||
|
<text>标签</text>
|
||||||
|
<text @click="editing">{{ is_edit ? "取消编辑" : "编辑" }}</text>
|
||||||
|
</view>
|
||||||
<view class="form-view active" @click="show_add()">+ 新建标签</view>
|
<view class="form-view active" @click="show_add()">+ 新建标签</view>
|
||||||
<view :class="['form-view', item.state == true ? 'active' : '']" v-for="(item, index) in fileListes" :key="index" @click="changeselect(index)">
|
<view :class="['form-view', item.state == true ? 'active' : '']" v-for="(item, index) in fileListes" :key="index" @click="changeselect(index)">
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
|
<u-icon v-show="is_edit && item.user_id != 0" class="close" name="close" color="#666" size="18" @click="isTable(item.id,index)"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 简介 -->
|
<!-- 简介 -->
|
||||||
<view class="titles">正文</view>
|
<view class="titles">正文</view>
|
||||||
<view class="titles_border"><textarea placeholder="请输入内容..." v-model="form.intro"></textarea></view>
|
<view class="titles_border"><textarea placeholder="请输入内容..." v-model="form.intro"></textarea></view>
|
||||||
<view class="show_two">
|
<view class="show_two">
|
||||||
<u-popup v-model="show_two" mode="bottom" :closeable="true">
|
<u-popup v-model="show_two" mode="bottom" @close="closeGood" :closeable="true">
|
||||||
<view class="title"><text>选择商品</text></view>
|
<view class="title"><text>选择商品</text></view>
|
||||||
<!-- 商品列表 -->
|
<!-- 商品列表 -->
|
||||||
<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll">
|
<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll">
|
||||||
@ -52,7 +61,7 @@
|
|||||||
<view class="u-button" @click="changes()">确定</view>
|
<view class="u-button" @click="changes()">确定</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
<!-- 底部选择商品列表 -->
|
<!-- 底部选择商品列表 -->
|
||||||
<view @click="show_two = true">
|
<view @click="selectGoods" v-if="userinfo.role != 4">
|
||||||
选择商品
|
选择商品
|
||||||
<image class="images" src="../../static/image/tosign/bhottom.png"></image>
|
<image class="images" src="../../static/image/tosign/bhottom.png"></image>
|
||||||
</view>
|
</view>
|
||||||
@ -64,13 +73,13 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 提交 -->
|
<!-- 提交 -->
|
||||||
<u-button class="custom-style" shape="circle" size="default" @click="publish">发表</u-button>
|
<u-button class="custom-style" shape="circle" size="default" :hair-line="false" @click="publish">发表</u-button>
|
||||||
</u-form>
|
</u-form>
|
||||||
<!-- 添加标签的按钮 -->
|
<!-- 添加标签的按钮 -->
|
||||||
<u-popup v-model="show" mode="center" border-radius="14" :closeable="true">
|
<u-popup v-model="show" mode="center" border-radius="14" :closeable="true">
|
||||||
<view class="text">创建属于你的标签吧</view>
|
<view class="text">创建属于你的标签吧</view>
|
||||||
<view class="u-inputes"><u-input v-model="tagcontent" /></view>
|
<view class="u-inputes"><u-input v-model="tagcontent" /></view>
|
||||||
<u-button class="custom-style-button" shape="circle" size="default" @click="addLiveSpec">确定</u-button>
|
<u-button :hair-line="false" class="custom-style-button" shape="circle" size="default" @click="addLiveSpec">确定</u-button>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
<u-toast ref="uToast" />
|
<u-toast ref="uToast" />
|
||||||
</view>
|
</view>
|
||||||
@ -82,11 +91,18 @@ let COS = require('../../common/cos-wx-sdk-v5.js');
|
|||||||
const upload_file_server = (_this, filepath) => {
|
const upload_file_server = (_this, filepath) => {
|
||||||
// 腾讯云配置
|
// 腾讯云配置
|
||||||
let cosConfig = {
|
let cosConfig = {
|
||||||
Bucket: 'dmmall-1300406074', //replace with yours
|
Bucket: 'dmmall-1302895943', //replace with yours
|
||||||
Region: 'ap-shanghai', //replace with yours
|
Region: 'ap-shanghai', //replace with yours
|
||||||
SecretId: 'AKIDjDPJhni9gTzEB9iGNWQ3PTVGjv74q7EL', //replace with yours
|
SecretId: 'AKID7z1lFeo0tV9YmmvZ52mrxlNmvqHTcuCF', //replace with yours
|
||||||
SecretKey: 'ye3SZOvAQO5X5LK3Vy933h6G86h4mqpG' //replace with yours
|
SecretKey: 'd3zTJ0RFwMYVE7jAMJzQ4UbS4YmmJiPq' //replace with yours
|
||||||
};
|
};
|
||||||
|
// 腾讯云配置
|
||||||
|
// let cosConfig = {
|
||||||
|
// Bucket: 'dmmall-1300406074', //replace with yours
|
||||||
|
// Region: 'ap-shanghai', //replace with yours
|
||||||
|
// SecretId: 'AKIDjDPJhni9gTzEB9iGNWQ3PTVGjv74q7EL', //replace with yours
|
||||||
|
// SecretKey: 'ye3SZOvAQO5X5LK3Vy933h6G86h4mqpG' //replace with yours
|
||||||
|
// };
|
||||||
// 获取本地文件
|
// 获取本地文件
|
||||||
let filePath = filepath;
|
let filePath = filepath;
|
||||||
// 自定义文件名以及路径
|
// 自定义文件名以及路径
|
||||||
@ -116,7 +132,7 @@ const upload_file_server = (_this, filepath) => {
|
|||||||
console.log(err, data, 12345);
|
console.log(err, data, 12345);
|
||||||
if (err == null) {
|
if (err == null) {
|
||||||
if (data.statusCode == 200) {
|
if (data.statusCode == 200) {
|
||||||
_this.videopath = 'https://dmmall-1300406074.cos.ap-shanghai.myqcloud.com/' + Key;
|
_this.videopath = 'https://dmmall-1302895943.cos.ap-shanghai.myqcloud.com/' + Key;
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
_this.videostate = true;
|
_this.videostate = true;
|
||||||
} else {
|
} else {
|
||||||
@ -137,6 +153,7 @@ const cImage = _this => {
|
|||||||
count: 1,
|
count: 1,
|
||||||
sourceType: ['camera', 'album'],
|
sourceType: ['camera', 'album'],
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
|
// _this.is_video = true;
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '上传中'
|
title: '上传中'
|
||||||
});
|
});
|
||||||
@ -161,12 +178,13 @@ export default {
|
|||||||
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||||
},
|
},
|
||||||
// 演示地址,请勿直接使用
|
// 演示地址,请勿直接使用
|
||||||
action: 'https://dmmall.sdbairui.com/storeapi/Upload/uploadFile',
|
action: 'https://mall.dmygkeji.com/storeapi/Upload/uploadFile',
|
||||||
fileListA: [],
|
fileListA: [],
|
||||||
imgarrA: [],
|
imgarrA: [],
|
||||||
videopath: '', //视频链接
|
videopath: '', //视频链接
|
||||||
fileListes: [],
|
fileListes: [],
|
||||||
show: false,
|
show: false,
|
||||||
|
is_video: false,
|
||||||
show_two: false,
|
show_two: false,
|
||||||
arres_list: [],
|
arres_list: [],
|
||||||
shoplist: [], //选择商品列表
|
shoplist: [], //选择商品列表
|
||||||
@ -176,13 +194,29 @@ export default {
|
|||||||
tagcontent: '', //新建标签名字
|
tagcontent: '', //新建标签名字
|
||||||
selectvideo: '', //视频名字
|
selectvideo: '', //视频名字
|
||||||
videostate: false, //视频状态
|
videostate: false, //视频状态
|
||||||
progress: 0
|
progress: 0,
|
||||||
|
is_edit: false, // 编辑标签
|
||||||
|
userinfo:{}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
this.userinfo = uni.getStorageSync("userinfo")
|
||||||
this.getLiveSpec();
|
this.getLiveSpec();
|
||||||
this.resetgood();
|
this.resetgood();
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
show() {
|
||||||
|
let me = this;
|
||||||
|
if (this.show) {
|
||||||
|
this.is_video = true;
|
||||||
|
} else {
|
||||||
|
setTimeout(function() {
|
||||||
|
me.is_video = false;
|
||||||
|
},600)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
immediate: true
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 获取可以推荐的商品
|
// 获取可以推荐的商品
|
||||||
resetgood() {
|
resetgood() {
|
||||||
@ -211,15 +245,23 @@ export default {
|
|||||||
label_arr: this.selectarr
|
label_arr: this.selectarr
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.errCode != 0) {
|
if (res.errCode != 0) {
|
||||||
this.$refs.uToast.show({
|
// this.$refs.uToast.show({
|
||||||
title: res.message,
|
// title: res.message,
|
||||||
type: 'error'
|
// type: 'error'
|
||||||
});
|
// });
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: "none"
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
this.$refs.uToast.show({
|
// this.$refs.uToast.show({
|
||||||
title: res.message,
|
// title: res.message,
|
||||||
type: 'success'
|
// type: 'success'
|
||||||
});
|
// });
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: "none"
|
||||||
|
})
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
uni.navigateBack({
|
uni.navigateBack({
|
||||||
delta: 1
|
delta: 1
|
||||||
@ -252,23 +294,42 @@ export default {
|
|||||||
this.selectarr.push(this.fileListes[num].id);
|
this.selectarr.push(this.fileListes[num].id);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 选择商品
|
||||||
|
selectGoods() {
|
||||||
|
this.show_two = true;
|
||||||
|
this.is_video = true;
|
||||||
|
},
|
||||||
|
// 选择商品弹窗关闭
|
||||||
|
closeGood() {
|
||||||
|
this.is_video = false;
|
||||||
|
},
|
||||||
// 创建标签
|
// 创建标签
|
||||||
addLiveSpec() {
|
addLiveSpec() {
|
||||||
this.$u.api.createLivesp({
|
this.$u.api.createLivesp({
|
||||||
spec_name: this.tagcontent
|
spec_name: this.tagcontent
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.errCode != 0) {
|
if (res.errCode != 0) {
|
||||||
this.$refs.uToast.show({
|
// this.$refs.uToast.show({
|
||||||
title: res.message,
|
// title: res.message,
|
||||||
type: 'error'
|
// type: 'error',
|
||||||
});
|
// });
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: "none"
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
this.tagcontent = '';
|
this.tagcontent = '';
|
||||||
this.show = false;
|
this.show = false;
|
||||||
this.$refs.uToast.show({
|
res.data.state = false;
|
||||||
title: res.message,
|
this.fileListes.push(res.data);
|
||||||
type: 'success'
|
// this.$refs.uToast.show({
|
||||||
});
|
// title: res.message,
|
||||||
|
// type: 'success'
|
||||||
|
// });
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: "none"
|
||||||
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -277,10 +338,14 @@ export default {
|
|||||||
let that = this;
|
let that = this;
|
||||||
this.$u.api.getLiveSpec({}).then(res => {
|
this.$u.api.getLiveSpec({}).then(res => {
|
||||||
if (res.errCode != 0) {
|
if (res.errCode != 0) {
|
||||||
this.$refs.uToast.show({
|
// this.$refs.uToast.show({
|
||||||
title: res.message,
|
// title: res.message,
|
||||||
type: 'error'
|
// type: 'error'
|
||||||
});
|
// });
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: "none"
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
let arr = res.data;
|
let arr = res.data;
|
||||||
for (let index in arr) {
|
for (let index in arr) {
|
||||||
@ -290,6 +355,34 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 删除标签
|
||||||
|
isTable(id,index) {
|
||||||
|
uni.showModal({
|
||||||
|
title: "提示",
|
||||||
|
content: "是否删除此标签?",
|
||||||
|
success: (res) => {
|
||||||
|
if (res.confirm) {
|
||||||
|
this.delTable(id,index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
delTable(id,index) {
|
||||||
|
let me = this;
|
||||||
|
this.$u.post("Streaming/deltLabel", {label_id: id}).then(res => {
|
||||||
|
if (res.errCode == 0) {
|
||||||
|
// this.$refs.uToast.show({
|
||||||
|
// title: res.message,
|
||||||
|
// type: 'success'
|
||||||
|
// });
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: "none"
|
||||||
|
})
|
||||||
|
this.fileListes.splice(index,1);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
// 上传封面
|
// 上传封面
|
||||||
uploadcover(data) {
|
uploadcover(data) {
|
||||||
let obj = data.data;
|
let obj = data.data;
|
||||||
@ -304,6 +397,10 @@ export default {
|
|||||||
show_add() {
|
show_add() {
|
||||||
this.show = !this.show;
|
this.show = !this.show;
|
||||||
},
|
},
|
||||||
|
// 编辑标签
|
||||||
|
editing() {
|
||||||
|
this.is_edit = !this.is_edit;
|
||||||
|
},
|
||||||
// 选择直播商品点击确定
|
// 选择直播商品点击确定
|
||||||
changes() {
|
changes() {
|
||||||
let that = this;
|
let that = this;
|
||||||
@ -351,6 +448,11 @@ export default {
|
|||||||
#release {
|
#release {
|
||||||
width: 690rpx;
|
width: 690rpx;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
padding-bottom:20rpx;
|
||||||
|
.flex-title {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
.titles_border,
|
.titles_border,
|
||||||
.uni-textarea-compute {
|
.uni-textarea-compute {
|
||||||
border: 1px #bababa solid !important;
|
border: 1px #bababa solid !important;
|
||||||
@ -485,6 +587,10 @@ export default {
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-bottom: 28rpx;
|
margin-bottom: 28rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
.close {
|
||||||
|
margin-left: 10rpx;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.active {
|
.active {
|
||||||
background: #ff780f;
|
background: #ff780f;
|
||||||
@ -494,17 +600,38 @@ export default {
|
|||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: rgba(51, 51, 51, 1);
|
color: rgba(51, 51, 51, 1);
|
||||||
margin: 30rpx 0;
|
margin: 30rpx 0;
|
||||||
|
>text{
|
||||||
|
font-size: 20rpx;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
.video-flex {
|
||||||
|
flex-direction: column;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
.videobox {
|
.videobox {
|
||||||
width: 200rpx;
|
width: 200rpx;
|
||||||
height: 200rpx;
|
height: 200rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background: #f4f5f6;
|
background-color: #f4f5f6;
|
||||||
margin-left: 10rpx;
|
margin-left: 10rpx;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
|
|
||||||
|
.video-mode {
|
||||||
|
width: 200rpx;
|
||||||
|
height: 200rpx;
|
||||||
|
line-height: 280rpx;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
background-color: #000;
|
||||||
|
& > image {
|
||||||
|
width: 100rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.videotext {
|
.videotext {
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
@ -519,7 +646,20 @@ export default {
|
|||||||
.custom-style {
|
.custom-style {
|
||||||
background: rgba(255, 120, 15, 1) !important;
|
background: rgba(255, 120, 15, 1) !important;
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
|
// font-size: 36rpx;
|
||||||
|
}
|
||||||
|
.u-btn {
|
||||||
|
width: 628rpx;
|
||||||
|
height: 98rpx;
|
||||||
|
background: rgba(255, 120, 15, 1) !important;
|
||||||
|
border-radius: 49rpx;
|
||||||
|
margin: 0 auto;
|
||||||
font-size: 36rpx;
|
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;
|
||||||
}
|
}
|
||||||
.custom-style-button {
|
.custom-style-button {
|
||||||
background: rgba(255, 120, 15, 1) !important;
|
background: rgba(255, 120, 15, 1) !important;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<div class="head">
|
<div class="head">
|
||||||
<div style="flex-direction: row;align-items:center">
|
<div style="flex-direction: row;align-items:center">
|
||||||
<text class="title">全部商品</text>
|
<text class="title">全部商品</text>
|
||||||
<text class="num">2件</text>
|
<text class="num">{{list.length}}件</text>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="add">
|
<!-- <div class="add">
|
||||||
<text style="font-size:28rpx;color: #fff;text-align:center">添加/管理商品</text>
|
<text style="font-size:28rpx;color: #fff;text-align:center">添加/管理商品</text>
|
||||||
@ -35,21 +35,21 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="user">
|
<div v-if="zhibo" class="user">
|
||||||
</div>
|
</div>
|
||||||
<div style="position: fixed;top: 60rpx;left: 30rpx;flex-direction: row;align-items:center">
|
<div v-if="zhibo" style="position: fixed;top: 60rpx;left: 30rpx;flex-direction: row;align-items:center">
|
||||||
<image class="userhead" :src="info.member_avatar"></image>
|
<image class="userhead" :src="info.member_avatar"></image>
|
||||||
<div class="userinfo">
|
<div class="userinfo">
|
||||||
<text class="username">{{info.member_name}}</text>
|
<text class="username">{{info.member_nickname}}</text>
|
||||||
<text class="username" style="font-size:20rpx">{{time}} | sadasdas</text>
|
<text class="username" style="font-size:20rpx">{{time}} | {{room.onlineUsers.users.length - 1 < 0 ? 0 : room.onlineUsers.users.length - 1}}</text>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<image class="closeimg" src="../../static/image/close.png" @click="closes"></image>
|
<image v-if="zhibo" class="closeimg" src="../../static/image/close.png" @click="closes"></image>
|
||||||
<image class="menuimg" src="../../static/image/menu.png" @click="tool = true"></image>
|
<image v-if="zhibo" class="menuimg" src="../../static/image/menu.png" @click="tool = true"></image>
|
||||||
<image class="shoptapimg" @click="xianshi" src="../../static/image/shop.png"></image>
|
<image v-if="zhibo && list.length != 0" 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 v-if="zhibo && fen" style="font-size:26rpx;color:#fff;width:512rpx;position:fixed;left:30rpx;top:793rpx;">本平台提倡绿色健康直播,严禁在平台内外出现诱导未成年人诈骗、赌博、低俗色情、吸烟酗酒等不当行为,若有违反,将向相关部门依法追究您的法律责任。如因此给平台造成损失,有权向您全额追偿。
|
||||||
</text>
|
</text>
|
||||||
<div class="danmulist">
|
<div v-if="zhibo" class="danmulist">
|
||||||
<text class="danmuitem" v-for="(i,j) in danmulist" :key="j">{{i.senderNickname}}:{{i.content}}</text>
|
<text class="danmuitem" v-for="(i,j) in danmulist" :key="j">{{i.senderNickname}}:{{i.content}}</text>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -59,12 +59,12 @@
|
|||||||
<text class="menutitle">直播工具</text>
|
<text class="menutitle">直播工具</text>
|
||||||
<view class="menutool">
|
<view class="menutool">
|
||||||
<view class="menutoolitem" @click="switchCamera">
|
<view class="menutoolitem" @click="switchCamera">
|
||||||
<image class="menutoolitemimg"></image>
|
<image src="../../static/images/fanzhuan.png" class="menutoolitemimg"></image>
|
||||||
<text class="menutoolitemtitle">翻转</text>
|
<text class="menutoolitemtitle">翻转</text>
|
||||||
</view>
|
</view>
|
||||||
<picker @change="bindPickerChange" :value="meiyan" :range="[1,2,3,4,5,6,7,8,9]">
|
<picker @change="bindPickerChange" :value="meiyan" :range="[1,2,3,4,5,6,7,8,9]">
|
||||||
<view class="menutoolitem">
|
<view class="menutoolitem">
|
||||||
<image class="menutoolitemimg"></image>
|
<image src="../../static/images/meiyan.png" class="menutoolitemimg"></image>
|
||||||
<text class="menutoolitemtitle">美颜</text>
|
<text class="menutoolitemtitle">美颜</text>
|
||||||
</view>
|
</view>
|
||||||
</picker>
|
</picker>
|
||||||
@ -72,6 +72,31 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="jieshu" v-if="!zhibo" :style="{'height':height + 'px'}">
|
||||||
|
<div class="jieshuback" :style="{'height':height + 'px'}" @click="closes1"></div>
|
||||||
|
<image class="closeimg" src="../../static/image/cloneb.png" @click="closes"></image>
|
||||||
|
<text class="jieshutitle">徳铭阳光在线</text>
|
||||||
|
<image class="jieshuheadimg" @click="closes1" :src="info.member_avatar"></image>
|
||||||
|
<text class="jieshuusername">{{info.member_nickname}}</text>
|
||||||
|
<div class="jieshubox">
|
||||||
|
<view class="jieshuboxitem">
|
||||||
|
<text style="color:#fff;font-size:30rpx">{{jieshu.newfans}}</text>
|
||||||
|
<text style="color:#fff;font-size:30rpx;margin-top:10rpx">新粉丝</text>
|
||||||
|
</view>
|
||||||
|
<view class="jieshuboxitem">
|
||||||
|
<text style="color:#fff;font-size:30rpx">{{jieshu.headcount}}</text>
|
||||||
|
<text style="color:#fff;font-size:30rpx;margin-top:10rpx">观看人数</text>
|
||||||
|
</view>
|
||||||
|
<view class="jieshuboxitem" v-if="list.length != 0">
|
||||||
|
<text style="color:#fff;font-size:30rpx">RMB {{jieshu.sales_amount}}</text>
|
||||||
|
<text style="color:#fff;font-size:30rpx;margin-top:10rpx">直播销量</text>
|
||||||
|
</view>
|
||||||
|
<view class="jieshuboxitem" v-if="list.length != 0">
|
||||||
|
<text style="color:#fff;font-size:30rpx">{{jieshu.buy_num}}</text>
|
||||||
|
<text style="color:#fff;font-size:30rpx;margin-top:10rpx">购买人数</text>
|
||||||
|
</view>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<!-- <button class="btn" @click="start">开始推流1</button>
|
<!-- <button class="btn" @click="start">开始推流1</button>
|
||||||
<button class="btn" @click="pause">暂停推流</button>
|
<button class="btn" @click="pause">暂停推流</button>
|
||||||
<button class="btn" @click="resume">resume</button>
|
<button class="btn" @click="resume">resume</button>
|
||||||
@ -84,6 +109,58 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.jieshuboxitem{
|
||||||
|
width: 210rpx;
|
||||||
|
height: 120rpx;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.jieshubox{
|
||||||
|
width: 438rpx;
|
||||||
|
height: 288rpx;
|
||||||
|
border-width: 1rpx;
|
||||||
|
border-color: #fff;
|
||||||
|
margin-top: 78rpx;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
}
|
||||||
|
.jieshuusername{
|
||||||
|
font-size: 30rpx;
|
||||||
|
margin-top: 31rpx;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.jieshuheadimg{
|
||||||
|
width: 154rpx;
|
||||||
|
height: 154rpx;
|
||||||
|
border-radius: 77rpx;
|
||||||
|
}
|
||||||
|
.jieshutitle{
|
||||||
|
font-size: 30rpx;
|
||||||
|
color:#fff;
|
||||||
|
width: 350rpx;
|
||||||
|
position: absolute;
|
||||||
|
top: 70rpx;
|
||||||
|
left: 31rpx;
|
||||||
|
height: 31rpx;
|
||||||
|
}
|
||||||
|
.jieshuback{
|
||||||
|
background-color: #000;
|
||||||
|
opacity: 0.8;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: 750rpx;
|
||||||
|
}
|
||||||
|
.jieshu{
|
||||||
|
z-index: 9999;
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 750rpx;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
.shoptapimg{
|
.shoptapimg{
|
||||||
width: 65rpx;
|
width: 65rpx;
|
||||||
height: 65rpx;
|
height: 65rpx;
|
||||||
@ -99,11 +176,13 @@
|
|||||||
bottom: 24rpx;
|
bottom: 24rpx;
|
||||||
}
|
}
|
||||||
.closeimg{
|
.closeimg{
|
||||||
position: fixed;
|
position: absolute;
|
||||||
top: 70rpx;
|
top: 70rpx;
|
||||||
right: 31rpx;
|
right: 31rpx;
|
||||||
width: 31rpx;
|
width: 51rpx;
|
||||||
height: 31rpx;
|
height: 51rpx;
|
||||||
|
padding:10rpx;
|
||||||
|
z-index:99999;
|
||||||
}
|
}
|
||||||
.username{
|
.username{
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
@ -155,7 +234,9 @@
|
|||||||
border-bottom-width: 2rpx;
|
border-bottom-width: 2rpx;
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
border-color: #ECECEC;
|
border-color: #ECECEC;
|
||||||
|
/* #ifndef APP-PLUS-NVUE */
|
||||||
display: flex;
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
@ -190,7 +271,9 @@
|
|||||||
border-bottom-width: 2rpx;
|
border-bottom-width: 2rpx;
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
border-color: #ECECEC;
|
border-color: #ECECEC;
|
||||||
|
/* #ifndef APP-PLUS-NVUE */
|
||||||
display: flex;
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
@ -262,11 +345,16 @@
|
|||||||
position: fixed;
|
position: fixed;
|
||||||
left: 30rpx;
|
left: 30rpx;
|
||||||
bottom: 118rpx;
|
bottom: 118rpx;
|
||||||
|
width: 690rpx;
|
||||||
}
|
}
|
||||||
.danmuitem{
|
.danmuitem{
|
||||||
font-size: 26rpx;
|
font-size: 30rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
flex-direction: column-reverse;
|
flex-direction: column-reverse;
|
||||||
|
/* #ifndef APP-PLUS-NVUE */
|
||||||
|
word-wrap:anywhere;
|
||||||
|
/* #endif */
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.livePusher{
|
.livePusher{
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
@ -290,18 +378,33 @@
|
|||||||
time:'00:00:00',
|
time:'00:00:00',
|
||||||
room:{},
|
room:{},
|
||||||
chatRoomService:{},
|
chatRoomService:{},
|
||||||
danmulist:[]
|
danmulist:[],
|
||||||
|
zhibo:true,
|
||||||
|
jieshu:{},
|
||||||
|
renshumax:0,
|
||||||
|
changeLiveRealtimeNumber:{},
|
||||||
|
fen:true
|
||||||
},
|
},
|
||||||
onLaunch: function() {
|
onLaunch: function() {
|
||||||
console.log('App Launch');
|
console.log('App Launch');
|
||||||
},
|
},
|
||||||
onShow: function() {
|
onShow: function() {
|
||||||
|
if(!this.zhibo){
|
||||||
|
return ;
|
||||||
|
}
|
||||||
this.stop()
|
this.stop()
|
||||||
this.startPreview()
|
this.startPreview()
|
||||||
this.start()
|
this.start()
|
||||||
|
// var message = {
|
||||||
|
// senderNickname : this.room.currentUser.nickname ,
|
||||||
|
// type : 1,
|
||||||
|
// content : '重连'
|
||||||
|
// }
|
||||||
|
// this.chatRoomService.sendMessages(this.room.id, message);
|
||||||
},
|
},
|
||||||
onHide: function() {
|
onHide: function() {
|
||||||
console.log('App Hide');
|
console.log('App Hide');
|
||||||
|
this.chatRoomService.warrings = ()=>{};
|
||||||
},
|
},
|
||||||
//模拟onshow生命周期
|
//模拟onshow生命周期
|
||||||
created() {
|
created() {
|
||||||
@ -343,18 +446,28 @@
|
|||||||
},500)
|
},500)
|
||||||
|
|
||||||
},
|
},
|
||||||
|
onBackPress(options) {
|
||||||
|
if (options.from === 'navigateBack' || !this.zhibo) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
this.closes();
|
||||||
|
return true;
|
||||||
|
},
|
||||||
onLoad(a){
|
onLoad(a){
|
||||||
|
|
||||||
console.log(getApp().globalData.im)
|
console.log(getApp().globalData.im)
|
||||||
|
uni.setKeepScreenOn({
|
||||||
|
keepScreenOn: true
|
||||||
|
});
|
||||||
this.url = a.url.replace("*","&")
|
this.url = a.url.replace("*","&")
|
||||||
let that = this
|
let that = this
|
||||||
const token = uni.getStorageSync('token');
|
const token = uni.getStorageSync('token');
|
||||||
console.log('Bearer' + " " + token)
|
console.log('Bearer' + " " + token)
|
||||||
this.chatroom_id = a.id
|
this.chatroom_id = a.id
|
||||||
this.live_id = a.live_id
|
this.live_id = a.live_id
|
||||||
|
|
||||||
uni.request({
|
uni.request({
|
||||||
url:"https://dmmall.sdbairui.com/storeapi/Streaming/liveStreamList",
|
url:"https://mall.dmygkeji.com/storeapi/Streaming/liveStreamList",
|
||||||
method:"POST",
|
method:"POST",
|
||||||
header:{
|
header:{
|
||||||
'Authorization' : 'Bearer' + " " + token
|
'Authorization' : 'Bearer' + " " + token
|
||||||
@ -365,7 +478,7 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
uni.request({
|
uni.request({
|
||||||
url:"https://dmmall.sdbairui.com/storeapi/member/memberInfo",
|
url:"https://mall.dmygkeji.com/storeapi/member/memberInfo",
|
||||||
method:"POST",
|
method:"POST",
|
||||||
header:{
|
header:{
|
||||||
'Authorization' : 'Bearer' + " " + token
|
'Authorization' : 'Bearer' + " " + token
|
||||||
@ -391,8 +504,11 @@
|
|||||||
//构造chatRoomService
|
//构造chatRoomService
|
||||||
that.chatRoomService.subscribeRoomMessage(room,currentUser)
|
that.chatRoomService.subscribeRoomMessage(room,currentUser)
|
||||||
that.chatRoomService.initialWhenNewMessage(that.whenNewMessage);
|
that.chatRoomService.initialWhenNewMessage(that.whenNewMessage);
|
||||||
|
that.chatRoomService.warrings = that.jinggao
|
||||||
//获取当前聊天室数据
|
//获取当前聊天室数据
|
||||||
that.room = that.chatRoomService.room;
|
that.room = that.chatRoomService.room;
|
||||||
|
console.log(that.room)
|
||||||
|
that.chatRoomService.initialWhenOnlineUserChange(that.renqu)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
let shi = 0;
|
let shi = 0;
|
||||||
@ -404,6 +520,9 @@
|
|||||||
miao = parseInt(miao)
|
miao = parseInt(miao)
|
||||||
miao = miao + 1
|
miao = miao + 1
|
||||||
// console.log(miao)
|
// console.log(miao)
|
||||||
|
if(fen > 0){
|
||||||
|
that.fen = false;
|
||||||
|
}
|
||||||
if(miao == 60){
|
if(miao == 60){
|
||||||
miao = 0;
|
miao = 0;
|
||||||
fen +=1
|
fen +=1
|
||||||
@ -423,6 +542,24 @@
|
|||||||
}
|
}
|
||||||
that.time = shi + ":" + fen + ":" + miao
|
that.time = shi + ":" + fen + ":" + miao
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
setInterval(()=>{
|
||||||
|
console.log("定时")
|
||||||
|
uni.request({
|
||||||
|
url:"https://mall.dmygkeji.com/storeapi/Streaming/changeLiveRealtimeNumber",
|
||||||
|
method:"POST",
|
||||||
|
header:{
|
||||||
|
'Authorization' : 'Bearer' + " " + token
|
||||||
|
},
|
||||||
|
data:{
|
||||||
|
live_id:that.live_id,
|
||||||
|
realtime_number: that.room.onlineUsers.users.length - 1 < 0 ? 0 : that.room.onlineUsers.users.length - 1
|
||||||
|
},
|
||||||
|
success(res){
|
||||||
|
console.log(JSON.stringify(res))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
10 * 1000)
|
||||||
// var roomToken = JSON.parse(options.roomToken);
|
// var roomToken = JSON.parse(options.roomToken);
|
||||||
|
|
||||||
|
|
||||||
@ -474,6 +611,38 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
jinggao(text){
|
||||||
|
console.log(text)
|
||||||
|
if(text.message_type == 1){
|
||||||
|
uni.showModal({
|
||||||
|
title: '警告',
|
||||||
|
content: text.content,
|
||||||
|
showCancel:false,
|
||||||
|
success: function (res) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else if(text.message_type == 2){
|
||||||
|
uni.showModal({
|
||||||
|
title: '警告',
|
||||||
|
content: text.content,
|
||||||
|
showCancel:false,
|
||||||
|
success: function (res) {
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.stop()
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
renqu(res){
|
||||||
|
if(res.users.length > this.renqu){
|
||||||
|
this.renqu = res.users.length
|
||||||
|
}
|
||||||
|
this.$forceUpdate()
|
||||||
|
},
|
||||||
whenNewMessage (message) {//新消息监听
|
whenNewMessage (message) {//新消息监听
|
||||||
// if(message.type == this.room.MessageType.PROP){
|
// if(message.type == this.room.MessageType.PROP){
|
||||||
// this.propAnimation(parseInt(message.content))
|
// this.propAnimation(parseInt(message.content))
|
||||||
@ -495,7 +664,19 @@
|
|||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
closes1() {
|
||||||
|
console.log(111);
|
||||||
|
},
|
||||||
closes(){
|
closes(){
|
||||||
|
console.log(this.zhibo)
|
||||||
|
if(!this.zhibo){
|
||||||
|
uni.navigateBack({
|
||||||
|
delta:1
|
||||||
|
});
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
this.chatRoomService.warrings = ()=>{};
|
||||||
|
|
||||||
const token = uni.getStorageSync('token');
|
const token = uni.getStorageSync('token');
|
||||||
let that = this
|
let that = this
|
||||||
console.log(that.url)
|
console.log(that.url)
|
||||||
@ -505,7 +686,7 @@
|
|||||||
success: function (res) {
|
success: function (res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
uni.request({
|
uni.request({
|
||||||
url:"https://dmmall.sdbairui.com/storeapi/Streaming/destroyChatRoom",
|
url:"https://mall.dmygkeji.com/storeapi/Streaming/destroyChatRoom",
|
||||||
data:{
|
data:{
|
||||||
chatroom_id:that.chatroom_id,
|
chatroom_id:that.chatroom_id,
|
||||||
live_id:that.live_id,
|
live_id:that.live_id,
|
||||||
@ -517,9 +698,12 @@
|
|||||||
},
|
},
|
||||||
success(res){
|
success(res){
|
||||||
console.log(res)
|
console.log(res)
|
||||||
uni.navigateBack({
|
that.stop()
|
||||||
delta: 1
|
that.jieshu = res.data.data
|
||||||
});
|
that.zhibo = false
|
||||||
|
// uni.navigateBack({
|
||||||
|
// delta: 1
|
||||||
|
// });
|
||||||
// that.list= res.data.data
|
// that.list= res.data.data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -630,9 +814,10 @@
|
|||||||
arr.push(this.list[i].goods_id)
|
arr.push(this.list[i].goods_id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
console.log(arr.join(','))
|
||||||
let that = this
|
let that = this
|
||||||
uni.request({
|
uni.request({
|
||||||
url:"https://dmmall.sdbairui.com/storeapi/Streaming/updateGoods",
|
url:"https://mall.dmygkeji.com/storeapi/Streaming/updateGoods",
|
||||||
method:"POST",
|
method:"POST",
|
||||||
data:{
|
data:{
|
||||||
goods_id:arr.join(',')
|
goods_id:arr.join(',')
|
||||||
@ -643,7 +828,7 @@
|
|||||||
success(res){
|
success(res){
|
||||||
console.log(res)
|
console.log(res)
|
||||||
uni.request({
|
uni.request({
|
||||||
url:"https://dmmall.sdbairui.com//storeapi/Streaming/liveStreamList",
|
url:"https://mall.dmygkeji.com//storeapi/Streaming/liveStreamList",
|
||||||
method:"POST",
|
method:"POST",
|
||||||
header:{
|
header:{
|
||||||
'Authorization' : 'Bearer' + " " + token
|
'Authorization' : 'Bearer' + " " + token
|
||||||
|
@ -47,6 +47,7 @@ export default {
|
|||||||
this.$u.api.reportdetail({
|
this.$u.api.reportdetail({
|
||||||
id: id
|
id: id
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
console.log(res)
|
||||||
if (res.errCode != 0) {
|
if (res.errCode != 0) {
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="imgbox">
|
<view class="imgbox">
|
||||||
<view v-if="type==1">
|
<view v-if="type==1">
|
||||||
<image :src="list" mode="" v-for="list in info.article_image"></image>
|
<image :src="list" mode="" @tap="viewImage" v-for="list in info.article_image"></image>
|
||||||
</view>
|
</view>
|
||||||
<view v-else>
|
<view v-else>
|
||||||
<video :src="info.video_path" controls></video>
|
<video :src="info.video_path" controls></video>
|
||||||
@ -36,7 +36,7 @@
|
|||||||
<view class="name">{{item.member_nickname}}{{item.reply_member_nickname==null?"评论了文章":" 回复了 "+item.reply_member_nickname}}</view>
|
<view class="name">{{item.member_nickname}}{{item.reply_member_nickname==null?"评论了文章":" 回复了 "+item.reply_member_nickname}}</view>
|
||||||
<view class="time">{{item.create_time}}</view>
|
<view class="time">{{item.create_time}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn" @click="showreply(item.id,item.member_id)">回复</view>
|
<view class="btn" @click="showreply(item.id,item.member_id)" v-if="item.pid==0">回复</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="content u-line-1">{{item.content}}</view>
|
<view class="content u-line-1">{{item.content}}</view>
|
||||||
</view>
|
</view>
|
||||||
@ -134,7 +134,13 @@ export default {
|
|||||||
this.info = res.data.article[0];
|
this.info = res.data.article[0];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
|
// 预览图片
|
||||||
|
viewImage() {
|
||||||
|
uni.previewImage({
|
||||||
|
urls: this.info.article_image
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
117
pages/user/feedback.vue
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
<template>
|
||||||
|
<view class="write-complaints">
|
||||||
|
<view class="main-container">
|
||||||
|
<view class="text-box">
|
||||||
|
<u-input class="textarea" placeholder="发表您的意见吧,我们会做得更好。 (必填)" v-model="text" type="textarea" :clearable="false" :maxlength="200" />
|
||||||
|
<span class="text-length">{{ text.length }}/200</span>
|
||||||
|
</view>
|
||||||
|
<u-input class="phone" placeholder="请输入手机号方便联系 (非必填)" v-model="phone" type="number" />
|
||||||
|
</view>
|
||||||
|
<view class="write-btn" @click="submit">发表意见</view>
|
||||||
|
<u-toast ref="uToast" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
phone: '',
|
||||||
|
text: '',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
submit() {
|
||||||
|
if(!this.verifyContent()) return false;
|
||||||
|
// console.log(this.phone);
|
||||||
|
// console.log(this.text);
|
||||||
|
this.$u.toast('提交成功');
|
||||||
|
this.phone = "";
|
||||||
|
this.text = "";
|
||||||
|
},
|
||||||
|
verifyContent() {
|
||||||
|
if(this.$u.test.isEmpty(this.text)) {
|
||||||
|
this.$u.toast('内容不可为空');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(!this.$u.test.isEmpty(this.phone)) {
|
||||||
|
if(!this.$u.test.mobile(this.phone)) {
|
||||||
|
this.$u.toast('手机格式错误');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
writeFeedback() {
|
||||||
|
if(!this.verifyContent()) return false;
|
||||||
|
this.$u.api.writeFeedback({
|
||||||
|
fb_content: this.text,
|
||||||
|
fb_images: this.imageList,
|
||||||
|
}).then(res => {
|
||||||
|
if(res.errCode == 0) {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: res.message,
|
||||||
|
duration: 2000,
|
||||||
|
callback:() => {
|
||||||
|
this.$u.route({
|
||||||
|
type: "navigateBack",
|
||||||
|
url: '/pageE/more/Complaints',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$u.toast(res.message);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.write-complaints {
|
||||||
|
min-height: calc(100vh - var(--window-top));
|
||||||
|
background-color: #ECECEC;
|
||||||
|
.main-container {
|
||||||
|
background-color: #ffffff;
|
||||||
|
.text-box {
|
||||||
|
padding-bottom: 60rpx;
|
||||||
|
position: relative;
|
||||||
|
&::after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
height: 3rpx;
|
||||||
|
width: 750rpx;
|
||||||
|
background-color: #ECECEC;
|
||||||
|
}
|
||||||
|
.text-length {
|
||||||
|
height: 60rpx;
|
||||||
|
position: absolute;
|
||||||
|
right: 40rpx;
|
||||||
|
bottom: 0;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/deep/ .textarea {
|
||||||
|
padding: 0 30rpx !important;
|
||||||
|
width: 100% !important;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
}
|
||||||
|
/deep/ .phone {
|
||||||
|
padding: 20rpx 30rpx !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.write-btn {
|
||||||
|
margin: 120rpx auto 0;
|
||||||
|
width: 690rpx;
|
||||||
|
height: 98rpx;
|
||||||
|
background: rgba(255,120,15,1);
|
||||||
|
border-radius: 46rpx;
|
||||||
|
font-size: 36rpx;
|
||||||
|
color: rgba(255,255,255,1);
|
||||||
|
text-align: center;
|
||||||
|
line-height: 98rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -6,16 +6,16 @@
|
|||||||
<view class="name">
|
<view class="name">
|
||||||
<text>{{info.member_nickname==null?"新用户":info.member_nickname}}</text>
|
<text>{{info.member_nickname==null?"新用户":info.member_nickname}}</text>
|
||||||
<text>账号:{{info.member_name}}</text>
|
<text>账号:{{info.member_name}}</text>
|
||||||
<text>个性签名:{{info.signature==""?"该用户很懒没有签名!":info.signature}}</text>
|
<text class="u-line-2">个性签名:{{info.signature==""?"该用户很懒没有签名!":info.signature}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<image src="/static/image/user/1.png"></image>
|
<image src="/static/image/user/1.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="nav" @click="toOthersPage('fans')">
|
<view class="nav" @click="toOthersPage('fans')">
|
||||||
<text>我的粉丝</text>
|
<text>我的粉丝</text>
|
||||||
<image src="/static/image/user/1.png"></image>
|
<image src="/static/image/user/1.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="nav" @click="toOthersPage('content')">
|
<view class="nav" @click="toOthersPage('content')">
|
||||||
<text>内容管理</text>
|
<text>内容管理</text>
|
||||||
<image src="/static/image/user/1.png"></image>
|
<image src="/static/image/user/1.png"></image>
|
||||||
</view>
|
</view>
|
||||||
@ -23,10 +23,29 @@
|
|||||||
<text>骑手投诉</text>
|
<text>骑手投诉</text>
|
||||||
<image src="/static/image/user/1.png"></image>
|
<image src="/static/image/user/1.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="nav" @click="loginout()">
|
<view class="nav" @click="toOthersPage('feedback')">
|
||||||
|
<text>用户反馈</text>
|
||||||
|
<image src="/static/image/user/1.png"></image>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="nav" @click="viewAgreement(0)">
|
||||||
|
<text>用户协议</text>
|
||||||
|
<image src="/static/image/user/1.png"></image>
|
||||||
|
</view>
|
||||||
|
<view class="nav" @click="viewAgreement(1)">
|
||||||
|
|
||||||
|
<text>隐私政策</text>
|
||||||
|
<image src="/static/image/user/1.png"></image>
|
||||||
|
</view>
|
||||||
|
<view class="nav" @click="clearCache">
|
||||||
|
<text>清除缓存</text>
|
||||||
|
<text>{{ fileSizeString }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="nav" @click="isLoginOut = true">
|
||||||
<text>退出登录</text>
|
<text>退出登录</text>
|
||||||
<image src="/static/image/user/1.png"></image>
|
<image src="/static/image/user/1.png"></image>
|
||||||
</view>
|
</view>
|
||||||
|
<u-modal v-model="isLoginOut" show-confirm-button show-cancel-button :content="content" @confirm="loginOut"></u-modal>
|
||||||
<u-toast ref="uToast" />
|
<u-toast ref="uToast" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -36,18 +55,75 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
info:{},
|
info:{},
|
||||||
num:0
|
isLoginOut: false,
|
||||||
|
content: "是否退出登录?",
|
||||||
|
num:0,
|
||||||
|
fileSizeString: "", // 缓存大小
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
isLoginOut() {
|
||||||
|
// console.log(this.isLoginOut);
|
||||||
|
// if (this.isLoginOut) {
|
||||||
|
// uni.hideTabBar();
|
||||||
|
// } else {
|
||||||
|
// setTimeout(function() {
|
||||||
|
// uni.showTabBar();
|
||||||
|
// },200)
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
this.getCache();
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.getmyinfo()
|
this.getmyinfo()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 获取缓存
|
||||||
|
getCache() {
|
||||||
|
let _this = this;
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
plus.cache.calculate(function(size) {
|
||||||
|
console.log(size);
|
||||||
|
let sizeCache = size;
|
||||||
|
if (sizeCache == 0) {
|
||||||
|
_this.fileSizeString = "0B";
|
||||||
|
} else if (sizeCache < 1024) {
|
||||||
|
_this.fileSizeString = sizeCache + "B";
|
||||||
|
} else if (sizeCache < 1048576) {
|
||||||
|
_this.fileSizeString = (sizeCache / 1024).toFixed(2) + "KB";
|
||||||
|
} else if (sizeCache < 1073741824) {
|
||||||
|
_this.fileSizeString = (sizeCache / 1048576).toFixed(2) + "MB";
|
||||||
|
} else {
|
||||||
|
_this.fileSizeString = (sizeCache / 1073741824).toFixed(2) + "GB";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
// 清除缓存
|
||||||
|
clearCache() {
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
uni.showModal({
|
||||||
|
title: "确定要清理缓存吗?",
|
||||||
|
cancelColor: "#999",
|
||||||
|
confirmColor: "#f00",
|
||||||
|
success: (res) => {
|
||||||
|
// console.log(res);
|
||||||
|
if (res.confirm) {
|
||||||
|
plus.cache.clear(function(e) {
|
||||||
|
console.log(e);
|
||||||
|
})
|
||||||
|
this.getCache();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
// 退出登陆
|
// 退出登陆
|
||||||
loginout(){
|
loginOut(){
|
||||||
uni.clearStorage();
|
uni.clearStorage();
|
||||||
|
this.imService.disconnect();
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: "退出登陆成功!",
|
title: "退出登陆成功!",
|
||||||
type: 'success'
|
type: 'success'
|
||||||
@ -76,7 +152,26 @@ export default {
|
|||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/user/' + url
|
url: '/pages/user/' + url
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
|
|
||||||
|
viewAgreement(index) {
|
||||||
|
if (index == 0) {
|
||||||
|
this.$u.route({
|
||||||
|
url: '/pages/login/agreements',
|
||||||
|
params: {
|
||||||
|
title: "用户协议"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (index == 1) {
|
||||||
|
this.$u.route({
|
||||||
|
url: '/pages/login/privacy_policy',
|
||||||
|
params: {
|
||||||
|
title: "隐私政策"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -97,6 +192,7 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
>image{
|
>image{
|
||||||
|
flex-shrink: 0;
|
||||||
width: 110rpx;
|
width: 110rpx;
|
||||||
height: 110rpx;
|
height: 110rpx;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
|
@ -5,14 +5,15 @@
|
|||||||
<text>更换头像</text>
|
<text>更换头像</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<text class="title">用户名</text>
|
<text class="title" v-if="role == 2">店铺名称</text>
|
||||||
|
<text class="title" v-else>达人名称</text>
|
||||||
<input type="text" value="" v-model="info.member_nickname" placeholder="请输入用户名"/>
|
<input type="text" value="" v-model="info.member_nickname" placeholder="请输入用户名"/>
|
||||||
</view>
|
</view>
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<text class="title">个性签名</text>
|
<text class="title">个性签名</text>
|
||||||
<input type="text" value="" v-model="info.signature" placeholder="请输入个性签名"/>
|
<input type="text" value="" v-model="info.signature" placeholder="请输入个性签名"/>
|
||||||
</view>
|
</view>
|
||||||
<view class="password" @click="updatePwd">
|
<view class="password" @click="updatePwd" v-if="role != 4">
|
||||||
<text>修改密码</text>
|
<text>修改密码</text>
|
||||||
<image src="/static/image/user/1.png"></image>
|
<image src="/static/image/user/1.png"></image>
|
||||||
</view>
|
</view>
|
||||||
@ -27,12 +28,17 @@ export default {
|
|||||||
fileurl: "",
|
fileurl: "",
|
||||||
filename:"",
|
filename:"",
|
||||||
info:{},
|
info:{},
|
||||||
num:0
|
num:0,
|
||||||
|
role: 0,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.getmyinfo()
|
this.getmyinfo();
|
||||||
|
let userinfo = uni.getStorageSync("userinfo");
|
||||||
|
this.role = userinfo.role;
|
||||||
|
// console.log(this.role);
|
||||||
},
|
},
|
||||||
|
// 保存信息
|
||||||
onNavigationBarButtonTap() {
|
onNavigationBarButtonTap() {
|
||||||
let that = this;
|
let that = this;
|
||||||
let obj ={
|
let obj ={
|
||||||
@ -82,7 +88,13 @@ export default {
|
|||||||
},
|
},
|
||||||
// 获取图片,上传图片
|
// 获取图片,上传图片
|
||||||
chooseImage(sourceType) {
|
chooseImage(sourceType) {
|
||||||
let that = this
|
let that = this;
|
||||||
|
let photo_type = "";
|
||||||
|
if (this.role == 2) {
|
||||||
|
photo_type = "store_avatar"
|
||||||
|
} else {
|
||||||
|
photo_type = "avatar"
|
||||||
|
}
|
||||||
const token = uni.getStorageSync('token');
|
const token = uni.getStorageSync('token');
|
||||||
uni.chooseImage({
|
uni.chooseImage({
|
||||||
count: 1,
|
count: 1,
|
||||||
@ -91,22 +103,26 @@ export default {
|
|||||||
console.log(JSON.stringify(res.tempFilePaths));
|
console.log(JSON.stringify(res.tempFilePaths));
|
||||||
const tempFilePaths = res.tempFilePaths;
|
const tempFilePaths = res.tempFilePaths;
|
||||||
uni.uploadFile({
|
uni.uploadFile({
|
||||||
url: 'https://dmmall.sdbairui.com/storeapi/Upload/uploadFile',
|
url: 'https://mall.dmygkeji.com/storeapi/Upload/uploadFile',
|
||||||
filePath: tempFilePaths[0],
|
filePath: tempFilePaths[0],
|
||||||
name: 'avatar',
|
name: photo_type,
|
||||||
formData:{
|
formData:{
|
||||||
name:"avatar"
|
name: photo_type,
|
||||||
|
store_id: that.info.store_id
|
||||||
},
|
},
|
||||||
header:{
|
header:{
|
||||||
Authorization:'Bearer' + " " + token
|
Authorization:'Bearer' + " " + token
|
||||||
},
|
},
|
||||||
success: uploadFileRes => {
|
success: uploadFileRes => {
|
||||||
let obj = JSON.parse(uploadFileRes.data)
|
let obj = JSON.parse(uploadFileRes.data)
|
||||||
that.fileurl = obj.data.file_path
|
that.fileurl = obj.data.file_path+'?'+new Date().getTime()
|
||||||
that.filename = obj.data.file_name
|
that.filename = obj.data.file_name
|
||||||
that.num++
|
that.num++
|
||||||
console.log(that.fileurl,that.filename)
|
console.log(that.fileurl,that.filename)
|
||||||
}
|
},
|
||||||
|
fail: (res) => {
|
||||||
|
console.log(res);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -2,15 +2,19 @@
|
|||||||
<view class="user">
|
<view class="user">
|
||||||
<view class="head" @click="toOthersPage('info')">
|
<view class="head" @click="toOthersPage('info')">
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<image :src="info.member_avatar"></image>
|
<image :src="info.member_avatar + '?' + (new Date().getTime())"></image>
|
||||||
<view class="name">
|
<view class="name">
|
||||||
<text>{{info.member_nickname==null?"新用户":info.member_nickname}}</text>
|
<text>{{info.member_nickname==null?"新用户":info.member_nickname}}</text>
|
||||||
<text>账号:{{info.member_name}}</text>
|
<text>账号:{{info.member_name}}</text>
|
||||||
<text>个性签名:{{info.signature==""?"该用户很懒没有签名!":info.signature}}</text>
|
<text class="u-line-2">个性签名:{{info.signature==""?"该用户很懒没有签名!":info.signature}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<image src="/static/image/user/1.png"></image>
|
<image src="/static/image/user/1.png"></image>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="nav" @click="navtos()">
|
||||||
|
<text>活动消息</text>
|
||||||
|
<image src="/static/image/user/1.png"></image>
|
||||||
|
</view>
|
||||||
<view class="nav" @click="toOthersPage('fans')">
|
<view class="nav" @click="toOthersPage('fans')">
|
||||||
<text>我的粉丝</text>
|
<text>我的粉丝</text>
|
||||||
<image src="/static/image/user/1.png"></image>
|
<image src="/static/image/user/1.png"></image>
|
||||||
@ -19,9 +23,17 @@
|
|||||||
<text>内容管理</text>
|
<text>内容管理</text>
|
||||||
<image src="/static/image/user/1.png"></image>
|
<image src="/static/image/user/1.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="release-btn" @click="publish">
|
<view class="nav" @click="clearCache">
|
||||||
<image src="../../static/image/index/publish.png"></image>
|
<text>清除缓存</text>
|
||||||
<view class="text">发布</view>
|
<text>{{ fileSizeString }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="nav" @click="is_loginout = true">
|
||||||
|
<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>
|
</view>
|
||||||
<u-popup v-model="publishstate" mode="bottom">
|
<u-popup v-model="publishstate" mode="bottom">
|
||||||
<view class="publish">
|
<view class="publish">
|
||||||
@ -42,6 +54,7 @@
|
|||||||
<image src="../../static/image/index/close.png" class="off" @click="close"></image>
|
<image src="../../static/image/index/close.png" class="off" @click="close"></image>
|
||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
|
<u-modal v-model="is_loginout" show-confirm-button show-cancel-button :content="content" @confirm="loginOut"></u-modal>
|
||||||
<u-toast ref="uToast" />
|
<u-toast ref="uToast" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -50,14 +63,81 @@ export default {
|
|||||||
name:"user",
|
name:"user",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
publishstate:false,
|
publishstate: false,
|
||||||
|
is_loginout: false,
|
||||||
|
content: "是否退出登录?",
|
||||||
info:{},
|
info:{},
|
||||||
|
fileSizeString: "", // 缓存大小
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onShow(){
|
||||||
this.getmyinfo()
|
this.getmyinfo()
|
||||||
},
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.getCache();
|
||||||
|
const user = uni.getStorageSync('userinfo');
|
||||||
|
console.log(user)
|
||||||
|
this.imService.login(user.member_id,user.member_nickname,user.member_avatar)
|
||||||
|
this.imService.connectIM()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 获取缓存
|
||||||
|
getCache() {
|
||||||
|
let _this = this;
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
plus.cache.calculate(function(size) {
|
||||||
|
console.log(size);
|
||||||
|
let sizeCache = size;
|
||||||
|
if (sizeCache == 0) {
|
||||||
|
_this.fileSizeString = "0B";
|
||||||
|
} else if (sizeCache < 1024) {
|
||||||
|
_this.fileSizeString = sizeCache + "B";
|
||||||
|
} else if (sizeCache < 1048576) {
|
||||||
|
_this.fileSizeString = (sizeCache / 1024).toFixed(2) + "KB";
|
||||||
|
} else if (sizeCache < 1073741824) {
|
||||||
|
_this.fileSizeString = (sizeCache / 1048576).toFixed(2) + "MB";
|
||||||
|
} else {
|
||||||
|
_this.fileSizeString = (sizeCache / 1073741824).toFixed(2) + "GB";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
// 清除缓存
|
||||||
|
clearCache() {
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
uni.showModal({
|
||||||
|
title: "确定要清理缓存吗?",
|
||||||
|
cancelColor: "#999",
|
||||||
|
confirmColor: "#f00",
|
||||||
|
success: (res) => {
|
||||||
|
// console.log(res);
|
||||||
|
if (res.confirm) {
|
||||||
|
plus.cache.clear(function(e) {
|
||||||
|
console.log(e);
|
||||||
|
})
|
||||||
|
this.getCache();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
navtos(){
|
||||||
|
this.$u.route({
|
||||||
|
url:"/pages/messages/list"
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 退出登录
|
||||||
|
loginOut(){
|
||||||
|
this.imService.disconnect()
|
||||||
|
uni.clearStorage();
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: "退出登陆成功!",
|
||||||
|
type: 'success'
|
||||||
|
});
|
||||||
|
uni.reLaunch({
|
||||||
|
url:"../login/login"
|
||||||
|
})
|
||||||
|
},
|
||||||
// 获取个人信息
|
// 获取个人信息
|
||||||
getmyinfo(){
|
getmyinfo(){
|
||||||
let that = this;
|
let that = this;
|
||||||
@ -89,33 +169,33 @@ export default {
|
|||||||
},
|
},
|
||||||
// 跳转发布页面
|
// 跳转发布页面
|
||||||
navto(url) {
|
navto(url) {
|
||||||
// 判断直播权限
|
// // 判断直播权限
|
||||||
if(url=="release/tosign"){
|
// if(url=="release/tosign"){
|
||||||
this.$u.api.canlive({}).then(res => {
|
// this.$u.api.canlive({}).then(res => {
|
||||||
console.log(res);
|
// console.log(JSON.stringify(res));
|
||||||
if (res.errCode != 0) {
|
// if (res.errCode != 0) {
|
||||||
this.$refs.uToast.show({
|
// this.$refs.uToast.show({
|
||||||
title: res.message,
|
// title: res.message,
|
||||||
type: 'error'
|
// type: 'error'
|
||||||
});
|
// });
|
||||||
} else {
|
// } else {
|
||||||
if(res.data.live_stataes==0){
|
// if(res.data.live_stataes==0){
|
||||||
this.$u.route({
|
// this.$u.route({
|
||||||
url: `/pages/${url}`
|
// url: `/pages/${url}`
|
||||||
});
|
// });
|
||||||
}else{
|
// }else{
|
||||||
this.$refs.uToast.show({
|
// this.$refs.uToast.show({
|
||||||
title: "当前用户没有直播权限",
|
// title: "当前用户没有直播权限",
|
||||||
type: 'error'
|
// type: 'error'
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}else{
|
// }else{
|
||||||
this.$u.route({
|
this.$u.route({
|
||||||
url: `/pages/${url}`
|
url: `/pages/${url}`
|
||||||
});
|
});
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -198,10 +278,10 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
>image{
|
>image{
|
||||||
|
flex-shrink: 0;
|
||||||
width: 110rpx;
|
width: 110rpx;
|
||||||
height: 110rpx;
|
height: 110rpx;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background-color: #0f0;
|
|
||||||
}
|
}
|
||||||
.name{
|
.name{
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
|
BIN
static/bg.png
Before Width: | Height: | Size: 908 KiB After Width: | Height: | Size: 341 KiB |
@ -62,7 +62,7 @@ function ChatRoomService(room, user) {
|
|||||||
//获取实例
|
//获取实例
|
||||||
ChatRoomService.prototype.connectGoEasyIM = function () {
|
ChatRoomService.prototype.connectGoEasyIM = function () {
|
||||||
this.im = GoEasyIM.getInstance({
|
this.im = GoEasyIM.getInstance({
|
||||||
appkey: 'BC-453aa755c4ea48148abefc55a86df283',
|
appkey: 'BC-d9b5e639006b4ee2a4bc9eddc4235a6a',
|
||||||
host: 'hangzhou.goeasy.io'
|
host: 'hangzhou.goeasy.io'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
BIN
static/image/7.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
static/image/cloneb.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
static/image/login/safe.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 2.0 KiB |
BIN
static/image/shopback.png
Normal file
After Width: | Height: | Size: 6.3 KiB |
BIN
static/images/fanzhuan.png
Normal file
After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 463 B After Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 932 B After Width: | Height: | Size: 3.1 KiB |
BIN
static/images/meiyan.png
Normal file
After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 620 B After Width: | Height: | Size: 8.7 KiB |
Before Width: | Height: | Size: 472 B After Width: | Height: | Size: 8.0 KiB |
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
import GoEasyIM from './goeasy-im-1.0.9';
|
import GoEasyIM from './goeasy-im-1.0.9';
|
||||||
import restApi from './restapi';
|
import restApi from './restapi';
|
||||||
|
import music from './music.mp3'
|
||||||
|
|
||||||
function Friend(uuid, name, avatar,time = "", text = "",date = "",unReadMessage = 0) {
|
function Friend(uuid, name, avatar,time = "", text = "",date = "",unReadMessage = 0) {
|
||||||
this.uuid = uuid;
|
this.uuid = uuid;
|
||||||
@ -35,7 +36,7 @@ function CurrentUser(uuid, name, avatar) {
|
|||||||
function IMService() {
|
function IMService() {
|
||||||
this.im = GoEasyIM.getInstance({
|
this.im = GoEasyIM.getInstance({
|
||||||
host:'hangzhou.goeasy.io',//qos=1
|
host:'hangzhou.goeasy.io',//qos=1
|
||||||
appkey:'BC-453aa755c4ea48148abefc55a86df283'
|
appkey:'BC-d9b5e639006b4ee2a4bc9eddc4235a6a'
|
||||||
});
|
});
|
||||||
//当前“我”
|
//当前“我”
|
||||||
this.currentUser = null;
|
this.currentUser = null;
|
||||||
@ -50,7 +51,7 @@ function IMService() {
|
|||||||
//群聊消息记录,map格式,每个群对应一个数组
|
//群聊消息记录,map格式,每个群对应一个数组
|
||||||
this.groupMessages = {};
|
this.groupMessages = {};
|
||||||
|
|
||||||
|
this.uid = 0;
|
||||||
/*
|
/*
|
||||||
* 监听器们
|
* 监听器们
|
||||||
*
|
*
|
||||||
@ -77,6 +78,10 @@ function IMService() {
|
|||||||
this.whenOnlineUserChange = function () {
|
this.whenOnlineUserChange = function () {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
this.warrings = function() {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//登录
|
//登录
|
||||||
@ -105,7 +110,7 @@ IMService.prototype.initialContacts = function (friendList) {
|
|||||||
const token = uni.getStorageSync('token');
|
const token = uni.getStorageSync('token');
|
||||||
console.log(token)
|
console.log(token)
|
||||||
uni.request({
|
uni.request({
|
||||||
url:"https://dmmall.sdbairui.com/api/Specialci/getAtwillUserInfo",
|
url:"https://mall.dmygkeji.com/api/Specialci/getAtwillUserInfo",
|
||||||
data:{
|
data:{
|
||||||
userId:i[0]
|
userId:i[0]
|
||||||
},
|
},
|
||||||
@ -119,7 +124,7 @@ IMService.prototype.initialContacts = function (friendList) {
|
|||||||
console.log(that.friends)
|
console.log(that.friends)
|
||||||
let sorts = function (friends){
|
let sorts = function (friends){
|
||||||
let paixu = function (a,b){
|
let paixu = function (a,b){
|
||||||
if(a.date > b.date){
|
if(a.date > b.date && b.unReadMessage == 0){
|
||||||
return 0;
|
return 0;
|
||||||
}else{
|
}else{
|
||||||
return 1;
|
return 1;
|
||||||
@ -226,7 +231,6 @@ IMService.prototype.connectIM = function () {
|
|||||||
this.subscribeFriendsPresence();
|
this.subscribeFriendsPresence();
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
console.log('连接失败,请确保网络正常,appkey和host正确,code:' + error.code + " content:" + error.content);
|
console.log('连接失败,请确保网络正常,appkey和host正确,code:' + error.code + " content:" + error.content);
|
||||||
this.connectIM()
|
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(12323)
|
console.log(12323)
|
||||||
@ -259,6 +263,11 @@ IMService.prototype.initialIMListeners = function () {
|
|||||||
//监听私聊消息
|
//监听私聊消息
|
||||||
this.im.on(GoEasyIM.EVENT.PRIVATE_MESSAGE_RECEIVED, (message) => {
|
this.im.on(GoEasyIM.EVENT.PRIVATE_MESSAGE_RECEIVED, (message) => {
|
||||||
console.log(message)
|
console.log(message)
|
||||||
|
if(message.senderId == 0){
|
||||||
|
console.log(message.payload.text)
|
||||||
|
this.warrings(JSON.parse(message.payload.text))
|
||||||
|
return;
|
||||||
|
}
|
||||||
//如果不是自己发的,朋友未读消息数 +1
|
//如果不是自己发的,朋友未读消息数 +1
|
||||||
if (message.senderId != this.currentUser.uuid) {
|
if (message.senderId != this.currentUser.uuid) {
|
||||||
let friend = this.friends[message.senderId];
|
let friend = this.friends[message.senderId];
|
||||||
@ -266,7 +275,7 @@ IMService.prototype.initialIMListeners = function () {
|
|||||||
// return ;
|
// return ;
|
||||||
let sorts = function (friends){
|
let sorts = function (friends){
|
||||||
let paixu = function (a,b){
|
let paixu = function (a,b){
|
||||||
if(a.date > b.date){
|
if(a.date > b.date && b.unReadMessage == 0){
|
||||||
return 0;
|
return 0;
|
||||||
}else{
|
}else{
|
||||||
return 1;
|
return 1;
|
||||||
@ -276,13 +285,21 @@ IMService.prototype.initialIMListeners = function () {
|
|||||||
friends.sort(paixu)
|
friends.sort(paixu)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if(message.senderId != this.uid){
|
||||||
|
const innerAudioContext = uni.createInnerAudioContext();
|
||||||
|
innerAudioContext.autoplay = true;
|
||||||
|
innerAudioContext.src = music;
|
||||||
|
innerAudioContext.onPlay(() => {
|
||||||
|
console.log('开始播放');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
let that = this
|
let that = this
|
||||||
if(!friend && friend == undefined){
|
if(!friend && friend == undefined){
|
||||||
const token = uni.getStorageSync('token');
|
const token = uni.getStorageSync('token');
|
||||||
console.log(token)
|
console.log(token)
|
||||||
uni.request({
|
uni.request({
|
||||||
url:"https://dmmall.sdbairui.com/api/Specialci/getAtwillUserInfo",
|
url:"https://mall.dmygkeji.com/api/Specialci/getAtwillUserInfo",
|
||||||
data:{
|
data:{
|
||||||
userId:message.senderId
|
userId:message.senderId
|
||||||
},
|
},
|
||||||
@ -299,7 +316,8 @@ IMService.prototype.initialIMListeners = function () {
|
|||||||
friend.text = message.type != "text" ? "其他消息" : message.payload.text
|
friend.text = message.type != "text" ? "其他消息" : message.payload.text
|
||||||
let time = new Date(message.timestamp)
|
let time = new Date(message.timestamp)
|
||||||
friend.date = message.timestamp
|
friend.date = message.timestamp
|
||||||
friend.time = time.getHours() + ":" + time.getMinutes() + ":" + time.getSeconds()
|
friend.time = (time.getHours() < 10 ? '0' + time.getHours() : time.getHours()) + ":" + (time.getMinutes() < 10 ? '0' + time.getMinutes() : time.getMinutes()) + ":" + (time.getSeconds() < 10 ? '0' + time.getSeconds() : time.getSeconds())
|
||||||
|
|
||||||
console.log(that.friends)
|
console.log(that.friends)
|
||||||
that.friendsarr = []
|
that.friendsarr = []
|
||||||
for(let i in that.friends){
|
for(let i in that.friends){
|
||||||
@ -325,7 +343,8 @@ IMService.prototype.initialIMListeners = function () {
|
|||||||
friend.text = message.type != "text" ? "其他消息" : message.payload.text
|
friend.text = message.type != "text" ? "其他消息" : message.payload.text
|
||||||
let time = new Date(message.timestamp)
|
let time = new Date(message.timestamp)
|
||||||
friend.date = message.timestamp
|
friend.date = message.timestamp
|
||||||
friend.time = time.getHours() + ":" + time.getMinutes() + ":" + time.getSeconds()
|
friend.time = (time.getHours() < 10 ? '0' + time.getHours() : time.getHours()) + ":" + (time.getMinutes() < 10 ? '0' + time.getMinutes() : time.getMinutes()) + ":" + (time.getSeconds() < 10 ? '0' + time.getSeconds() : time.getSeconds())
|
||||||
|
|
||||||
console.log(this.friends)
|
console.log(this.friends)
|
||||||
that.friendsarr = []
|
that.friendsarr = []
|
||||||
for(let i in this.friends){
|
for(let i in this.friends){
|
||||||
@ -392,7 +411,7 @@ IMService.prototype.sendMessagesSetStorage = function (friendId,message){
|
|||||||
// return ;
|
// return ;
|
||||||
let sorts = function (friends){
|
let sorts = function (friends){
|
||||||
let paixu = function (a,b){
|
let paixu = function (a,b){
|
||||||
if(a.date > b.date){
|
if(a.date > b.date && b.unReadMessage == 0){
|
||||||
return 0;
|
return 0;
|
||||||
}else{
|
}else{
|
||||||
return 1;
|
return 1;
|
||||||
@ -408,7 +427,7 @@ IMService.prototype.sendMessagesSetStorage = function (friendId,message){
|
|||||||
const token = uni.getStorageSync('token');
|
const token = uni.getStorageSync('token');
|
||||||
console.log(token)
|
console.log(token)
|
||||||
uni.request({
|
uni.request({
|
||||||
url:"https://dmmall.sdbairui.com/api/Specialci/getAtwillUserInfo",
|
url:"https://mall.dmygkeji.com/api/Specialci/getAtwillUserInfo",
|
||||||
data:{
|
data:{
|
||||||
userId:friendId
|
userId:friendId
|
||||||
},
|
},
|
||||||
@ -424,7 +443,8 @@ IMService.prototype.sendMessagesSetStorage = function (friendId,message){
|
|||||||
friend.text = message
|
friend.text = message
|
||||||
let time = new Date()
|
let time = new Date()
|
||||||
friend.date = time.getTime()
|
friend.date = time.getTime()
|
||||||
friend.time = time.getHours() + ":" + time.getMinutes() + ":" + time.getSeconds()
|
friend.time = (time.getHours() < 10 ? '0' + time.getHours() : time.getHours()) + ":" + (time.getMinutes() < 10 ? '0' + time.getMinutes() : time.getMinutes()) + ":" + (time.getSeconds() < 10 ? '0' + time.getSeconds() : time.getSeconds())
|
||||||
|
|
||||||
console.log(that.friends)
|
console.log(that.friends)
|
||||||
that.friendsarr = []
|
that.friendsarr = []
|
||||||
for(let i in that.friends){
|
for(let i in that.friends){
|
||||||
@ -448,7 +468,8 @@ IMService.prototype.sendMessagesSetStorage = function (friendId,message){
|
|||||||
friend.text = message
|
friend.text = message
|
||||||
let time = new Date()
|
let time = new Date()
|
||||||
friend.date = time.getTime()
|
friend.date = time.getTime()
|
||||||
friend.time = time.getHours() + ":" + time.getMinutes() + ":" + time.getSeconds()
|
friend.time = (time.getHours() < 10 ? '0' + time.getHours() : time.getHours()) + ":" + (time.getMinutes() < 10 ? '0' + time.getMinutes() : time.getMinutes()) + ":" + (time.getSeconds() < 10 ? '0' + time.getSeconds() : time.getSeconds())
|
||||||
|
|
||||||
console.log(this.friends)
|
console.log(this.friends)
|
||||||
that.friendsarr = []
|
that.friendsarr = []
|
||||||
for(let i in this.friends){
|
for(let i in this.friends){
|
||||||
@ -763,6 +784,10 @@ IMService.prototype.initialWhenOnlineUserChange = function (whenOnlineUserChange
|
|||||||
IMService.prototype.listenerNewMessage = function () {
|
IMService.prototype.listenerNewMessage = function () {
|
||||||
|
|
||||||
this.im.on(GoEasyIM.EVENT.GROUP_MESSAGE_RECEIVED, (message) => {
|
this.im.on(GoEasyIM.EVENT.GROUP_MESSAGE_RECEIVED, (message) => {
|
||||||
|
console.log(message)
|
||||||
|
if(message.senderId == 0){
|
||||||
|
return ;
|
||||||
|
}
|
||||||
var content = JSON.parse(message.payload.text);
|
var content = JSON.parse(message.payload.text);
|
||||||
this.addNewMessage(message);
|
this.addNewMessage(message);
|
||||||
this.whenNewMessage(content);
|
this.whenNewMessage(content);
|
||||||
|
BIN
static/music.mp3
Normal file
BIN
static/videoPlay.png
Normal file
After Width: | Height: | Size: 4.7 KiB |