Authored by TaoHuang

fix

... ... @@ -31,7 +31,7 @@ export default {
},
watch: {
follow(val) {
this.followStatus = val;
this.followStatus = val === 'Y' || val === 'O';
}
},
computed: {
... ...
... ... @@ -20,7 +20,7 @@ export default {
return;
}
let shareData = getDetailShareData(article);
let shareData = getDetailShareData(article, this.$yoho.appVersion);
document && (document.title = shareData.title);
... ...
... ... @@ -383,7 +383,7 @@ export default {
return;
}
Share.setShareInfo(getDetailShareData(article));
Share.setShareInfo(getDetailShareData(article, this.$yoho.appVersion));
},
reportArticleShow(items) {
if (!items || !items.length) {
... ...
... ... @@ -173,7 +173,7 @@ export default {
this.reportLabel(topicId);
},
onShare() {
this.$yoho.share(getDetailShareData(this.data));
this.$yoho.share(getDetailShareData(this.data, this.$yoho.appVersion));
},
onExpanding() {
if (this.data.articleType === 2) {
... ...
... ... @@ -86,7 +86,7 @@ export default {
}
},
onShare() {
const share = getDetailShareData(this.data);
const share = getDetailShareData(this.data, this.$yoho.appVersion);
keys(this.data.atUserInfo).forEach(k => {
share.desc = share.desc.replace(new RegExp(`@${k}#`, 'gm'), `${this.data.atUserInfo[k]}`);
... ...
... ... @@ -132,7 +132,9 @@ export default {
this.onFetching = false;
}, this.page > 1 ? 800 : 0);
},
onReply({ comment }) {
async onReply({ comment }) {
const uid = (await this.$sdk.getUser()).uid;
forEach(this.commentList, (val) => {
if (val.parentComment && +val.parentComment.id === +comment.rootId) {
val.childrenComments.unshift(Object.assign(comment, {
... ... @@ -140,7 +142,10 @@ export default {
destId: this.articleId,
headIco: this.yoho.context.userHeadIco,
userName: this.yoho.context.userName,
parentUserName: get(find(val.childrenComments, { id: +comment.parentId }), 'userName', '')
uid,
parentUserName: +val.parentComment.id === +comment.parentId ?
val.parentComment.userName :
get(find(val.childrenComments, { id: +comment.parentId }), 'userName', '')
}));
}
});
... ... @@ -164,7 +169,7 @@ export default {
break;
}
const childrenIndex = findIndex(val.childrenComments, {id: +commentId});
const childrenIndex = findIndex(val.childrenComments, { id: +commentId });
if ((+index !== -1) && (childrenIndex !== -1)) {
this.commentList[index].childrenComments.splice(childrenIndex, 1);
... ... @@ -206,11 +211,12 @@ export default {
align-items: center;
justify-content: center;
.loading-wrap {
display: flex;
align-items: center;
justify-content: center;
color: #999;
}
.loading-wrap {
display: flex;
align-items: center;
justify-content: center;
color: #999;
}
}
</style>
... ...
... ... @@ -132,7 +132,11 @@ export default {
if (this.type === 'fans') {
// 粉丝是已关注的列表,你关注他,就变成互相关注
this.list[index].isAttention = 'O';
if (follow === 'Y') {
this.list[index].isAttention = 'O';
} else {
this.list[index].isAttention = follow;
}
} else {
this.list[index].isAttention = follow;
}
... ...
import {get, first} from 'lodash';
const qs = require('yoho-qs');
const cookie = require('yoho-cookie');
let app_version = cookie.get('app_version') || qs.app_version || '';
function _version2num(version) {
if (!version) {
... ... @@ -40,7 +36,7 @@ function handleProtocol(url) {
return url.join('//');
}
const getDetailShareData = (article) => {
const getDetailShareData = (article, app_version = '6.9.11') => {
let shareImage = '';
let desc = '';
... ...
{
"name": "yoho-community-web",
"version": "6.9.11-beta3",
"version": "6.9.11-beta4",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ...