소스 검색

付费知识

qinhouyu 1 년 전
부모
커밋
b2227e83ac
5개의 변경된 파일49개의 추가작업 그리고 15개의 파일을 삭제
  1. 16 2
      pages.json
  2. 1 1
      pages/informationDetail/informationDetail.vue
  3. 5 2
      pages/myPayKnow/informationDetail.vue
  4. 11 2
      pages/myPayKnow/myPayKnow.vue
  5. 16 8
      pages/toGovernmentList/toGovernmentList.vue

+ 16 - 2
pages.json

@@ -148,6 +148,13 @@
 				"navigationBarBackgroundColor": "#07c160",
 				"navigationBarTextStyle": "white",
 				"enablePullDownRefresh": true,
+				"navigationBarTextStyle": "dark",
+				"backgroundTextStyle": "dark",
+				"pullToRefresh": {
+					"support": true,
+					"color": "#000000",
+					"style": "circle"
+				},
 				"navigationBarTitleText": "付费知识"
 			}
 		},
@@ -322,8 +329,15 @@
 				"usingComponents": {},
 				"navigationBarBackgroundColor": "#07c160",
 				"navigationBarTextStyle": "white",
-				"navigationBarTitleText": "惠民通"
-
+				"navigationBarTitleText": "惠民通",
+				"enablePullDownRefresh": true,
+				"navigationBarTextStyle": "dark",
+				"backgroundTextStyle": "dark",
+				"pullToRefresh": {
+					"support": true,
+					"color": "#000000",
+					"style": "circle"
+				}
 			}
 		},
 		{

+ 1 - 1
pages/informationDetail/informationDetail.vue

@@ -6,7 +6,7 @@
             <view class="wenzhangLy">
                 <!-- 头像昵称 -->
                 <view class="txTime">
-                    <image :src="loadImgSrcLocalhost(detailInfo.headImg!=null?detailInfo.headImg:'/profile/upload/2024/03/05/abf969632ee94bd5a429c8c2dbb2f6b4 (1)_20240305092823A002.png')" style="border-radius: 50px;"></image>
+                    <image :src="loadImgSrcLocalhost(detailInfo.headImg)" style="border-radius: 50px;"></image>
                     <view class="time">
                         <p>{{detailInfo.nickName?detailInfo.nickName:'网友'}}</p>
                         <span>{{ detailInfo.createTime }}</span>

+ 5 - 2
pages/myPayKnow/informationDetail.vue

@@ -23,7 +23,7 @@
                     <!-- 图片轮播 -->
                     <swiper :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration" :circular="circular">
                         <block v-for="(one, index) in detailInfo.urls" :key="index">
-                            <swiper-item><image :src="loadImgSrc(one)"  style="background-size: 100% 100%;"></image></swiper-item>
+                            <swiper-item><image :src="loadImgSrcLocalhost(one)"  style="background-size: 100% 100%;"></image></swiper-item>
                         </block>
                     </swiper>
                 </view>
@@ -76,7 +76,10 @@ export default {
      * 生命周期函数--监听页面加载
      */,
     onLoad(options) {
-		 this.detailInfo = JSON.parse(options.obj)
+		const {
+				obj = {}
+			} = options;
+			this.detailInfo = JSON.parse(decodeURIComponent(obj));
 	  },
     /**
      * 生命周期函数--监听页面初次渲染完成

+ 11 - 2
pages/myPayKnow/myPayKnow.vue

@@ -67,6 +67,13 @@ export default {
 	   this.wb = [];
 	   this.getlist()
 	 },
+	 // 下拉刷新
+	 onPullDownRefresh() {
+	 	setTimeout(() => {
+	 		this.query.pageNum = 1;
+	 		this.wb = [];this.getlist()
+	 	},500)
+	 },
     onLoad(options) {
 		// this.query.createId = getApp().globalData.userId
 		this.query.createId = '1763382026214764546'
@@ -77,8 +84,10 @@ export default {
 			myPayKnow(this.query).then(res=>{
 				this.wb = [...this.wb,...res.rows]
 				this.total = res.total
+				uni.showToast({
+					title:`加载成功`
+				})
 			})
-			uni.stopPullDownRefresh();
 		},
         goSanNong() {
             uni.navigateTo({
@@ -89,7 +98,7 @@ export default {
         goDetails(item) {
 			if(item==null) return;
             uni.navigateTo({
-                url: '/pages/myPayKnow/informationDetail?obj='+ JSON.stringify(item)
+                url: '/pages/myPayKnow/informationDetail?obj='+ encodeURIComponent(JSON.stringify(item))
             });
         }
     }

+ 16 - 8
pages/toGovernmentList/toGovernmentList.vue

@@ -20,16 +20,16 @@
 	            <span class="listTitle">{{ item.titleName }}</span>
 
 	            <view class="onePic" v-if="item.top != 1  ? item.urls.length == 1 : false ">
-	                <image :src="loadImgSrc(item.urls[index2])" v-for="(v, index2) in item.urls" :key="index2">
+	                <image :src="loadImgSrcLocalhost(item.urls[index2])" v-for="(v, index2) in item.urls" :key="index2">
 					</image>
 	            </view>
 	            <view class="twoPic" v-if="item.top != 1 ? item.urls.length == 2 : false">
-	                <image :src="loadImgSrc(item.urls[index2])" v-for="(v, index2) in item.urls" :key="index2">
+	                <image :src="loadImgSrcLocalhost(item.urls[index2])" v-for="(v, index2) in item.urls" :key="index2">
 					</image>
 	            </view>
 
 	            <view class="threePic" v-if="item.top != 1 ? item.urls.length == 3 : false">
-	                <image :src="loadImgSrc(item.urls[index2])" v-for="(v, index2) in item.urls" :key="index2">
+	                <image :src="loadImgSrcLocalhost(item.urls[index2])" v-for="(v, index2) in item.urls" :key="index2">
 					</image>
 	            </view>
 
@@ -91,6 +91,15 @@ export default {
 	created(){
 
 	},
+	// 下拉刷新
+	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
@@ -145,12 +154,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) {
@@ -204,10 +216,6 @@ export default {
      */
     onUnload() {},
     /**
-     * 页面相关事件处理函数--监听用户下拉动作
-     */
-    onPullDownRefresh() {},
-    /**
      * 用户点击右上角分享
      */
     onShareAppMessage() {},