|
@@ -63,28 +63,28 @@ Page({ |
|
@@ -63,28 +63,28 @@ Page({ |
|
63
|
},
|
63
|
},
|
|
64
|
bookInfo: null,
|
64
|
bookInfo: null,
|
|
65
|
async getDetail(id){
|
65
|
async getDetail(id){
|
|
66
|
- let res=await App.Reserve.Detail({rid: id});
|
66
|
+ let params={rid: id}
|
|
|
|
67
|
+ let res=await App.Reserve.Detail(params);
|
|
67
|
this.bookInfo=res.data
|
68
|
this.bookInfo=res.data
|
|
68
|
if(res.data.operator_openid==2){//运营处理订单,强制使用运营短信
|
69
|
if(res.data.operator_openid==2){//运营处理订单,强制使用运营短信
|
|
69
|
this.tplsIndex='SMS_173950289'
|
70
|
this.tplsIndex='SMS_173950289'
|
|
|
|
71
|
+ params.template_code='SMS_173950289'
|
|
70
|
}
|
72
|
}
|
|
71
|
- let tplMsg=await ST.getTplMsg(res.data,this.tplsIndex,this.sc)
|
|
|
|
72
|
- console.log('tplMsg',tplMsg)
|
73
|
+ let msg=await App.SendSMS.GetSmsContent(params);
|
|
|
|
74
|
+ //let tplMsg=await ST.getTplMsg(res.data,this.tplsIndex,this.sc)
|
|
|
|
75
|
+ console.log('tplMsg',msg.data.content)
|
|
73
|
this.setData({
|
76
|
this.setData({
|
|
74
|
bookInfo: res.data,
|
77
|
bookInfo: res.data,
|
|
75
|
- tplMsg: tplMsg
|
78
|
+ tplMsg: msg.data.content
|
|
76
|
})
|
79
|
})
|
|
77
|
|
80
|
|
|
|
|
81
|
+
|
|
78
|
},
|
82
|
},
|
|
79
|
sendsms(){
|
83
|
sendsms(){
|
|
80
|
- App.SendSMS.Message({
|
|
|
|
81
|
- phone: this.bookInfo.phone,
|
|
|
|
82
|
- sign_name: '周到安排',
|
|
|
|
83
|
- template_code: this.tplsIndex,
|
|
|
|
84
|
- template_param: JSON.stringify(ST.smsData),
|
84
|
+ App.SendSMS.NewMessage({
|
|
85
|
rid: this.bookInfo.id,
|
85
|
rid: this.bookInfo.id,
|
|
86
|
- len:this.data.tplMsg.length
|
|
|
|
87
|
- }).then((res) => {
|
86
|
+ sid: this.bookInfo.seller.id
|
|
|
|
87
|
+ }).then(res=>{
|
|
88
|
if (res.ret != 200) {
|
88
|
if (res.ret != 200) {
|
|
89
|
return util.toast(res.msg, 'none');
|
89
|
return util.toast(res.msg, 'none');
|
|
90
|
}
|
90
|
}
|