处理代码逻辑
parent
346a17f8b2
commit
f22d2a81e1
|
|
@ -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
|
||||||
// 等待刷新完成的请求队列
|
// 等待刷新完成的请求队列
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue