diff --git a/App.vue b/App.vue
index 82f3409..4aa4695 100644
--- a/App.vue
+++ b/App.vue
@@ -336,11 +336,11 @@
}
.fcb {
- color: $uni-text-color-disable
+ color: $uni-text-color-disable;
}
.fcm {
- color: $uni-color-error
+ color: $uni-color-error;
}
.z-top {
diff --git a/components/orderItem/orderItem.vue b/components/orderItem/orderItem.vue
index 3bc690d..ee24290 100644
--- a/components/orderItem/orderItem.vue
+++ b/components/orderItem/orderItem.vue
@@ -23,7 +23,8 @@
-
+
立即支付
@@ -31,14 +32,18 @@
{{ foodSn }}
-
+
申请售后
-
- 退款详情
-
+
+
+ 退款详情
+
+
@@ -67,8 +72,9 @@
},
computed: {
//订单总价格
- fullPrice(){
- return this.formatPrice(Number(this.order.transport_price) + Number(this.order.pack_price) + Number(this.order.total_price))
+ fullPrice() {
+ return this.formatPrice(Number(this.order.transport_price) + Number(this.order.pack_price) + Number(this
+ .order.total_price))
},
// 是否显示 "立即支付" 按钮
showPayButton() {
@@ -94,36 +100,37 @@
if (this.order.main_status === '已付款' && this.order.refund_status === '未申请') {
return this.order.shipment_status;
}
- switch (this.order.refund_status) {
- case '申请中':
- return '申请中';
- case '已同意':
- return '商家同意退款';
- case '主动退':
- return '商家退单';
- case '拒绝退':
- return '商家拒绝退款';
- default:
- return '';
+ // 如果订单的主状态是已退款,直接返回已退款
+ if (this.order.main_status === '已退款') {
+ return '已退款';
}
- },
- // 显示退款状态
- refundStatusDisplay() {
- switch (this.order.refund_status) {
- case '申请中':
- return '申请中';
- case '已同意':
+
+ // 如果订单的主状态是已付款,并且退款状态为已同意,返回商家同意退款
+ if (this.order.main_status === '已付款') {
+ if (this.order.refund_status === '已同意') {
return '商家同意退款';
- case '主动退':
+ }
+
+ // 如果退款状态为主动退,返回商家退单
+ if (this.order.refund_status === '主动退') {
return '商家退单';
- case '拒绝退':
- return '商家拒绝退款';
- default:
- return '';
+ }
}
+
+ // 根据退款状态显示其他状态
+ if (this.order.refund_status === '申请中') {
+ return '申请中';
+ }
+
+ if (this.order.refund_status === '拒绝退') {
+ return '商家拒绝退款';
+ }
+
+ // 默认返回空
+ return '';
},
},
- methods:{
+ methods: {
formatPrice //价格格式化
},
props: {
diff --git a/components/process/process.vue b/components/process/process.vue
new file mode 100644
index 0000000..13a4439
--- /dev/null
+++ b/components/process/process.vue
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages.json b/pages.json
index e1d1c83..8bf2301 100644
--- a/pages.json
+++ b/pages.json
@@ -2,8 +2,7 @@
"easycom": {
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
},
- "pages": [
- {
+ "pages": [{
"path": "pages/index/index",
"style": {
"navigationStyle": "custom"
@@ -46,29 +45,27 @@
}
},
{
- "path" : "pages/main/login",
+ "path": "pages/main/login",
"style": {
"navigationStyle": "custom"
}
},
{
- "path" : "pages/order/index",
+ "path": "pages/order/index",
"style": {
"navigationStyle": "custom"
}
},
{
- "path" : "pages/order/refund",
- "style" :
- {
+ "path": "pages/order/refund",
+ "style": {
"navigationStyle": "custom"
}
},
{
- "path" : "pages/order/refProcess",
- "style" :
- {
- "navigationBarTitleText" : ""
+ "path": "pages/order/refProcess",
+ "style": {
+ "navigationStyle": "custom"
}
}
],
diff --git a/pages/order/refProcess.vue b/pages/order/refProcess.vue
index 8183fd0..d441c92 100644
--- a/pages/order/refProcess.vue
+++ b/pages/order/refProcess.vue
@@ -1,6 +1,18 @@
-
+
+
+
+
+
+
+
+
+
+ {{ order.refund_status !== "主动退"?"买家申请":"卖家取消订单" }}
+
+
+
@@ -8,15 +20,28 @@
export default {
data() {
return {
-
+ order_sn: '', //订单号
}
},
+ onLoad(options) {
+ this.order_sn = options.order_sn // 从提交订单页面传递过来的订单号
+ },
methods: {
-
+
+ },
+ computed: {
+ //订单
+ order() {
+ if (this.order_sn) {
+ return this.$store.state.orderList.find(item => item.order_sn === this.order_sn)
+ } else {
+ return null
+ }
+ },
}
}
-
+
\ No newline at end of file
diff --git a/pages/order/refund.vue b/pages/order/refund.vue
index 5c3d649..f006a3e 100644
--- a/pages/order/refund.vue
+++ b/pages/order/refund.vue
@@ -249,7 +249,7 @@
},
watch: {},
computed: {
- //未付款订单
+ //订单
order() {
if (this.order_sn) {
return this.$store.state.orderList.find(item => item.order_sn === this.order_sn)