tijiao
This commit is contained in:
@@ -294,8 +294,7 @@
|
||||
:user="currentUser"
|
||||
ref="hbComment"
|
||||
@add="sendComment"
|
||||
@del="del"
|
||||
@focusOn="focusOn"
|
||||
|
||||
:deleteTip="'确认删除?'"
|
||||
:cmData="commentData"
|
||||
v-if="commentData"
|
||||
@@ -408,8 +407,7 @@
|
||||
:user="currentUser"
|
||||
ref="hbComment"
|
||||
@add="sendComment"
|
||||
@del="del"
|
||||
@focusOn="focusOn"
|
||||
|
||||
:deleteTip="'确认删除?'"
|
||||
:cmData="commentData"
|
||||
v-if="commentData"
|
||||
@@ -1120,12 +1118,13 @@ export default {
|
||||
.then((res) => {
|
||||
console.log("res at line 713:", res);
|
||||
if (res.code == 0) {
|
||||
this.getMedicalDetail();
|
||||
if(pid==0){
|
||||
setTimeout(() => {
|
||||
this.scrollToView("commentData");
|
||||
}, 500);
|
||||
}, 100);
|
||||
}
|
||||
this.getMedicalDetail();
|
||||
|
||||
|
||||
|
||||
// this.scrollToComment();
|
||||
|
||||
@@ -34,8 +34,7 @@
|
||||
:articleUserId="articleInfo.userId"
|
||||
ref="hbComment"
|
||||
@add="sendComment"
|
||||
@del="del"
|
||||
@focusOn="focusOn"
|
||||
|
||||
:deleteTip="'确认删除?'"
|
||||
:cmData="commentData"
|
||||
v-if="commentData"
|
||||
@@ -176,12 +175,14 @@ export default {
|
||||
.then((res) => {
|
||||
console.log("res at line 713:", res);
|
||||
if (res.code == 0) {
|
||||
this.getMedicalDetail();
|
||||
if (pid == 0) {
|
||||
if(pid==0){
|
||||
setTimeout(() => {
|
||||
this.scrollToView("commentData");
|
||||
}, 500);
|
||||
}, 100);
|
||||
}
|
||||
this.getMedicalDetail();
|
||||
|
||||
|
||||
} else {
|
||||
this.$commonJS.showToast("评论失败");
|
||||
}
|
||||
|
||||
@@ -232,6 +232,24 @@
|
||||
<uni-popup ref="share" type="share" safeArea backgroundColor="#fff">
|
||||
<uni-popup-share @select="haveSelected"></uni-popup-share>
|
||||
</uni-popup>
|
||||
<uni-popup ref="customModal2" type="dialog" backgroundColor="#fff" round="8" >
|
||||
<view class="my-modal" style="width: 80vw;border-radius: 20px;padding: 20px;">
|
||||
<view class="my-modal__hd" style="font-size: 36rpx;font-weight: 700;margin-bottom: 10rpx;">消息提醒</view>
|
||||
<view style="margin-bottom: 20rpx;font-size: 26rpx;color: #5188e5;">您的文章有人点赞评论啦,请注意查看。</view>
|
||||
<view class="my-modal__bd">
|
||||
<view class="multi-line-text">
|
||||
<view style=" display: block;" v-for="(item, index) in sysNotices_list" :key="index">
|
||||
|
||||
<view v-if="item&&item.title" class="hidden1" @click="readArticle(item)" style="text-wrap: wrap;white-space: pre-wrap;width: 100%;
|
||||
word-wrap: break-word;">{{index+1}}.{{ item.title }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="my-modal__ft" style="margin-top: 10rpx;">
|
||||
<button @click="confirm2" style="font-size: 28rpx;color: #bbb;">知道了</button>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -245,6 +263,7 @@ import commonLikeList from "../articleList/likeList.vue";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
sysNotices_list:[],
|
||||
shareId: null,
|
||||
activeTab: 0,
|
||||
tabsList: [],
|
||||
@@ -303,11 +322,62 @@ export default {
|
||||
}, 800);
|
||||
},
|
||||
onLoad() {
|
||||
this.getSysNotices()
|
||||
uni.hideTabBar();
|
||||
this.getTabData();
|
||||
},
|
||||
onShow() {},
|
||||
methods: {
|
||||
confirm2(){
|
||||
this.$refs.customModal2.close();
|
||||
this.sysNotices_list.forEach(e=>{
|
||||
if(e&&e.id){
|
||||
this.readSysNotice(e.id);
|
||||
}
|
||||
})
|
||||
// this.readSysNotice();
|
||||
},
|
||||
readArticle(item){
|
||||
this.readSysNotice(item.id)
|
||||
|
||||
uni.navigateTo({
|
||||
url: `/pages/articleList/article?navTitle=文章详情&title=文章详情&id=${item.id}&type=detail&statusId=${item.showFlag}`,
|
||||
});
|
||||
this.$refs.customModal2.close();
|
||||
},
|
||||
//已读记录
|
||||
async readSysNotice(id) {
|
||||
await $http
|
||||
.request({
|
||||
url: "common/taihuTalentArticle/setReadFlag",
|
||||
method: "POST",
|
||||
data: { articleId: id},
|
||||
header: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then(async (res) => {
|
||||
|
||||
});
|
||||
},
|
||||
async getSysNotices() {
|
||||
await $http
|
||||
.request({
|
||||
url: "common/taihuTalentArticle/getCommentRemind",
|
||||
method: "POST",
|
||||
data: { },
|
||||
header: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then(async (res) => {
|
||||
if(res.set&&res.set.length>0){
|
||||
this.sysNotices_list = res.set;
|
||||
// this.idString = res.set.map(item => item.id).join(', ');
|
||||
this.$refs.customModal2.open();
|
||||
}
|
||||
});
|
||||
},
|
||||
refreshData(reset) {
|
||||
if (reset) {
|
||||
this.currentCateIndex = 0;
|
||||
@@ -873,4 +943,10 @@ export default {
|
||||
max-height: 48px;
|
||||
height: auto;
|
||||
}
|
||||
.hidden1 {
|
||||
line-height: 24px;
|
||||
max-height: 24px;
|
||||
height: auto;
|
||||
-webkit-line-clamp: 1;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user