gjy 3 vuotta sitten
vanhempi
commit
4ec08ab6c1
1 muutettua tiedostoa jossa 32 lisäystä ja 8 poistoa
  1. 32 8
      pages/order/driverDetail.vue

+ 32 - 8
pages/order/driverDetail.vue

@@ -67,10 +67,10 @@
 			<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"
 				class="mescroll">
 				<view class="flex flex-space-between">
-					<view :class="btnData == 1 ? 'btn-active':'btn'" @click="btnChange(1)">全部(1)</view>
-					<view :class="btnData == 2 ? 'btn-active':'btn'" @click="btnChange(2)">最新(1)</view>
-					<view :class="btnData == 3 ? 'btn-active':'btn'" @click="btnChange(3)">好评(1)</view>
-					<view :class="btnData == 4 ? 'btn-active':'btn'" @click="btnChange(4)">差评(1)</view>
+					<view :class="btnData == '' ? 'btn-active':'btn'" @click="btnChange('')">全部({{list.length}})</view>
+					<!-- <view :class="btnData == 2 ? 'btn-active':'btn'" @click="btnChange(2)">最新(1)</view> -->
+					<view :class="btnData == 1 ? 'btn-active':'btn'" @click="btnChange(1)">好评({{list3.length}})</view>
+					<view :class="btnData == 2 ? 'btn-active':'btn'" @click="btnChange(2)">差评({{list4.length}})</view>
 				</view>
 				<view class="evaluate_css" v-for="(item,index) in list">
 					<view class="flex">
@@ -137,7 +137,7 @@
 		},
 		data() {
 			return {
-				btnData: 1,
+				btnData: '',
 				tabIndex: 1,
 				index: 1,
 				show: false,
@@ -150,7 +150,10 @@
 					name: '司机',
 				}, {
 					name: '评价',
-				}]
+				}],
+
+				list3:[],
+				list4:[]
 			};
 		},
 		onNavigationBarButtonTap(e) {
@@ -191,11 +194,31 @@
 				this.tabIndex = index
 			},
 			btnChange(num) {
-				debugger
+				// debugger
 				this.btnData = num
-				// this.getList()
+				this.getList()
 			},
 			upCallback(page) {
+				that.$request.baseRequest('get', '/evaluateInfo/selectEvaluateInfo', {
+						driverId: this.objectInfo.driverId,
+						flag: 1,
+						pageSize: page.size,
+						haoType:1,
+						currentPage: page.num
+					}).then(res => {
+						if (page.num == 1) that.list3 = [];
+						that.list3 = that.list3.concat(res.data.records); //追加新数据
+					})
+					that.$request.baseRequest('get', '/evaluateInfo/selectEvaluateInfo', {
+							driverId: this.objectInfo.driverId,
+							flag: 1,
+							pageSize: page.size,
+							haoType:2,
+							currentPage: page.num
+						}).then(res => {
+							if (page.num == 1) that.list4 = [];
+							that.list4 = that.list4.concat(res.data.records); //追加新数据
+						})
 				that.$request.baseRequest('get', '/evaluateInfo/selectEvaluateInfo', {
 						driverId: this.objectInfo.driverId,
 						flag: 1,
@@ -205,6 +228,7 @@
 						debugger
 						if (page.num == 1) that.list = [];
 						that.list = that.list.concat(res.data.records); //追加新数据
+
 						for (let i = 0; i < that.list.length; i++) {
 							if (that.list[i].ownerUrl) {
 								that.list[i].imgList = that.list[i].ownerUrl.split(',')