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 http from '../utils/http/index.js'
import store from '@/store/index' import store from '@/store/index'
import { XAPPID, PAY_URL, enterpriseType } from '@/enums/index.js' import { XAPPID, PAY_URL, enterpriseType } from '@/enums/index.js'
import { changeTabbar } from '@/utils/hook'
let areaCache = null let areaCache = null
/** /**
* 获取省市区街道 * 获取省市区街道
@ -42,6 +43,8 @@ function syncStore(res) {
avatar: null avatar: null
} }
store.commit('setUserInfo', userInfo) store.commit('setUserInfo', userInfo)
// 根据企业类型切换tabbar
changeTabbar(company.enterpriseType)
} else { } else {
let userInfo = { let userInfo = {
name: '', // 没有企业就没有name, 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 { getBaseInfo, pushCustomerBind } from '@/apis/commonApi'
import { accountType, verificationType, codePurpose, enterpriseType } from '@/enums/index.js' import { accountType, verificationType, codePurpose, enterpriseType } from '@/enums/index.js'
import store from '@/store/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' import { validateField } from '@/utils/index.js'
export default { export default {
data() { data() {
@ -166,7 +166,6 @@ export default {
if (type == enterpriseType.PERSONAL) { if (type == enterpriseType.PERSONAL) {
page.url = 'mall' page.url = 'mall'
} }
changeTabbar(type)
go2(page.url, page.data, page.isRedirect) go2(page.url, page.data, page.isRedirect)
} }
} }

Loading…
Cancel
Save