Commit 6082cf9afae72e407ce481a624a99e5e43b97f0d

Authored by vking
1 parent 8678707b

更换短信逻辑

... ... @@ -63,28 +63,28 @@ Page({
},
bookInfo: null,
async getDetail(id){
let res=await App.Reserve.Detail({rid: id});
let params={rid: id}
let res=await App.Reserve.Detail(params);
this.bookInfo=res.data
if(res.data.operator_openid==2){//运营处理订单,强制使用运营短信
this.tplsIndex='SMS_173950289'
params.template_code='SMS_173950289'
}
let tplMsg=await ST.getTplMsg(res.data,this.tplsIndex,this.sc)
console.log('tplMsg',tplMsg)
let msg=await App.SendSMS.GetSmsContent(params);
//let tplMsg=await ST.getTplMsg(res.data,this.tplsIndex,this.sc)
console.log('tplMsg',msg.data.content)
this.setData({
bookInfo: res.data,
tplMsg: tplMsg
tplMsg: msg.data.content
})
},
sendsms(){
App.SendSMS.Message({
phone: this.bookInfo.phone,
sign_name: '周到安排',
template_code: this.tplsIndex,
template_param: JSON.stringify(ST.smsData),
App.SendSMS.NewMessage({
rid: this.bookInfo.id,
len:this.data.tplMsg.length
}).then((res) => {
sid: this.bookInfo.seller.id
}).then(res=>{
if (res.ret != 200) {
return util.toast(res.msg, 'none');
}
... ...
... ... @@ -136,10 +136,16 @@ Page({
hasUpTime:reserev.type==1 && reserev.hasRunning && reserev.status!=2,
}
})
/*
App.Reserve.SellerInfo({seller_id:reserev.seller.id}).then(async sc=>{
this.msgTpl=await ST.getTplMsg(reserev,sc.data.setting.template_code,sc.data)
console.log('this.msgTpl',this.msgTpl);
})
})*/
})
App.SendSMS.GetSmsContent({
rid:this.data.options.id,
}).then(res=>{
this.msgTpl=res.data.content
})
},
formatDatail(detail,dateSmart){
... ...
... ... @@ -366,6 +366,11 @@ export default {
openid:'openid',
cachetime: -1,
},
//查看短信内容
'App.SendSMS.GetSmsContent':null,
//发送短信
'App.SendSMS.NewMessage':null,
//商户修改在线预定
'App.Customer.SetReserveInfoById':null,
//生成小程序码
... ...