|
@@ -46,12 +46,12 @@
|
|
|
<view class="txt overtwo"><rich-text :nodes="ite.partyContent"></rich-text></view>
|
|
|
<view class="stabox flexc">
|
|
|
<view class="time flex1">{{ite.publishTime}}</view>
|
|
|
- <view class="btns flexc">
|
|
|
- <image :src="star" class="imga"></image>42
|
|
|
- <!-- <image :src="stara" class="imga"></image>42 -->
|
|
|
+ <view class="btns flexc" @click.stop="getScFn(ite,idx)">
|
|
|
+ <image :src="star" class="imga" v-if="ite.isStars=='Y'"></image>
|
|
|
+ <image :src="stara" class="imga" v-else></image>{{ite.starsCount||0}}
|
|
|
</view>
|
|
|
<view class="btns flexc">
|
|
|
- <image :src="eye" class="imgb"></image>1361
|
|
|
+ <image :src="eye" class="imgb"></image>{{ite.viewCount||0}}
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
@@ -70,30 +70,50 @@
|
|
|
<image :src="niconb" class="imga" v-else></image>
|
|
|
<view>点赞</view>
|
|
|
</view>
|
|
|
- <view class="plrbtn flexc flex0" @click.stop="getHfFn(ite)">
|
|
|
+ <view class="plrbtn flexc flex0" @click.stop="getHfFn('yjhf',ite,ite.id)">
|
|
|
<image :src="nicone" class="imgb"></image>
|
|
|
<view>回复</view>
|
|
|
</view>
|
|
|
+ <view class="plrbtn flexc flex0" @click.stop="getDelFn(ite.id)" v-if="checkPermi(['wuYe:commentIndex:remove'])&&ite.isMyself=='Y'">
|
|
|
+ <image :src="del" class="imgc"></image>
|
|
|
+ <view class="cof4">删除</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view class="infotxt">{{ite.content}}<view class="infotime">{{ite.createDate}}</view></view>
|
|
|
+ <view class="infotxt">
|
|
|
+ <rich-text :nodes="analyzeEmoji(ite.content)"></rich-text>
|
|
|
+ <view class="infotime">{{ite.createDate}}</view></view>
|
|
|
|
|
|
<!-- 二级回复 -->
|
|
|
<view class="pllist flex" v-for="(aite,aidx) in ite.childrenList" :key="`ej${aidx}`">
|
|
|
<image :src="aite.commentUser.avatar?baseUrl+aite.commentUser.avatar:head" class="head"></image>
|
|
|
<view class="flex1 overh">
|
|
|
<view class="flexat mb14 ">
|
|
|
- <view class="plname flex1 over">{{aite.commentUser.nickName}}</view>
|
|
|
+ <view class="plname flex1 over flexc">
|
|
|
+ <view class="over">{{aite.commentUser.nickName}}</view>
|
|
|
+ <block v-if="aite.toRoot=='Y'">
|
|
|
+ <image :src="rimg" class="rimg"></image>
|
|
|
+ <view class="over">{{aite.targetUser.nickName}}</view>
|
|
|
+ </block>
|
|
|
+ <!-- 判断是不是二级回复的回复 加字段-->
|
|
|
+ <!-- <block v-if="ite."></block> -->
|
|
|
+ </view>
|
|
|
<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" @click.stop="getHfFn(aite)">
|
|
|
+ <view class="plrbtn flexc flex0" @click.stop="getHfFn('ejhf',aite,ite.id)">
|
|
|
<image :src="nicone" class="imgb"></image>
|
|
|
<view>回复</view>
|
|
|
</view>
|
|
|
+ <view class="plrbtn flexc flex0" @click.stop="getDelFn(aite.id)" v-if="checkPermi(['wuYe:commentIndex:remove'])&&aite.isMyself=='Y'">
|
|
|
+ <image :src="del" class="imgc"></image>
|
|
|
+ <view class="cof4">删除</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view class="infotxt">{{aite.content}}<view class="infotime">{{aite.createDate}}</view></view>
|
|
|
+ <view class="infotxt">
|
|
|
+ <rich-text :nodes="analyzeEmoji(aite.content)"></rich-text>
|
|
|
+ <view class="infotime">{{aite.createDate}}</view></view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="flexc" v-if="ite.childrenListCount>0">
|
|
@@ -163,10 +183,86 @@
|
|
|
niconc:require('@/news/static/news/niconc.png'),
|
|
|
nicond:require('@/news/static/news/nicond.png'),
|
|
|
nicone:require('@/news/static/news/nicone.png'),
|
|
|
+ del:require('@/news/static/news/delb.png'),
|
|
|
head:require('@/news/static/news/head.png'),
|
|
|
upimg:require('@/mine/static/house/up.png'),
|
|
|
baseUrl:config.baseUrl,
|
|
|
delBtnWidth:66,//左滑默认宽度
|
|
|
+ OwOlist: [
|
|
|
+ //表情包和表情路径
|
|
|
+ { title: "微笑", url: "weixiao.gif" },
|
|
|
+ { title: "嘻嘻", url: "xixi.gif" },
|
|
|
+ { title: "哈哈", url: "haha.gif" },
|
|
|
+ { title: "可爱", url: "keai.gif" },
|
|
|
+ { title: "可怜", url: "kelian.gif" },
|
|
|
+ { title: "挖鼻", url: "wabi.gif" },
|
|
|
+ { title: "吃惊", url: "chijing.gif" },
|
|
|
+ { title: "害羞", url: "haixiu.gif" },
|
|
|
+ { title: "挤眼", url: "jiyan.gif" },
|
|
|
+ { title: "闭嘴", url: "bizui.gif" },
|
|
|
+ { title: "鄙视", url: "bishi.gif" },
|
|
|
+ { title: "爱你", url: "aini.gif" },
|
|
|
+ { title: "泪", url: "lei.gif" },
|
|
|
+ { title: "偷笑", url: "touxiao.gif" },
|
|
|
+ { title: "亲亲", url: "qinqin.gif" },
|
|
|
+ { title: "生病", url: "shengbing.gif" },
|
|
|
+ { title: "太开心", url: "taikaixin.gif" },
|
|
|
+ { title: "白眼", url: "baiyan.gif" },
|
|
|
+ { title: "右哼哼", url: "youhengheng.gif" },
|
|
|
+ { title: "左哼哼", url: "zuohengheng.gif" },
|
|
|
+ { title: "嘘", url: "xu.gif" },
|
|
|
+ { title: "衰", url: "shuai.gif" },
|
|
|
+ { title: "吐", url: "tu.gif" },
|
|
|
+ { title: "哈欠", url: "haqian.gif" },
|
|
|
+ { title: "抱抱", url: "baobao.gif" },
|
|
|
+ { title: "怒", url: "nu.gif" },
|
|
|
+ { title: "疑问", url: "yiwen.gif" },
|
|
|
+ { title: "馋嘴", url: "chanzui.gif" },
|
|
|
+ { title: "拜拜", url: "baibai.gif" },
|
|
|
+ { title: "思考", url: "sikao.gif" },
|
|
|
+ { title: "汗", url: "han.gif" },
|
|
|
+ { title: "困", url: "kun.gif" },
|
|
|
+ { title: "睡", url: "shui.gif" },
|
|
|
+ { title: "钱", url: "qian.gif" },
|
|
|
+ { title: "失望", url: "shiwang.gif" },
|
|
|
+ { title: "酷", url: "ku.gif" },
|
|
|
+ { title: "色", url: "se.gif" },
|
|
|
+ { title: "哼", url: "heng.gif" },
|
|
|
+ { title: "鼓掌", url: "guzhang.gif" },
|
|
|
+ { title: "晕", url: "yun.gif" },
|
|
|
+ { title: "悲伤", url: "beishang.gif" },
|
|
|
+ { title: "抓狂", url: "zhuakuang.gif" },
|
|
|
+ { title: "黑线", url: "heixian.gif" },
|
|
|
+ { title: "阴险", url: "yinxian.gif" },
|
|
|
+ { title: "怒骂", url: "numa.gif" },
|
|
|
+ { title: "互粉", url: "hufen.gif" },
|
|
|
+ { title: "书呆子", url: "shudaizi.gif" },
|
|
|
+ { title: "愤怒", url: "fennu.gif" },
|
|
|
+ { title: "感冒", url: "ganmao.gif" },
|
|
|
+ { title: "心", url: "xin.gif" },
|
|
|
+ { title: "伤心", url: "shangxin.gif" },
|
|
|
+ { title: "猪", url: "zhu.gif" },
|
|
|
+ { title: "熊猫", url: "xiongmao.gif" },
|
|
|
+ { title: "兔子", url: "tuzi.gif" },
|
|
|
+ { title: "喔克", url: "ok.gif" },
|
|
|
+ { title: "耶", url: "ye.gif" },
|
|
|
+ { title: "棒棒", url: "good.gif" },
|
|
|
+ { title: "不", url: "no.gif" },
|
|
|
+ { title: "赞", url: "zan.gif" },
|
|
|
+ { title: "来", url: "lai.gif" },
|
|
|
+ { title: "弱", url: "ruo.gif" },
|
|
|
+ { title: "草泥马", url: "caonima.gif" },
|
|
|
+ { title: "神马", url: "shenma.gif" },
|
|
|
+ { title: "囧", url: "jiong.gif" },
|
|
|
+ { title: "浮云", url: "fuyun.gif" },
|
|
|
+ { title: "给力", url: "geili.gif" },
|
|
|
+ { title: "围观", url: "weiguan.gif" },
|
|
|
+ { title: "威武", url: "weiwu.gif" },
|
|
|
+ { title: "话筒", url: "huatong.gif" },
|
|
|
+ { title: "蜡烛", url: "lazhu.gif" },
|
|
|
+ { title: "蛋糕", url: "dangao.gif" },
|
|
|
+ { title: "发红包", url: "fahongbao.gif" },
|
|
|
+ ],
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
@@ -180,6 +276,28 @@
|
|
|
getDetail(e){
|
|
|
this.$emit('getDetail',e)
|
|
|
},
|
|
|
+ analyzeEmoji(cont){
|
|
|
+ //编译表情替换成图片展示出来
|
|
|
+ var pattern1 = /\[[\u4e00-\u9fa5]+\]/g;
|
|
|
+ var pattern2 = /\[[\u4e00-\u9fa5]+\]/;
|
|
|
+ var content = cont.match(pattern1);
|
|
|
+ var str = cont;
|
|
|
+ if (content) {
|
|
|
+ for (var i = 0; i < content.length; i++) {
|
|
|
+ for (var j = 0; j < this.OwOlist.length; j++) {
|
|
|
+ if ("[" + this.OwOlist[j].title + "]" == content[i]) {
|
|
|
+ var src = this.OwOlist[j].url;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var s = require("./img/face/" + src);
|
|
|
+ var imoj = "<img src='" + s + "'/>";
|
|
|
+
|
|
|
+ str = str.replace(pattern2, imoj);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return str;
|
|
|
+ },
|
|
|
getZhanFn(ite,idx){
|
|
|
var obj={
|
|
|
ite:ite,
|
|
@@ -198,32 +316,40 @@
|
|
|
}
|
|
|
this.$emit("getDzFn",obj)
|
|
|
},
|
|
|
- getHfFn(ite){
|
|
|
+ getScFn(ite,idx){
|
|
|
+ var obj={
|
|
|
+ ite:ite,
|
|
|
+ idx:idx
|
|
|
+ }
|
|
|
+ this.$emit("getScFn",obj)
|
|
|
+ },
|
|
|
+ getHfFn(type,ite,id){
|
|
|
var cuser=JSON.parse(JSON.stringify(ite.commentUser))
|
|
|
var obj={
|
|
|
- parentId:ite.id,
|
|
|
+ parentId:id,
|
|
|
toUserId:cuser.id,
|
|
|
toNickName:cuser.nickName,
|
|
|
toAvatar:cuser.avatar,
|
|
|
+ type:type||""
|
|
|
}
|
|
|
this.$emit("getHfFn",obj)
|
|
|
},
|
|
|
getShouFn(idx){
|
|
|
this.$emit("getShouFn",idx)
|
|
|
},
|
|
|
- getPreview(idx,arr) {
|
|
|
- var newArr=[];
|
|
|
- arr.forEach(ite=>{
|
|
|
- var ds=this.baseUrl+ite
|
|
|
- newArr.push(ds)
|
|
|
- })
|
|
|
- uni.previewImage({
|
|
|
- urls: newArr,
|
|
|
- current:idx,
|
|
|
- success: function(data) {},
|
|
|
- fail: function(err) {}
|
|
|
- });
|
|
|
- },
|
|
|
+ // getPreview(idx,arr) {
|
|
|
+ // var newArr=[];
|
|
|
+ // arr.forEach(ite=>{
|
|
|
+ // var ds=this.baseUrl+ite
|
|
|
+ // newArr.push(ds)
|
|
|
+ // })
|
|
|
+ // uni.previewImage({
|
|
|
+ // urls: newArr,
|
|
|
+ // current:idx,
|
|
|
+ // success: function(data) {},
|
|
|
+ // fail: function(err) {}
|
|
|
+ // });
|
|
|
+ // },
|
|
|
getDelFn(id){
|
|
|
var that=this;
|
|
|
uni.showModal({
|
|
@@ -307,6 +433,7 @@
|
|
|
image{width: 16rpx;height: 28rpx;}
|
|
|
}
|
|
|
}
|
|
|
+.rimg{width: 16rpx;height: 28rpx;margin: 0 10rpx;flex: 0 0 auto;}
|
|
|
.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;}
|
|
|
//资讯
|
|
|
.newlists{
|
|
@@ -319,13 +446,16 @@
|
|
|
.btns{font-weight: 500;font-size: 22rpx;color: #666666;line-height: 36rpx;min-width: 100rpx;box-sizing: border-box;margin-left: 20rpx;
|
|
|
.imga{width: 24rpx;height: 22rpx;margin-right: 8rpx;}
|
|
|
.imgb{width: 24rpx;height: 18rpx;margin-right: 10rpx;}
|
|
|
+ .imgc{width: 26rpx;height: 26rpx;margin-right: 10rpx;}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
//评论
|
|
|
.pllist{padding-top: 20rpx;margin-bottom: 16rpx;border-bottom: 2rpx solid #DADADA;
|
|
|
.head{width: 40rpx;height: 40rpx;margin-right: 18rpx;flex: 0 0 auto;}
|
|
|
- .plname{font-weight: bold;font-size: 30rpx;color: #161616;}
|
|
|
+ .plname{font-weight: bold;font-size: 30rpx;color: #161616;
|
|
|
+ view{max-width: 50%;}
|
|
|
+ }
|
|
|
.plrbtn{margin-left: 36rpx;
|
|
|
image{width: 26rpx;height: 24rpx;margin-right: 16rpx;
|
|
|
&.imga{width: 26rpx;height: 26rpx;}
|
|
@@ -336,6 +466,7 @@
|
|
|
.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;}
|
|
|
+ image{width: 44rpx;height: 44rpx;}
|
|
|
}
|
|
|
.pllist{
|
|
|
padding-top: 0;border-bottom: none;margin-bottom: 0;
|