处理代码逻辑

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配置注意末尾不要加斜杠 // 基础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防止并发刷新 // 是否正在刷新token防止并发刷新
let isRefreshing = false let isRefreshing = false
// 等待刷新完成的请求队列 // 等待刷新完成的请求队列

View File

@ -380,7 +380,8 @@ export default {
couponMap.forEach((couponList, couponId) => { couponMap.forEach((couponList, couponId) => {
console.log(`优惠券ID${couponId}`); console.log(`优惠券ID${couponId}`);
console.log(`优惠券列表:`, couponList); 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) + ""; const randomstr = Math.floor(Math.random() * 10000000) + "";
@ -393,9 +394,9 @@ export default {
let params = { let params = {
appid: "00390105", // appid appid: "00390105", // appid
body: bodyStr, // body: bodyStr, //
cusid: "56479107531MPMN", // cusid: order.tlPayCusid, //
notify_url: 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", orgid: "56479107392N35H",
paytype: "W06", paytype: "W06",
randomstr: randomstr, randomstr: randomstr,
@ -404,10 +405,10 @@ export default {
reqsn: order.orderNumber, reqsn: order.orderNumber,
sign: "", sign: "",
signtype: "RSA", signtype: "RSA",
trxamt, trxamt: "1",
version: "12", version: "12",
}; };
console.log(params)
if (order.orderNumber) { if (order.orderNumber) {
uni.setStorageSync("lastOrderNumber", order.orderNumber); uni.setStorageSync("lastOrderNumber", order.orderNumber);
} }

View File

@ -17,12 +17,12 @@
:class="{ active: currentTab === 'pending_verification' }" :class="{ active: currentTab === 'pending_verification' }"
@click="switchTab('pending_verification')" @click="switchTab('pending_verification')"
> >
<text class="tab-text">待核销</text> <text class="tab-text">已完成</text>
</view> </view>
<view <view
class="tab-item" class="tab-item"
:class="{ active: currentTab === 'completed' }" :class="{ active: currentTab === 'chargeback' }"
@click="switchTab('completed')" @click="switchTab('chargeback')"
> >
<text class="tab-text">已退款</text> <text class="tab-text">已退款</text>
</view> </view>
@ -115,7 +115,7 @@
</view> </view>
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<view class="record-actions" v-if="item.status === 1"> <view class="record-actions" v-if="item.status === 0">
<button <button
class="action-btn cancel-btn" class="action-btn cancel-btn"
@click.stop="handleCancel(item)" @click.stop="handleCancel(item)"
@ -126,7 +126,7 @@
立即支付 立即支付
</button> </button>
</view> </view>
<view class="record-actions" v-else-if="item.status === 2"> <view class="record-actions" v-else-if="item.status === 1">
<!-- <button <!-- <button
class="action-btn detail-btn" class="action-btn detail-btn"
@click.stop="handleViewDetail(item)" @click.stop="handleViewDetail(item)"
@ -237,9 +237,9 @@ export default {
// tab status // tab status
getStatusValue() { getStatusValue() {
const map = { const map = {
pending_payment: 1, // pending_payment: 0, //
pending_verification: 2, // pending_verification: 1, //
completed: 3, // chargeback: 3, // 退
cancelled: 4, // cancelled: 4, //
}; };
return map[this.currentTab]; return map[this.currentTab];
@ -264,21 +264,21 @@ export default {
}, },
// //
getStatusText(status) { getStatusText(status) {
return status === 1 return status === 0
? "待支付" ? "待支付"
: status === 2 : status === 1
? "待核销"
: status === 3
? "已完成" ? "已完成"
: status === 3
? "已退款"
: status === 4 : status === 4
? "已取消" ? "已取消"
: ""; : "";
}, },
// //
getStatusClass(status) { getStatusClass(status) {
return status === 1 return status === 0
? "status-pending" ? "status-pending"
: status === 2 : status === 1
? "status-verification" ? "status-verification"
: status === 3 : status === 3
? "status-completed" ? "status-completed"