Authored by yyq

fix

... ... @@ -615,6 +615,18 @@ const yoho = {
} else {
// tip(tipInfo);
}
},
// 跳转个人信息页
goMineInfo(args, success, fail) {
if (this.isYohoBuy && window.yohoInterface) {
window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, {
method: 'go.mineinfo',
arguments: args
});
} else {
// tip(tipInfo);
}
}
};
... ...
... ... @@ -7,7 +7,7 @@
<div class="flex">
<WidgetAvatar v-if="baseData.headIco" class="h-headico" :src="baseData.headIco" :width="100" :height="100"></WidgetAvatar>
</div>
<div class="h-follow flex">
<div v-if="!isOwner" class="h-follow flex">
<WidgetFollow class="widget-follow" :author-uid="autherInfo.authorUid" :follow="isAttention" @on-follow="follow => onFollow(follow)"></WidgetFollow>
</div>
</div>
... ... @@ -44,7 +44,7 @@
</li>
</ul>
<div class="operate-wrap">
<label v-if="isOwner" class="operate-btn btn-user-edit">编辑个人资料</label>
<label v-if="isOwner" class="operate-btn btn-user-edit" @click="goUserInfoEdit">编辑个人资料</label>
<WidgetFollow v-else class="operate-btn" :author-uid="autherInfo.authorUid" :follow="isAttention" @on-follow="follow => onFollow(follow)"></WidgetFollow>
</div>
</div>
... ... @@ -89,7 +89,7 @@
baseData: {},
isAttention: false,
isOwner: false,
tabsNum: [10, 0],
tabsNum: [0, 0],
activeIndex: 0,
fetchInfo: {},
loadStatus: ''
... ... @@ -224,10 +224,14 @@
}
if (result.code === 200) {
info.list = (info.list || []).concat(result.data.list);
info.list = (info.list || []).concat(result.data.list || []);
info.page++;
info.totalPage = result.data.totalPage;
info.lastedTime = result.data.lastedTime;
if (info.list.length) {
info.list[0]._type = `${info.list[0].articleId}_${this.activeIndex}`;
}
}
if (info.page > info.totalPage) {
... ... @@ -240,6 +244,11 @@
this.fetchInfo = {...this.fetchInfo};
},
goUserInfoEdit() {
if (this.$yoho.isYohoBuy) {
this.$yoho.goMineInfo();
}
},
onFollow(follow) {
this.isAttention = follow;
}
... ...
... ... @@ -93,7 +93,7 @@ export default {
},
list(newList, oldList) {
if (oldList.length > newList.length ||
get(oldList, '[0].articleId') !== get(newList, '[0].articleId')) {
get(oldList, '[0]._type') !== get(newList, '[0]._type')) {
this.reset();
}
... ...