zouling 3 månader sedan
förälder
incheckning
0437637fd7

+ 1 - 1
user_ui/mine/pages/news/myhd.vue

@@ -67,7 +67,7 @@
 				var type=this.tabval;
 				var targetType=info.targetType;//1:社区 2:党建 
 				if(type=='mypl'){
-					var id=info.commentId;
+					var id=info.communityId;
 					this.$tab.navigateTo("/news/pages/news/detail?id="+id)
 				}else{
 					var id=info.targetId;

+ 2 - 1
user_ui/news/components/box/list.vue

@@ -188,6 +188,7 @@
 				upimg:require('@/mine/static/house/up.png'),
 				baseUrl:config.baseUrl,
 				delBtnWidth:66,//左滑默认宽度
+				userId:this.$store.state.user.userId,
 				OwOlist: [
 				        //表情包和表情路径
 				        { title: "微笑", url: "weixiao.gif" },
@@ -439,7 +440,7 @@
 }
 //评论
 .pllist{padding-top: 20rpx;margin-bottom: 16rpx;border-bottom: 2rpx solid #DADADA;
-	.head{width: 40rpx;height: 40rpx;margin-right: 18rpx;flex: 0 0 auto;}
+	.head{width: 40rpx;height: 40rpx;margin-right: 18rpx;flex: 0 0 auto;border-radius: 50%;}
 	.plname{font-weight: bold;font-size: 30rpx;color: #161616;
 		view{max-width: 50%;}
 	}

+ 43 - 38
user_ui/news/pages/news/detail.vue

@@ -1,44 +1,47 @@
 <template>
 	<view class="ndetail ">
-		<!-- 详情 -->
-		<view class="ndbox mb12">
-			<view class="plr15">
-				<view class="tit">{{datainfo.communityTitle}}</view>
-				<view class="time mb12">{{datainfo.publishTime}}</view>
-				<view class="rich">
-					<rich-text :nodes="communityContent" style="word-break: break-all;"></rich-text>
+		<image :src="nonews" v-if="datainfo.status==2" class="noimg"></image>
+		<block v-else>
+			<!-- 详情 -->
+			<view class="ndbox mb12">
+				<view class="plr15">
+					<view class="tit">{{datainfo.communityTitle}}</view>
+					<view class="time mb12">{{datainfo.publishTime}}</view>
+					<view class="rich">
+						<rich-text :nodes="communityContent" style="word-break: break-all;"></rich-text>
+					</view>
 				</view>
-			</view>
-			<view class="ndbfox flexc">
-				<view class="flexcc ndbflist" @click="getHfFn">
-					<image :src="nicona"></image>
-					<view>{{datainfo.userComment}}</view>
-				</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" @click="getScFn('1')">
-					<image :src="starb" v-if="datainfo.isStar=='Y'"></image>
-					<image :src="niconc" v-else></image>
-					<view>{{datainfo.userStars}}</view>
+				<view class="ndbfox flexc">
+					<view class="flexcc ndbflist" @click="getHfFn">
+						<image :src="nicona"></image>
+						<view>{{datainfo.userComment}}</view>
+					</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" @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>
-		<view class="ndbox mb12 plr15">
-			<view class="pltit">评论<text>({{commenttotal}})</text></view>
-			<!-- 评论列表 -->
-			<box-list :datainfo="commentlist" type="comment" @getZhanFn="getZhanFn" @getShouFn="getShouFn" @getDzFn="getplDzFn" @getHfFn="getplHfFn" @getDelFn="getDelFn"></box-list>
-		</view>
-		<!-- 评论 -->
-		<view class="pjfbtn">
-			<view class="flexc pjfbox">
-				<uni-easyinput :focus="isfocus" type="textarea" autoHeight v-model="text" :inputBorder='false' placeholder="发表我的评论…" />
-				<view class="btns" @click="getPinLunFn">发送</view>
+			<view class="ndbox mb12 plr15">
+				<view class="pltit">评论<text>({{commenttotal}})</text></view>
+				<!-- 评论列表 -->
+				<box-list :datainfo="commentlist" type="comment" @getZhanFn="getZhanFn" @getShouFn="getShouFn" @getDzFn="getplDzFn" @getHfFn="getplHfFn" @getDelFn="getDelFn"></box-list>
 			</view>
-		</view>
-	<loading></loading>	
+			<!-- 评论 -->
+			<view class="pjfbtn">
+				<view class="flexc pjfbox">
+					<uni-easyinput :focus="isfocus" type="textarea" autoHeight v-model="text" :inputBorder='false' placeholder="发表我的评论…" />
+					<view class="btns" @click="getPinLunFn">发送</view>
+				</view>
+			</view>
+		</block>	
+		<loading></loading>	
 	</view>
 </template>
 
@@ -61,6 +64,7 @@
 				starb:require('@/news/static/news/starb.png'),
 				head:require('@/news/static/news/head.png'),
 				upimg:require('@/mine/static/house/up.png'),
+				nonews:require('@/news/static/news/nonews.png'),
 				baseUrl:config.baseUrl,
 				datainfo:{
 					
@@ -106,12 +110,12 @@
 				})
 			},
 			// 删除
