Commit a7dfa6a8 authored by ZJG's avatar ZJG

订阅消息

parent 21dfebb6
...@@ -375,20 +375,28 @@ ...@@ -375,20 +375,28 @@
uni.showLoading({ uni.showLoading({
title: '下单中...' title: '下单中...'
}) })
this.request2({ let that= this
uni.requestSubscribeMessage({
tmplIds: that.details.template_message_list,
complete(_res) {
console.log(_res)
that.request2({
url: '/api/AppletCar/SetAppletCarOrderInfo', url: '/api/AppletCar/SetAppletCarOrderInfo',
data: this.addMsg data: that.addMsg
}, },
res => { res => {
uni.hideLoading() uni.hideLoading()
if (res.resultCode == 1) { if (res.resultCode == 1) {
this.queren(res.data) that.queren(res.data)
} }
}, },
err => { err => {
uni.hideLoading() uni.hideLoading()
} }
); );
}
});
}, },
queren(OrderId){ queren(OrderId){
let url='/api/WeChatPay/GetDmcPayInfo' let url='/api/WeChatPay/GetDmcPayInfo'
...@@ -425,12 +433,22 @@ ...@@ -425,12 +433,22 @@
uni.showToast({ uni.showToast({
title: "支付成功" title: "支付成功"
}) })
setTimeout(()=>{
uni.redirectTo({
url: '/pages/jiuzhai/allorderList'
});
}, 100 )
}, },
fail: function(err) { fail: function(err) {
console.log('fail:', err); console.log('fail:', err);
uni.showToast({ uni.showToast({
title: "支付失败" title: "支付失败"
}) })
setTimeout(()=>{
uni.redirectTo({
url: '/pages/jiuzhai/allorderList'
});
}, 100 )
} }
}); });
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment