From b89e823aa4bcb0653bc286071ea4922862cfc63f Mon Sep 17 00:00:00 2001 From: liudong <liudong> Date: 星期三, 31 七月 2024 11:29:41 +0800 Subject: [PATCH] 登录接口调试 --- .env.development | 2 +- config/vite.config.dev.ts | 7 ++++--- src/views/login/components/login-form.vue | 20 ++++++++++---------- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.env.development b/.env.development index 4e6eb7f..329d4c0 100644 --- a/.env.development +++ b/.env.development @@ -1,2 +1,2 @@ VUE_APP_BASE_API=/api -VITE_API_BASE_URL= 'http://aiotlink.com:8189' \ No newline at end of file +VITE_API_BASE_URL= 'http://192.168.20.158:8089' \ No newline at end of file diff --git a/config/vite.config.dev.ts b/config/vite.config.dev.ts index 8c7a59d..6951ffa 100644 --- a/config/vite.config.dev.ts +++ b/config/vite.config.dev.ts @@ -12,8 +12,8 @@ strict: true, }, proxy: { - '/basic-api': { - target: 'http://localhost:3000', + '/base': { + target: 'http://192.168.20.158:8089',//閭﹂偊 changeOrigin: true, ws: true, // rewrite: (path) => path.replace(new RegExp(`^/basic-api`), ''), @@ -22,7 +22,8 @@ }, '/api/v1': { // target: 'http://192.168.20.116:1080/', - target: 'http://aiotlink.com:8189', + target: 'http://192.168.20.158:8089',//閭﹂偊 + // target: 'http://aiotlink.com:8189', changeOrigin: true, ws: true, // rewrite: (path) => path.replace(new RegExp(`^/upload`), ''), diff --git a/src/views/login/components/login-form.vue b/src/views/login/components/login-form.vue index 02b12da..b628dad 100644 --- a/src/views/login/components/login-form.vue +++ b/src/views/login/components/login-form.vue @@ -102,18 +102,18 @@ if (!errors) { setLoading(true); try { - // const rsaPassWord = rsaPsw(values.password) as string; - // console.log(values,'鐧诲綍淇℃伅'); - // await userStore.login({ - // email: values.email, - // password: rsaPassWord, - // } as LoginData); - // const { redirect, ...othersQuery } = router.currentRoute.value.query; + const rsaPassWord = rsaPsw(values.password) as string; + console.log(values,'鐧诲綍淇℃伅'); + await userStore.login({ + email: values.email, + password: rsaPassWord, + } as LoginData); + const { redirect, ...othersQuery } = router.currentRoute.value.query; router.push({ name: 'knowledgeLib', - // query: { - // ...othersQuery, - // }, + query: { + ...othersQuery, + }, }); Message.success(t('娆㈣繋鍥炴潵')); const { rememberPassword } = loginConfig.value; -- Gitblit v1.8.0