feat: 新增退款相关功能及状态显示
- 在订单详情页新增退款状态显示,包括"已退款"和"退款中" - 新增退款目的地页面,用户可查看退款信息 - 更新应用版本号至1.0.58 - 更新依赖edu-core至v1.0.13 - 修改部分组件样式和逻辑,优化用户体验
This commit is contained in:
@@ -69,6 +69,12 @@
|
||||
<text
|
||||
class="orderState orderState5"
|
||||
v-if="orderContet.orderStatus == 5">已超时</text>
|
||||
<text
|
||||
class="orderState orderState6"
|
||||
v-if="orderContet.orderStatus == 6">已退款</text>
|
||||
<text
|
||||
class="orderState orderState7"
|
||||
v-if="orderContet.orderStatus == 7">退款中</text>
|
||||
</view>
|
||||
|
||||
<view class="order_block">
|
||||
@@ -857,14 +863,15 @@ export default {
|
||||
text: "继续付款",
|
||||
});
|
||||
}
|
||||
if (this.orderContet.orderStatus == 0) {
|
||||
this.customButton.push({
|
||||
width: "160rpx",
|
||||
text: "取消订单",
|
||||
color: "#333",
|
||||
backgroundColor: "#f0f0f0",
|
||||
});
|
||||
}
|
||||
// soulspace:注释取消订单按钮
|
||||
// if (this.orderContet.orderStatus == 0) {
|
||||
// this.customButton.push({
|
||||
// width: "160rpx",
|
||||
// text: "取消订单",
|
||||
// color: "#333",
|
||||
// backgroundColor: "#f0f0f0",
|
||||
// });
|
||||
// }
|
||||
if (this.orderContet.orderStatus == 0) {
|
||||
this.titleStat = "待支付";
|
||||
} else if (this.orderContet.orderStatus == 1) {
|
||||
@@ -873,6 +880,10 @@ export default {
|
||||
this.titleStat = "待收到";
|
||||
} else if (this.orderContet.orderStatus == 3) {
|
||||
this.titleStat = "已完成";
|
||||
} else if (this.orderContet.orderStatus == 6) {
|
||||
this.titleStat = "已退款";
|
||||
} else if (this.orderContet.orderStatus == 7) {
|
||||
this.titleStat = "退款中";
|
||||
}
|
||||
if (
|
||||
this.orderContet.orderStatus >= 2 &&
|
||||
@@ -915,9 +926,27 @@ export default {
|
||||
},
|
||||
});
|
||||
},
|
||||
checkPayTimeout(payItem) {
|
||||
const createTime = payItem && payItem.createTime;
|
||||
if (!createTime) return true;
|
||||
const createdAt = new Date(String(createTime).replace(/-/g, "/")).getTime();
|
||||
if (!createdAt) return true;
|
||||
const expired = Date.now() - createdAt > 10 * 60 * 1000;
|
||||
if (expired) {
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: "订单已超时,不能继续支付,请重新下单",
|
||||
confirmText: "知道了",
|
||||
showCancel: false,
|
||||
});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
// 支付
|
||||
goPay(payItem) {
|
||||
if (!this.checkPayTimeout(payItem)) return;
|
||||
if (payItem.paymentMethod == 2) {
|
||||
console.log("阿里支付");
|
||||
setPay(
|
||||
@@ -1054,6 +1083,12 @@ view,uni-view {
|
||||
.orderState5 {
|
||||
background-color: #787878;
|
||||
}
|
||||
.orderState6 {
|
||||
background-color: #f56c6c;
|
||||
}
|
||||
.orderState7 {
|
||||
background-color: #f56c6c;
|
||||
}
|
||||
.guoqi {
|
||||
font-size: 28rpx;
|
||||
align-items: center;
|
||||
|
||||
27
pages/detail/refundDestination.vue
Normal file
27
pages/detail/refundDestination.vue
Normal file
@@ -0,0 +1,27 @@
|
||||
<template>
|
||||
<view class="page-wrap">
|
||||
<public-module></public-module>
|
||||
<common-refund-destination :order-id="orderId" :http="$http" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
orderId: "",
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options && options.orderId != null) {
|
||||
this.orderId = options.orderId;
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.page-wrap {
|
||||
min-height: 100vh;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user