Commit 22f607f590d759312e2576f4cc389eff5b382665

Authored by wangfan
1 parent 72d9122e

v2 book sendsms

... ... @@ -53,6 +53,18 @@ App({
console.log('onUpdateFailed',res)
})
}
try{
let sms_code= await this.getClipboardData();
wx.setClipboardData({
data:"?"
})
console.log('SMS.code',sms_code);
wx.reLaunch({
url:'/pages/customer/index?sms_code='+sms_code
});
}catch (e){
console.log('SMS.code.catch',e);
}
},
getSystemInfo(){
this._getSystemInfo().then((res)=>{
... ... @@ -127,4 +139,21 @@ App({
}
return openid;
},
getClipboardData(){
return new Promise((success,fail)=>{
wx.getClipboardData({
success:(res)=>{
let match=res.data.match(/¥(.*)¥/);
if(match && res.data.indexOf('订个座儿')>0){
success(match[1])
}else{
fail()
}
},
fail:()=>{
fail()
}
})
})
}
})
\ No newline at end of file
... ...
... ... @@ -29,7 +29,7 @@
</view>
<view class="flex-lr" style="margin-top: 43rpx;">
<view>用餐人数</view>
<view class="detail-info-right">{{detail.pnum}}人</view>
<view class="detail-info-right">{{detail.pnum_str}}人</view>
</view>
<view class="flex-lr" wx:if="{{detail.cusman}}"
style="margin-top: 43rpx;"
... ...
... ... @@ -30,16 +30,7 @@ Page({
this.selectComponent("#network").refresh();
return;
}
opt.sms_code='';
try{
opt.sms_code= await this.getClipboardData();
wx.setClipboardData({
data:"?"
})
console.log('SMS.code',opt.sms_code);
}catch (e){
console.log('SMS.code.catch',e);
}
let url = '/pages/customer/list';
if (opt.id > 0 || opt.sms_code) {
if(opt.invite_name){
... ... @@ -147,21 +138,4 @@ Page({
let openid = getApp().openid;
return openid;
},
getClipboardData(){
return new Promise((success,fail)=>{
wx.getClipboardData({
success:(res)=>{
let match=res.data.match(/¥(.*)¥/);
if(match && res.data.indexOf('订个座儿')>0){
success(match[1])
}else{
fail()
}
},
fail:()=>{
fail()
}
})
})
}
})
\ No newline at end of file
... ...