This commit is contained in:
andy 2026-07-18 14:19:14 +08:00
parent 83c876b88c
commit 30bc01d15e
7 changed files with 2224 additions and 8 deletions

View File

@ -5,7 +5,7 @@ VITE_APP_TITLE = 伊特机械MES
VITE_APP_ENV = 'development'
# 开发环境
VITE_APP_BASE_API = 'http://192.168.12.230:8888/api'
VITE_APP_BASE_API = 'http://192.168.12.4:8888/api'
#VITE_APP_BASE_API = 'http://192.168.5.14:9100/gateway'
#VITE_APP_BASE_API = '/dev-api'

View File

@ -24,7 +24,7 @@
"html2canvas": "^1.4.1",
"jsencrypt": "^3.3.2",
"jspdf": "^4.2.1",
"naive-ui": "^2.37.3",
"naive-ui":"^2.37.3",
"pinia": "^2.1.7",
"pinia-plugin-persistedstate": "^3.2.1",
"three": "^0.184.0",

File diff suppressed because it is too large Load Diff

View File

@ -30,11 +30,13 @@ export interface UserInfo {
id: number
username: string
nickname: string
postNames:string
avatar: string
email: string
phone: string
gender: number
status: number
//userId:number|string
}
export interface MenuInfo {

View File

@ -17,7 +17,11 @@ export const useUserStore = defineStore('user', () => {
const isLogin = computed(() => !!token.value)
const nickname = computed(() => user.value?.nickname || user.value?.username || '')
const avatar = computed(() => user.value?.avatar || '')
const postNames = computed(() => user.value?.postNames || '')
const userid = computed(() => user.value?.id || '')
function setinit(v:any) {
init.value = v
}
@ -92,6 +96,8 @@ export const useUserStore = defineStore('user', () => {
nickname,
avatar,
init,
postNames,
userid,
setinit,
login,
getInfo,

View File

@ -114,10 +114,10 @@ async function decryptResponseData(data: string): Promise<any> {
//axios.defaults.headers["Content-Type"] = 'application/json;charset=utf-8' //"application/x-www-form-urlencoded;charset=utf-8"; //"application/json;charset=utf-8";
// 创建axios实例
// 后端 API 统一使用 /api 前缀
// 后端 API 统一使用 /api 前缀
const service: AxiosInstance = axios.create({
// baseURL'/api'
baseURL: BASE_API,
baseURL:'/api',
//baseURL: BASE_API,
timeout: 30000
})

View File

@ -22,7 +22,8 @@ export default defineConfig({
proxy: {
'/api': {
//target:'http://192.168.6.107:8080', //'http://192.168.5.230:8888',
target:'http://192.168.5.230:8888',
//target:'http://192.168.12.4:8888',
target:'http://192.168.12.230:8888',
//target:'http://192.168.5.200:8888',
changeOrigin: true
},