fix(关注/足迹): 优化交互逻辑

This commit is contained in:
2026-01-07 11:35:28 +08:00
parent d1b9e528f8
commit 8df59abd03
11 changed files with 111 additions and 31 deletions

View File

@@ -1,8 +1,7 @@
<template>
<view :style="themeColor">
<mescroll-uni ref="mescroll" @getData="getData" class="member-point" :size="8" @listenRefresh="listenRefresh"
v-if="storeToken">
<view class="goods_list" slot="list">
<mescroll-uni ref="mescroll" @getData="getData" class="member-point" :size="8" @listenRefresh="listenRefresh">
<block class="goods_list" slot="list">
<block v-if="collectionList.length > 0">
<view class="goods_li margin-top" v-for="(item, index) in collectionList" :key="index"
@click.stop="toDetail(item)">
@@ -30,9 +29,15 @@
</view>
</block>
<!-- 第一个列表为空时 -->
<ns-empty v-if="collectionList.length == 0 && isShowEmpty" text="暂无关注的商品" :isIndex="false"></ns-empty>
<view class="collection-empty" v-else>
<ns-empty v-if="collectionList.length == 0 && isShowEmpty" text="暂无关注的商品"
:isIndex="Boolean(storeToken)" :emptyBtn="{ text: $lang('toGoodsCategoryPage'), url: '/pages_goods/category' }"></ns-empty>
<button type="primary" size="mini" class="button mini" v-if="!storeToken"
@click="toLogin">{{ $lang('toLogin') }}</button>
</view>
<ns-goods-recommend ref="goodsRecommend"></ns-goods-recommend>
</view>
</block>
</mescroll-uni>
<ns-login ref="login"></ns-login>
<loading-cover ref="loadingCover"></loading-cover>
@@ -40,11 +45,11 @@
</template>
<script>
import common from './public/js/common.js';
import collection from './public/js/collection.js';
export default {
mixins: [collection],
mixins: [common, collection],
data() {
return {};
},
@@ -53,7 +58,7 @@ export default {
if (this.$refs.mescroll) this.$refs.mescroll.refresh();
} else {
this.$nextTick(() => {
this.$refs.login.open('/pages_tool/member/collection');
this.$refs.loadingCover.hide();
});
}
},