Skip to content

Commit 5ba69ba

Browse files
committed
2 parents de9ec95 + 1d047d8 commit 5ba69ba

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

src/views/mall/home/components/OperationDataCard.vue

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,18 @@ const data = reactive({
5353
/** 查询订单数据 */
5454
const getOrderData = async () => {
5555
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+
}
6068
}
6169
6270
/** 查询商品数据 */
@@ -83,6 +91,13 @@ const handleClick = (routerName: string) => {
8391
router.push({ name: routerName })
8492
}
8593
94+
/** 激活时 */
95+
onActivated(() => {
96+
getOrderData()
97+
getProductData()
98+
getWalletRechargeData()
99+
})
100+
86101
/** 初始化 **/
87102
onMounted(() => {
88103
getOrderData()

0 commit comments

Comments
 (0)