瀏覽代碼

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

ylong 7 月之前
父節點
當前提交
6630527856
共有 1 個文件被更改,包括 6 次插入5 次删除
  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>