Commit b353d8362131e618d8ab42e80c75ddd896b073dd

Authored by vking
1 parent ca93da54

接单人

@@ -34,6 +34,13 @@ Page({ @@ -34,6 +34,13 @@ Page({
34 }catch(e){} 34 }catch(e){}
35 console.log('this.sc', this.sc,getApp().isAdmin); 35 console.log('this.sc', this.sc,getApp().isAdmin);
36 if(getApp().isAdmin || this.sc.seller.is_call_tel==1){ 36 if(getApp().isAdmin || this.sc.seller.is_call_tel==1){
  37 + if(getApp().isAdmin){
  38 + App.Customer.GetReceptionists({sid:this.sc.seller.id}).then(res=>{
  39 + this.setData({
  40 + jdMans:res.data,
  41 + })
  42 + })
  43 + }
37 this.hasCallPhone=true; 44 this.hasCallPhone=true;
38 } 45 }
39 this.getDetail(opt.id); 46 this.getDetail(opt.id);
@@ -350,6 +357,27 @@ Page({ @@ -350,6 +357,27 @@ Page({
350 let key=util.attr(e,'key') 357 let key=util.attr(e,'key')
351 let bi=this.data.bookInfo 358 let bi=this.data.bookInfo
352 //getApp().isAdmin 359 //getApp().isAdmin
  360 + if(key=='jdmans'){
  361 + try{
  362 + let jdphone=this.data.jdMans[0].phone
  363 + if(!jdphone) throw new Error('no-jdphone')
  364 + wx.makePhoneCall({
  365 + phoneNumber: jdphone
  366 + })
  367 + }catch(e){
  368 + return wx.showModal({
  369 + title: '温馨提示',
  370 + content: '商家未设置在线接单人或电话,请联系商家完善',
  371 + confirmColor: '#199095',
  372 + confirmText:'知道了',
  373 + showCancel: false,
  374 + success: (res)=> {
  375 +
  376 + }
  377 + });
  378 + }
  379 + return;
  380 + }
353 if(bi.type==1 && !this.hasCallPhone && key!='seller'){//在线预订 381 if(bi.type==1 && !this.hasCallPhone && key!='seller'){//在线预订
354 if(bi.status==6) return; 382 if(bi.status==6) return;
355 if(bi.status==0){ 383 if(bi.status==0){
@@ -178,6 +178,9 @@ @@ -178,6 +178,9 @@
178 <block wx:if="{{isAdmin}}"> 178 <block wx:if="{{isAdmin}}">
179 <view class="notice-button-border font34r flex-lr"> 179 <view class="notice-button-border font34r flex-lr">
180 <view> 180 <view>
  181 + <formids bindclick="easyCall" data-key="jdmans">联系接单人</formids>
  182 + </view>
  183 + <view>
181 <formids bindclick="easyCall" data-key="seller">联系商家</formids> 184 <formids bindclick="easyCall" data-key="seller">联系商家</formids>
182 </view> 185 </view>
183 <view> 186 <view>
@@ -496,4 +496,7 @@ export default { @@ -496,4 +496,7 @@ export default {
496 openid:'openid', 496 openid:'openid',
497 silence: false, 497 silence: false,
498 }, 498 },
  499 +
  500 + //接单人,获得商家设置的接单人列表
  501 + 'App.Customer.GetReceptionists':null,
499 } 502 }