File tree Expand file tree Collapse file tree 1 file changed +19
-4
lines changed
src/views/mall/home/components Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -53,10 +53,18 @@ const data = reactive({
53
53
/** 查询订单数据 */
54
54
const getOrderData = async () => {
55
55
const orderCount = await TradeStatisticsApi .getOrderCount ()
56
- data .orderUndelivered .value = orderCount .undelivered
57
- data .orderAfterSaleApply .value = orderCount .afterSaleApply
58
- data .orderWaitePickUp .value = orderCount .pickUp
59
- data .withdrawAuditing .value = orderCount .auditingWithdraw
56
+ if (orderCount .undelivered != null ) {
57
+ data .orderUndelivered .value = orderCount .undelivered
58
+ }
59
+ if (orderCount .afterSaleApply != null ) {
60
+ data .orderAfterSaleApply .value = orderCount .afterSaleApply
61
+ }
62
+ if (orderCount .pickUp != null ) {
63
+ data .orderWaitePickUp .value = orderCount .pickUp
64
+ }
65
+ if (orderCount .auditingWithdraw != null ) {
66
+ data .withdrawAuditing .value = orderCount .auditingWithdraw
67
+ }
60
68
}
61
69
62
70
/** 查询商品数据 */
@@ -83,6 +91,13 @@ const handleClick = (routerName: string) => {
83
91
router .push ({ name: routerName })
84
92
}
85
93
94
+ /** 激活时 */
95
+ onActivated (() => {
96
+ getOrderData ()
97
+ getProductData ()
98
+ getWalletRechargeData ()
99
+ })
100
+
86
101
/** 初始化 **/
87
102
onMounted (() => {
88
103
getOrderData ()
You can’t perform that action at this time.
0 commit comments