处理代码逻辑

cz_dev
格调main 2026-03-04 23:30:04 +08:00
parent 346a17f8b2
commit f22d2a81e1
3 changed files with 22 additions and 21 deletions

View File

@ -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
// 等待刷新完成的请求队列

View File

@ -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);
}

View File

@ -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"