zhengkaixin 2 years ago
parent
commit
353ac9469b

+ 11 - 0
apis/pagejs/news.js

@@ -75,3 +75,14 @@ export function newsCommentsdelete(id) {
 		method: 'post',	
 	})
 }
+
+
+export function newsCommentsList(formData) {
+	var url= '/open/newsApi/newsCommentsList';
+	
+	return request({
+		url:url,
+		data: formData,
+		method: 'post',	
+	})
+}

+ 3 - 2
pages/mine/issue.vue

@@ -171,6 +171,7 @@
 				API_share.addShare(this.subForm).then((res) => {
 					
 					uni.hideLoading();
+					this.carhelp.set("addShare",1);
 					if(this.nic){
 						uni.showModal({
 							showCancel:false,
@@ -179,7 +180,7 @@
 							
 							cancelText:"确定",
 							success: res1 => {
-								this.carhelp.set("addShare",1);
+							
 								this.$refs.refNavbar.goBack()
 								
 							}})
@@ -191,7 +192,7 @@
 							confirmText:"前往分享空间",
 							cancelText:"返回",
 							success: res1 => {
-								this.carhelp.set("addShare",1);
+								
 								if (res1.confirm) {
 									uni.redirectTo({
 										url:"/pages/staffHome/filesonic"

+ 3 - 0
pages/mine/personalPage.vue

@@ -88,6 +88,9 @@
 					<view class="year-month">
 						{{yearmonth(item.createTime)}}
 					</view>
+					<view class="status" style="color: red;" v-if="item.status!=1">
+						[{{item.status==0?'审核中':''}}{{item.status==2?'审核不通过':''}}]
+					</view>
 				</view>
 				<view class="content">
 					<view class="title">

+ 3 - 0
pages/mine/points/rankingList.vue

@@ -167,12 +167,14 @@
 			 color: rgba(51, 51, 51, 1);
 			 font-size: 16px;
 			 margin-left: 24rpx;
+			 width: 100px;
 			 font-family: 'Medium';
 		 }
 		 .points{
 			 color: rgba(31, 74, 153, 1);
 			 font-size: 16px;
             margin-left: auto;
+			
 			font-family: 'Regular';
 		 }
 	}
@@ -211,6 +213,7 @@
 	   			 color: rgba(51, 51, 51, 1);
 	   			 font-size: 16px;
 	   			 margin-left: 24rpx;
+				  width: 100px;
 				 font-family: 'Medium';
 	   }
 	   .points{

+ 63 - 12
pages/news/articleDetails.vue

@@ -32,12 +32,12 @@
 		<template v-if="info.typeName!=='通知公告'">
 			
 		
-		<view class="comment" v-if="info.title&&info.listComment&&info.listComment.length"   >
+		<view class="comment" v-if="info.title&&infolistComment&&infolistComment.length"   >
 			<view class="title">
 				精华评论
 			</view>
 			
-		<view class="comment-item"  v-for="(item,i) in info.listComment" :key="i" >
+		<view class="comment-item"  v-for="(item,i) in infolistComment" :key="i" >
 			<view class="photo">
 				<img  v-if="item.headImg" :src="item.headImg" alt="">
 				<u-avatar  v-else  size="80" ></u-avatar>
@@ -46,9 +46,9 @@
 			<view class="details">
 				<view class="name-date">
 					<view class="name" :class="{
-						red:!item.name
+						red:!item.userName
 					}" >
-						{{item.name?item.name:'用户异常'}}
+						{{item.userName?item.userName:'用户异常'}}
 					</view>
 					<view class="date">
 						{{item.date}}
@@ -56,7 +56,7 @@
 				</view>
 				<view class="comment-content">
 					{{item.content}}
-					<view class="mine" v-if="item.isMine">
+					<view class="mine" v-if="userInfo&&(item.userId==userInfo.id)">
 						<view class="my-comment">
 							我的评论<span style="color:red;margin-left: 2px;"  v-if="item.status==0">[审批中]</span>
 						</view>
@@ -69,6 +69,8 @@
 			   
 			</view>
 		</view>
+			<u-divider   v-if="infolistComment.length==recordsTotal" border-color="#CFD2D5">已经到底了</u-divider>
+		
 		</view>
 		
 		<view class="bottom"  v-if="userInfo" >
@@ -136,6 +138,13 @@
 				showMessage:false,
 				userInfo:null,
 				list:[],
+				infolistComment:[],
+				listForm:{
+					pageIndex:1,
+					newsId:"",
+					queryStatus:0,
+					pageSize:5,
+				},
 				 back:true,
 				recordsTotal:0,
 				
@@ -146,12 +155,22 @@
 				this.back=false
 			}
 			this.id=op.id
+			this.listForm.newsId=this.id;
 			this.userInfo=this.carhelp.getPersonInfo()
 			this.getInfo(true)
 			
 		},
 	
 		methods: {
+			onReachBottom() {
+				if (this.infolistComment.length < this.recordsTotal) {			
+					this.myLoadmore();
+				}
+			},
+			myLoadmore(){
+				this.listForm.pageIndex += 1;
+				this.getNewsCommentsList();
+			},
 			issueMethod(){
 				uni.showModal({
 					title:"提示",
@@ -237,23 +256,54 @@
 				})
 			},
 			changeLikes(){
+				if(!this.info.iLike){
+					uni.showLoading({
+						title: "加载中",
+						mask: true,
+					})
+					
+					
+					API.changeLikes({
+						newsId:this.id
+					}).then((res) => {
+						
+						this.getInfo(true)
+					}).catch(error => {
+						uni.showToast({
+							title: error,
+							icon: "none"
+						})
+					})
+				}else{
+					uni.showToast({
+						title: "您已经点过赞了",
+						icon: "none"
+					})
+				}
+				
+			},
+			getNewsCommentsList(){
 				uni.showLoading({
 					title: "加载中",
 					mask: true,
 				})
-				
-				
-				API.changeLikes({
-					newsId:this.id
-				}).then((res) => {
-					
-					this.getInfo(true)
+				if(this.userInfo){
+					this.listForm.queryStatus =1
+				}
+				API.newsCommentsList(this.listForm).then((res) => {
+					uni.hideLoading();
+					this.infolistComment = [
+						...this.infolistComment,
+						...res.data.data
+					];
+					this.recordsTotal = res.data.recordsTotal;
 				}).catch(error => {
 					uni.showToast({
 						title: error,
 						icon: "none"
 					})
 				})
+				
 			},
 			getInfo(bl){
 				if(bl){
@@ -292,6 +342,7 @@
 					    }
 							 
 					})
+					this.getNewsCommentsList();
 				}).catch(error => {
 					uni.showToast({
 						title: error,

+ 3 - 2
pages/staffHome/filesonic.vue

@@ -46,6 +46,7 @@
 				</view>
 
 				<view class="tag" :class="item.activityId"   @click="issueMethod(item.activityId)" >
+					<text class="status" style="color: red;" v-if="item.status!=1">[{{item.status==0?'审核中':''}}{{item.status==2?'审核不通过':''}}]</text>
 					<text class="symbol">#</text>
 					<text class="text">{{item.activityName}}</text>
 					<text class="icon"   >
@@ -93,7 +94,7 @@
 			}
 		},
 		onShow(){
-			
+			console.log("onShow")
 			if(	this.carhelp.get("addShare")){
 				this.listForm.pageIndex=1;
 				this.getList()
@@ -159,7 +160,7 @@
 						},
 						...res.data
 					]
-					console.log()
+					
 				}).catch(error => {
 					
 				})