|
...
|
...
|
@@ -57,6 +57,7 @@ Component({ |
|
|
|
value: false,
|
|
|
|
},
|
|
|
|
hasNewActivityList:Boolean,//新的活动商家列表
|
|
|
|
hasInSwiper:Boolean,//是否在Swiper控件内,不能使用组件电话框,只能通知页面
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
...
|
...
|
@@ -107,9 +108,10 @@ Component({ |
|
|
|
})
|
|
|
|
},
|
|
|
|
tapButton(e) {
|
|
|
|
//console.log('tapButton',e)
|
|
|
|
let type = util.attr(e, 'type');
|
|
|
|
if (type == 'oncall') {
|
|
|
|
if(this.data.seller.is_online_reserve==1){
|
|
|
|
if(this.data.seller.is_online_reserve==1 && this.data.seller.is_tele==1){
|
|
|
|
let url=util.http_build_query({id:this.data.seller.id,activeTab:'reserve'},'/pages/reserve/detail')
|
|
|
|
if(this.data.seller.findSellerParamObj){
|
|
|
|
let findSellerParamObj=this.data.seller.findSellerParamObj
|
|
...
|
...
|
@@ -126,30 +128,11 @@ Component({ |
|
|
|
url:url,
|
|
|
|
})
|
|
|
|
}
|
|
|
|
let seller_tel = this.data.seller.seller_tel;
|
|
|
|
if (seller_tel.length < 1) {
|
|
|
|
seller_tel = [this.data.seller.phone]
|
|
|
|
if(this.data.hasInSwiper){
|
|
|
|
this.triggerEvent('event',{act:type,seller:this.data.seller})
|
|
|
|
}else{
|
|
|
|
this.selectComponent('#as').show(this.data.seller);
|
|
|
|
}
|
|
|
|
if (seller_tel.length == 1) {
|
|
|
|
wx.makePhoneCall({
|
|
|
|
phoneNumber: seller_tel[0].replace(/[^\d]/g, '')
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
//wx.hideTabBar();
|
|
|
|
wx.showActionSheet({
|
|
|
|
itemList: seller_tel,
|
|
|
|
complete: () => {
|
|
|
|
//wx.showTabBar();
|
|
|
|
},
|
|
|
|
success: (res) => {
|
|
|
|
let phone = seller_tel[res.tapIndex]
|
|
|
|
wx.makePhoneCall({
|
|
|
|
phoneNumber: phone.replace(/[^\d]/g, '')
|
|
|
|
})
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
util.toast('请打电话预订', 'none');
|
|
|
|
}
|
...
|
...
|
|