Commit 35af8fc60f43a748943637f90fc12965d2c99127

Authored by wangfan
1 parent ac994bc3

most_pnum

... ... @@ -48,6 +48,9 @@ Component({
});
break;
case 2:
if(!this.data.bookInfo.hasOwner){
return util.toast('只有记录人可以拨打','none');
}
if(this.data.bookInfo.phone.length<3){
return util.toast('号码错误','none');
}
... ...
... ... @@ -55,6 +55,9 @@ Page({
};
},
getcall:function(){
if(!this.detailData.hasOwner){
return util.toast('只有记录人可以拨打','none');
}
if(this.data.bookInfo.phone.length<3){
return util.toast('号码错误','none');
}
... ... @@ -109,14 +112,26 @@ Page({
App.Reserve.SellerInfo(util.cache('enter_params'),true);
},
detailData:null,
getDetail(id,force=false){
App.Reserve.Detail({rid:id,openid:''},force).then(res=>{
res.data.rdateStr=util.unixtoTime(res.data.ddate,"MM月DD日 HH:II")
this.detailData=res.data;
this.setData({
tables:res.data.tables,
bookInfo:res.data,
})
async getDetail(id,force=false){
let res=await App.Reserve.Detail({rid:id,openid:''},force);
res.data.rdateStr=util.unixtoTime(res.data.ddate,"MM月DD日 HH:II")
res.data.phoneStr=res.data.phone;
let enter_params=util.cache('enter_params');
let sc=(await App.Reserve.SellerInfo(enter_params)).data
let note_openid=enter_params.seller_openid;
res.data.hasOwner=false;
if(note_openid==res.data.note_openid || sc.seller_user.role_name=='管理员'){
res.data.hasOwner=true;
}
if(res.data.hasOwner){
res.data.phoneStr=res.data.phoneStr.replace(/(\d{2})(.{5})(\d{3})/,function($0,$1,$2,$3){
return $1+'**'+$3;
})
}
this.detailData=res.data;
this.setData({
tables:res.data.tables,
bookInfo:res.data,
})
},
gotoModify(){
... ...
... ... @@ -15,10 +15,10 @@
</view>
<view class="flex-lr order-desk">
<view class="gray-deep-font font30r"></view>
<view class="flex-re" style="width:80%;flex-wrap:wrap;">
<view class="flex-re" style="width:100%;flex-wrap:wrap;">
<block wx:for="{{tables}}">
<board width="160" height="180" board="{{item}}" className="noBottom"
style="margin-left:20rpx;zoom: 0.8"></board>
style="margin-left:20rpx;zoom: 0.8; margin-bottom: 20rpx;"></board>
</block>
</view>
</view>
... ... @@ -28,7 +28,7 @@
</view>
<view class="flex-lr order-detail">
<view class="gray-deep-font font30r">手机号码</view>
<view class="black-font font34r" bindtap="getcall">{{bookInfo.phone||''}}</view>
<view class="black-font font34r" bindtap="getcall">{{bookInfo.phoneStr||''}}</view>
</view>
<block wx:if="{{bookInfo.cusdem!='' && bookInfo.cusdem!='null'}}">
<view class="flex-lr order-detail">
... ...
... ... @@ -68,7 +68,13 @@ Page({
},
buy(){
if(!this.data.form.meal_id) return;
App.Reserve.SmsBuy(this.data.form).then(res=>{
let prarms={
sellerid: this.data.form.seller_id,
price:this.data.form.price,
id:this.data.form.meal_id,
openid:getApp().openid,
}
App.Reserve.SmsBuy(prarms).then(res=>{
let pay=res.data;
wx.requestPayment({
'timeStamp': pay.timeStamp,
... ...
... ... @@ -91,6 +91,8 @@ export default {
},
//生成支付签名接口
'App.Reserve.SmsBuy':null,
'App.Reserve.SmsBuy':{
alias:'App.Pay.WxPaySub',
},
}
\ No newline at end of file
... ...