Przeglądaj źródła

Merge remote-tracking branch 'origin/master'

lidongyu 1 rok temu
rodzic
commit
118b903b10
4 zmienionych plików z 79 dodań i 48 usunięć
  1. 25 2
      pages.json
  2. 13 5
      pages/fuwu/fuwu.vue
  3. 17 23
      pages/matters/matters.vue
  4. 24 18
      pages/toLegal/toLegal.vue

+ 25 - 2
pages.json

@@ -121,7 +121,14 @@
 				"usingComponents": {},
 				"onReachBottomDistance": 5,
 				"navigationBarBackgroundColor": "#07c160",
-				"navigationBarTextStyle": "white",
+				"enablePullDownRefresh": true,
+				"navigationBarTextStyle": "dark",
+				"backgroundTextStyle": "dark",
+				"pullToRefresh": {
+					"support": true,
+					"color": "#000000", 	
+					"style": "circle" 	
+				},
 				"navigationBarTitleText": "资讯"
 			}
 		},
@@ -150,7 +157,15 @@
 				"usingComponents": {},
 				"navigationBarBackgroundColor": "#07c160",
 				"navigationBarTextStyle": "white",
-				"navigationBarTitleText": "我的事项"
+				"navigationBarTitleText": "我的事项",
+				"enablePullDownRefresh": true,
+				"navigationBarTextStyle": "dark",
+				"backgroundTextStyle": "dark",
+				"pullToRefresh": {
+					"support": true,
+					"color": "#000000", 	
+					"style": "circle" 	
+				}
 			}
 		},
 		{
@@ -317,6 +332,14 @@
 				"usingComponents": {},
 				"navigationBarBackgroundColor": "#07c160",
 				"navigationBarTextStyle": "white",
+				"enablePullDownRefresh": true,
+				"navigationBarTextStyle": "dark",
+				"backgroundTextStyle": "dark",
+				"pullToRefresh": {
+					"support": true,
+					"color": "#000000", 	
+					"style": "circle" 	
+				},
 				"navigationBarTitleText": "法律下乡"
 
 			}

+ 13 - 5
pages/fuwu/fuwu.vue

@@ -99,6 +99,15 @@ export default {
 			this.getList()
 		})
 	},
