|
@@ -173,7 +173,7 @@ Page({
|
|
|
this.setData({ isPaymentLoading: true });
|
|
this.setData({ isPaymentLoading: true });
|
|
|
try {
|
|
try {
|
|
|
// 调用支付接口
|
|
// 调用支付接口
|
|
|
- const payResult = await orderPayMethod(this.data.id, this.data.orderDetail?.remark);
|
|
|
|
|
|
|
+ const payResult = await orderPayMethod(this.data.id, (this.data.orderDetail as any)?.remark || '');
|
|
|
if (payResult) {
|
|
if (payResult) {
|
|
|
const paymentParams = payResult;
|
|
const paymentParams = payResult;
|
|
|
handleWeChatPayment(paymentParams, (res: any) => {
|
|
handleWeChatPayment(paymentParams, (res: any) => {
|
|
@@ -183,6 +183,16 @@ Page({
|
|
|
});
|
|
});
|
|
|
}, (error: any) => {
|
|
}, (error: any) => {
|
|
|
this.setData({ isPaymentLoading: false });
|
|
this.setData({ isPaymentLoading: false });
|
|
|
|
|
+ if (error?.errMsg === 'requestPayment:fail cancel') {
|
|
|
|
|
+ // 支付取消跳到支付订单页面
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ wx.redirectTo({
|
|
|
|
|
+ url: '/module/article/pages/order-list/order-list',
|
|
|
|
|
+ });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }, 2000);
|
|
|
|
|
+ }
|
|
|
|
|
+ console.log(error, '支付失败');
|
|
|
wx.showToast({
|
|
wx.showToast({
|
|
|
title: error?.errMsg || error?.message || "支付失败,请重试",
|
|
title: error?.errMsg || error?.message || "支付失败,请重试",
|
|
|
icon: "none",
|
|
icon: "none",
|