44 Commits

Author SHA1 Message Date
cmxdd
9baac8ef63 update adout upload adout tencentCOS 2020-08-12 15:17:48 +08:00
cmxdd
26c2e044dc fixed bug 2020-08-11 20:37:54 +08:00
cmxdd
7cf5577cb0 fixed bug adout publish shop 2020-08-11 09:41:12 +08:00
cmx
e33e07178d Merge pull request 'cmx' (#37) from cmx into master
Reviewed-on: http://git.luyuan.tk/luyuan/demingshangjia/pulls/37
2020-08-10 20:26:57 +08:00
cmxdd
9fac4e8a2e fixed bug adout shop 2020-08-10 20:24:58 +08:00
cmxdd
e223fd5ff9 Merge branch 'master' of http://git.luyuan.tk/luyuan/demingshangjia into cmx 2020-08-10 19:06:34 +08:00
gyh
d7c6625416 Merge pull request 'GDPAO' (#36) from gyh into master
Reviewed-on: http://git.luyuan.tk/luyuan/demingshangjia/pulls/36
2020-08-10 19:04:54 +08:00
Gdpao
0a8f2f815d GDPAO 2020-08-10 19:03:44 +08:00
42a08e07ba Merge pull request '防止多次点击' (#35) from xbx into master
Reviewed-on: http://git.luyuan.tk/luyuan/demingshangjia/pulls/35
2020-08-10 17:38:51 +08:00
4e350f4dd0 Merge branch 'master' into xbx 2020-08-10 17:38:46 +08:00
e946b98abf 防止多次点击 2020-08-10 17:31:56 +08:00
cmxdd
2759972de6 Merge branch 'master' of http://git.luyuan.tk/luyuan/demingshangjia into cmx 2020-08-10 16:55:34 +08:00
bee3ab9fba Merge pull request 'xbx' (#34) from xbx into master
Reviewed-on: http://git.luyuan.tk/luyuan/demingshangjia/pulls/34
2020-08-10 16:48:34 +08:00
a318ea9f84 Merge branch 'master' of http://git.luyuan.tk/luyuan/demingshangjia into xbx 2020-08-10 16:47:52 +08:00
3eaee9009a 聊天 2020-08-10 16:47:27 +08:00
cmxdd
2ab2d1c38e fixed bug 2020-08-10 15:55:21 +08:00
gyh
d8840edb30 Merge pull request 'gdpao' (#33) from gyh into master
Reviewed-on: http://git.luyuan.tk/luyuan/demingshangjia/pulls/33
2020-08-10 14:48:10 +08:00
Gdpao
1d98624753 gdpao 2020-08-10 14:47:20 +08:00
75a4bbedbe Merge branch 'master' of http://git.luyuan.tk/luyuan/demingshangjia into xbx 2020-08-10 14:45:35 +08:00
cmx
d4a9b38f99 Merge pull request 'cmx' (#32) from cmx into master
Reviewed-on: http://git.luyuan.tk/luyuan/demingshangjia/pulls/32
2020-08-10 12:08:34 +08:00
cmxdd
3b9e429c80 Merge branch 'cmx' of http://git.luyuan.tk/luyuan/demingshangjia into cmx 2020-08-10 12:07:30 +08:00
cmxdd
a9d4708d2c fixe bug about image 2020-08-10 12:04:09 +08:00
cmx
7206d00afc Merge pull request 'master' (#31) from master into cmx
Reviewed-on: http://git.luyuan.tk/luyuan/demingshangjia/pulls/31
2020-08-10 11:32:18 +08:00
cmx
798f499263 Merge pull request 'cmx' (#30) from cmx into master
Reviewed-on: http://git.luyuan.tk/luyuan/demingshangjia/pulls/30
2020-08-10 11:31:51 +08:00
cmxdd
64da585bd7 add login out 2020-08-10 11:31:03 +08:00
cmxdd
959afc776a fixed bg adout login 2020-08-10 11:27:06 +08:00
f89803cf9b 消息 2020-08-10 10:41:20 +08:00
cmx
795726bdb8 Merge pull request 'cmx' (#29) from cmx into master
Reviewed-on: http://git.luyuan.tk/luyuan/demingshangjia/pulls/29
2020-08-10 10:25:18 +08:00
cmxdd
de2b7fe26d uopdate about conflict 2020-08-10 10:24:36 +08:00
cmxdd
a0e780d05b update adout color of tag 2020-08-10 10:01:10 +08:00
cmxdd
0b5fa511bf update adout tag color 2020-08-10 09:56:01 +08:00
a1cba0a7fd Merge pull request 'meiyan' (#26) from xbx into master
Reviewed-on: http://git.luyuan.tk/luyuan/demingshangjia/pulls/26
2020-08-09 18:37:34 +08:00
1b03d1be7e Merge branch 'master' into xbx 2020-08-09 18:37:26 +08:00
55695f164b meiyan 2020-08-09 18:36:37 +08:00
084826e144 Merge pull request 'xbx' (#25) from xbx into master
Reviewed-on: http://git.luyuan.tk/luyuan/demingshangjia/pulls/25
2020-08-08 18:35:18 +08:00
ab4b418c8f Merge branch 'master' into xbx 2020-08-08 18:35:11 +08:00
56eb7e551c Merge branch 'xbx' of http://git.luyuan.tk/luyuan/demingshangjia into xbx 2020-08-08 18:34:45 +08:00
0279128637 解决了不出现的问题 2020-08-08 18:34:43 +08:00
d78b787967 Merge pull request 'xbx' (#24) from xbx into master
Reviewed-on: http://git.luyuan.tk/luyuan/demingshangjia/pulls/24
2020-08-08 17:30:06 +08:00
cmxdd
71a25fd11d fixed bug 2020-08-06 17:02:11 +08:00
cmxdd
6ec2318d0c update photo adout publish 2020-08-06 14:40:11 +08:00
cmxdd
04a4ed523f update bug 2020-08-06 11:48:45 +08:00
cmxdd
e67e2fe701 update code adout order 2020-08-06 10:04:38 +08:00
cmx
7d82d8d156 Merge pull request 'Merge pull request 'cmx' (#21) from cmx into master' (#22) from master into cmx
Reviewed-on: http://git.luyuan.tk/luyuan/demingshangjia/pulls/22
2020-08-05 20:12:03 +08:00
31 changed files with 703 additions and 281 deletions

3
.gitignore vendored
View File

@@ -1,3 +1,4 @@
.vscode
node_modules
unpackage
unpackage
manifest.json

View File

@@ -18,5 +18,7 @@ export default {
<style lang="scss">
/*每个页面公共css */
/* #ifndef APP-PLUS-NVUE */
@import 'uview-ui/index.scss';
/* #endif*/
</style>

7
common/cos-wx-sdk-v5.js Normal file

File diff suppressed because one or more lines are too long

View File

@@ -86,8 +86,8 @@ const install = (Vue, vm) => {
return vm.$u.post("/article/articleInfo",{article_id})
},
// 回复评论
reply({article_id,pid,content}){
return vm.$u.post("/article/articleAddComment",{article_id,pid,content})
reply({article_id,pid,content,reply_id}){
return vm.$u.post("/article/articleAddComment",{article_id,pid,content,reply_id})
},
// 达人是否可以直播
canlive(){

View File

@@ -10,14 +10,15 @@
<view class="status" v-if="info.view_type==1">待处理订单</view>
<view class="status" v-else-if="info.view_type==2">已发货订单</view>
<view class="status" v-else-if="info.view_type==3">已完成订单</view>
<view class="status" v-else-if="info.view_type==4">申请退款订单</view>
<view class="status" v-else-if="info.view_type==4">申请退款</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>
<view class="name u-line-1">{{info.extend_order_goods[0].goods_name}}</view>
<view class="info">
<view class="num">{{info.extend_order_goods[0].goods_num}}件商品</view>
<view class="price">实付<span>{{info.extend_order_goods[0].goods_pay_price}}</span></view>
<view class="num">{{info.count_number}}件商品</view>
<view class="price">实付<span>{{info.order_amount}}</span></view>
</view>
</view>
</view>

View File

@@ -2,14 +2,16 @@
<view class="item" @click="toDetailsPage">
<image :src="info.goods_pic"></image>
<view class="goods">
<view class="">
<view class="box">
<view class="boxid">
{{info.goods_try_id}}
</view>
<!-- 0:待处理订单 20:同意 40:拒绝此订单 -->
<view class="status" v-if="info.goods_try_order_status==0">待处理订单</view>
<view class="status" v-if="info.goods_try_order_status==20">已接单订单</view>
<view class="status" v-if="info.goods_try_order_status==40">已拒绝订单</view>
<view class="status" v-if="info.goods_try_order_status==50">已完成订单</view>
</view>
<view class="name u-line-1">{{info.goods_name}}</view>
<view class="info">
<view class="num">{{info.goods_try_num}}件商品</view>
@@ -67,7 +69,15 @@ export default {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
justify-content: space-between;
.box{
width: 100%;
display: flex;
font-size: 24rpx;
}
.boxid{
flex: 1;
}
.status {
align-self: flex-end;
font-size: 26rpx;

View File

@@ -1,6 +1,6 @@
{
"name" : "hdemingshangjia",
"appid" : "",
"name" : "德铭阳光商家",
"appid" : "__UNI__EA895BE",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
@@ -17,7 +17,12 @@
"delay" : 0
},
/* */
"modules" : {},
"modules" : {
"Push" : {},
"OAuth" : {},
"VideoPlayer" : {},
"LivePusher" : {}
},
/* */
"distribute" : {
/* android */
@@ -45,12 +50,56 @@
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
],
"abiFilters" : [ "armeabi-v7a", "x86" ]
},
/* ios */
"ios" : {},
/* SDK */
"sdkConfigs" : {}
"sdkConfigs" : {
"ad" : {},
"push" : {},
"oauth" : {},
"maps" : {}
},
"icons" : {
"android" : {
"hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png"
},
"ios" : {
"appstore" : "unpackage/res/icons/1024x1024.png",
"ipad" : {
"app" : "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png",
"notification" : "unpackage/res/icons/20x20.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x" : "unpackage/res/icons/167x167.png",
"settings" : "unpackage/res/icons/29x29.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png"
},
"iphone" : {
"app@2x" : "unpackage/res/icons/120x120.png",
"app@3x" : "unpackage/res/icons/180x180.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png",
"spotlight@3x" : "unpackage/res/icons/120x120.png"
}
}
},
"splashscreen" : {
"iosStyle" : "storyboard",
"ios" : {
"storyboard" : "E:/Source-code/deming/static/CustomStoryboard.zip"
}
}
}
},
/* */
@@ -72,7 +121,7 @@
"mp-toutiao" : {
"usingComponents" : true
},
"uniStatistics": {
"enable": false
"uniStatistics" : {
"enable" : false
}
}

View File

@@ -266,29 +266,28 @@
},
"tabBar": {
"color": "#7A7E83",
"selectedColor": "#3cc51f",
"selectedColor": "#FF780F",
"borderStyle": "black",
"backgroundColor": "#ffffff",
"height": "50px",
"fontSize": "10px",
"iconWidth": "24px",
"spacing": "3px",
"list": [{
"pagePath": "pages/index/index",
"iconPath": "",
"selectedIconPath": "",
"iconPath": "static/image/tabbar/index.png",
"selectedIconPath": "static/image/tabbar/indexselect.png",
"text": "首页",
"selectedColor": "#FBFBFB"
}, {
"pagePath": "pages/messages/messagesList",
"iconPath": "",
"selectedIconPath": "",
"iconPath": "static/image/tabbar/info.png",
"selectedIconPath": "static/image/tabbar/infoselect.png",
"text": "消息",
"selectedColor": "#FBFBFB"
}, {
"pagePath": "pages/user/index",
"iconPath": "",
"selectedIconPath": "",
"iconPath": "static/image/tabbar/mine.png",
"selectedIconPath": "static/image/tabbar/mineselect.png",
"text": "我的",
"selectedColor": "#FBFBFB"
}]

View File

@@ -1,38 +1,45 @@
<template>
<view class="details">
<view class="goods-info">
<image :src="info.extend_order_goods[0].goods_image"></image>
<view class="info-right">
<view class="name u-line-1">{{ info.extend_order_goods[0].goods_name }}</view>
<view class="info">
<view class="num">{{ info.extend_order_goods[0].goods_num }}件商品</view>
<view class="price">
实付
<span>{{ info.extend_order_goods[0].goods_pay_price }}</span>
<view class="box" v-if="type<4">
<view class="goods-info" v-for="list in info.extend_order_goods">
<image :src="list.image_480_url"></image>
<view class="info-right">
<view class="name u-line-1">{{ list.goods_name }}</view>
<view class="info">
<view class="num">{{ list.goods_num }}件商品</view>
<view class="price">
实付
<span>{{ list.goods_pay_price }}</span>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="refunds-user" v-if="type == 2 || type == 3 || type == 4 || type == 5 || type == 6">
<view>
<image src="/static/image/home/2.png"></image>
<view>{{ info.extend_order_common.reciver_name }}</view>
<u-radio-group class="box" v-model="value" v-if="type>3">
<view class="goods-info" v-for="list in info.refund_list">
<image :src="list.goods_image"></image>
<view class="info-right">
<view class="name u-line-1">{{ list.goods_name }}</view>
<view class="info">
<view class="num">{{ list.goods_num }}件商品</view>
<view class="price">
实付
<span>{{ list.refund_amount }}</span>
</view>
</view>
</view>
<u-radio :name="list.refund_id" v-if="type==4" shape="circle" @change="radioGroupChange">
</u-radio >
</view>
<view>
<image src="/static/image/home/3.png"></image>
<view>{{ info.extend_order_common.reciver_info.mob_phone }}</view>
</view>
<view>
<image src="/static/image/home/4.png"></image>
<view class="address u-line-1">{{ info.extend_order_common.reciver_info.address }}</view>
</view>
</view>
</u-radio-group>
<!-- 待处理 -->
<view class="user-info" v-if="type == 1">
<view class="info-title">收件人信息</view>
<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>
@@ -44,6 +51,24 @@
</view>
</view>
</view>
<!-- 待处理之后的 -->
<view class="refunds-title" v-if="type!=1">收件人信息</view>
<view class="refunds-user" v-if="type == 2 || type == 3 || type == 4 || type == 5 || type == 6|| type == 7">
<view>
<image src="/static/image/home/2.png"></image>
<view>{{ info.extend_order_common.reciver_name }}</view>
<image src="/static/image/home/chat.png" @click="tochat(info.buyer_id)"></image>
</view>
<view>
<image src="/static/image/home/3.png"></image>
<view>{{ info.extend_order_common.reciver_info.mob_phone }}</view>
</view>
<view>
<image src="/static/image/home/4.png"></image>
<view class="address u-line-1">{{ info.extend_order_common.reciver_info.address }}</view>
</view>
</view>
<!-- 待处理 -->
<view class="delivery" v-if="type == 1">
<view class="title">派送方式</view>
<view class="methods">
@@ -52,19 +77,25 @@
</view>
<view class="btn" @click="confirmpushstyle">确认</view>
</view>
<!-- 已发货 -->
<view class="pushtimeline" v-if="type == 2">
<view class="timelinetitle">物流信息</view>
<view class="timelineid">订单单号:{{ info.order_sn }}</view>
<view class="timelineid">订单单号:&nbsp;&nbsp;&nbsp;{{ info.order_sn }}</view>
<view class="timelinebox" v-for="list in info.express_list">
<view class="timelinecontent">{{list.content}}</view>
<view class="timelinetime">{{list.kd_time}}</view>
</view>
</view>
<!-- 已完成 -->
<!-- 退款处理 -->
<view class="refunds-option" v-if="type == 4">
<view :class="{ active: cur == 0 }" @click="unrefuse">不处理</view>
<view :class="{ active: cur == 1 }" @click="refuse">确定处理</view>
</view>
<view class="refund" v-if="type == 5 || type == 6">退款状态:{{ 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 == 7 ">退款状态:商家拒绝退款请等待客服联系</view>
<u-popup v-model="showDelivery" mode="center" border-radius="10" class="delivery-popup">
<view class="title">骑手信息</view>
<view class="input-info">
@@ -74,7 +105,8 @@
</view>
<view class="btn" @click="showDelivery = false">确认</view>
</u-popup>
<u-picker mode="selector" v-model="show" :default-selector="[0]" :range="list" range-key="content" @confirm="getselect"></u-picker>
<!-- <u-picker mode="selector" v-model="show" :default-selector="[0]" :range="list" range-key="content" @confirm="getselect" confirm-color="#ff780f;"></u-picker> -->
<u-select v-model="show" :list="list" @confirm="getselect" confirm-color="#FF780F"></u-select>
<!-- companylist -->
<u-picker
mode="selector"
@@ -128,29 +160,84 @@ export default {
express: '',
type: '',
orderid: 0,
info: {},
info: {
extend_order_goods:[{}],
extend_order_common:{
reciver_info:{
mob_phone:"",
address:""
},
receive_name:""
}
},
list: [],
pushid: null,
pushstate: false, //显示物流单号
selctcar: null, //骑手信息
companyidA: null, //物流派送公司id
companyidB: null //骑手派送公司id
companyidB: null, //骑手派送公司id
value:"",
refundid:null
};
},
onLoad(option) {
this.type = option.type;
console.log(this.type)
this.orderid = option.id;
this.resetinfo();
if (this.type == 1) {
// 获取快递公司
this.getcompanyinfo();
}
if (this.type == 2) {
// 获取物流信息
this.getcarinfo();
}
// 订单状态: 0:全部 1已付款未发货 2已发货 3已完成 4申请退款/退货 5已退款/退货 6拒绝退款/退货
},
methods: {
// 跳转详情页面
tochat(ID){
function Friend(uuid, name, avatar,time = "", text = "",date = "") {
this.uuid = uuid;
this.name = name;
this.avatar = avatar;
this.online = false;
this.unReadMessage = 0;
this.text = text;
this.time = time;
this.date = date
}
console.log(ID)
const token = uni.getStorageSync('token');
let that = this
uni.request({
url:"https://dmmall.sdbairui.com/api/Specialci/getAtwillUserInfo",
data:{
userId: ID
},
method:"POST",
header:{
"Authorization" : 'Bearer' + " " + token
},
success(res){
console.log(res)
res = res.data
let user = new Friend(res.data.member_id,res.data.member_nickname,res.data.member_avatar)
that.$u.route({
url:"/pages/messages/privateChat",
params:{
id:JSON.stringify(user)
}
})
}
})
},
// 退款单选
radioGroupChange(e) {
this.refundid = e
console.log(e);
},
// 人工配送
pushstyleA() {
this.cur = 0;
@@ -181,9 +268,8 @@ export default {
this.showRefunds = false;
if (this.cur == 0) {
// 确定退款
return;
this.$u.api.refund({
refund_id: this.orderid,
refund_id: this.refundid,
seller_state:2,
seller_message:""
}).then(res => {
@@ -197,14 +283,16 @@ export default {
title: res.message,
type: 'success'
});
uni.navigateBack({
delta: 1
});
console.log(res);
}
});
} else {
// 不进行退款
return;
this.$u.api.refund({
refund_id: this.orderid,
refund_id: this.refundid,
seller_state:3,
seller_message:""
}).then(res => {
@@ -218,6 +306,9 @@ export default {
title: res.message,
type: 'success'
});
uni.navigateBack({
delta: 1
});
console.log(res);
}
});
@@ -233,25 +324,6 @@ export default {
this.cur = 0;
this.showRefunds = true;
},
// 获取物流信息
getcarinfo() {
this.$u.api.getpushinfo({
order_id: this.orderid
}).then(res => {
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
this.$refs.uToast.show({
title: res.message,
type: 'success'
});
console.log(res);
}
});
},
// 选择快递公司
getselectcompany(e) {
let obj = this.companylist[e[0]];
@@ -298,13 +370,16 @@ export default {
title: res.message,
type: 'success'
});
uni.navigateBack({
delta: 1
});
}
});
}
},
// 选择骑手
getselect(e) {
this.selctcar = this.list[e[0]];
this.selctcar = this.list[e[0].value];
},
// 获取订单信息
resetinfo() {
@@ -331,7 +406,8 @@ export default {
} else {
let arr = res.data;
for (let index in arr) {
arr[index].content = arr[index].company_name + '——' + arr[index].contacts + '——' + arr[index].contact_number;
arr[index].value = index;
arr[index].label = arr[index].company_name + ' ' + arr[index].contacts + ' ' + arr[index].contact_number;
}
this.list = arr;
}
@@ -348,6 +424,7 @@ export default {
background-color: #ececec;
.goods-info {
background-color: #ffffff;
width: 750rpx;
padding: 30rpx;
display: flex;
align-items: center;
@@ -381,6 +458,12 @@ export default {
}
}
}
.refunds-title{
padding: 25rpx 30rpx;
font-weight: 500;
color: #333333;
background-color: #ffffff;
}
.refunds-user {
padding: 25rpx 30rpx;
background-color: #ffffff;
@@ -388,6 +471,7 @@ export default {
> view {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 30rpx;
@mixin image-class($width, $right) {
> image {
@@ -409,6 +493,7 @@ export default {
@include image-class($width: 36rpx, $right: 22rpx);
}
> view {
flex: 1;
font-size: 26rpx;
color: rgba(51, 51, 51, 1);
}
@@ -443,6 +528,11 @@ export default {
}
.value {
font-size: 26rpx;
flex: 1;
}
image{
width: 40rpx;
height: 40rpx;
}
}
}

View File

@@ -2,19 +2,7 @@
<view class="home">
<view class="image-swiper"><u-swiper :list="imageList" mode="dot" border-radius="20"></u-swiper></view>
<view class="tab-swiper">
<u-tabs-swiper
ref="uTabs"
:list="list"
:current="current"
@change="tabsChange"
active-color="#FF780F"
inactive-color="#333333"
font-size="26"
height="98"
:show-bar="false"
swiperWidth="750"
gutter="52"
></u-tabs-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>
</view>
<view class="order-list" v-if="current == 0">
<view v-for="(item, index) in allorder" :key="index"><OrderItem :info="item"></OrderItem></view>
@@ -34,7 +22,7 @@
<view class="title">选择订单号</view>
<view class="worker" v-if="JSON.stringify(worker) != '{}'">
<view>{{ worker.name }}</view>
<u-icon name="edit-pen" @click="worker = {}"></u-icon>
<u-icon name="arrow-down" @click="worker = {}"></u-icon>
</view>
<view v-else class="select" @click="showSelect = true">
<view>请选择</view>
@@ -50,10 +38,14 @@
</view>
</view>
<view v-else-if="current == 5">
<view v-for="(item, index) in finshlist" :key="index"><OrderItem :cur="current"></OrderItem></view>
<view v-for="(item, index) in finshlist" :key="index">
<OrderItem :info="item"></OrderItem>
</view>
</view>
<view v-else-if="current == 6">
<view v-for="(item, index) in badlist" :key="index"><OrderItem :cur="current"></OrderItem></view>
<view v-for="(item, index) in badlist" :key="index">
<OrderItem :info="item"></OrderItem>
</view>
</view>
<view class="release-btn" @click="publish">
<image src="../../static/image/index/publish.png"></image>
@@ -150,6 +142,8 @@ export default {
this.getswiper();
// 获取可投诉列表
this.getcarlist();
// 所有订单
this.getallorder(0);
const user = uni.getStorageSync('userinfo');
console.log(user)
this.imService.login(user.userId,user.member_avatar,"")
@@ -157,11 +151,6 @@ export default {
// 订单状态: 0:全部 1已付款未发货 2已发货 3已完成 4申请退款/退货 5已退款/退货 6拒绝退款/退货
},
onShow() {
this.current=0
// 初始化数据
this.resetarr()
// 所有订单
this.getallorder(0);
this.publishstate = false;
},
onReachBottom() {
@@ -201,7 +190,7 @@ export default {
this.getallorder(3);
} else if (current == 6) {
// 退货订单
this.getallorder(5);
this.getallorder(4);
}
},
// 关闭发布弹窗
@@ -357,6 +346,13 @@ export default {
},
// 骑手投诉点击确定
setWorker(e) {
if(e[0].label==null){
this.$refs.uToast.show({
title: "选择无效",
type: 'error'
});
return
}
let arr = this.carlist;
for (let index in arr) {
if (arr[index].takeawayer_id == e[0].value) {
@@ -374,9 +370,6 @@ export default {
this.current = index;
this.num = 1;
this.resetarr();
if (index == 6) {
this.getallorder(4);
}
this.reset();
},
// 发布内容跳转页面
@@ -404,15 +397,15 @@ export default {
}
.complaint {
margin: 0 30rpx;
padding: 75rpx 30rpx;
padding: 100rpx 20rpx;
background-color: #ffffff;
.select-container {
display: flex;
align-items: center;
margin-bottom: 60rpx;
margin-bottom: 100rpx;
.title {
width: 180rpx;
font-size: 30rpx;
width: 150rpx;
font-size: 26rpx;
color: rgba(51, 51, 51, 1);
margin-right: 20rpx;
text-align: right;
@@ -450,8 +443,8 @@ export default {
box-sizing: border-box;
display: flex;
.title {
width: 180rpx;
font-size: 30rpx;
width: 150rpx;
font-size: 26rpx;
text-align: right;
color: rgba(51, 51, 51, 1);
margin-right: 20rpx;

View File

@@ -13,21 +13,9 @@
</view>
</view>
</view>
<view class="refunds-user" v-if="type == 2 || type == 3 || type == 4">
<view>
<image src="/static/image/home/2.png"></image>
<view>{{ info.goods_try_member_name }}</view>
</view>
<view>
<image src="/static/image/home/3.png"></image>
<view>{{ info.goods_try_member_mobile }}</view>
</view>
<view>
<image src="/static/image/home/4.png"></image>
<view class="address u-line-1">{{ info.goods_try_area_info }}</view>
</view>
</view>
<view class="user-info" v-if="type == 1">
<!-- 待处理订单/已发货订单收货人信息 -->
<view class="user-info">
<view class="info-title">收件人信息</view>
<view class="info-container">
<view>
@@ -42,8 +30,29 @@
<view class="title">收货地址</view>
<view class="value u-line-1">{{ info.goods_try_area_info }}</view>
</view>
<view v-if="type==2">
<view class="title">派送方式</view>
<view class="value u-line-1">{{ info.goods_try_deliver_goods_type==1?"人工送达":"骑手" }}</view>
</view>
</view>
</view>
<!-- 已拒绝/已完成订单收货人信息 -->
<!-- <view class="refunds-user" v-if="type == 3 || type == 4">
<view>
<image src="/static/image/home/2.png"></image>
<view>{{ info.goods_try_member_name }}</view>
</view>
<view>
<image src="/static/image/home/3.png"></image>
<view>{{ info.goods_try_member_mobile }}</view>
</view>
<view>
<image src="/static/image/home/4.png"></image>
<view class="address u-line-1">{{ info.goods_try_area_info }}</view>
</view>
</view> -->
<!-- 待处理订单 -->
<view class="delivery" v-if="type == 1">
<view class="title">派送方式</view>
<view class="methods">
@@ -53,35 +62,44 @@
<view class="btn" @click="confirmpushstyle">确认</view>
</view>
<!-- <view class="refunds-option" v-if="type==4">
<view :class="{active: cur==0}" @click="cur=0;showRefunds=true">不处理</view>
<view :class="{active: cur==1}" @click="cur=1;showRefunds=true">确定处理</view>
</view> -->
<!-- <u-popup v-model="showDelivery" mode="center" border-radius="10" class="delivery-popup">
<view class="title">骑手信息</view>
<view class="input-info">
<input type="text" placeholder="请输入您的姓名" v-model="name" />
<input type="text" placeholder="请输入您的手机号" v-model="phone" />
<input type="text" placeholder="请输入您的公司名称" v-model="company" />
<!-- 已发货 -->
<!-- 人工送达 -->
<view class="refunds-user" v-if="info.goods_try_deliver_goods_type==1&&type==2">
<view>
<view>人工送达请等待货物正在飞速与你接近</view>
</view>
<view class="btn">确认</view>
</u-popup> -->
</view>
<!-- 骑手 -->
<view class="refunds-title" v-if="type==2">配送信息</view>
<view class="refunds-title" v-if="type==3||type==4">提示信息</view>
<view class="refunds-user" v-if="info.goods_try_deliver_goods_type==2&&type==2">
<view>
<image src="/static/image/home/2.png"></image>
<view>{{ info.takeawayer_name }}</view>
</view>
<view>
<image src="/static/image/home/3.png"></image>
<view>{{ info.takeawayer_mobile }}</view>
</view>
<!-- 骑手公司 -->
<!-- <view>
<image src="/static/image/home/4.png"></image>
<view class="address u-line-1">{{ info.goods_try_area_info }}</view>
</view> -->
</view>
<!-- 已经拒绝 -->
<view class="refunds-user" v-if="type==3">
<view>
<view>抱歉商家正忙无法接单期待下次为您服务</view>
</view>
</view>
<!-- 已完成订单 -->
<view class="refunds-user" v-if="type==4">
<view>
<view>订单配送完成期待下次为您服务</view>
</view>
</view>
<u-picker mode="selector" v-model="show" :default-selector="[0]" :range="list" range-key="content" @confirm="getselect"></u-picker>
<!-- <u-popup v-model="showExpress" mode="center" border-radius="10" class="delivery-popup">
<view class="title" @click="bindpushid">填写快递单号</view>
<view class="input-info">
<input type="text" placeholder="请输入快递单号" v-model="express" />
</view>
<view class="btn">确认</view>
</u-popup> -->
<!-- <u-popup v-model="showRefunds" mode="center" border-radius="10" class="refunds-popup">
<view v-if="cur==1" class="popup-tips">确定处理<br />平台将进行退款</view>
<view v-if="cur==0" class="popup-tips">确定不处理<br />平台将进行联系</view>
<view class="popup-btn">
<view class="cancel" @click="showRefunds=false">取消</view>
<view class="determine">确定</view>
</view>
</u-popup> -->
<u-toast ref="uToast" />
</view>
</template>
@@ -135,6 +153,13 @@ export default {
type: 'error'
});
} else {
this.$refs.uToast.show({
title: res.message,
type: 'success'
});
uni.navigateBack({
delta: 1
});
}
});
} else {
@@ -150,6 +175,13 @@ export default {
type: 'error'
});
} else {
this.$refs.uToast.show({
title: res.message,
type: 'success'
});
uni.navigateBack({
delta: 1
});
}
});
}
@@ -234,6 +266,13 @@ export default {
}
}
}
.refunds-title{
padding: 25rpx 30rpx;
font-weight: 500;
color: #333333;
background-color: #ffffff;
border-bottom: 2rpx solid #ececec;
}
.refunds-user {
padding: 25rpx 30rpx;
background-color: #ffffff;
@@ -290,7 +329,7 @@ export default {
border-bottom: 2rpx solid #ececec;
}
.title {
width: 150rpx;
width: 170rpx;
font-size: 30rpx;
margin-right: 10rpx;
}

View File

@@ -2,7 +2,7 @@
<!-- login页面 -->
<view>
<view class="login">
<image class="images" :src="url"></image>
<!-- <image class="images" :src="url"></image> -->
<view class="backes"></view>
<view class="title_top">德铭阳光在线-商家端</view>
<view class="content">
@@ -158,8 +158,20 @@ export default {
</script>
<style lang="scss" scoped>
.login:before{
background: url(../../static/bg.png) no-repeat;
background-size: cover;
width: 750rpx;
height: 100vh;
content: "";
position: absolute;
top: 0;
left: 0;
z-index: -1;/*-1 可以当背景*/
-webkit-filter: blur(3px);
filter: blur(3px);
}
.login {
// background: url(../../static/pageA/loginbackground.png) no-repeat!important;
.images {
position: fixed;
width: 100%;

View File

@@ -32,8 +32,8 @@
<!-- 标签 -->
<view>
<view class="titles">标签</view>
<view class="form-view" @click="show_add()">+ 新建标签</view>
<view :class="[item.state == true ? 'active' : '', 'form-view']" v-for="(item, index) in fileListes" :key="index" @click="changeselect(index)">
<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)">
{{ item.name }}
</view>
</view>
@@ -49,7 +49,14 @@
<view class="listes_shoping" v-for="(item, index) in list" :key="index">
<view>
<u-checkbox-group>
<u-checkbox @change="checkboxChange" shape="circle" active-color="#FF780F" v-model="item.checked" :name="item.goods_id"></u-checkbox>
<u-checkbox
shape="circle"
size="40"
active-color="#FF780F"
v-model="item.checked"
:name="index"
@change="checkboxChange"
></u-checkbox>
</u-checkbox-group>
</view>
<view><image :src="item.goods_image" mode="widthFix"></image></view>
@@ -118,6 +125,8 @@ export default {
checked: false,
list: [],
List_tosign: [],
flagA: true,
flagB: false,
scrollTop: 0,
imgarr: [], //上传图片数组
cover: '', //图文封面
@@ -137,34 +146,37 @@ export default {
for (let index in arr) {
newarr.push(arr[index].file_id);
}
this.$u.api.publishphoto({
article_title: this.form.name,
article_content: this.form.intro,
article_pic: this.imgarrA[0].file_name,
file_id: newarr,
goods_id_arr: this.arres_list,
label_arr: this.selectarr
}).then(res => {
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
this.$refs.uToast.show({
title: res.message,
type: 'success'
});
setTimeout(function(){
uni.navigateBack({
delta:1
})
},1000)
}
});
console.log(this.imgarrA);
this.$u.api
.publishphoto({
article_title: this.form.name,
article_content: this.form.intro,
article_pic: this.imgarrA[0].file_name,
file_id: newarr,
goods_id_arr: this.arres_list,
label_arr: this.selectarr
})
.then(res => {
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
this.$refs.uToast.show({
title: res.message,
type: 'success'
});
setTimeout(function() {
uni.navigateBack({
delta: 1
});
}, 1000);
}
});
},
// 获取商品数组变化
getshoplist() {
getshoplist(id) {
let arr = this.arres_list;
let newarr = this.list;
this.shoplist = [];
@@ -175,6 +187,7 @@ export default {
}
}
}
console.log(this.shoplist)
},
// 改变选中状态
changeselect(num) {
@@ -207,35 +220,52 @@ export default {
},
// 创建标签
addLiveSpec() {
this.$u.api.createLivesp({
spec_name: this.tagcontent
}).then(res => {
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
this.tagcontent = '';
this.show = false;
this.$refs.uToast.show({
title: res.message,
type: 'success'
});
}
});
this.$u.api
.createLivesp({
spec_name: this.tagcontent
})
.then(res => {
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
this.tagcontent = '';
this.show = false;
this.$refs.uToast.show({
title: res.message,
type: 'success'
});
}
});
},
// 上传封面
uploadcover(data) {
let obj = data.data;
obj.url = obj.file_path;
this.imgarrA.push(obj);
console.log(data);
if (data.errCode != 0) {
this.$refs.uToast.show({
title: '上传失败',
type: 'error'
});
} else {
let obj = data.data;
obj.url = obj.file_path;
this.imgarrA.push(obj);
}
},
// 上传图片
uploadphoto(data) {
let obj = data.data;
obj.url = obj.file_path;
this.imgarrB.push(obj);
if (data.errCode != 0) {
this.$refs.uToast.show({
title: '上传失败',
type: 'error'
});
} else {
let obj = data.data;
obj.url = obj.file_path;
this.imgarrB.push(obj);
}
},
changes() {
let that = this;
@@ -246,11 +276,14 @@ export default {
},
// 选中某个复选框时由checkbox时触发
checkboxChange(e) {
let id = e.name;
let that = this;
let num =Number(e.name)
if (e.value == true) {
this.pushes(id);
that.pushes(that.list[num].goods_id);
that.list[num].checked=true
} else {
this.delarr(id);
that.delarr(that.list[num].goods_id);
that.list[num].checked=false
}
},
// 删除直播商品
@@ -307,7 +340,7 @@ export default {
margin: 0 auto;
.form-view {
background: rgba(255, 120, 15, 1);
background: #cdc7c8;
border-radius: 6rpx;
margin-right: 20rpx;
font-size: 24rpx;
@@ -317,7 +350,7 @@ export default {
color: #fff;
}
.active {
background: red;
background: #ff780f;
}
.scroll {
width: 100%;

View File

@@ -62,7 +62,8 @@
fileListes:[],
rSelect:[],
image:"",
token:""
token:"",
tiaozhuan:false
};
},
methods: {
@@ -80,6 +81,7 @@
tupian(){
uni.hideLoading()
},
sccg() {},
// 选中某个复选框时由checkbox时触发
checkboxChange(e) {
//console.log(e);
@@ -106,8 +108,11 @@
this.init()
},
tupian(a){
console.log(JSON.parse(a.data))
this.image = JSON.parse(a.data).data.file_name
// console.log(JSON.parse(a.data));
let info = JSON.parse(a.data);
console.log(info.data.file_path);
// console.log(JSON.stringify(a.data))
this.image = info.data.file_path;
},
navto(url){
this.$u.route({
@@ -115,6 +120,10 @@
})
},
kaibo(){
if(this.tiaozhuan){
return ;
}
this.tiaozhuan = true
this.$u.api.createChatRoom({
chat_name:this.max,
live_desc:this.form.text,
@@ -128,6 +137,7 @@
title: res.message,
type: 'error'
});
this.tiaozhuan = false
}
this.$u.route({
url:"/pages/release/zhibo",

View File

@@ -24,8 +24,8 @@
<!-- 标签 -->
<view>
<view class="titles">标签</view>
<view class="form-view" @click="show_add()">+ 新建标签</view>
<view :class="[item.state == true ? 'active' : '', 'form-view']" v-for="(item, index) in fileListes" :key="index" @click="changeselect(index)">
<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)">
{{ item.name }}
</view>
</view>
@@ -40,7 +40,7 @@
<view class="listes_shoping" v-for="(item, index) in list" :key="index">
<view>
<u-checkbox-group>
<u-checkbox @change="checkboxChange" shape="circle" active-color="#FF780F" v-model="item.checked" :name="item.goods_id"></u-checkbox>
<u-checkbox shape="circle" size="40" active-color="#FF780F" v-model="item.checked" :name="index" @change="checkboxChange"></u-checkbox>
</u-checkbox-group>
</view>
<view><image :src="item.goods_image" mode="widthFix"></image></view>
@@ -77,6 +77,75 @@
</template>
<script>
let COS = require('../../common/cos-wx-sdk-v5.js');
// 上传文件
const upload_file_server = (_this, filepath) => {
// 腾讯云配置
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 time = new Date();
var y = time.getFullYear();
var m = time.getMonth() + 1;
m = m < 10 ? '0' + m : m;
var d = time.getDate();
d = d < 10 ? '0' + d : d;
let str = y + m + d;
let Key = 'video/' + str + '/' + filePath.substr(filePath.lastIndexOf('/') + 1);
// 初始化凭证
var cos = new COS({
SecretId: cosConfig.SecretId,
SecretKey: cosConfig.SecretKey
});
//上传文件
cos.postObject(
{
Bucket: cosConfig.Bucket,
Region: cosConfig.Region,
Key: Key,
StorgeClass: 'STANDARD', //存储方式
FilePath: filePath
},
(err, data) => {
console.log(err, data, 12345);
if (err == null) {
if (data.statusCode == 200) {
_this.videopath = 'https://dmmall-1300406074.cos.ap-shanghai.myqcloud.com/' + Key;
uni.hideLoading();
_this.videostate = true;
} else {
uni.showToast({
title: '上传失败!',
icon: 'none'
});
}
} else {
return;
}
}
);
};
// 选择图片(通用)
const cImage = _this => {
uni.chooseVideo({
count: 1,
sourceType: ['camera', 'album'],
success: function(res) {
uni.showLoading({
title: '上传中'
});
const tempFilePaths = res.tempFilePath;
console.log(tempFilePaths);
upload_file_server(_this, tempFilePaths);
}
});
};
export default {
data() {
return {
@@ -106,7 +175,8 @@ export default {
selectarr: [], //选中标签
tagcontent: '', //新建标签名字
selectvideo: '', //视频名字
videostate: false //视频状态
videostate: false, //视频状态
progress: 0
};
},
onLoad() {
@@ -150,11 +220,11 @@ export default {
title: res.message,
type: 'success'
});
setTimeout(function(){
setTimeout(function() {
uni.navigateBack({
delta:1
})
},1000)
delta: 1
});
}, 1000);
}
});
},
@@ -228,36 +298,7 @@ export default {
},
// 上传视频
uploadvideo() {
let url = this.action;
let that = this;
uni.chooseVideo({
count: 1,
sourceType: ['camera', 'album'],
success: function(res) {
self.src = res.tempFilePath;
const tempFilePaths = res.tempFilePath;
uni.uploadFile({
url: url, //仅为示例,非真实的接口地址
filePath: tempFilePaths,
name: 'article_video',
formData: {
name: 'article_video'
},
header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
},
success: uploadFileRes => {
let obj = JSON.parse(uploadFileRes.data);
that.videopath = obj.data.url;
that.selectvideo = obj.data.key;
that.videostate = true;
},
fail: function(error) {
console.log(error);
}
});
}
});
cImage(this);
},
// 新建标签
show_add() {
@@ -270,11 +311,14 @@ export default {
},
// 选中某个复选框时由checkbox时触发
checkboxChange(e) {
let id = e.name;
let that = this;
let num = Number(e.name);
if (e.value == true) {
this.pushes(id);
that.pushes(that.list[num].goods_id);
that.list[num].checked = true;
} else {
this.delarr(id);
that.delarr(that.list[num].goods_id);
that.list[num].checked = false;
}
},
// 删除直播商品
@@ -433,7 +477,7 @@ export default {
-webkit-line-clamp: 2;
}
.form-view {
background: rgba(255, 120, 15, 1);
background: #cdc7c8;
border-radius: 6rpx;
margin-right: 20rpx;
font-size: 24rpx;
@@ -443,7 +487,7 @@ export default {
color: #fff;
}
.active {
background: red;
background: #ff780f;
}
.titles {
font-size: 30rpx;

View File

@@ -1,11 +1,11 @@
<template>
<div>
<live-pusher id='livePusher' ref="livePusher" class="livePusher" :url="url"
mode="SD" :muted="false" :enable-camera="true" :auto-focus="true" :beauty="meiyan + 1" whiteness="2"
mode="FHD" :muted="false" :enable-camera="true" :auto-focus="true" :beauty="meiyan + 1" whiteness="0"
aspect="9:16" @statechange="statechange" @netstatus="netstatus" @error = "error"
:style="{'height':height + 'px'}"
></live-pusher>
<div class="bottom" :style="{'height':height + 'px'}" v-if="show" @click="show = false">
<div class="bottom" :style="{'height':height }" v-if="show" @click="show = false">
<div class="tanchuceng" @click="zuzhi">
<div class="head">
<div style="flex-direction: row;align-items:center">
@@ -231,6 +231,8 @@
overflow: hidden;
top: 0;
left: 0;
width: 750rpx;
height: 335rpx;
}
.menutitle{
font-size: 30rpx;
@@ -319,17 +321,27 @@
},
onReady() {
// 注意需要在onReady中 或 onLoad 延时
this.context = uni.createLivePusherContext("livePusher", this);
this.startPreview()
let that = this
uni.getSystemInfo({
success(a){
console.log(a.windowHeight)
that.height = a.windowHeight
// that.start()
}
})
setTimeout(()=>{
uni.getSystemInfo({
success(a){
console.log(a.windowHeight,1212)
that.height = a.windowHeight
// that.start()
setTimeout(()=>{
that.context = uni.createLivePusherContext("livePusher", that);
that.startPreview()
},500)
}
})
},500)
},
onLoad(a){
@@ -519,6 +531,7 @@
},
statechange(e) {
console.log("statechange:" + JSON.stringify(e));
console.log(e)
},
netstatus(e) {
// console.log("netstatus:" + JSON.stringify(e));
@@ -527,6 +540,7 @@
console.log("error:" + JSON.stringify(e));
},
start: function() {
console.log("开始")
console.log(this.url)
this.context.start({
success: (a) => {

View File

@@ -31,12 +31,12 @@
<view class="comment-list">
<view class="item" v-for="(item, index) in info.articlecomment" :key="index">
<view class="info">
<image></image>
<image :src="item.member_avatar"></image>
<view class="center">
<view class="name">{{item.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>
<view class="btn" @click="showreply(item.id)">回复</view>
<view class="btn" @click="showreply(item.id,item.member_id)">回复</view>
</view>
<view class="content u-line-1">{{item.content}}</view>
</view>
@@ -63,7 +63,8 @@ export default {
},
type:1,
content:"",
pid:null
pid:null,
replyid:null
};
},
onLoad(option) {
@@ -74,9 +75,10 @@ export default {
},
methods: {
// 展示回复弹框
showreply(id){
showreply(id,replyid){
this.showChat = true
this.pid = id
this.replyid = replyid
},
// 回复评论
reply(){
@@ -91,7 +93,8 @@ export default {
this.$u.api.reply({
pid:that.pid,
content:that.content,
article_id: that.id
article_id: that.id,
reply_id:that.replyid
}).then(res => {
if (res.errCode != 0) {
this.$refs.uToast.show({
@@ -101,6 +104,8 @@ export default {
} else {
this.pid = "";
this.content = "";
this.getdetail();
this.showChat = false
this.$refs.uToast.show({
title: res.message,
type: 'success'

View File

@@ -1,8 +1,8 @@
<template>
<view class="user">
<view class="head" @click="toOthersPage('info')">
<view class="info">
<image :src="info.member_avatar"></image>
<view class="info" :key="num">
<image :src="info.member_avatar+'?'+new Date().getTime()"></image>
<view class="name">
<text>{{info.member_nickname==null?"新用户":info.member_nickname}}</text>
<text>账号{{info.member_name}}</text>
@@ -23,6 +23,10 @@
<text>骑手投诉</text>
<image src="/static/image/user/1.png"></image>
</view>
<view class="nav" @click="loginout()">
<text>退出登录</text>
<image src="/static/image/user/1.png"></image>
</view>
<u-toast ref="uToast" />
</view>
</template>
@@ -31,13 +35,27 @@ export default {
name:"user",
data() {
return {
info:{}
info:{},
num:0
}
},
onLoad() {
},
onShow() {
this.getmyinfo()
},
methods: {
// 退出登陆
loginout(){
uni.clearStorage();
this.$refs.uToast.show({
title: "退出登陆成功!",
type: 'success'
});
uni.reLaunch({
url:"../login/login"
})
},
// 获取个人信息
getmyinfo(){
let that = this;
@@ -50,6 +68,7 @@ export default {
});
} else {
this.info = res.data.memberInfo
this.num++
}
});
},

View File

@@ -1,7 +1,7 @@
<template>
<view class="info">
<view class="head" @click="chooseImage">
<image :src="fileurl" :key="num"></image>
<image :src="fileurl+'?'+new Date().getTime()"></image>
<text>更换头像</text>
</view>
<view class="item">
@@ -35,6 +35,12 @@ export default {
},
onNavigationBarButtonTap() {
let that = this;
let obj ={
nickname:that.info.member_nickname,
avatar:that.filename,
signature:that.info.signature
}
console.log(obj)
this.$u.api.changeinfo({
nickname:that.info.member_nickname,
avatar:that.filename,
@@ -51,6 +57,9 @@ export default {
title: res.message,
type: 'success'
});
uni.navigateBack({
delta:1
})
}
});
},
@@ -81,7 +90,6 @@ export default {
success: function(res) {
console.log(JSON.stringify(res.tempFilePaths));
const tempFilePaths = res.tempFilePaths;
that.fileurl = tempFilePaths[0]
uni.uploadFile({
url: 'https://dmmall.sdbairui.com/storeapi/Upload/uploadFile',
filePath: tempFilePaths[0],

BIN
static/bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 908 KiB

BIN
static/image/home/chat.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@@ -386,7 +386,85 @@ IMService.prototype.initialIMListeners = function () {
// })
};
IMService.prototype.sendMessagesSetStorage = function (friendId,message){
let friend = this.friends[friendId];
console.log(friend)
// return ;
let sorts = function (friends){
let paixu = function (a,b){
if(a.date > b.date){
return 0;
}else{
return 1;
}
}
friends.sort(paixu)
}
let that = this
if(!friend && friend == undefined){
const token = uni.getStorageSync('token');
console.log(token)
uni.request({
url:"https://dmmall.sdbairui.com/api/Specialci/getAtwillUserInfo",
data:{
userId:friendId
},
method:"POST",
header:{
"Authorization" : 'Bearer' + " " + token
},
success(res){
console.log(res)
that.friends[friendId] = new Friend(res.data.data.member_id, res.data.data.member_nickname, res.data.data.member_avatar);
friend = that.friends[friendId];
console.log(friend)
friend.text = message
let time = new Date()
friend.date = time.getTime()
friend.time = time.getHours() + ":" + time.getMinutes() + ":" + time.getSeconds()
console.log(that.friends)
that.friendsarr = []
for(let i in that.friends){
console.log(i)
that.friendsarr.push(that.friends[i])
}
sorts(that.friendsarr)
let arr = []
for(let i in that.friends){
arr.push([that.friends[i].uuid,that.friends[i].time,that.friends[i].text,that.friends[i].date,0])
}
console.log(arr)
uni.setStorageSync('imlist',JSON.stringify(arr))
that.onFriendListChange(that.friends);
}
})
}else{
console.log(friend)
friend.text = message
let time = new Date()
friend.date = time.getTime()
friend.time = time.getHours() + ":" + time.getMinutes() + ":" + time.getSeconds()
console.log(this.friends)
that.friendsarr = []
for(let i in this.friends){
that.friendsarr.push(this.friends[i])
}
sorts(that.friendsarr)
let arr = []
for(let i in that.friends){
arr.push([that.friends[i].uuid,that.friends[i].time,that.friends[i].text,that.friends[i].date,0])
}
console.log(arr)
uni.setStorageSync('imlist',JSON.stringify(arr))
this.onFriendListChange(this.friends);
}
}
//订阅群消息
IMService.prototype.subscribeGroupMessage = function (id) {
this.im.subscribeGroup([id])
@@ -462,6 +540,8 @@ IMService.prototype.sendPrivateTextMessage = function (friendId, text) {
text: text
});
this.sendPrivateMessage(friendId, textMessage);
this.sendMessagesSetStorage(friendId, text)
};
//私聊图片消息
@@ -473,6 +553,8 @@ IMService.prototype.sendPrivateImageMessage = function (friendId, imageFile) {
}
});
this.sendPrivateMessage(friendId, imageMessage);
this.sendMessagesSetStorage(friendId, '其他消息')
};
//私聊视频消息
@@ -484,6 +566,8 @@ IMService.prototype.sendPrivateVideoMessage = function (friendId, videoFile) {
}
});
this.sendPrivateMessage(friendId, videoMessage);
this.sendMessagesSetStorage(friendId, '其他消息')
};
IMService.prototype.sendPrivateAudioMessage = function (friendId, audiofile) {
@@ -495,6 +579,8 @@ IMService.prototype.sendPrivateAudioMessage = function (friendId, audiofile) {
});
this.sendPrivateMessage(friendId, audioMessage);
this.sendMessagesSetStorage(friendId, '其他消息')
};
//发送私聊消息