shish 4 лет назад
Родитель
Сommit
27f449dfe0
2 измененных файлов с 5 добавлено и 92 удалено
  1. 1 4
      hdApp/src/admin/home/workbench.vue
  2. 4 88
      hdApp/src/mixins/globalMixins.js

+ 1 - 4
hdApp/src/admin/home/workbench.vue

@@ -111,7 +111,6 @@
         </div>
       </template>
     </modal-module>
-    <none-hd :show="AUTHORITY_SHOW" :title="MODEL_TITLE" :btnText="MODEL_BTN_TEXT" @bthClick="toFreeApply_HOME" :authShow="EXPER_AUTH_SHOW" @comfirm="experienceFun"></none-hd>
   </div>
 </template>
 
@@ -124,14 +123,12 @@ import { getDataTimestamp } from "@/utils/common";
 import { getWeixinId } from "@/api/invite/index";
 import { getUser } from "@/utils/auth";
 import { consoleIndex } from "@/api/workbench";
-import noneHd from "@/components/none-hd";
 export default {
   name: "admin-workbench",
   components: {
     ModalModule,
     FabModule,
-    AppAvatarModule,
-    noneHd
+    AppAvatarModule
   },
   data () {
     return {

+ 4 - 88
hdApp/src/mixins/globalMixins.js

@@ -18,7 +18,6 @@ export default {
       AUTHORITY_SHOW: false,
       shopAdminId: null,
       MODEL_TITLE: '',
-      MODEL_BTN_TEXT: '一键开店',
       EXPER_AUTH_SHOW: false
 		}
 	},
@@ -50,99 +49,16 @@ export default {
     }
 	},
 	onShow(){
-		if (isLogin()&&!this.$util.isEmpty(this.getLoginInfo)) {
-			if (this.init) {
-				this.init()
-      }
-    }
-    if (uni.getStorageSync('HOME_REFRESH') == '1') {
-      this.MODEL_TITLE = '已申请'
-      this.MODEL_BTN_TEXT = '查看申请进度'
-      this.AUTHORITY_SHOW = true
-      uni.hideTabBar()
-    }
-    if (uni.getStorageSync('HOME_REFRESH') == '2') {
-      this.MODEL_TITLE = ''
-      this.MODEL_BTN_TEXT = '一键开店'
-      this.AUTHORITY_SHOW = true
-      uni.hideTabBar()
+    if (this.init) {
+      this.init()
     }
 	},
 	methods: {
-    ...mapActions(['setUserShopAll']),
-    toFreeApply_HOME () {
-      let status = ''
-        if (uni.getStorageSync('HOME_STATUS_STROAGE_SHOW') == '0') {
-          this.$util.pageTo({
-            url: "/pagesClient/official/index",
-            query: {
-              ...this.option
-            }
-          });
-        } else {
-          getStaffApi().then(res => {
-            if (res.data.openShop == '2') {
-              status = '2'
-            } else if (res.data.openShop == '3') {
-              status = '3'
-            }
-            this.$util.pageTo({
-              url: '/admin/common/result',
-              query: {
-                status
-              }
-            })
-          }).catch(err => {})
-      }
-    },
-    experienceFun (experienceCode) {
-      if (this.$util.isEmpty(experienceCode)) {
-        this.$msg('请输入体验码')
-        return false
-      }
-      /**姜枫 2021.04.30  小程序审核体验账号**/
-      postWxCode({experienceCode: experienceCode}).then(subRes => {
-        if (this.$util.isEmpty(subRes)) {
-          return false
-        }
-        uni.setStorageSync('token', subRes.data.token)
-        uni.setStorageSync('shopId', subRes.data.admin.currentShopId)
-        getDictionaries({ token: subRes.data.token }).then(res => {
-          if (this.$util.isEmpty(res)) {
-            return false
-          }
-          this.$store.commit('setDictionariesInfo', {
-            ...res.data.dict,
-            ...res.data
-          })
-          this.$store.commit('setMyShopInfo', {
-            ...res.data.shop,
-            ...res.data
-          })
-        })
-        this.$store.commit('setLoginInfo', {
-          ...subRes.data.admin,
-          ...subRes.data
-        })
-        uni.removeStorageSync('HOME_STATUS_STROAGE_SHOW')
-        uni.removeStorageSync('OPEN_SHOP_ID')
-
-        //shish 20210615
-        uni.removeStorageSync('HOME_REFRESH')
-
-        this.AUTHORITY_SHOW = false
-        uni.showTabBar()
-
-        getUser(true)
-        //获取门店信息
-        this.setUserShopAll();
-        uni.switchTab({url:'/admin/home/workbench'})
-      })
-    },
+    ...mapActions(['setUserShopAll'])
 	},
 	mounted() {
 		if (this.mInit) {
 			this.mInit()
 		}
 	}
-}
+}