+	// 下拉刷新
+	onPullDownRefresh() {
+		setTimeout(() => {
+			this.listParams.pageNum = 1;
+			this.qbwd = [];
+			let result = this.getList(this.listParams.flag,'刷新')
+		},500)
+	},
+	// 上拉加载
 	onReachBottom(){
 		let pageNum = this.listParams.pageNum
 		let pageSize = this.listParams.pageSize
@@ -153,12 +162,15 @@ export default {
 			this.listParams.titleName = this.searchValue
 			this.getList()
 		},
-		getList(val = null){
+		getList(val = null,toastVal = '加载'){
 			this.listParams.flag = val || ''
 			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) {
@@ -196,10 +208,6 @@ export default {
      */
     onUnload() {},
     /**
-     * 页面相关事件处理函数--监听用户下拉动作
-     */
-    onPullDownRefresh() {},
-    /**
      * 用户点击右上角分享
      */
     onShareAppMessage() {},

+ 17 - 23
pages/matters/matters.vue

@@ -26,8 +26,6 @@
 					</image>
 	            </view>
 			</view>
-			<uni-fab ref="fab" horizontal="right"  style="position: fixed;bottom: 1%;right: 1%;z-index: 200;"
-			         @fabClick="fabClick()"/>
 	    </view>
 		<!-- 新增资讯按钮 -->
 		<!-- <button class="addInfomarionBtn" @click="addInfomation()"></button> -->
@@ -64,6 +62,14 @@ export default {
 	created(){
 		this.getList()
 	},
+	// 下拉刷新
+	onPullDownRefresh() {
+		setTimeout(() => {
+			this.listParams.pageNum = 1;
+			this.qbwd = [];
+			let result = this.getList(this.listParams.flag,'刷新')
+		},500)
+	},
 	onReachBottom(){
 		let pageNum = this.listParams.pageNum
 		let pageSize = this.listParams.pageSize
@@ -123,24 +129,16 @@ export default {
 			this.listParams.title = this.searchValue
 			this.getList()
 		},
-		getList(val = null,type){
+		getList(val = null,toastVal = '加载'){
 			this.listParams.flag = val || ''
-			switch(type){
-				case 'dropDown':
-				// 上拉
-					getMattersList(this.listParams).then(res => {
-						this.qbwd = [...this.qbwd,...res.rows]
-						this.total = res.total
-					})
-				break;
-				default:
-					this.qbwd = this.topList
-					getMattersList(this.listParams).then(res => {
-						this.qbwd = [...this.qbwd,...res.rows]
-						this.total = res.total
-					})
-				break;
-			}
+			this.qbwd = this.topList
+			getMattersList(this.listParams).then(res => {
+				this.qbwd = [...this.qbwd,...res.rows]
+				this.total = res.total
+				uni.showToast({
+					title:`${toastVal}成功`
+				})
+			})
 		},
 		goDetails(e) {
 			let id = e.id || ''
@@ -177,10 +175,6 @@ export default {
      */
     onUnload() {},
     /**
-     * 页面相关事件处理函数--监听用户下拉动作
-     */
-    onPullDownRefresh() {},
-    /**
      * 用户点击右上角分享
      */
     onShareAppMessage() {},

+ 24 - 18
pages/toLegal/toLegal.vue

@@ -15,23 +15,22 @@
 			></uni-data-select>
 		</view>
 	    <view class="rnwdList">
-	        <view class="list" @tap="goDetails(item)" v-for="(item, index1) in qbwd" :key="index1">
-				<span v-if="item.isTop == 1" style="color: red;">[置顶]</span>
+	        <view class="list" @tap.stop="goDetails(item)" v-for="(item, index1) in qbwd" :key="index1">
+				<span v-if="item.top == 1" style="color: red;">[置顶]</span>
 	            <span class="listTitle">{{ item.titleName }}</span>
-	            <view class="onePic" v-if="item.isTop != 1 ? item.urls.length == 1 : false ">
-	                <image :src="loadImgSrc(item.urls[index2])" v-for="(v, index2) in item.urls" :key="index2">
+				<view class="onePic" v-if="item.top != 1 ? item.urls.length == 1 : false ">
+					<image :src="loadImgSrcLocalhost(item.urls[index2])" v-for="(v, index2) in item.urls" :key="index2">
 					</image>
-	            </view>
-	            <view class="twoPic" v-if="item.isTop != 1 ? item.urls.length == 2 : false">
-	                <image :src="loadImgSrc(item.urls[index2])" v-for="(v, index2) in item.urls" :key="index2">
+				</view>
+				<view class="twoPic" v-if="item.top != 1 ? item.urls.length == 2 : false">
+					<image :src="loadImgSrcLocalhost(item.urls[index2])" v-for="(v, index2) in item.urls" :key="index2">
 					</image>
-	            </view>
-	
-	            <view class="threePic" v-if="item.isTop != 1 ? item.urls.length == 3 : false">
-	                <image :src="loadImgSrc(item.urls[index2])" v-for="(v, index2) in item.urls" :key="index2">
+				</view>
+					
+				<view class="threePic" v-if="item.top != 1 ? item.urls.length == 3 : false">
+					<image :src="loadImgSrcLocalhost(item.urls[index2])" v-for="(v, index2) in item.urls" :key="index2">
 					</image>
-	            </view>
-	
+				</view>
 	           <view class="jlSj">
 	                <span class="jf">
 	                   <!-- {{ item.jf }}
@@ -98,6 +97,14 @@ export default {
 			this.getList()
 		})
 	},
+	// 下拉刷新
+	onPullDownRefresh() {
+		setTimeout(() => {
+			this.listParams.pageNum = 1;
+			this.qbwd = [];
+			let result = this.getList(this.listParams.flag,'刷新')
+		},500)
+	},
 	onReachBottom(){
 		let pageNum = this.listParams.pageNum
 		let pageSize = this.listParams.pageSize
@@ -152,12 +159,15 @@ export default {
 			this.listParams.titleName = this.searchValue
 			this.getList()
 		},
-		getList(val = null){
+		getList(val = null,toastVal = '加载'){
 			this.listParams.flag = val || ''
 			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) {
@@ -195,10 +205,6 @@ export default {
      */
     onUnload() {},
     /**
-     * 页面相关事件处理函数--监听用户下拉动作
-     */
-    onPullDownRefresh() {},
-    /**
      * 用户点击右上角分享
      */
     onShareAppMessage() {},