bihuisong před 1 rokem
rodič
revize
867cff0912
2 změnil soubory, kde provedl 102 přidání a 92 odebrání
  1. 1 1
      pages/index/index.vue
  2. 101 91
      pages/me/myPayKnow/myPayKnow.vue

+ 1 - 1
pages/index/index.vue

@@ -193,7 +193,7 @@
 			</view>
 			<ul class="rmzsList" @click="goKnowledgeDetails(item)" v-for="(item, index) in dataSource" :key="index">
 				<li>
-					<image :src="loadImgSrcLocalhost(item.imgUrlList)"></image>
+					<image v-if="item.pictureList != null" :src="loadImgSrcLocalhost(item.imgUrlList)"></image>
 					<view class="listCont">
 						<p>{{ item.titleName }}</p>
 						<text>{{ item.createBy }}</text>

+ 101 - 91
pages/me/myPayKnow/myPayKnow.vue

@@ -1,102 +1,112 @@
 <template>
-    <!-- pages/fuwu/fuwu.wxml -->
-    <view class="container">
-        <view class="rnwdList" @tap="goDetails(item)" v-for="(item, index) in wb" :key="index">
-            <span class="lb">{{ item.popular == '1' ? '热门' : '非热门' }}</span>
-
-            <view class="list">
-                <span class="listTitle">{{ item.titleName }}</span>
-                <view class="jlSj">
-                    <span class="jf">
-                        {{ item.updateTime || item.createTime }}
-                    </span>
-                    <view class="ck">
-                       <span class="jf">
-                           {{ item.integral }}
-                           <em class="iconfont icon-jifen"></em>
-                       </span>
-                        <span>
-                            <em class="iconfont icon-chakan"></em>
-                            {{ item.watchNum }}
-                        </span>
-
-                    </view>
-                </view>
-            </view>
-        </view>
-    </view>
+	<!-- pages/fuwu/fuwu.wxml -->
+	<!-- 付费知识 -->
+	<view class="container">
+		<view class="rnwdList">
+			<view class="list" @tap="goDetails(item)" v-for="(item, index1) in wb" :key="index1">
+				<span class="lb">{{ item.popular == '1' ? '热门' : '非热门' }}</span>
+				<span class="listTitle">{{ item.titleName }}</span>
+	
+				<view class="onePic" v-if="item.imgUrlList != null">
+					<image :src="loadImgSrcLocalhost(item.imgUrlList)">
+					</image>
+				</view>
+	
+				<view class="jlSj">
+					<span style="color: #07c160;font-size: 24rpx;">
+					   {{ item.createTime }}
+					    <!-- <em class="iconfont icon-jifen"></em> -->
+					</span>
+					<view class="ck">
+						<span class="jf">
+							{{ item.integral }}
+							<em class="iconfont icon-jifen"></em>
+						</span>
+						<span>
+							<em class="iconfont icon-shoucang"></em>
+							{{ item.watchNum }}
+						</span>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
 </template>
 
 <script>
-	import {myPayKnow} from '@/api/me/me.js'
+	import {
+		myPayKnow
+	} from '@/api/me/me.js'
 
-export default {
-    data() {
-        return {
-			query:{
-				pageSize:10,
-				pageNum:1,
-				createId:null
-			},
-            wb: [],
-			total:0
-        };
-    }
-    /**
-     * 生命周期函数--监听页面加载
-     */,
-	 onReachBottom(){
-	 	let pageNum = this.query.pageNum
-	 	let pageSize = this.query.pageSize
-	 	let total = this.total
-	 	if(pageNum*pageSize >= total){
-	 		uni.showToast({
-	 			title:'暂无更多数据'
-	 		})
-	 		return
-	 	} else {
-	 		this.query.pageNum += 1;
-	 		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'
-		this.getlist()
-    },
-    methods: {
-		getlist(){
-			myPayKnow(this.query).then(res=>{
-				this.wb = [...this.wb,...res.rows]
-				this.total = res.total
+	export default {
+		data() {
+			return {
+				query: {
+					pageSize: 10,
+					pageNum: 1,
+					createId: null
+				},
+				wb: [],
+				total: 0
+			};
+		}
+		/**
+		 * 生命周期函数--监听页面加载
+		 */
+		,
+		onReachBottom() {
+			let pageNum = this.query.pageNum
+			let pageSize = this.query.pageSize
+			let total = this.total
+			if (pageNum * pageSize >= total) {
 				uni.showToast({
-					title:`加载成功`
+					title: '暂无更多数据'
 				})
-			})
+				return
+			} else {
+				this.query.pageNum += 1;
+				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'
+			this.getlist()
 		},
-        goSanNong() {
-            uni.navigateTo({
-                url: '/pages/demo/sannong/sannong'
-            });
-        },
+		methods: {
+			getlist() {
+				myPayKnow(this.query).then(res => {
+					this.wb = [...this.wb, ...res.rows]
+					this.total = res.total
+					uni.showToast({
+						title: `加载成功`
+					})
+				})
+			},
+			goSanNong() {
+				uni.navigateTo({
+					url: '/pages/demo/sannong/sannong'
+				});
+			},
 
-        goDetails(item) {
-			if(item==null) return;
-            uni.navigateTo({
-                url: '/pages/me/myPayKnow/informationDetail?obj='+ encodeURIComponent(JSON.stringify(item))
-            });
-        }
-    }
-};
+			goDetails(item) {
+				if (item == null) return;
+				uni.navigateTo({
+					url: '/pages/me/myPayKnow/informationDetail?obj=' + encodeURIComponent(JSON.stringify(item))
+				});
+			}
+		}
+	};
 </script>
 <style>
-@import 'myPayKnow.css';
-</style>
+	@import 'myPayKnow.css';
+</style>