Browse Source

点赞,评论

zouling 3 months ago
parent
commit
01235146da

+ 109 - 0
user_ui/mine/components/box/list.vue

@@ -161,6 +161,62 @@
 				</view>
 			</view>
 		</block>
+		<!-- 我的互动 -->
+		<block v-if="type=='myhd'">
+			<view class="mb12 pr" v-for="(ite,idx) in datainfo" :key="idx"
+				:data-idx="idx"
+				@touchstart="drawStart" @touchmove="drawMove" @touchend="drawEnd" :style="'right:'+ite.right+'px'"
+			>
+				<view class="hdlist pd12 flex">
+					<image :src="man" class="mhead flex0"></image>
+					<view class="flex1 overh">
+						<view class="flexc mb6">
+							<view class="name flex1 over">喜欢耶耶耶</view>
+							<view class="tit flex0 ml10">点赞了你的文章</view>
+							<view class="time flex0 ml10">02-26</view>
+						</view>
+						<view class="flexc overh mb4">
+							<view class="line bga"></view>
+							<view class="txt over flex1">物业服务费缴费公告</view>
+							<image :src="rimg" class="rimg ml10"></image>
+						</view>
+					</view>
+				</view>
+				<view class="spdel" v-if="ite.right>0&&checkPermi(['wuYe:residentInfo:remove'])" @click.stop="getDelFn(ite.residentId)">删除</view>
+			</view>
+		</block>
+		<block v-if="type=='plsh'">
+				<view class="mb12 pr"  v-for="(ite,idx) in datainfo" :key="idx"
+					:data-idx="idx"
+					@touchstart="drawStart" @touchmove="drawMove" @touchend="drawEnd" :style="'right:'+ite.right+'px'"
+				>
+					<view class="hdlist ">
+						<view class="pd12 flex">
+							<image :src="ite.avatar?baseUrl+ite.avatar:man" class="mhead flex0"></image>
+							<view class="flex1 overh">
+								<view class="flexc mb6">
+									<view class="name flex1 over">{{ite.nickName}}</view>
+									<view class="time flex0 ml10">02-26</view>
+								</view>
+								<view class="txt mb8">{{ite.commentContent}}</view>
+								<view class="flexc overh mb2">
+									<view class="line bgd"></view>
+									<view class="txta over flex1">{{ite.communityTitle}}</view>
+									<image :src="rimg" class="rimg ml10"></image>
+								</view>
+							</view>
+						</view>
+						<view class="shbtns flexc pd12" >
+							<view class="btn bga" @click="getSh('4',ite.contentId)">不予展示</view>
+							<view class="flex1"></view>
+							<view class="btn bgb" @click="getSh('3',ite.contentId)">不通过</view>
+							<view class="btn bgc" @click="getSh('2',ite.contentId)">通过</view>
+						</view>
+					</view>
+					<view class="spdel" v-if="ite.right>0&&checkPermi(['wuYe:residentInfo:remove'])" @click.stop="getDelFn(ite.residentId)">删除</view>
+				</view>
+			</block>
+		</block>
 		<view class="shax" v-if="wtdt">{{wtdt}}</view>
 	</block>
 	<!-- 无数据 -->
@@ -225,6 +281,7 @@
 				cirb:require('@/news/static/complaint/cirb.png'),
 				man:require("@/health/static/man.png"),
 				woman:require("@/health/static/woman.png"),
+				rimg:require("@/static/images/rimga.png"),
 				baseUrl:config.baseUrl,
 				delBtnWidth:66,//左滑默认宽度
 			}
@@ -255,6 +312,33 @@
 					}
 				});
 			},
+			getSh(type,id){
+				var that=this;
+				var str="";
+				if(type=='2'){
+					str="通过"
+				}else if(type=='3'){
+					str="不通过"
+				}else if(type=='4'){
+					str="下架"
+				}
+				uni.showModal({
+					title: '确认'+str,
+					content: "是否确认"+str,
+					cancelText: '取消',
+					confirmText: '确认',
+					success: function(res) {
+						if (res.confirm) {
+							var obj={
+								status:type,
+								contentId:id
+							}
+							that.$emit('getSh',obj)
+						} else if (res.cancel) {
+						}
+					}
+				});
+			},
 			getZhan(idx){
 				// var obj=JSON.parse(JSON.stringify(this.datainfo))[idx]
 				// obj.zhanflag=!obj.zhanflag;
@@ -458,6 +542,31 @@ border-radius: 10rpx;}
 		&.act{transform: rotate(0deg);}
 	}
 }
