From e8ae17c0fbe5dc0a5424905c738004b143d9ce2c Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: Thu, 22 Aug 2024 15:04:14 +0800
Subject: [PATCH] 二维码打印排版
---
src/store/modules/user.js | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index 4451a04..8461d2e 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -3,6 +3,7 @@
import defAva from '@/assets/images/profile.jpg'
import Cookies from "js-cookie";
import {getUserById} from "@/api/hazardousChemicals/user";
+import {getConfigById} from "@/api/hazardousChemicals/config";
const useUserStore = defineStore(
'user',
{
@@ -27,8 +28,15 @@
setToken(res.data.token)
if(res.data && res.data.id){
const info = await getUserById(res.data.id);
- if(info.data.code === 200){}
- Cookies.set('userInfo',JSON.stringify(info.data))
+ if(info.code === 200){
+ Cookies.set('userInfo',JSON.stringify(info.data))
+ }
+ if(info.data.userType != 0){
+ const con = await getConfigById(res.data.companyId);
+ if(con.code === 200){
+ Cookies.set('configInfo',JSON.stringify(con.data))
+ }
+ }
}
this.token = res.data.token
resolve()
--
Gitblit v1.9.2