From add1eeea7815d6601f63add140df09396c639a4d Mon Sep 17 00:00:00 2001
From: zmc <zmc_li@foxmail.com>
Date: 星期四, 14 十二月 2023 15:25:21 +0800
Subject: [PATCH] 修改为正确的网络请求Ip

---
 src/stores/user.js |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/src/stores/user.js b/src/stores/user.js
index 51b1b60..ac6b272 100644
--- a/src/stores/user.js
+++ b/src/stores/user.js
@@ -1,8 +1,9 @@
 // 鍔犺浇鐘舵�佺殑閫昏緫绠$悊
 
 import { defineStore } from 'pinia'
+import { ref, computed } from 'vue'
 
-export const useLoginUserStore = defineStore('loginUser',() => {
+export const useLoginUserStore = defineStore('loginUser', () => {
   // 褰撳墠鐧婚檰鐨勭敤鎴峰悕
   const currentLoginUser = ref('-1')
   // 淇敼
@@ -10,12 +11,10 @@
     currentLoginUser.value = user
   }
 
-
-  
-  const getUserName = computed(()=>{
-    return currentLoginUser.value == '-1' ? localStorage.getItem('currentUserName'): currentLoginUser.value
+  const getUserName = computed(() => {
+    return currentLoginUser.value == '-1'
+      ? localStorage.getItem('currentUserName')
+      : currentLoginUser.value
   })
-  return {currentLoginUser,setUser,getUserName}
+  return { currentLoginUser, setUser, getUserName }
 })
-
-

--
Gitblit v1.9.3