shish 4 месяцев назад
Родитель
Сommit
ca359e8f58
2 измененных файлов с 8 добавлено и 52 удалено
  1. 6 38
      hdApp/src/admin/home/mall.vue
  2. 2 14
      hdApp/src/admin/home/workbench.vue

+ 6 - 38
hdApp/src/admin/home/mall.vue

@@ -1,17 +1,5 @@
 <template>
 <view>
-  <block v-if="loginStyle  == 0">
-    <view style="width:100vw;text-align: center;">
-      <!-- #ifdef MP-WEIXIN -->
-      <view style="margin-top:50upx;font-size:34upx;margin-bottom:30upx;">个人买花</view>
-      <view><button class="admin-button-com big blue" style="width:240upx;" @click="buyItem">去买花</button></view>
-	    <!-- #endif -->
-      <view style="margin-top:100upx;font-size:34upx;margin-bottom:30upx;">花店登录</view>
-      <view><button class="admin-button-com big blue" style="width:240upx;" @click="pageTo({url:'/admin/home/login'})">去登录</button></view>
-      <view style="font-size:40upx;color:green;text-decoration: underline;margin-top:60upx;" @click="pageTo({url:'/pagesClient/official/apply'})">花店注册</view>
-    </view>
-  </block>
-  <block v-else>
     <view class="app-main app-content">
       <template v-if="lookMoney == 1">
         <view class="today-overview-card">
@@ -250,7 +238,7 @@
       </template>
 
     </view>
-  </block>
+  
 
   <uni-popup ref="mallOptionsPopup" type="center" mask-background-color="rgba(0,0,0,0.4)">
     <view class="mall-options-container">
@@ -267,7 +255,8 @@
     </view>
   </uni-popup>
 
-  <custom-tab-bar v-if="loginStyle == 2" :current="2" />
+  <custom-tab-bar :current="2" />
+
 </view>
 </template>
 <script>
@@ -322,9 +311,7 @@ export default {
 		//只需要采购花材的花店不显示底部菜单
 		loginInfo(newVal) {
       if(!this.$util.isEmpty(newVal.admin) && newVal.admin.currentShopId > 0){
-          if(!this.$util.isEmpty(newVal.onlyCg)){
-            this.handleLoginStyle(newVal.onlyCg)
-          }
+        this.getMallData()  
       }
 		}
 	},
@@ -345,21 +332,13 @@ export default {
 
       // 判断是否登录
       if(!this.$util.isEmpty(this.loginInfo.admin) && this.loginInfo.admin.currentShopId > 0){
-          if(!this.$util.isEmpty(this.loginInfo.onlyCg)){
-            this.handleLoginStyle(this.loginInfo.onlyCg)
-          }
-
+          this.getMallData()
           // this.getUnReadMsgCount()
           this.showShopName()
       }
   },
 	onShareAppMessage(res) {
-		return {
-			title: "花掌柜,花店管家婆",
-			desc: "",
-			imageUrl: "",
-			path: "admin/home/workbench",
-		}
+		return { title: "花掌柜,花店管家婆", desc: "", imageUrl: "", path: "admin/home/mall" }
 	},
   methods: {
     onChooseAvatar(e){
@@ -460,17 +439,6 @@ export default {
       this.showShopName()
       this.getUnReadMsgCount()
     },
-    handleLoginStyle(onlyCg){
-      if(Number(onlyCg) == 1){
-        this.loginStyle  = 1
-        uni.hideTabBar({fail:()=>{}})
-        this.toRemindCustom()
-      }else{
-        this.loginStyle  = 2
-        uni.hideTabBar({fail:()=>{}})
-        this.getMallData()
-      }
-    },
     getMallData(){
       getShortUrl().then(res=>{
         if(res.code == 1){

+ 2 - 14
hdApp/src/admin/home/workbench.vue

@@ -236,7 +236,7 @@
       </view>
     </uni-popup>
   
-    <custom-tab-bar v-if="loginStyle == 2" :current="0" />
+    <custom-tab-bar :current="0" />
   </view>
   </template>
   <script>
@@ -323,12 +323,7 @@
         }
     },
     onShareAppMessage(res) {
-      return {
-        title: "花掌柜,花店管家婆",
-        desc: "",
-        imageUrl: "",
-        path: "admin/home/workbench",
-      }
+      return { title: "花掌柜,花店管家婆", desc: "", imageUrl: "", path: "admin/home/mall" }
     },
     methods: {
       onChooseAvatar(e){
@@ -430,15 +425,8 @@
         this.getUnReadMsgCount()
       },
       handleLoginStyle(onlyCg){
-        if(Number(onlyCg) == 1){
           this.loginStyle  = 1
-          uni.hideTabBar({fail:()=>{}})
           this.toRemindCustom()
-        }else{
-          this.loginStyle  = 2
-          uni.hideTabBar({fail:()=>{}})
-          this.getMallData()
-        }
       },
       getMallData(){
         getShortUrl().then(res=>{