暂存代码

This commit is contained in:
何江明
2025-05-23 18:03:45 +08:00
parent 8217069b9a
commit a2c87e47bf
313 changed files with 6157 additions and 1102 deletions
@@ -29,14 +29,19 @@ const _sfc_main = {
wayShow: false,
wayOption: [],
// 支付选项
height: "180rpx"
height: "180rpx",
isShowBalance: false
};
},
onLoad(options) {
const id = options.id;
this.id = id ? parseInt(id, 10) : 0;
this.getOrderInfo();
this.getWayOption();
const payOpen = options.payOpen;
if (payOpen && payOpen !== "null") {
this.getWayOption();
this.wayShow = payOpen;
}
},
methods: {
getValue: utils_enumUtils.getValue,
@@ -49,10 +54,25 @@ const _sfc_main = {
url: "/pages/mine_order/mine_order?type=" + this.orderInfo.status
});
},
wayShowFun(type) {
if (type) {
this.getWayOption();
}
this.wayShow = type;
},
async getWayOption() {
const result = await api_order.getSupportPay();
if (result && result.bizcode === 100) {
this.wayOption = result.data;
const data = result.data || [];
const amount = this.orderInfo.sumAmount;
let flag = data.some((item) => ["wechat", "alipay"].includes(item.type));
if (flag) {
this.isShowBalance = false;
} else {
const balanceFlag = data.some((item) => item.type === "balance" && item.balance < amount);
this.isShowBalance = balanceFlag;
}
this.wayOption = data;
}
},
// 查询订单详情
@@ -115,18 +135,18 @@ const _sfc_main = {
async appWxpay(alipay, orderId, orderNum) {
try {
const result = await utils_payUtils.appWxpayFun(alipay, orderId, orderNum);
common_vendor.index.__f__("log", "at pages/mine_order_info/mine_order_info.vue:307", "支付成功", result);
common_vendor.index.__f__("log", "at pages/mine_order_info/mine_order_info.vue:332", "支付成功", result);
} catch (error) {
common_vendor.index.__f__("error", "at pages/mine_order_info/mine_order_info.vue:310", "支付失败", error);
common_vendor.index.__f__("error", "at pages/mine_order_info/mine_order_info.vue:335", "支付失败", error);
}
},
// 支付宝支付
async zfbPay(alipay, orderId, orderNum) {
try {
const result = await utils_payUtils.zfbPayFun(alipay, orderId, orderNum);
common_vendor.index.__f__("log", "at pages/mine_order_info/mine_order_info.vue:318", "支付成功", result);
common_vendor.index.__f__("log", "at pages/mine_order_info/mine_order_info.vue:343", "支付成功", result);
} catch (error) {
common_vendor.index.__f__("error", "at pages/mine_order_info/mine_order_info.vue:321", "支付失败", error);
common_vendor.index.__f__("error", "at pages/mine_order_info/mine_order_info.vue:346", "支付失败", error);
}
},
/**
@@ -154,6 +174,14 @@ const _sfc_main = {
this.form.page = 1;
this.loadData();
}
},
/**
* 去充值
*/
goRechargeFun(item) {
common_vendor.index.navigateTo({
url: "/pages/mine_purse_recharge/mine_purse_recharge?category=balance&amount=" + item.balance + "&back=orderInfo&id=" + this.id
});
}
}
};
@@ -282,9 +310,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
height: "20",
bgColor: "#f1f6ff00"
}),
E: common_vendor.o(($event) => {
$data.wayShow = true;
})
E: common_vendor.o(($event) => $options.wayShowFun(true))
} : {}, {
F: [$options.ORDER_TYPE.UNPAID, $options.ORDER_TYPE.NOT_RECEIVE].includes($data.orderInfo.status)
}, [$options.ORDER_TYPE.UNPAID, $options.ORDER_TYPE.NOT_RECEIVE].includes($data.orderInfo.status) ? common_vendor.e({
@@ -308,7 +334,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
name: item.type,
activeColor: "#FF7C41"
}),
f: item.type
f: item.type === "balance" && $data.isShowBalance
}, item.type === "balance" && $data.isShowBalance ? {} : {}, {
g: item.id
});
}),
L: common_vendor.o(($event) => $data.wayForm.payway = $event),
File diff suppressed because one or more lines are too long
@@ -23,7 +23,7 @@
/* 水平间距 */
/* 垂直间距 */
.mine_order_info_warp.data-v-e943673c {
background-color: #F5F5F5;
background-color: #F5F5F5FF;
position: relative;
overflow-y: auto;
}