|
|
@@ -136,7 +136,7 @@
|
|
|
</text>
|
|
|
<!-- <view class="txt">券</view> -->
|
|
|
</view>
|
|
|
- <template v-if="item?.merchant?.id &&(!appStore.userInfo || (appStore.userInfo && !appStore.merchantId))">
|
|
|
+ <template v-if="item?.merchant?.id && merchantNameShow()">
|
|
|
<view class="merchantInfo" @click.stop="toMerchant(item.merchant.id)">
|
|
|
<image class="merchantLogo" :src="item.merchant.merchantLogo" mode="scaleToFill"></image>
|
|
|
<text class="merchantName">{{item.merchant.merchantName}}</text>
|
|
|
@@ -273,16 +273,16 @@ onLoad(async (options) => {
|
|
|
merchantId.value = '';
|
|
|
}
|
|
|
|
|
|
- // 3. 根据商户ID获取不同数据
|
|
|
await initPageData();
|
|
|
});
|
|
|
-onShow(() => {
|
|
|
+onShow(async () => {
|
|
|
const isLogin = appStore.isLogin;
|
|
|
if(isLogin){
|
|
|
rightsStore.getUserBenefits(appStore.userInfo?.userId);
|
|
|
getUserBenefits();
|
|
|
}
|
|
|
-
|
|
|
+ goodScroll.value = true;
|
|
|
+ await initPageData();
|
|
|
uni.setNavigationBarTitle({ title: site_name.value });
|
|
|
|
|
|
});
|
|
|
@@ -299,7 +299,6 @@ const initPageData = async () => {
|
|
|
} else {
|
|
|
promises.push(getIndexConfig());
|
|
|
}
|
|
|
-
|
|
|
promises.push(getGroomList());
|
|
|
promises.push(getAllCategory());
|
|
|
|
|
|
@@ -463,7 +462,9 @@ const isNoDataState = computed(() => {
|
|
|
|
|
|
// Product Lists
|
|
|
const getGroomList = async () => {
|
|
|
+ console.log('111111111111111')
|
|
|
if (!goodScroll.value) return;
|
|
|
+ console.log('=====================++++++')
|
|
|
try {
|
|
|
loading.value = true;
|
|
|
merchantId.value!='' ? params.value.merchantId = merchantId.value:'';
|
|
|
@@ -508,6 +509,13 @@ const toGoodsCate = (item) => {
|
|
|
uni.setStorageSync('goods_cate', { id: item.id }); // 存储参数
|
|
|
uni.switchTab({url:`/pages/goods_cate/goods_cate`})
|
|
|
}
|
|
|
+const merchantNameShow = () => {
|
|
|
+ if(!appStore.userInfo ||((appStore.userInfo && !appStore.userInfo.merchant && !appStore.merchantId))){
|
|
|
+ return true;
|
|
|
+ }else{
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style>
|