Browse Source

tabbat切换

devlop
mo-bai 4 years ago
parent
commit
ff208c417d
2 changed files with 4 additions and 2 deletions
  1. 3
      apis/commonApi.js
  2. 3
      pages/login/index.vue

3
apis/commonApi.js

@ -1,6 +1,7 @@
import http from '../utils/http/index.js'
import store from '@/store/index'
import { XAPPID, PAY_URL, enterpriseType } from '@/enums/index.js'
import { changeTabbar } from '@/utils/hook'
let areaCache = null
/**
* 获取省市区街道
@ -42,6 +43,8 @@ function syncStore(res) {
avatar: null
}
store.commit('setUserInfo', userInfo)
// 根据企业类型切换tabbar
changeTabbar(company.enterpriseType)
} else {
let userInfo = {
name: '', // 没有企业就没有name,

3
pages/login/index.vue

@ -42,7 +42,7 @@ import { getAuthCaptcha, loginByPhone, getQnToken } from '@/apis/loginApi'
import { getBaseInfo, pushCustomerBind } from '@/apis/commonApi'
import { accountType, verificationType, codePurpose, enterpriseType } from '@/enums/index.js'
import store from '@/store/index.js'
import { go2, back, changeTabbar } from '@/utils/hook.js'
import { go2, back } from '@/utils/hook.js'
import { validateField } from '@/utils/index.js'
export default {
data() {
@ -166,7 +166,6 @@ export default {
if (type == enterpriseType.PERSONAL) {
page.url = 'mall'
}
changeTabbar(type)
go2(page.url, page.data, page.isRedirect)
}
}

Loading…
Cancel
Save