Commit 15aeaff0 authored by 李苏's avatar 李苏 💬

erp系统通用存储

parent 421636f3
import { login, logout, getInfo } from '@/api/login'
import { getToken, setToken, removeToken, setUserid } from '@/utils/auth'
import materialProp from 'common/src/utils/materialProp'
const user = {
state: {
......@@ -52,6 +53,14 @@ const user = {
localStorage.setItem('systemid',systemid)
/* 存储本地一份 */
setToken(res.data.token)
/* ERP项目查询物料属性*/
materialProp().then(res=>{
let list=['isKwgl','isPhgl','isFjldw','isGysgl']
list.forEach(item=>{
localStorage.setItem(item,res[item])
})
})
commit('SET_TOKEN', res.data.token)
setUserid(res.data.userid)
resolve()
......
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