处理代码逻辑
parent
346a17f8b2
commit
f22d2a81e1
|
|
@ -4,8 +4,8 @@
|
|||
*/
|
||||
|
||||
// 基础URL配置(注意:末尾不要加斜杠)
|
||||
const BASE_URL = 'https://guangsh.manage.hschengtai.com'
|
||||
|
||||
// const BASE_URL = 'https://guangsh.manage.hschengtai.com'
|
||||
const BASE_URL = 'http://192.168.5.134:48085'
|
||||
// 是否正在刷新token(防止并发刷新)
|
||||
let isRefreshing = false
|
||||
// 等待刷新完成的请求队列
|
||||
|
|
|
|||
|
|
@ -380,7 +380,8 @@ export default {
|
|||
couponMap.forEach((couponList, couponId) => {
|
||||
console.log(`优惠券ID:${couponId}`);
|
||||
console.log(`优惠券列表:`, couponList);
|
||||
bodyStr = bodyStr + couponList[0].couponName + 'x' + couponList.length + ';';
|
||||
const name = couponList[0] && couponList[0].couponName ? couponList[0].couponName : "商品";
|
||||
bodyStr = bodyStr + name + 'x' + couponList.length + ';';
|
||||
});
|
||||
|
||||
const randomstr = Math.floor(Math.random() * 10000000) + "";
|
||||
|
|
@ -393,9 +394,9 @@ export default {
|
|||
let params = {
|
||||
appid: "00390105", // 平台分配的appid
|
||||
body: bodyStr, //
|
||||
cusid: "56479107531MPMN", // 平台分配的商户号
|
||||
cusid: order.tlPayCusid, // 平台分配的商户号
|
||||
notify_url:
|
||||
"http://e989c692.natappfree.cc/admin-api/member/lu-order/tlNotice", // 保持原值不变
|
||||
"https://guangsh.manage.hschengtai.com/admin-api/member/lu-order/tlNotice", // 保持原值不变
|
||||
orgid: "56479107392N35H",
|
||||
paytype: "W06",
|
||||
randomstr: randomstr,
|
||||
|
|
@ -404,10 +405,10 @@ export default {
|
|||
reqsn: order.orderNumber,
|
||||
sign: "",
|
||||
signtype: "RSA",
|
||||
trxamt,
|
||||
trxamt: "1",
|
||||
version: "12",
|
||||
};
|
||||
|
||||
console.log(params)
|
||||
if (order.orderNumber) {
|
||||
uni.setStorageSync("lastOrderNumber", order.orderNumber);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,12 +17,12 @@
|
|||
:class="{ active: currentTab === 'pending_verification' }"
|
||||
@click="switchTab('pending_verification')"
|
||||
>
|
||||
<text class="tab-text">待核销</text>
|
||||
<text class="tab-text">已完成</text>
|
||||
</view>
|
||||
<view
|
||||
class="tab-item"
|
||||
:class="{ active: currentTab === 'completed' }"
|
||||
@click="switchTab('completed')"
|
||||
:class="{ active: currentTab === 'chargeback' }"
|
||||
@click="switchTab('chargeback')"
|
||||
>
|
||||
<text class="tab-text">已退款</text>
|
||||
</view>
|
||||
|
|
@ -115,7 +115,7 @@
|
|||
</view>
|
||||
|
||||
<!-- 操作按钮区域 -->
|
||||
<view class="record-actions" v-if="item.status === 1">
|
||||
<view class="record-actions" v-if="item.status === 0">
|
||||
<button
|
||||
class="action-btn cancel-btn"
|
||||
@click.stop="handleCancel(item)"
|
||||
|
|
@ -126,7 +126,7 @@
|
|||
立即支付
|
||||
</button>
|
||||
</view>
|
||||
<view class="record-actions" v-else-if="item.status === 2">
|
||||
<view class="record-actions" v-else-if="item.status === 1">
|
||||
<!-- <button
|
||||
class="action-btn detail-btn"
|
||||
@click.stop="handleViewDetail(item)"
|
||||
|
|
@ -237,9 +237,9 @@ export default {
|
|||
// 根据当前 tab 映射到接口所需的 status 值
|
||||
getStatusValue() {
|
||||
const map = {
|
||||
pending_payment: 1, // 待支付
|
||||
pending_verification: 2, // 待核销
|
||||
completed: 3, // 已完成
|
||||
pending_payment: 0, // 待支付
|
||||
pending_verification: 1, // 已完成
|
||||
chargeback: 3, // 已退款
|
||||
cancelled: 4, // 已取消
|
||||
};
|
||||
return map[this.currentTab];
|
||||
|
|
@ -264,21 +264,21 @@ export default {
|
|||
},
|
||||
// 获取状态文本
|
||||
getStatusText(status) {
|
||||
return status === 1
|
||||
return status === 0
|
||||
? "待支付"
|
||||
: status === 2
|
||||
? "待核销"
|
||||
: status === 3
|
||||
: status === 1
|
||||
? "已完成"
|
||||
: status === 3
|
||||
? "已退款"
|
||||
: status === 4
|
||||
? "已取消"
|
||||
: "";
|
||||
},
|
||||
// 获取状态样式类
|
||||
getStatusClass(status) {
|
||||
return status === 1
|
||||
return status === 0
|
||||
? "status-pending"
|
||||
: status === 2
|
||||
: status === 1
|
||||
? "status-verification"
|
||||
: status === 3
|
||||
? "status-completed"
|
||||
|
|
|
|||
Loading…
Reference in New Issue