宴席2.0
Some checks are pending
deploy / deploy (push) Waiting to run

This commit is contained in:
sjeam 2025-08-15 14:27:15 +08:00
commit 3f4b19fcf6
3 changed files with 36 additions and 8 deletions

View File

@ -362,10 +362,22 @@
order_id: order_id order_id: order_id
}).catch((res) => { }).catch((res) => {
if (res.code === 1) { if (res.code === 1) {
// this.payOrder(res.data.order_id); wx.requestPayment({
"timeStamp": res.data.timeStamp,
// this.propShowOrder = true; "nonceStr": res.data.nonceStr,
"package": res.data.package,
"signType": res.data.signType,
"paySign": res.data.paySign,
"success": function (res) {
console.log('success:' + JSON.stringify(res));
},
"fail": function (err) {
console.log('fail:' + JSON.stringify(err));
},
"complete": function (res) {
console.log('complete:' + JSON.stringify(res));
}
})
console.log(res.data); console.log(res.data);
// this.close(); // this.close();
} else { } else {

View File

@ -159,7 +159,7 @@ export default defineComponent({
// //
addCart (id) { addCart (id) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/banquet/combo/index??id=${id}` url: `/pages/banquet/combo/index?id=${id}`
}); });
// CommonApi.commonPost('/api/cart/add', { // CommonApi.commonPost('/api/cart/add', {
// buy_now: false, // buy_now: false,

View File

@ -297,6 +297,22 @@ export default defineComponent({
// this.propShowOrder = true; // this.propShowOrder = true;
console.log(res.data); console.log(res.data);
wx.requestPayment({
"timeStamp": res.data.timeStamp,
"nonceStr": res.data.nonceStr,
"package": res.data.package,
"signType": res.data.signType,
"paySign": res.data.paySign,
"success": function (res) {
console.log('success:' + JSON.stringify(res));
},
"fail": function (err) {
console.log('fail:' + JSON.stringify(err));
},
"complete": function (res) {
console.log('complete:' + JSON.stringify(res));
}
})
// this.close(); // this.close();
} else { } else {
uni.$u.toast(res.msg); uni.$u.toast(res.msg);