ソースを参照

Merge remote-tracking branch 'origin/master'

Wang-Xiao-Ran 1 年間 前
コミット
363e14429c

+ 1 - 0
pages.json

@@ -345,6 +345,7 @@
 			"style": {
 				"usingComponents": {},
 				"navigationBarBackgroundColor": "#07c160",
+				"onReachBottomDistance": 0,
 				"navigationBarTextStyle": "white",
 				"enablePullDownRefresh": true,
 				"navigationBarTextStyle": "dark",

+ 16 - 7
pages/fuwu/fuwu.vue

@@ -103,8 +103,15 @@ export default {
 	onPullDownRefresh() {
 		setTimeout(() => {
 			this.listParams.pageNum = 1;
-			this.qbwd = [];
-			let result = this.getList(this.listParams.flag,'刷新')
+			listWx({
+				type:12,
+				isTop:1
+			}).then(e => {
+				this.topList = e.data
+				this.qbwd = this.topList
+				console.log(this.listParams.flag)
+				this.getList(this.listParams.flag)
+			})
 		},500)
 	},
 	// 上拉加载
@@ -159,18 +166,20 @@ export default {
 			this.listParams.titleName = ''
 		},
 		search(){
+			this.listParams.pageNum = 1
 			this.listParams.titleName = this.searchValue
+			this.qbwd = this.topList
 			this.getList()
 		},
 		getList(val = null,toastVal = '加载'){
-			this.listParams.flag = val || ''
-			this.qbwd = this.topList
+			if(val){
+				this.listParams.flag = val
+				this.listParams.pageNum = 1
+				this.qbwd = this.topList
+			}
 			listWxs(this.listParams).then(res => {
 				this.qbwd = [...this.qbwd,...res.rows]
 				this.total = res.total
-				uni.showToast({
-					title:`${toastVal}成功`
-				})
 			})
 		},
 		goDetails(e) {

+ 5 - 2
pages/index/index.css

@@ -404,7 +404,9 @@
     height: auto;
     border-radius: 20rpx;
 }
-
+.rmzsList{
+	width: 100%;
+}
 /* 热门知识 */
 .rmzsList li {
     width: 100%;
@@ -424,6 +426,7 @@
 }
 
 .listCont p {
+	height: 62%;
     font-size: 32rpx;
     color: #333;
     overflow: hidden;
@@ -471,7 +474,7 @@
 .yjjg {
     font-size: 24rpx;
     color: #9c9c9c;
-    margin: 6rpx 0 0 20rpx;
+    margin: 0 0 0 20rpx;
     text-decoration: line-through;
 }
 

+ 1 - 1
pages/toGovernmentList/toGovernmentList.vue

@@ -157,7 +157,7 @@ export default {
 				this.qbwd = res.rows
 				this.total = res.total
 				uni.showToast({
-					title:`${toastVal}成功`
+					title:`加载成功`
 				})
 			})
 		},

+ 18 - 9
pages/toLegal/toLegal.vue

@@ -101,8 +101,15 @@ export default {
 	onPullDownRefresh() {
 		setTimeout(() => {
 			this.listParams.pageNum = 1;
-			this.qbwd = [];
-			let result = this.getList(this.listParams.flag,'刷新')
+			listWx({
+				type:11,
+				isTop:1
+			}).then(e => {
+				this.topList = e.data
+				this.qbwd = this.topList
+				console.log(this.listParams.flag)
+				this.getList(this.listParams.flag)
+			})
 		},500)
 	},
 	onReachBottom(){
@@ -140,14 +147,14 @@ export default {
 				// 取消点赞
 				likeServer({
 					id:e.id,
-					type:12
+					type:11
 				})
 				let deleteIdx = this.favoriteList.findIndex((v => v == e.id))
 				this.favoriteList.splice(deleteIdx,1)
 			} else {
 				likeServer({
 					id:e.id,
-					type:12
+					type:11
 				})
 				this.favoriteList.push(e.id)
 			}
@@ -156,18 +163,20 @@ export default {
 			this.listParams.titleName = ''
 		},
 		search(){
+			this.listParams.pageNum = 1
 			this.listParams.titleName = this.searchValue
+			this.qbwd = this.topList
 			this.getList()
 		},
 		getList(val = null,toastVal = '加载'){
-			this.listParams.flag = val || ''
-			this.qbwd = this.topList
+			if(val){
+				this.listParams.flag = val
+				this.listParams.pageNum = 1
+				this.qbwd = this.topList
+			}
 			listWxs(this.listParams).then(res => {
 				this.qbwd = [...this.qbwd,...res.rows]
 				this.total = res.total
-				uni.showToast({
-					title:`${toastVal}成功`
-				})
 			})
 		},
 		goDetails(e) {