1 parent
47614bff74
commit
1bf2e174dd
3 files changed
+12
-1
No files matched your search
@@ -12,6 +12,14 @@ yarn
|
|||||||
yarn dev
|
yarn dev
|
||||||
```
|
```
|
||||||
|
|
||||||
|
开发代理默认连接本机 HTTPS 后端 `https://127.0.0.1:443`。如果后端使用其他地址,请在 `fe/.env.development` 中设置:
|
||||||
|
|
||||||
|
```env
|
||||||
|
VITE_DEV_BACKEND_URL=https://127.0.0.1:443
|
||||||
|
```
|
||||||
|
|
||||||
|
自签名证书仅用于本地开发,代理不会校验证书链;生产环境应使用有效证书。
|
||||||
|
|
||||||
### Compile and Minify for Production
|
### Compile and Minify for Production
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ const useGlobalStatusStore = defineStore("useGlobalStatusStore", {
|
|||||||
this.authChecked = true;
|
this.authChecked = true;
|
||||||
this.authStatus = AUTH_STATUS.UNAUTHENTICATED;
|
this.authStatus = AUTH_STATUS.UNAUTHENTICATED;
|
||||||
this.authError = "";
|
this.authError = "";
|
||||||
|
this.clearAuthRetryPath();
|
||||||
},
|
},
|
||||||
setUser(payload, resetPrompt = false) {
|
setUser(payload, resetPrompt = false) {
|
||||||
const previousAccount = this.userInfos?.account || "";
|
const previousAccount = this.userInfos?.account || "";
|
||||||
@@ -114,11 +115,13 @@ const useGlobalStatusStore = defineStore("useGlobalStatusStore", {
|
|||||||
this.authChecked = true;
|
this.authChecked = true;
|
||||||
this.authStatus = AUTH_STATUS.NEEDS_SETUP;
|
this.authStatus = AUTH_STATUS.NEEDS_SETUP;
|
||||||
this.authError = "";
|
this.authError = "";
|
||||||
|
this.clearAuthRetryPath();
|
||||||
},
|
},
|
||||||
resetAuthAvailability() {
|
resetAuthAvailability() {
|
||||||
this.authChecked = false;
|
this.authChecked = false;
|
||||||
this.authStatus = AUTH_STATUS.UNKNOWN;
|
this.authStatus = AUTH_STATUS.UNKNOWN;
|
||||||
this.authError = "";
|
this.authError = "";
|
||||||
|
this.clearAuthRetryPath();
|
||||||
},
|
},
|
||||||
setAuthRetryPath(path) {
|
setAuthRetryPath(path) {
|
||||||
this.authRetryPath = typeof path === "string" && path ? path : "/";
|
this.authRetryPath = typeof path === "string" && path ? path : "/";
|
||||||
|
|||||||
+1
-1
@@ -9,7 +9,7 @@ import vue from '@vitejs/plugin-vue'
|
|||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig(({ mode }) => {
|
export default defineConfig(({ mode }) => {
|
||||||
const env = loadEnv(mode, process.cwd(), '')
|
const env = loadEnv(mode, process.cwd(), '')
|
||||||
const backendUrl = (env.VITE_DEV_BACKEND_URL || 'http://127.0.0.1:9001').replace(/\/$/, '')
|
const backendUrl = (env.VITE_DEV_BACKEND_URL || 'https://127.0.0.1:443').replace(/\/$/, '')
|
||||||
|
|
||||||
return {
|
return {
|
||||||
plugins: [
|
plugins: [
|
||||||
|
|||||||
Reference in new issue
Block a user