Bladeren bron

feature 统计功能增加&收货统计

ylong 7 maanden geleden
bovenliggende
commit
6630527856
1 gewijzigde bestanden met toevoegingen van 6 en 5 verwijderingen
  1. 6 5
      pages/index/statistic/after-sale-result.vue

+ 6 - 5
pages/index/statistic/after-sale-result.vue

@@ -68,10 +68,7 @@ const total = ref({
 
 //获取时段统计数据
 const getStatData = () => {
-	uni.$u.http.get('/app/orderStat/afterOrderStat', {
-		startTime: otherParams.value.startTime,
-		endTime: otherParams.value.endTime
-	}).then(res => {
+	uni.$u.http.get('/app/orderStat/afterOrderStat?startTime=' + otherParams.value.startTime + '&endTime=' + otherParams.value.endTime).then(res => {
 		total.value = res.data
 	})
 }
@@ -80,8 +77,12 @@ onLoad((options) => {
 	if (options.startTime && options.endTime) {
 		otherParams.value.startTime = decodeURIComponent(options.startTime)
 		otherParams.value.endTime = decodeURIComponent(options.endTime)
+		getStatData()
+	}else{
+		otherParams.value.startTime = ''
+		otherParams.value.endTime = ''
+		getStatData()
 	}
-	getStatData()
 })
 </script>