Browse Source

运营数据bug

xhj 3 years ago
parent
commit
f28c609e04

+ 1 - 0
pages/cell/cell.vue

@@ -222,6 +222,7 @@
 				this.isLogin = true
 			}else{
 				this.isLogin = false
+				this.actMerchant = null
 				// this.getMachineList()
 			}
 		},

+ 1 - 0
pages/machine/machine.vue

@@ -169,6 +169,7 @@
 				this.isLogin = true
 			}else{
 				this.isLogin = false
+				this.actMerchant = null
 				// this.getMachineList()
 			}
 		},

+ 4 - 0
pages/operationData/operationData.vue

@@ -488,6 +488,9 @@
 		onShow() {
 
 		},
+		onReachBottom() {
+			this.getDataList(true)
+		},
 		methods: {
 			jumpUrl(url) {
 				if (req.isLogins(true)) {
@@ -565,6 +568,7 @@
 			
 			
 			getDataList(isPage) {
+				if(this.queryType==1) return
 				if(this.isQuerying) return
 				else this.isQuerying = true
 				if (!isPage) {

+ 19 - 5
pages/operationDataPersonal/operationDataPersonal.vue

@@ -7,24 +7,24 @@
 			</view>
 			<view class="sssb-box ddflex">
 				<view class="sssb-item fflex">
-					<view class="sssb-data sssb-color">{{totalTurnover?totalTurnover:0}}</view>
+					<view class="sssb-data sssb-color">{{topData.totalTurnover?topData.totalTurnover:0}}</view>
 					<view class="sssb-label">营业总额</view>
 				</view>
 				<view class="sssb-line"></view>
 				<view class="sssb-item fflex">
-					<view class="sssb-data sssb-color">{{totalRefund?totalRefund:0}}</view>
+					<view class="sssb-data sssb-color">{{topData.totalRefund?topData.totalRefund:0}}</view>
 					<view class="sssb-label">累计退款</view>
 				</view>
 			</view>
 			<view class="sssb-box ddflex">
 				<view class="sssb-item fflex">
 					<view class="sssb-label">收益总额</view>
-					<view class="sssb-data sssb-color">{{totalProfit?totalProfit:0}}</view>
+					<view class="sssb-data sssb-color">{{topData.totalProfit?topData.totalProfit:0}}</view>
 				</view>
 				<view class="sssb-line"></view>
 				<view class="sssb-item fflex">
 					<view class="sssb-label">可分账金额</view>
-					<view class="sssb-data sssb-color">{{useProfit?useProfit:0}}</view>
+					<view class="sssb-data sssb-color">{{topData.useProfit?topData.useProfit:0}}</view>
 				</view>
 			</view>
 			<view style="margin-top: 30rpx;height:500rpx" v-if="showEchart">
@@ -57,6 +57,8 @@
 				pxToRpxScale: 0,
 				rpxTopxScale: 0,
 				
+				topData:{},
+				
 				showEchart:false,
 				merchantId:null,
 				storeId:null,
@@ -218,6 +220,7 @@
 			if(options.storeId){
 				this.storeId = options.storeId
 			}
+			this.getTopData()
 			this.totalTurnover = options.totalTurnover&&options.totalTurnover!='null'?options.totalTurnover:0
 			this.totalRefund = options.totalRefund&&options.totalRefund!='null'?options.totalRefund:0
 			this.totalProfit = options.totalProfit&&options.totalProfit!='null'?options.totalProfit:0
@@ -243,7 +246,7 @@
 						this.option2.xAxis[0].data = this.echartData.turnoverList.map(item=>{return item.showTime})
 						this.option2.yAxis[0].axisLabel.fontSize = 13 * this.rpxTopxScale
 						this.option2.xAxis[0].axisLabel.fontSize = 13 * this.rpxTopxScale
-						this.option2.series[0].data = this.echartData.turnoverList.map(item=>{return item.orderCount?item.orderCount:0})
+						this.option2.series[0].data = this.echartData.turnoverList.map(item=>{return item.turnover?item.turnover:0})
 						this.option2.series[0].label.normal.fontSize = 13 * this.rpxTopxScale
 						chart.setOption(this.option2);
 					});
@@ -280,6 +283,17 @@
 					})
 				})
 			},
+			
+			getTopData(){
+				let pData = {
+					
+				}
+				if(this.merchantId) pData.merchantId = this.merchantId
+				if(this.storeId) pData.storeId = this.storeId
+				req.getRequest('/admin/v2/merchant/count',pData,res=>{
+					this.topData = res
+				})
+			}
 		},
 		mounted() {
 			const systemInfo = uni.getSystemInfoSync();

+ 1 - 0
pages/order/order.vue

@@ -202,6 +202,7 @@
 				this.isLogin = true
 			}else{
 				this.isLogin = false
+				this.actMerchant = null
 				// this.getMachineList()
 			}
 		},