fix(我的关注): 显示登录按钮
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view :style="themeColor">
|
<view :style="themeColor">
|
||||||
<mescroll-uni ref="mescroll" @getData="getData" class="member-point" :size="8" @listenRefresh="listenRefresh"
|
<mescroll-uni ref="mescroll" @getData="getData" class="member-point" :size="8" @listenRefresh="listenRefresh">
|
||||||
v-if="storeToken">
|
|
||||||
<view class="goods_list" slot="list">
|
<view class="goods_list" slot="list">
|
||||||
<block v-if="collectionList.length > 0">
|
<block v-if="collectionList.length > 0">
|
||||||
<view class="goods_li margin-top" v-for="(item, index) in collectionList" :key="index"
|
<view class="goods_li margin-top" v-for="(item, index) in collectionList" :key="index"
|
||||||
@@ -30,7 +29,13 @@
|
|||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<!-- 第一个列表为空时 -->
|
<!-- 第一个列表为空时 -->
|
||||||
<ns-empty v-if="collectionList.length == 0 && isShowEmpty" text="暂无关注的商品" :isIndex="false"></ns-empty>
|
<view class="collection-empty">
|
||||||
|
<ns-empty v-if="collectionList.length == 0 && isShowEmpty" text="暂无关注的商品"
|
||||||
|
:isIndex="Boolean(storeToken)"></ns-empty>
|
||||||
|
<button type="primary" size="mini" class="button mini" v-if="!storeToken"
|
||||||
|
@click="toLogin">去登录</button>
|
||||||
|
</view>
|
||||||
|
|
||||||
<ns-goods-recommend ref="goodsRecommend"></ns-goods-recommend>
|
<ns-goods-recommend ref="goodsRecommend"></ns-goods-recommend>
|
||||||
</view>
|
</view>
|
||||||
</mescroll-uni>
|
</mescroll-uni>
|
||||||
@@ -53,8 +58,12 @@ export default {
|
|||||||
if (this.$refs.mescroll) this.$refs.mescroll.refresh();
|
if (this.$refs.mescroll) this.$refs.mescroll.refresh();
|
||||||
} else {
|
} else {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.login.open('/pages_tool/member/collection');
|
this.isShowEmpty = true;
|
||||||
|
this.$refs.loadingCover.hide();
|
||||||
});
|
});
|
||||||
|
// this.$nextTick(() => {
|
||||||
|
// if (this.$refs.login) this.$refs.login.open();
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|||||||
@@ -99,3 +99,24 @@
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
margin-top: 50rpx;
|
margin-top: 50rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.collection-empty {
|
||||||
|
text-align: center;
|
||||||
|
padding: 140rpx $padding 80rpx $padding;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 380rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
min-width: 300rpx;
|
||||||
|
margin-top: 100rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
line-height: 70rpx !important;
|
||||||
|
font-size: $font-size-base;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
&.visit-the {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export default {
|
|||||||
},
|
},
|
||||||
async: false,
|
async: false,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
let newArr = res.data.list;
|
let newArr = res.data?.list || [];
|
||||||
for (var i = 0; i < newArr.length; i++) {
|
for (var i = 0; i < newArr.length; i++) {
|
||||||
newArr[i].composite_score = Math.floor((parseFloat(newArr[i].shop_desccredit) + parseFloat(newArr[i].shop_servicecredit) + parseFloat(newArr[i].shop_deliverycredit)) / 3).toFixed(1);
|
newArr[i].composite_score = Math.floor((parseFloat(newArr[i].shop_desccredit) + parseFloat(newArr[i].shop_servicecredit) + parseFloat(newArr[i].shop_deliverycredit)) / 3).toFixed(1);
|
||||||
}
|
}
|
||||||
@@ -75,6 +75,9 @@ export default {
|
|||||||
goodsImageError(index) {
|
goodsImageError(index) {
|
||||||
this.collectionList[index].sku_image = this.$util.getDefaultImage().goods;
|
this.collectionList[index].sku_image = this.$util.getDefaultImage().goods;
|
||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
}
|
},
|
||||||
|
toLogin() {
|
||||||
|
this.$refs.login.open();
|
||||||
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user