|
|
@@ -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()
|
|
|
}
|
|
|
}
|
|
|
-}
|
|
|
+}
|