Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-community-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
TaoHuang
6 years ago
Commit
aeba459cd90f5edcd28cdc702f231df194ffcf5d
1 parent
42f07e4b
fix
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
27 additions
and
21 deletions
apps/components/widgets/widget-follow.vue
apps/pages/article/article-detail-share.vue
apps/pages/article/article-detail.vue
apps/pages/article/components/article/article-item-intro.vue
apps/pages/article/components/detail/article-header.vue
apps/pages/article/components/detail/comment-list.vue
apps/pages/userpage/components/user-list.vue
apps/utils/share-handler.js
package.json
apps/components/widgets/widget-follow.vue
View file @
aeba459
...
...
@@ -31,7 +31,7 @@ export default {
},
watch: {
follow(val) {
this.followStatus = val;
this.followStatus = val
=== 'Y' || val === 'O'
;
}
},
computed: {
...
...
apps/pages/article/article-detail-share.vue
View file @
aeba459
...
...
@@ -20,7 +20,7 @@ export default {
return;
}
let shareData = getDetailShareData(article);
let shareData = getDetailShareData(article
, this.$yoho.appVersion
);
document && (document.title = shareData.title);
...
...
apps/pages/article/article-detail.vue
View file @
aeba459
...
...
@@ -383,7 +383,7 @@ export default {
return;
}
Share.setShareInfo(getDetailShareData(article));
Share.setShareInfo(getDetailShareData(article
, this.$yoho.appVersion
));
},
reportArticleShow(items) {
if (!items || !items.length) {
...
...
apps/pages/article/components/article/article-item-intro.vue
View file @
aeba459
...
...
@@ -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) {
...
...
apps/pages/article/components/detail/article-header.vue
View file @
aeba459
...
...
@@ -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]}`);
...
...
apps/pages/article/components/detail/comment-list.vue
View file @
aeba459
...
...
@@ -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>
...
...
apps/pages/userpage/components/user-list.vue
View file @
aeba459
...
...
@@ -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;
}
...
...
apps/utils/share-handler.js
View file @
aeba459
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
=
''
;
...
...
package.json
View file @
aeba459
{
"name"
:
"yoho-community-web"
,
"version"
:
"6.9.11-beta
3
"
,
"version"
:
"6.9.11-beta
4
"
,
"private"
:
true
,
"description"
:
"A New Yohobuy Project With Express"
,
"repository"
:
{
...
...
Please
register
or
login
to post a comment