From bd43cf042d48087d2f75237c0fe27ffb56fed5f4 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Mon, 21 Feb 2022 19:45:54 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/qfqk-android

---
 pages/article/article.vue |   41 +++++++++++++++++++++++++----------------
 1 files changed, 25 insertions(+), 16 deletions(-)

diff --git a/pages/article/article.vue b/pages/article/article.vue
index 1368359..41279d9 100644
--- a/pages/article/article.vue
+++ b/pages/article/article.vue
@@ -6,14 +6,13 @@
 				:style="titleNum==index? 'color:#000000':'color:#808080'">{{item}}</view>
 		</view> -->
 		<view>
-			<u-dropdown style="height:0rpx">
+			<u-dropdown style="height:0rpx" @open="open">
 				<u-dropdown-item v-model="value1" title="看新闻" @change="change" :options="options1"></u-dropdown-item>
 				<u-dropdown-item v-model="value1" title="看视频" @change="change" :options="options2"></u-dropdown-item>
 				<u-dropdown-item v-model="value1" title="行业圈" @change="change" :options="options3"></u-dropdown-item>
 				<u-dropdown-item v-model="value1" title="看现场" @change="change" :options="options4"></u-dropdown-item>
 			</u-dropdown>
 		</view>
-		
 		<view>
 			<view class="search-block" style="height: 35px">
 				<view class="search-ico-wapper">
@@ -26,13 +25,12 @@
 				</view> -->
 			</view>
 		</view>
-		
-
-		
-
 		<scroll-view id="articleBox" :style="{ height: swiperHeight + 'px' }" class="article-content" scroll-y
 			style="width: 100%; margin-top: 100rpx;" :refresher-enabled="refresherFlag" :refresher-threshold="threshold"
 			:refresher-triggered="triggered" @refresherrefresh="refreshing" @refresherrestore="refresherrestore">
+			<view style="text-align: center;">
+				<u-loading size="90" mode="flower" :show="loading"></u-loading>
+			</view>
 			<view v-for="i in data" class="advisory-model" @click="goDetail(i)">
 				<view class="advisory-left">
 					<view class="advisory-title-top">
@@ -51,9 +49,9 @@
 		</scroll-view>
 
 		<!-- <view class="article-content">
-			
 		</view> -->
-
+		
+		<u-toast ref="uToast" />
 		<!-- 底部导航条 -->
 		<u-tabbar :list="tabbar" :mid-button="true"></u-tabbar>
 	</view>
@@ -69,8 +67,9 @@
 			return {
 				// pathUrl:"http://localhost:89/",
 				pathUrl: this.$store.state.piAPI + "",
+				loading:true,//加载动画
 				page: 1,
-				pagesize: 99999,
+				pagesize: 20,
 				status: 'loadmore',
 				// loadStatus:'loading',  //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
 				isLoadMore: false, //是否加载中
@@ -139,6 +138,9 @@
 					{
 						label: '知识讨论',
 						value: 'hyq003',
+					}, {
+						label: '个人',
+						value: 'hyq004',
 					}
 				],
 				options4: [{
@@ -173,7 +175,7 @@
 					query
 						.select('#articleBox')
 						.boundingClientRect(data => {
-							that.swiperHeight = (safeArea.bottom - data.top - 50);
+							that.swiperHeight = (safeArea.bottom - data.top - 70);
 
 						})
 						.exec();
@@ -183,7 +185,6 @@
 
 		//上拉加载更多
 		onReachBottom() {
-			console.log(2323232)
 			if (this.status == 'nomore') return;
 			this.page = ++this.page;
 			setTimeout(() => {
@@ -199,18 +200,17 @@
 				let detail = {
 					id: e.id
 				};
-				if(e.articleType.indexOf("ksp") != -1){
+				if (e.articleType.indexOf("ksp") != -1) {
 					//去跳转
 					uni.navigateTo({
 						url: './article_video?detailData=' + (JSON.stringify(e))
 					});
-				}else{
+				} else {
 					//去跳转
 					uni.navigateTo({
 						url: './article_detail?detailData=' + JSON.stringify(detail)
 					});
 				}
-				
 			},
 			//on input 通过 keyword 关键字查询
 			getKeyword() {
@@ -242,6 +242,7 @@
 					data: paramData,
 					success: (res) => {
 						if (res.data.code == 200) {
+							that.loading = false;
 							if (res.data.data.records) {
 								//如果总数小于pageSize,不做其他操作
 								if (res.data.data.total < that.pagesize) {
@@ -251,7 +252,7 @@
 									if (res.data.data.records.length < that.pagesize) {
 										//如果数量小于分页数量,则为最后一页
 										that.status = 'nomore'
-									} else {	
+									} else {
 										//否则继续加载更多数据
 										that.status = 'loading';
 									}
@@ -271,6 +272,14 @@
 			change(e) {
 				this.page = 1;
 				this.getArtcilePageList(e);
+			},
+			open(e) {
+				if (e >= 2) {
+					this.$refs.uToast.show({
+						title: '功能研发中',
+						type: 'warning',
+					})
+				}
 			},
 			refreshing() {
 				if (this.isRefreshing) {
@@ -293,7 +302,7 @@
 </script>
 
 <style>
-	
+
 </style>
 
 <style lang="scss" scoped>

--
Gitblit v1.9.3