|
|
@@ -25,13 +25,20 @@
|
|
|
<i class="iconfont icon-xiangyou"></i>
|
|
|
<span class="l-right">{{currentEnName}}</span>
|
|
|
</div>
|
|
|
- <div class="line" @click="go('/mobile/user/storeinfo')">
|
|
|
+ <div class="line" @click="go('/mobile/user/storeinfo')" v-if="storeStatus.uuid">
|
|
|
<div class="img-wrap">
|
|
|
<img src="/images/mobile/user/icon_02.png" alt="">
|
|
|
</div>
|
|
|
<span>店铺信息</span>
|
|
|
<i class="iconfont icon-xiangyou"></i>
|
|
|
</div>
|
|
|
+ <div class="line" @click="go('/mobile/user/storeinfo')" v-else>
|
|
|
+ <div class="img-wrap">
|
|
|
+ <img src="/images/mobile/user/apply-store.png" alt="">
|
|
|
+ </div>
|
|
|
+ <span>开店申请</span>
|
|
|
+ <i class="iconfont icon-xiangyou"></i>
|
|
|
+ </div>
|
|
|
<div class="line block-line" @click="go('/mobile/user/enterpriseinfo')">
|
|
|
<div class="img-wrap">
|
|
|
<img src="/images/mobile/user/icon_03.png" alt="">
|
|
|
@@ -108,11 +115,22 @@
|
|
|
components: {
|
|
|
RemindBox
|
|
|
},
|
|
|
+ fetch ({store}) {
|
|
|
+ return Promise.all([
|
|
|
+ store.dispatch('loadStoreStatus', {op: 'check'})
|
|
|
+ ])
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ storeStatus () {
|
|
|
+ return this.$store.state.option.storeStatus.data
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
switchEnterprise(en) {
|
|
|
this.$http.get(`/user/authentication/${en.uu || 0}`).then(() => {
|
|
|
this.$store.dispatch('loadUserInfo').then(() => {
|
|
|
this.showLogin = false
|
|
|
+ this.$store.dispatch('loadStoreStatus', {op: 'check'})
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
@@ -130,16 +148,11 @@
|
|
|
},
|
|
|
go: function (url) {
|
|
|
if (url === '/mobile/user/storeinfo') {
|
|
|
- this.$http.get('/store-service/stores', {params: {op: 'check'}}).then(res => {
|
|
|
- if (res.data.uuid) {
|
|
|
- this.$router.push(url)
|
|
|
- } else {
|
|
|
- this.setRemindText('请先前往pc端申请开店')
|
|
|
- }
|
|
|
- }, err => {
|
|
|
- console.log(err)
|
|
|
+ if (this.storeStatus.uuid) {
|
|
|
+ this.$router.push(url)
|
|
|
+ } else {
|
|
|
this.setRemindText('请先前往pc端申请开店')
|
|
|
- })
|
|
|
+ }
|
|
|
} else if (!this.user.data.enterprise.uu || this.user.data.enterprise.isVendor !== 313) {
|
|
|
this.setRemindText('请先前往pc端完善企业信息')
|
|
|
} else {
|