Commit b353d8362131e618d8ab42e80c75ddd896b073dd

Authored by vking
1 parent ca93da54

接单人

... ... @@ -34,6 +34,13 @@ Page({
}catch(e){}
console.log('this.sc', this.sc,getApp().isAdmin);
if(getApp().isAdmin || this.sc.seller.is_call_tel==1){
if(getApp().isAdmin){
App.Customer.GetReceptionists({sid:this.sc.seller.id}).then(res=>{
this.setData({
jdMans:res.data,
})
})
}
this.hasCallPhone=true;
}
this.getDetail(opt.id);
... ... @@ -350,6 +357,27 @@ Page({
let key=util.attr(e,'key')
let bi=this.data.bookInfo
//getApp().isAdmin
if(key=='jdmans'){
try{
let jdphone=this.data.jdMans[0].phone
if(!jdphone) throw new Error('no-jdphone')
wx.makePhoneCall({
phoneNumber: jdphone
})
}catch(e){
return wx.showModal({
title: '温馨提示',
content: '商家未设置在线接单人或电话,请联系商家完善',
confirmColor: '#199095',
confirmText:'知道了',
showCancel: false,
success: (res)=> {
}
});
}
return;
}
if(bi.type==1 && !this.hasCallPhone && key!='seller'){//在线预订
if(bi.status==6) return;
if(bi.status==0){
... ...
... ... @@ -178,6 +178,9 @@
<block wx:if="{{isAdmin}}">
<view class="notice-button-border font34r flex-lr">
<view>
<formids bindclick="easyCall" data-key="jdmans">联系接单人</formids>
</view>
<view>
<formids bindclick="easyCall" data-key="seller">联系商家</formids>
</view>
<view>
... ...
... ... @@ -496,4 +496,7 @@ export default {
openid:'openid',
silence: false,
},
//接单人,获得商家设置的接单人列表
'App.Customer.GetReceptionists':null,
}
\ No newline at end of file
... ...