Commit 3c2b887f58c13d54151b624e74e66e11ae113391

Authored by wangfan
1 parent cbfb0ba0

多个电话

... ... @@ -40,12 +40,30 @@ Component({
tapButton(e){
let type=util.attr(e,'type');
if(type=='oncall'){
if(!this.data.seller.phone){
if(this.data.seller.seller_tel.length<1){
if(!this.data.seller.phone){
return util.toast('商家电话错误','none');
}
wx.makePhoneCall({
}
wx.makePhoneCall({
phoneNumber:this.data.seller.phone
})
})
}else{
wx.hideTabBar();
//this.selectComponent('#as').show();
wx.showActionSheet({
itemList:this.data.seller.seller_tel,
complete:()=>{
wx.showTabBar();
},
success:(res)=>{
let phone=this.data.seller.seller_tel[res.tapIndex]
wx.makePhoneCall({
phoneNumber:phone.replace(/[^\d]/g,'')
})
}
});
}
}else{
util.toast('请打电话预定','none');
}
... ...
{
"component": true,
"usingComponents": {}
"usingComponents": {
"as":"../../actionSheet/index"
}
}
\ No newline at end of file
... ...
... ... @@ -17,4 +17,5 @@
</view>
</view>
</view>
</view>
\ No newline at end of file
</view>
<as items="{{['1','2']}}" id="as"></as>
\ No newline at end of file
... ...