+// 互动
+.pd12{padding: 24rpx;}
+.hdlist{background: #FFFFFF;border-radius: 20rpx;position: relative;z-index: 1;
+	.mhead{width: 56rpx;height: 56rpx;margin-right: 20rpx;}
+	.name{font-size: 28rpx;font-weight: bold;color: #272727;height: 56rpx;line-height: 56rpx;}
+	.tit{font-weight: 500;font-size: 22rpx;color: #666666;}
+	.time{font-weight: 500;font-size: 22rpx;color: #666666;}
+	.line{width: 6rpx;height: 28rpx;border-radius: 4rpx;margin-right: 12rpx;
+		&.bga{background: #FACA7D;}
+		&.bgb{background: #86AFFF;}
+		&.bgc{background: #93E9C2;}
+		&.bgd{background: #DADADA;}
+	}
+	.txt{font-weight: 500;font-size: 26rpx;color: #272727;line-height: 36rpx;}
+	.txta{font-weight: 500;font-size: 26rpx;color: #666666;}
+	.rimg{width: 12rpx;height: 22rpx;}
+	.shbtns{border-top: 2rpx solid #DADADA;
+		.btn{border-radius: 20rpx;min-width: 110rpx;box-sizing: border-box;padding: 0 16rpx;
+height: 52rpx;display: flex;align-items: center;justify-content: center;flex:0 0 auto;margin-left: 20rpx;
+			&.bga{border: 2rpx solid #06C770;background: #DAEFE6;color: #06C770;margin-left: 0;}
+			&.bgb{border: 2rpx solid #FF6969;;background: #FFE7E7;color: #FF6969;}
+			&.bgc{background: #0256FD;color: #FFFFFF;}
+		}
+	}
+}
 // 无数据
 .nodata{display: flex;flex-direction: column;align-items: center;
 	image{width: 440rpx;height: 440rpx;}

+ 106 - 0
user_ui/mine/pages/news/index.vue

@@ -0,0 +1,106 @@
+<template>
+	<view class="news">
+		<box-list :datainfo="list" :wtdt="wtdt" type="myhd" @getDetail='getDetail'></box-list>
+	<loading></loading>	
+	</view>
+</template>
+
+<script>
+	import config from '@/config'
+	const baseUrl = config.baseUrl
+	import boxList from "@/mine/components/box/list.vue"
+	import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
+	export default{
+		components:{boxList},
+		data(){
+			return{
+				hrimg:require('@/static/logo.png'),
+				list:[{tit:"11"}],
+				pageSize: 10,
+				pageNum: 1,
+				reachflag: true,
+				wtdt:'',
+			}
+		},
+		onLoad: function() {
+		
+		},
+		onPageScroll(e) {
+			var scrollTop = Number(e.scrollTop);
+			// var listTop=Number(this.listTop)-Number(this.nvaHeight)
+			if(scrollTop>2){
+				this.scroflag=true
+			}else{
+				this.scroflag=false
+			}
+		},
+		// 上拉触底加载更多触发事件
+		onReachBottom() {
+			if (this.reachflag) {
+				this.pageNum++
+				this.getDataFn()
+			}
+		},
+		methods:{
+			checkPermi, checkRole,
+			// getNextFn(){
+			// 	this.$tab.navigateTo("/work/pages/business/add")
+			// },
+			getDelFn(id){
+				var that=this;
+				reservDel(data).then(res=>{
+					if(res.code==200){
+						this.$toast("删除成功");
+						setTimeout(function(){
+							that.getrefreshData()
+						},1500)
+					}
+				})
+			},
+			getrefreshData(){
+				this.pageNum=1;
+				this.list=[];
+				this.reachflag=true;
+				this.getDataFn()
+			},
+			getDataFn(){
+				var params={
+					pageSize:this.pageSize,
+					pageNum: this.pageNum,
+				}
+				params.noticeType=this.tabidx
+				getNoticeList(params).then(res=>{
+					if(res.code==200){
+						if (res.rows.length < this.pageSize) {
+							this.reachflag = false
+							this.wtdt = '到底了~';
+						} else {
+							var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum -	1)
+							if (num < res.total) {
+								this.reachflag = true
+								this.wtdt = ''
+							} else {
+								this.reachflag = false
+								this.wtdt = '到底了~';
+							}
+						}
+						if (this.pageNum == 1) {
+							this.list = res.rows;
+						} else {
+							this.list = this.list.concat(res.rows)
+						}
+					}else{
+						this.$toast(res.msg)
+					}
+				})
+				
+			},
+		}
+	}
+</script>
+<style>
+	page{background: #F3F3F0;}
+</style>
+<style lang="scss" scoped>
+.news{padding:20rpx 18rpx;}
+</style>

+ 123 - 0
user_ui/mine/pages/news/sh.vue

@@ -0,0 +1,123 @@
+<template>
+	<view class="news">
+		<box-list :datainfo="list" :wtdt="wtdt" type="plsh" @getDetail='getDetail' @getSh="getSh"></box-list>
+	<loading></loading>	
+	</view>
+</template>
+
+<script>
+	import config from '@/config'
+	const baseUrl = config.baseUrl
+	import boxList from "@/mine/components/box/list.vue"
+	import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
+	import {commentSh,commentContentPut} from "@/api/work/news.js"
+	export default{
+		components:{boxList},
+		data(){
+			return{
+				hrimg:require('@/static/logo.png'),
+				list:[{tit:"11"}],
+				pageSize: 10,
+				pageNum: 1,
+				reachflag: true,
+				wtdt:'',
+			}
+		},
+		onLoad: function() {
+			this.getDataFn()
+		},
+		onPageScroll(e) {
+			var scrollTop = Number(e.scrollTop);
+			// var listTop=Number(this.listTop)-Number(this.nvaHeight)
+			if(scrollTop>2){
+				this.scroflag=true
+			}else{
+				this.scroflag=false
+			}
+		},
+		// 上拉触底加载更多触发事件
+		onReachBottom() {
+			if (this.reachflag) {
+				this.pageNum++
+				this.getDataFn()
+			}
+		},
+		methods:{
+			checkPermi, checkRole,
+			// getNextFn(){
+			// 	this.$tab.navigateTo("/work/pages/business/add")
+			// },
+			getDelFn(id){
+				var that=this;
+				reservDel(data).then(res=>{
+					if(res.code==200){
+						this.$toast("删除成功");
+						setTimeout(function(){
+							that.getrefreshData()
+						},1500)
+					}
+				})
+			},
+			getrefreshData(){
+				this.pageNum=1;
+				this.list=[];
+				this.reachflag=true;
+				this.getDataFn()
+			},
+			getSh(data){
+				var that=this;
+				var params=JSON.parse(JSON.stringify(data))
+				commentContentPut(params).then(res=>{
+					if(res.code==200){
+						this.$toast('审核成功')
+						setTimeout(function() {
+							that.getrefreshData()
+						}, 1500);
+					}
+				})
+			},
+			getDataFn(){
+				var params={
+					pageSize:this.pageSize,
+					pageNum: this.pageNum,
+					"status":'1'
+				}
+				commentSh(params).then(res=>{
+					if(res.code==200){
+						if (res.rows.length < this.pageSize) {
+							this.reachflag = false
+							this.wtdt = '到底了~';
+						} else {
+							var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum -	1)
+							if (num < res.total) {
+								this.reachflag = true
+								this.wtdt = ''
+							} else {
+								this.reachflag = false
+								this.wtdt = '到底了~';
+							}
+						}
+						var newArr=JSON.parse(JSON.stringify(res.rows))
+						newArr.forEach(ite=>{
+							ite.right=0;
+						})
+						if (this.pageNum == 1) {
+							this.list = newArr;
+						} else {
+							this.list = this.list.concat(newArr)
+						}
+					}else{
+						this.$toast(res.msg)
+					}
+				})
+				
+			},
+		}
+	}
+</script>
+<style>
+	page{background: #F3F3F0;}
+</style>
+<style lang="scss" scoped>
+.news{padding:20rpx 18rpx;}
+</style>

+ 35 - 12
user_ui/news/components/box/list.vue

@@ -65,17 +65,17 @@
 				<view class="flex1 overh">
 					<view class="flexat mb14 ">
 						<view class="plname flex1 over">{{ite.commentUser.nickName}}</view>
-						<view class="plrbtn flexc flex0">
+						<view class="plrbtn flexc flex0" @click.stop="getDzFn(ite.id,'2',ite.content,idx)">
 							<image :src="nicond" v-if="ite.isLike=='Y'"></image>
 							<image :src="niconb" class="imga" v-else></image>
 							<view>点赞</view>
 						</view>
-						<view class="plrbtn flexc flex0">
+						<view class="plrbtn flexc flex0" @click.stop="getHfFn(ite)">
 							<image :src="nicone" class="imgb"></image>
 							<view>回复</view>
 						</view>
 					</view>
-					<view class="infotxt mb6">{{ite.content}}<view class="infotime">{{ite.createDate}}</view></view>
+					<view class="infotxt">{{ite.content}}<view class="infotime">{{ite.createDate}}</view></view>
 				
 					<!-- 二级回复 -->
 					<view class="pllist flex" v-for="(aite,aidx) in ite.childrenList" :key="`ej${aidx}`">
@@ -83,26 +83,28 @@
 						<view class="flex1 overh">
 							<view class="flexat mb14 ">
 								<view class="plname flex1 over">{{aite.commentUser.nickName}}</view>
-								<view class="plrbtn flexc flex0">
+								<view class="plrbtn flexc flex0" @click.stop="getDzFn(aite.id,'2',aite.content,idx,aidx,'ejdz')">
 									<image :src="nicond" v-if="aite.isLike=='Y'"></image>
 									<image :src="niconb" class="imga" v-else></image>
 									<view>点赞</view>
 								</view>
-								<view class="plrbtn flexc flex0">
+								<view class="plrbtn flexc flex0" @click.stop="getHfFn(aite)">
 									<image :src="nicone" class="imgb"></image>
 									<view>回复</view>
 								</view>
 							</view>
-							<view class="infotxt mb6">{{aite.content}}<view class="infotime">{{aite.createDate}}</view></view>
+							<view class="infotxt">{{aite.content}}<view class="infotime">{{aite.createDate}}</view></view>
 						</view>
 					</view>
 					<view class="flexc" v-if="ite.childrenListCount>0">
-						<view class="zhanbox flexc" @click.stop="getZhanFn(ite,idx)">
-							展开{{ite.childrenListCount}}条回复<image :src="upimg" class="zhan"></image>
+						<view class="zhanbox flexc" v-if="ite.reachflag" @click.stop="getZhanFn(ite,idx)">
+							<block v-if="ite.childrenList&&ite.childrenList.length">展开更多</block>
+							<block v-else>展开{{ite.childrenListCount}}条回复</block>
+							<image :src="upimg" class="zhan"></image>
 						</view>
-						<view class="zhanbox flexc ml10" @click.stop="getShouFn(ite,idx)">收起<image :src="upimg"></view>
+						<view v-if="ite.childrenList&&ite.childrenList.length" class="zhanbox flexc ml10" @click.stop="getShouFn(idx)">收起<image :src="upimg"></view>
 					</view>
-					<view style="height: 16rpx;" v-else></view>	
+					<!-- <view style="height: 16rpx;" v-else></view>	 -->
 				</view>
 			</view>
 		</block>
@@ -185,8 +187,29 @@
 				}
 				this.$emit("getZhanFn",obj)
 			},
+			getDzFn(id,type,content,idx,aidx,atype){
+				var obj={
+					id:id,
+					type:type,
+					content:content,
+					idx:idx,
+					aidx:aidx,
+					atype:atype
+				}
+				this.$emit("getDzFn",obj)
+			},
+			getHfFn(ite){
+				var cuser=JSON.parse(JSON.stringify(ite.commentUser))
+				var obj={
+					parentId:ite.id,
+					toUserId:cuser.id,
+					toNickName:cuser.nickName,
+					toAvatar:cuser.avatar,
+				}
+				this.$emit("getHfFn",obj)
+			},
 			getShouFn(idx){
-				
+				this.$emit("getShouFn",idx)
 			},
 			getPreview(idx,arr) {
 				var newArr=[];
@@ -310,7 +333,7 @@
 		}
 		view{font-weight: bold;font-size: 24rpx;color: #314081;}
 	}
-	.infotxt{font-weight: 500;font-size: 26rpx;color: #161616;line-height: 40rpx;
+	.infotxt{font-weight: 500;font-size: 26rpx;color: #161616;line-height: 40rpx;margin-bottom: 30rpx;
 		&:before {content: "";float: right;width: 0;height: calc(100% - 16px);background: red;}
 		.infotime{font-weight: 500;font-size: 24rpx;color: #666666; float: right;clear: both;}	
 	}

+ 165 - 17
user_ui/news/pages/news/detail.vue

@@ -10,30 +10,32 @@
 				</view>
 			</view>
 			<view class="ndbfox flexc">
-				<view class="flexcc ndbflist">
+				<view class="flexcc ndbflist" @click="getHfFn">
 					<image :src="nicona"></image>
-					<view>32</view>
+					<view>{{datainfo.userComment}}</view>
 				</view>
-				<view class="flexcc ndbflist">
-					<image :src="niconb"></image>
-					<view>32</view>
+				<view class="flexcc ndbflist" @click="getDzFn('1')">
+					<image :src="nicond" v-if="datainfo.isLike=='Y'"></image>
+					<image :src="niconb" v-else></image>
+					<view>{{datainfo.userLikes}}</view>
 				</view>
-				<view class="flexcc ndbflist">
-					<image :src="niconc"></image>
-					<view>32</view>
+				<view class="flexcc ndbflist" @click="getScFn('1')">
+					<image :src="starb" v-if="datainfo.isStar=='Y'"></image>
+					<image :src="niconc" v-else></image>
+					<view>{{datainfo.userStars}}</view>
 				</view>
 			</view>
 		</view>
 		<view class="ndbox mb12 plr15">
 			<view class="pltit">评论<text>({{commenttotal}})</text></view>
 			<!-- 评论列表 -->
-			<box-list :datainfo="commentlist" type="comment" @getZhanFn="getZhanFn"></box-list>
+			<box-list :datainfo="commentlist" type="comment" @getZhanFn="getZhanFn" @getShouFn="getShouFn" @getDzFn="getplDzFn" @getHfFn="getplHfFn"></box-list>
 		</view>
 		<!-- 评论 -->
 		<view class="pjfbtn">
 			<view class="flexc pjfbox">
-				<uni-easyinput type="textarea" autoHeight v-model="text" :inputBorder='false' placeholder="发表我的评论…" />
-				<view class="btns">发送</view>
+				<uni-easyinput :focus="isfocus" type="textarea" autoHeight v-model="text" :inputBorder='false' placeholder="发表我的评论…" />
+				<view class="btns" @click="getPinLunFn">发送</view>
 			</view>
 		</view>
 	<loading></loading>	
@@ -56,6 +58,7 @@
 				niconc:require('@/news/static/news/niconc.png'),
 				nicond:require('@/news/static/news/nicond.png'),
 				nicone:require('@/news/static/news/nicone.png'),
+				starb:require('@/news/static/news/starb.png'),
 				head:require('@/news/static/news/head.png'),
 				upimg:require('@/mine/static/house/up.png'),
 				baseUrl:config.baseUrl,
@@ -69,11 +72,17 @@
 				commenttotal:"0",
 				pageSize: 10,
 				pageNum: 1,
+				userId:this.$store.state.user.userId,
+				nickName:this.$store.state.user.nickName,
+				avatar:this.$store.state.user.avatar,
+				isRoot:'1',//isRoot,根评论id 1:根评论 2:子评论
+				isfocus:false,
+				plinfo:'',//二级评论信息
 			}
 		},
 		onLoad: function(e) {
 			this.id=e.id;
-			// this.getDetailFn();
+			this.getDetailFn();
 			this.getRootComment()
 		},
 		// 上拉触底加载更多触发事件
@@ -102,19 +111,157 @@
 				var idx=obj.idx;
 				var list=JSON.parse(JSON.stringify(this.commentlist))[idx]
 				var params={
-					parentId:obj.id,
-					pageSize:obj.pageSize,
-					pageNum: obj.pageNum,
+					parentId:list.id,
+					pageSize:list.pageSize,
+					pageNum: list.pageNum,
 				}
 				getParentComment(params).then(res=>{
 					if(res.code==200){
 						var reachflag=true;
-						var data=JSON.parse(JSON.stringify(res.data))
+						if (res.data.length < obj.pageSize) {
+							list.reachflag = false
+						} else {
+							var num = parseInt(res.data.length) + parseInt(obj.pageSize) * parseInt(obj.pageNum -	1)
+							if (num < obj.childrenListCount) {
+								list.reachflag = true
+							} else {
+								list.reachflag = false
+							}
+						}
 						list.childrenList=list.childrenList.concat(res.data)
-						this.commentlist.splice(idx,0,list)
+						list.pageNum=obj.pageNum++
+						this.commentlist.splice(idx,1,list)
+					}
+				})
+			},
+			// 点赞
+			getDzFn(type,info){
+				var params={
+					userId:this.userId,
+					nickName:this.nickName,
+					avatar:this.avatar,
+					targetType:type,
+				}
+				if(type==1){
+					params.targetId=this.id;
+					params.targetTitle=this.datainfo.communityTitle;
+				}else {
+					params.targetId=info.id;
+					params.targetTitle=info.content;
+				}
+				giveTheThumbs(params).then(res=>{
+					if(res.code==200){
+						if(type==1){
+							if(this.datainfo.isLike=='Y'){
+								this.$toast("取消点赞成功");
+								this.datainfo.isLike='N';
+								this.datainfo.userLikes--;
+							}else{
+								this.$toast("点赞成功");
+								this.datainfo.isLike='Y';
+								this.datainfo.userLikes--;
+							}
+						}else{
+							var idx=info.idx;
+							var aidx=info.aidx;
+							var atype=info.atype;
+							var obj=JSON.parse(JSON.stringify(this.commentlist))[idx];
+							if(atype&&atype=='ejdz'){
+								var erobj=obj.childrenList[aidx];
+								if(erobj.isLike=='Y'){
+									this.$toast("取消点赞成功");
+									erobj.isLike='N';
+								}else{
+									this.$toast("点赞成功");
+									erobj.isLike='Y';
+								}
+								obj.childrenList[aidx]=JSON.parse(JSON.stringify(erobj))
+								this.commentlist.splice(idx,1,obj)
+							}else{
+								if(obj.isLike=='Y'){
+									this.$toast("取消点赞成功");
+									obj.isLike='N';
+								}else{
+									this.$toast("点赞成功");
+									obj.isLike='Y';
+								}
+								this.commentlist.splice(idx,1,obj)
+							}
+						}	
+					}
+				})
+			},
+			getplDzFn(data){
+				var info=JSON.parse(JSON.stringify(data))
+				console.log(info,1)
+				this.getDzFn('2',info)
+			},
+			// 收藏
+			getScFn(type){
+				var params={
+					userId:this.userId,
+					nickName:this.nickName,
+					avatar:this.avatar,
+					targetType:1,//目标类型(1:社区 2:党建 )
+				}
+				params.targetId=this.id;
+				params.targetTitle=this.datainfo.communityTitle;
+				getStars(params).then(res=>{
+					if(res.code==200){
+						if(this.datainfo.isStar=='Y'){
+							this.$toast("取消收藏成功");
+							this.datainfo.isStar='N';
+							this.datainfo.userStars--;
+						}else{
+							this.$toast("收藏成功");
+							this.datainfo.isStar='Y';
+							this.datainfo.userStars++
+						}	
+					}
+				})
+			},
+			// 评论回复
+			getHfFn(data){
+				this.isRoot='1';
+				this.isfocus=true;
+			},
+			getplHfFn(data){
+				this.plinfo=JSON.parse(JSON.stringify(data))
+				this.isRoot='2';
+				this.isfocus=true;
+			},
+			getPinLunFn(){
+				var params={
+					userId:this.userId,
+					nickName:this.nickName,
+					avatar:this.avatar,
+					isRoot:this.isRoot,
+					communityId:this.id,
+					communityType:this.datainfo.communityType,
+					commentContent:this.text
+				}
+				
+				if(this.isRoot==2){
+					var info=JSON.parse(JSON.stringify(this.plinfo))
+					params.parentId=info.parentId;
+					params.toUserId=info.toUserId;
+					params.toNickName=info.toNickName;
+					params.toAvatar=info.toAvatar;
+				}
+				commentIndex(params).then(res=>{
+					if(res.code==200){
+						this.$toast('评论成功,等待审核')
+						this.text='';
 					}
 				})
 			},
+			getShouFn(idx){
+				var list=JSON.parse(JSON.stringify(this.commentlist))[idx];
+				list.childrenList=[];
+				list.pageNum=1;
+				list.reachflag=true;
+				this.commentlist.splice(idx,1,list)
+			},
 			getRootComment(){
 				var that=this;
 				var params={
@@ -150,6 +297,7 @@
 						} else {
 							this.commentlist = this.list.concat(newArr)
 						}
+						console.log(this.commentlist)
 					}
 				})
 			},

+ 14 - 0
user_ui/pages.json

@@ -344,6 +344,20 @@
 			    "navigationBarTitleText": "运单详情",
 				"h5":{"titleNView":false}
 			  }
+			},
+			{
+			  "path": "pages/news/index",
+			  "style": {
+			    "navigationBarTitleText": "收到的互动",
+				"h5":{"titleNView":false}
+			  }
+			},
+			{
+			  "path": "pages/news/sh",
+			  "style": {
+			    "navigationBarTitleText": "评论审核",
+				"h5":{"titleNView":false}
+			  }
 			}
 			
 		]

+ 16 - 5
user_ui/pages/mine/index.vue

@@ -87,18 +87,18 @@
 					<view class="tit flex1">我的违停</view>
 					<image :src="rimg" class="rimg"></image>
 				</view>
-				<view class="flexc mine_list" @click="getClockcontFn" v-if="checkPermi([''])">
+				<view class="flexc mine_list" @click="getMyHdFn" v-if="checkPermi([''])">
 					<view class="limg">
-						<image :src="listimgi" class="imge"></image>
+						<image :src="listimgo" class="imgd"></image>
 					</view>
 					<view class="tit flex1">我的互动</view>
 					<image :src="rimg" class="rimg"></image>
 				</view>
-				<view class="flexc mine_list" @click="getYqMeetFn">
+				<view class="flexc mine_list" @click="getPlShFn">
 					<view class="limg">
-						<image :src="listimgj" class="imgd"></image>
+						<image :src="listimgp" class="imgg"></image>
 					</view>
-					<view class="tit flex1">我的收藏</view>
+					<view class="tit flex1">评论审核</view>
 					<image :src="rimg" class="rimg"></image>
 				</view>
 				<view class="flexc mine_list" @click="getClockcontFn" v-if="checkPermi([''])">
@@ -181,6 +181,8 @@
 				listimgl: require('@/static/images/mine/mtabl.png'),
 				listimgm: require('@/static/images/mine/mtabm.png'),
 				listimgn: require('@/static/images/mine/mtabn.png'),
+				listimgo: require('@/static/images/mine/mtabo.png'),
+				listimgp: require('@/static/images/mine/mtabp.png'),
 
 				head:require('@/static/images/mine/head.png'),
 				wrimg:require("@/static/images/mine/wrimg.png"),
@@ -280,10 +282,18 @@
 			handleToSetting() {
 			  this.$tab.navigateTo('/pages/mine/setting/index')
 			},
+			
+			
 			// 修改密码
 			handleUpassword(){
 				this.$tab.navigateTo(`/pages/mine/pwd/index`)  
 			},
+			getPlShFn(){//评论审核
+				this.$tab.navigateTo('/mine/pages/news/sh')
+			},
+			getMyHdFn(){//我的互动
+				this.$tab.navigateTo('/mine/pages/news/index')
+			},
 			// 账号信息
 			handleToInfo() {
 				this.$tab.navigateTo('/pages/mine/info/index')
@@ -422,6 +432,7 @@ page{background-color: #ffffff;}
 					.imgd{width: 32rpx;height: 32rpx;}//16 16
 					.imge{width: 26rpx;height: 30rpx;}//13 15
 					.imgf{width: 26rpx;height: 32rpx;}//13 16
+					.imgg{width: 32rpx;height: 30rpx;}//16 15
 				}
 				.tit{font-weight: bold;font-size: 26rpx;color: #272727;}
 				.txt{font-weight: 500;font-size: 26rpx;color: #666666;margin-left: 20rpx;flex: 0 0 auto;}

BIN
user_ui/static/images/mine/mtabo.png


BIN
user_ui/static/images/mine/mtabp.png


BIN
user_ui/static/images/rimga.png


+ 1 - 0
user_ui/store/getters.js

@@ -2,6 +2,7 @@ const getters = {
   token: state => state.user.token,
   avatar: state => state.user.avatar,
   name: state => state.user.name,
+  nickName: state => state.user.nickName,
   roles: state => state.user.roles,
   permissions: state => state.user.permissions,
   wgtcode:state => state.user.wgtcode,

+ 7 - 0
user_ui/store/modules/user.js

@@ -10,6 +10,7 @@ const user = {
   state: {
     token: getToken(),
     name: storage.get(constant.name),
+    nickName: storage.get(constant.nickName),
     avatar: storage.get(constant.avatar),
     roles: storage.get(constant.roles),
     permissions: storage.get(constant.permissions),
@@ -37,6 +38,10 @@ const user = {
       state.name = name
       storage.set(constant.name, name)
     },
+	SET_NICKNAME: (state, nickName) => {
+	  state.nickName = nickName
+	  storage.set(constant.nickName, nickName)
+	},
     SET_AVATAR: (state, avatar) => {
       state.avatar = avatar
       storage.set(constant.avatar, avatar)
@@ -120,6 +125,7 @@ const user = {
           const user = res.user
           const avatar = (user == null || user.avatar == "" || user.avatar == null) ? require("@/static/images/profile.jpg") : baseUrl + user.avatar
           const username = (user == null || user.userName == "" || user.userName == null) ? "" : user.userName
+          const nickName = (user == null || user.nickName == "" || user.nickName == null) ? "" : user.nickName
 		  const userId = (user == null || user.userId == "" || user.userId == null) ? "" : user.userId
 		  const phonenumber = (user == null || user.phonenumber == "" || user.phonenumber == null) ? "" : user.phonenumber
           if (res.roles && res.roles.length > 0) {
@@ -129,6 +135,7 @@ const user = {
             commit('SET_ROLES', ['ROLE_DEFAULT'])
           }
           commit('SET_NAME', username)
+          commit('SET_NICKNAME', nickName)
           commit('SET_AVATAR', avatar)
 		  commit('SET_USERID', userId)
 		  commit('SET_PHONENUMBER', phonenumber)

+ 1 - 0
user_ui/utils/constant.js

@@ -1,6 +1,7 @@
 const constant = {
    avatar: 'vuex_avatar',
    name: 'vuex_name',
+   nickName: 'vuex_nickName',
    roles: 'vuex_roles',
    permissions: 'vuex_permissions',
    autologin:'vuex_autologin',

+ 1 - 1
user_ui/utils/storage.js

@@ -4,7 +4,7 @@ import constant from './constant'
 let storageKey = 'storage_data'
 
 // 存储节点变量名
-let storageNodeKeys = [constant.avatar, constant.name, constant.roles, constant.permissions,constant.autologin,constant.wgtcode,constant.userId,constant.phonenumber,]
+let storageNodeKeys = [constant.avatar, constant.name,constant.nickName, constant.roles, constant.permissions,constant.autologin,constant.wgtcode,constant.userId,constant.phonenumber,]
 
 const storage = {
   set: function(key, value) {