From 29aac5a4ccada5b1194c4546e8cebfe604a37ff4 Mon Sep 17 00:00:00 2001 From: lczmx Date: Sat, 5 Mar 2022 16:42:33 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E5=8A=A8=E6=80=81=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E5=90=8E=E7=AB=AFip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/html5/src/App.vue | 29 +++++++++++++++++++++++++++++ frontend/html5/src/store/index.ts | 7 ++++++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/frontend/html5/src/App.vue b/frontend/html5/src/App.vue index 98240ae..26ccfd2 100644 --- a/frontend/html5/src/App.vue +++ b/frontend/html5/src/App.vue @@ -1,3 +1,32 @@ + + diff --git a/frontend/html5/src/store/index.ts b/frontend/html5/src/store/index.ts index 39781c7..1c0f845 100644 --- a/frontend/html5/src/store/index.ts +++ b/frontend/html5/src/store/index.ts @@ -4,7 +4,8 @@ import persistedState from "vuex-persistedstate"; // 持久化 export default createStore({ state: { // sever hostname - serverHost: "http://192.168.0.110:8000", + serverHost: "", + serverPort: "8366", // 用于记录当前页面是否被修改 changeState: false, // 是否被提交 @@ -34,6 +35,10 @@ export default createStore({ state.token.accessToken = accessToken; state.token.tokenType = tokenType; }, + setServiceHost(state, host) { + // 动态设置serverHost + state.serverHost = `${host}:${state.serverPort}`; + }, }, actions: {}, modules: {},