This commit is contained in:
2020-08-07 11:40:13 +08:00
parent 9f444ad070
commit eb0d648f6a
5 changed files with 60 additions and 22 deletions

View File

@@ -139,7 +139,7 @@
<image src="/static/image/common/18.png"></image>
店铺
</view>
<view class="navs" style="margin-right:30rpx">
<view @click="customers()" class="navs" style="margin-right:30rpx">
<image src="/static/image/common/19.png"></image>
客服
</view>
@@ -159,7 +159,7 @@
<image src="/static/image/common/18.png"></image>
<text>店铺</text>
</view>
<view>
<view @click="customers()">
<image src="/static/image/common/19.png"></image>
<text>客服</text>
</view>
@@ -204,6 +204,7 @@ export default {
sel: "", // 拼接的规格
quanxuan: false, // 规格是否选择
debounce: true,
storeid:0 //店铺id
}
},
components: {
@@ -238,6 +239,34 @@ export default {
clearInterval(this.timer);
},
methods: {
customers(){
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(123)
this.$u.api.getAtwillUserInfo({
id:this.storeid
}).then((res)=>{
console.log(res)
let user = new Friend(res.data.member_id,res.data.member_nickname,res.data.member_avatar)
this.$u.route({
url:"/pageD/privateChat/privateChat",
params:{
id:JSON.stringify(user)
}
})
}).catch((err)=>{
console.log(err)
})
},
setSwiperList(list) {
let img = [];
list.forEach(item => {
@@ -309,12 +338,14 @@ export default {
// 普通商品详情
ordinaryDetails(id) {
this.$u.api.getGoodsDetails({ id: id }).then((res)=>{
console.log(res)
if (res.errCode == 0) {
this.evaluate = res.data.goods_evaluate_info;
this.goodsInfo = res.data.goods;
this.storeInfo = res.data.store;
this.setSwiperList(res.data.goods_image);
this.glist = res.data.spec_list;
this.storeid = res.data.store.store_id
// console.log(this.goodsInfo.mobile_body);
}
})