mirror of
				https://gitee.com/hhyykk/ipms-sjy-ui.git
				synced 2025-11-04 12:18:43 +08:00 
			
		
		
		
	修复运营模块数据不实时更新的问题
This commit is contained in:
		@@ -53,10 +53,18 @@ const data = reactive({
 | 
			
		||||
/** 查询订单数据 */
 | 
			
		||||
const getOrderData = async () => {
 | 
			
		||||
  const orderCount = await TradeStatisticsApi.getOrderCount()
 | 
			
		||||
  data.orderUndelivered.value = orderCount.undelivered
 | 
			
		||||
  data.orderAfterSaleApply.value = orderCount.afterSaleApply
 | 
			
		||||
  data.orderWaitePickUp.value = orderCount.pickUp
 | 
			
		||||
  data.withdrawAuditing.value = orderCount.auditingWithdraw
 | 
			
		||||
  if (orderCount.undelivered != null) {
 | 
			
		||||
    data.orderUndelivered.value = orderCount.undelivered
 | 
			
		||||
  }
 | 
			
		||||
  if (orderCount.afterSaleApply != null) {
 | 
			
		||||
    data.orderAfterSaleApply.value = orderCount.afterSaleApply
 | 
			
		||||
  }
 | 
			
		||||
  if (orderCount.pickUp != null) {
 | 
			
		||||
    data.orderWaitePickUp.value = orderCount.pickUp
 | 
			
		||||
  }
 | 
			
		||||
  if (orderCount.auditingWithdraw != null) {
 | 
			
		||||
    data.withdrawAuditing.value = orderCount.auditingWithdraw
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/** 查询商品数据 */
 | 
			
		||||
@@ -83,6 +91,13 @@ const handleClick = (routerName: string) => {
 | 
			
		||||
  router.push({ name: routerName })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/** 激活时 */
 | 
			
		||||
onActivated(() => {
 | 
			
		||||
  getOrderData()
 | 
			
		||||
  getProductData()
 | 
			
		||||
  getWalletRechargeData()
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
/** 初始化 **/
 | 
			
		||||
onMounted(() => {
 | 
			
		||||
  getOrderData()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user