xiaoxin 9 mesi fa
parent
commit
e78445ea2b
2 ha cambiato i file con 22 aggiunte e 16 eliminazioni
  1. 8 8
      common/config.js
  2. 14 8
      pages/index/shop/index.vue

+ 8 - 8
common/config.js

@@ -1,12 +1,12 @@
-const ROOTPATH = "https://mxys.chuanghai-tech.com/sqx_fast";
-const ROOTPATH1 = "https://mxys.chuanghai-tech.com/sqx_fast";
-const ROOTPATH2 = "wss://mxys.chuanghai-tech.com/wss/websocket/"
-const ROOTPATH3 = "wss://mxys.chuanghai-tech.com/wss/ordersChat/"
+// const ROOTPATH = "https://mxys.chuanghai-tech.com/sqx_fast";
+// const ROOTPATH1 = "https://mxys.chuanghai-tech.com/sqx_fast";
+// const ROOTPATH2 = "wss://mxys.chuanghai-tech.com/wss/websocket/"
+// const ROOTPATH3 = "wss://mxys.chuanghai-tech.com/wss/ordersChat/"
 
-// const ROOTPATH = "https://mxys.chuanghai-tech.com/wm-test/wm-api/sqx_fast";
-// const ROOTPATH1 = "https://mxys.chuanghai-tech.com/wm-test/wm-api/sqx_fast";
-// const ROOTPATH2 = "wss://mxys.chuanghai-tech.com/wss-test/websocket/"
-// const ROOTPATH3 = "wss://mxys.chuanghai-tech.com/wss-test/ordersChat/"
+const ROOTPATH = "https://mxys.chuanghai-tech.com/wm-test/wm-api/sqx_fast";
+const ROOTPATH1 = "https://mxys.chuanghai-tech.com/wm-test/wm-api/sqx_fast";
+const ROOTPATH2 = "wss://mxys.chuanghai-tech.com/wss-test/websocket/"
+const ROOTPATH3 = "wss://mxys.chuanghai-tech.com/wss-test/ordersChat/"
 
 // const ROOTPATH = "http://192.168.161.190:8171/sqx_fast";
 // const ROOTPATH1 = "http://192.168.161.190:8171/sqx_fast";

+ 14 - 8
pages/index/shop/index.vue

@@ -257,7 +257,7 @@
 								差评({{ EvaluateData.negativeComment ? EvaluateData.negativeComment : 0 }})
 							</u-button>
 						</view>
-						<scroll-view v-if="EvaluateList.length" scroll-y style="height: calc(100vh - 590rpx)">
+						<scroll-view v-if="EvaluateList.length" scroll-y style="height: calc(100vh - 590rpx)" @scrolltolower="scrolltolower">
 							<view class="padding-tb-sm margin-lr u-border-bottom" v-for="(item, index) in EvaluateList" :key="index">
 								<view class="flex justify-between align-center">
 									<view class="flex align-center">
@@ -280,7 +280,7 @@
 											@click="yuanlan(item.pictures == undefined ? [] : item.pictures.split(','), index2)"
 											v-for="(item2, index2) in item.pictures == undefined ? [] : item.pictures.split(',')"
 											:src="item2"
-											mode=""
+											mode="aspectFill"
 										></image>
 										<image style="margin-bottom: 20rpx; width: 160rpx; height: 0" src="" mode=""></image>
 										<image style="margin-bottom: 20rpx; width: 160rpx; height: 0" src="" mode=""></image>
@@ -770,6 +770,17 @@ export default {
 		}
 	},
 	methods: {
+		scrolltolower() {
+			if (this.EvaluateData.pageUtils.totalCount > this.EvaluateList.length) {
+				this.evaluatePage++
+				this.getEvaluateList()
+			} else {
+				uni.showToast({
+					title: '没有更多数据了',
+					icon: 'none'
+				})
+			}
+		},
 		//营业执照点击放大
 		clickImg(img) {
 			uni.previewImage({
@@ -870,6 +881,7 @@ export default {
 				grade: this.grade
 			}
 			this.$Request.get('/app/goods/selectEvaluateByShopId', data).then((res) => {
+				// console.log(res)
 				if (res.code == 0 && res.data) {
 					this.EvaluateData = res.data
 					if (this.evaluatePage == 1) {
@@ -1440,12 +1452,6 @@ export default {
 				})
 			}
 		}
-	},
-	onReachBottom: function () {
-		if (this.current == 2) {
-			this.evaluatePage = this.evaluatePage + 1
-			this.getEvaluateList()
-		}
 	}
 }
 </script>