|
|
@ -474,6 +474,7 @@ export default { |
|
|
|
// 获取总积分 |
|
|
|
async getTotalPoints() { |
|
|
|
try { |
|
|
|
if(!uni.getStorageSync("userInfo") )return |
|
|
|
this.Post({}, "/framework/points/getLastBalance", "DES").then((res) => { |
|
|
|
if (res.code === 200) { |
|
|
|
this.userPoints = res.data.balance || 0; |
|
|
@ -964,10 +965,11 @@ export default { |
|
|
|
onSuccess: (data) => { |
|
|
|
this.isOrderLoading = false; // 结束加载 |
|
|
|
// 处理成功逻辑 |
|
|
|
uni.showToast({ |
|
|
|
title: "订单创建成功", |
|
|
|
icon: "success", |
|
|
|
}); |
|
|
|
// uni.showToast({ |
|
|
|
// title: "订单创建成功", |
|
|
|
// icon: "success", |
|
|
|
// }); |
|
|
|
this.orderPay(res.msg) |
|
|
|
}, |
|
|
|
onFailure: (data) => { |
|
|
|
this.isOrderLoading = false; // 结束加载 |
|
|
@ -1002,6 +1004,35 @@ export default { |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
orderPay(token){ |
|
|
|
this.Post( |
|
|
|
{ |
|
|
|
method: "POST", |
|
|
|
orderNo:token, |
|
|
|
fromType:1, |
|
|
|
payAmount:this.allprice, |
|
|
|
userId:124 |
|
|
|
}, |
|
|
|
"/framework/wxPay/submitShopPurOrder", |
|
|
|
"DES" |
|
|
|
).then(res =>{ |
|
|
|
uni.requestPayment({ |
|
|
|
nonceStr: res.data.nonceStr, |
|
|
|
package: res.data.package, |
|
|
|
paySign: res.data.paySign, |
|
|
|
signType: res.data.signType, |
|
|
|
timeStamp: res.data.timeStamp, |
|
|
|
success: () => { |
|
|
|
this.getSubscribeMessage() |
|
|
|
}, |
|
|
|
fail() { |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/subPackages/order/trades' |
|
|
|
}) |
|
|
|
} |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// ---------------自提----------------------- |
|
|
|
changPopShow(e) { |
|
|
|