-			getDelFn(data){
+			getDelFn(id){
 				var that=this;
-				var info=JSON.parse(JSON.stringify(data))
+				// var info=JSON.parse(JSON.stringify(data))
 				// var type=info.type;
 				// var pid=info.pid;
-				deletepl(info.id).then(res=>{
+				deletepl(id).then(res=>{
 					if(res.code==200){
 						this.$toast("删除成功");
 						uni.$emit('partyNewsList')
@@ -277,6 +281,7 @@
 					if(res.code==200){
 						this.$toast('评论成功,等待审核')
 						this.text='';
+						this.isfocus=false;
 					}
 				})
 			},

+ 4 - 2
user_ui/news/pages/news/djdetail.vue

@@ -1,7 +1,8 @@
 <template>
-	<view class="ndetail ">
+	<view class="ndetail">
+		<image :src="nonews" v-if="datainfo.status==2" class="noimg"></image>
 		<!-- 详情 -->
-		<view class="ndbox mb12">
+		<view class="ndbox mb12" v-else>
 			<view class="plr15">
 				<view class="tit">{{datainfo.partyTitle}}</view>
 				<view class="time mb12">{{datainfo.publishTime}}</view>
@@ -46,6 +47,7 @@
 				head:require('@/news/static/news/head.png'),
 				starb:require('@/news/static/news/starb.png'),
 				eye:require('@/news/static/news/eye.png'),
+				nonews:require('@/news/static/news/nonews.png'),
 				datainfo:{
 					
 				},

+ 17 - 14
user_ui/news/pages/news/newssq.vue

@@ -3,9 +3,10 @@
 		<view class="cartop">
 			<view class="tabtop flexc">
 				<view class="tabt" :class="tabval==ite.dictValue?'act':''" v-for="(ite,idx) in wzlxList" :key="idx" @click="getTabFn(ite.dictValue)">{{ite.dictLabel}}</view>
-				<view class="numbox" @click="getHdFn">
-					未读互动<text>{{hdcount}}</text>
-				</view>
+				
+			</view>
+			<view class="numbox" @click="getHdFn">
+				未读互动<text>{{hdcount}}</text>
 			</view>
 		</view>
 		<!-- 列表 -->
@@ -85,7 +86,8 @@
 				})
 			},
 			getHdFn(){
-				this.$tab.navigateTo("/mine/pages/news/index")
+				this.$tab.navigateTo("/mine/pages/news/index");
+				this.hdcount=0;
 			},
 			getDetail(id){
 				this.$tab.navigateTo("/news/pages/news/detail?id="+id)
@@ -170,21 +172,22 @@
 <style lang="scss" scoped>
 .car{padding: 148rpx 0 10rpx;}
 .cartop{position: fixed;left: 0;right: 0;top: 0;background-color: #ffffff;z-index: 2;
-	.tabtop{padding:28rpx 200rpx 40rpx 0;position: relative;
-		.tabt{font-weight: 500;font-size: 32rpx;color: #666666;position: relative;line-height: 56rpx;padding: 0 40rpx;
+	.tabtop{padding:28rpx 200rpx 40rpx 0;position: relative;overflow: auto;
+		.tabt{font-weight: 500;font-size: 32rpx;color: #666666;position: relative;line-height: 56rpx;flex: 0 0 auto;text-align: center;margin: 0 10rpx;padding: 0 20rpx;
 			&.act{font-weight: bold;font-size: 32rpx;color: #272727;
 			&::after{content: '';width: 40rpx;height: 10rpx;background: #0156FE;border-radius: 6rpx;position: absolute;left: 50%;margin-left: -20rpx;bottom: -10rpx;}
 			}
 		}
-		.numbox{width: 188rpx;height: 58rpx;background-color: #E6E6E6;border-radius: 29rpx 0 0 29rpx;font-weight: 500;font-size: 26rpx;color: #0156FE;display: flex;align-items: center;justify-content: center;position: absolute;right: 0;
-			text{height: 20rpx;min-width: 20rpx;padding: 0 8rpx;box-sizing: border-box;line-height: 20rpx;margin-left: 10rpx;font-weight: bold;
-font-size:16rpx;
-color: #FCF9F1;
-
-background: #D32C26;
-border-radius: 5px;}
-		}
+		
 	}
+	.numbox{width: 188rpx;height: 58rpx;background-color: #E6E6E6;border-radius: 29rpx 0 0 29rpx;font-weight: 500;font-size: 26rpx;color: #0156FE;display: flex;align-items: center;justify-content: center;position: absolute;right: 0;top: 28rpx;				
+	text{height: 20rpx;min-width: 20rpx;padding: 0 8rpx;box-sizing: border-box;line-height: 20rpx;margin-left: 10rpx;font-weight: bold;
+	font-size:16rpx;
+	color: #FCF9F1;
+	
+	background: #D32C26;
+	border-radius: 5px;}
+			}
 }
 .carlists{padding: 0 18rpx;}
 </style>

BIN
user_ui/news/static/news/nonews.png


BIN
user_ui/static/applogo.png


+ 1 - 1
user_ui/static/style.css

@@ -37,7 +37,7 @@ font-weight: bold;font-size: 26rpx;color: #FFFFFF;background: #0256FD;border-rad
 .spdel{width: 164rpx;background: #EA2D2D;font-weight: bold;font-size: 26rpx;color: #FFFFFF;display: flex;align-items: center;justify-content: center;position: absolute;right: -146rpx;top: 0;bottom: 0;padding-left: 14rpx;}
 .delleft{background-color: #ffffff;border-radius: 20rpx;position: relative;z-index: 1;width: 100%;}
 .pr{position: relative;}
-
+.noimg{width: 251rpx;height: 292rpx;margin: 100rpx auto;display: block;}
 .pdlr12{padding: 0 24rpx;}
 .plr15{padding: 0 30rpx;}
 .tdu{text-decoration: underline;}