| | |
| | | import Cookies from "js-cookie"; |
| | | import {getUserById} from "@/api/hazardousChemicals/user"; |
| | | import {getConfigById} from "@/api/hazardousChemicals/config"; |
| | | import {ElMessage} from "element-plus"; |
| | | const useUserStore = defineStore( |
| | | 'user', |
| | | { |
| | |
| | | if(info.code === 200){ |
| | | Cookies.set('userInfo',JSON.stringify(info.data)) |
| | | } |
| | | if(info.data.userType == 3){ |
| | | ElMessage.warning('监管部门账号不可登录') |
| | | loading.value = false |
| | | return |
| | | } |
| | | if(info.data.userType != 0){ |
| | | const con = await getConfigById(res.data.companyId); |
| | | if(con.code === 200){ |