shish il y a 3 ans
Parent
commit
6cad8cd485
2 fichiers modifiés avec 32 ajouts et 3 suppressions
  1. 1 1
      hdApp/src/admin/cg/mall.vue
  2. 31 2
      mallApp/src/pages/home/recent.vue

+ 1 - 1
hdApp/src/admin/cg/mall.vue

@@ -14,7 +14,7 @@
     <view class="img_box">
       <image :src="flowerImgUrl" class="img_url"></image>
     </view>
-    <view style="margin:0 auto;width:50vw;font-size:30upx;font-weight:bold;text-align:center;">花</view>
+    <view style="margin:0 auto;width:50vw;font-size:30upx;font-weight:bold;text-align:center;">花</view>
     <div class="confirm-btn">
       <button class="admin-button-com big blue" style="width:50vw;" @click="downloadImg(flowerImgUrl)">保存图片</button>
     </div>

+ 31 - 2
mallApp/src/pages/home/recent.vue

@@ -2,6 +2,14 @@
   <view class="latest-content_box">
     <view class="shop-list_box" v-if="showGlInfo == 0">
 
+  <block v-if="loginStyle  == 0">
+    <view style="width:100vw;height:500upx;display:flex;align-items:center;justify-content:center;">
+      <button class="admin-button-com big blue" @click="pageTo({url:'/pages/login/index'})">点我登录</button>
+    </view>
+  </block>
+  <block v-else>
+
+
       <view class="ghs_list_page flex-col" v-if="!$util.isEmpty(list)">
         <view class="ghs_list_area flex-col justify-end">
 
@@ -30,6 +38,9 @@
       <view v-else>
         <text style="margin-top:30upx;margin-left:30upx;">暂无花店</text>
       </view>
+
+  </block>
+
     </view>
     <view class="app-main app-content" v-else>
     <app-swiper :list="ad" />
@@ -85,11 +96,29 @@ export default {
     return {
       list: [],
       showGlInfo: 0,
-      ad:[{"img":`${this.$constant.imgUrl}/logo2.jpg?v=5`}]
+      ad:[{"img":`${this.$constant.imgUrl}/logo2.jpg?v=5`}],
+      //0没有登录 1有登录
+      loginStyle :0
     };
   },
   computed: {
-    ...mapGetters({ userInfo: "getUser" })
+    ...mapGetters({ userInfo: "getUser",loginInfo:"getLoginInfo" })
+  },
+	watch: {
+		loginInfo(newVal) {
+      if(!this.$util.isEmpty(newVal)){
+        this.loginStyle = 1
+      }else{
+        this.loginStyle = 0
+      }
+		}
+	},
+  onShow () {
+      if(!this.$util.isEmpty(this.loginInfo)){
+        this.loginStyle = 1
+      }else{
+        this.loginStyle = 0
+      }
   },
   onLoad () {
   },