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

erp系统通用存储

parent 421636f3
import { login, logout, getInfo } from '@/api/login' import { login, logout, getInfo } from '@/api/login'
import { getToken, setToken, removeToken, setUserid } from '@/utils/auth' import { getToken, setToken, removeToken, setUserid } from '@/utils/auth'
import materialProp from 'common/src/utils/materialProp'
const user = { const user = {
state: { state: {
...@@ -52,6 +53,14 @@ const user = { ...@@ -52,6 +53,14 @@ const user = {
localStorage.setItem('systemid',systemid) localStorage.setItem('systemid',systemid)
/* 存储本地一份 */ /* 存储本地一份 */
setToken(res.data.token) 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) commit('SET_TOKEN', res.data.token)
setUserid(res.data.userid) setUserid(res.data.userid)
resolve() 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