Commit c5f18317 authored by wangxl's avatar wangxl

22

parent 4f6354fd
...@@ -293,7 +293,7 @@ export function changeProjType (type) { ...@@ -293,7 +293,7 @@ export function changeProjType (type) {
new Promise(async (resolve, reject) => { new Promise(async (resolve, reject) => {
try { try {
this.$store.commit('app/clearStore') this.$store.commit('app/clearStore')
setType(type + '') setType(type)
this.$store.commit('app/setProjType', type) this.$store.commit('app/setProjType', type)
let menuList = JSON.parse(window.sessionStorage.getItem('menuList')) let menuList = JSON.parse(window.sessionStorage.getItem('menuList'))
this.$store.commit('app/initStore', [menuList[0].id]) this.$store.commit('app/initStore', [menuList[0].id])
......
// @ts-nocheck // @ts-nocheck
import router from '@/router' import router from '@/router'
import api from '@/api' import api from '@/api'
import { getType } from '@/views/utils/auth' import { getType, setType } from '@/views/utils/auth'
const state = { const state = {
...@@ -20,6 +20,8 @@ const actions = { ...@@ -20,6 +20,8 @@ const actions = {
try { try {
window.sessionStorage.setItem('user', JSON.stringify(data.userInfo)) window.sessionStorage.setItem('user', JSON.stringify(data.userInfo))
window.sessionStorage.setItem('menuList', JSON.stringify(data.menuList)) window.sessionStorage.setItem('menuList', JSON.stringify(data.menuList))
setType(hasUser.type)
this.commit('app/setProjType', hasUser.type)
this.commit('app/setComplete', data.complete) this.commit('app/setComplete', data.complete)
this.commit('app/initStore', [data.menuList[0].id]) this.commit('app/initStore', [data.menuList[0].id])
resolve(data) resolve(data)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment