From c08e182cb4978ad8eff5d8bfe0be2354c98225fa Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Thu, 7 Sep 2023 12:37:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B6query=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- .gitignore | 1 - src/store/modules/user.js | 7 +++++ src/views/form/publish/index.vue | 2 ++ src/views/form/write/index.vue | 49 ++++++++++++++++++++++++++------ 5 files changed, 50 insertions(+), 11 deletions(-) diff --git a/.env.development b/.env.development index fe2591b..4885e45 100644 --- a/.env.development +++ b/.env.development @@ -3,7 +3,7 @@ VUE_APP_TITLE = 问卷调查开发环境 # 接口请求地址,会设置到 axios 的 baseURL 参数上 VUE_APP_API_ROOT_TDUCK = /tduck-api #VUE_APP_API_ROOT = http://localhost:8116/ -VUE_APP_API_ROOT = http://192.168.1.140/api +VUE_APP_API_ROOT = http://192.168.1.144/api # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VUE_APP_DEBUG_TOOL = # 高德地图key 暂时没有用到 diff --git a/.gitignore b/.gitignore index 7ac9edd..dce01c2 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,6 @@ node_modules /src/assets/sprites/*.* !/src/assets/sprites/.gitkeep /questionnaire - # local env files .env.local .env.*.local diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 137d5a6..20c0db4 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -54,6 +54,10 @@ const actions = { setTokens(context, token) { console.log('setToekns', token) context.commit('setToken', token) + }, + setAgencyId(context, agencyId) { + console.log('setAgencyId', agencyId) + context.commit('AgencyId', agencyId) } } @@ -72,6 +76,9 @@ const mutations = { }, setToken(state, token) { state.token = token + }, + setAgencyId(state, token) { + state.agencyId = token } } diff --git a/src/views/form/publish/index.vue b/src/views/form/publish/index.vue index 9e6308f..84e254c 100644 --- a/src/views/form/publish/index.vue +++ b/src/views/form/publish/index.vue @@ -133,7 +133,9 @@ export default { }, mounted () { this.projectKey = this.$route.query.key + this.agencyId = this.$route.query.agencyId let url = window.location.protocol + '//' + window.location.host + console.log(this.agencyId); this.writeLink = `${url}/${process.env.VUE_APP_PUBLIC_PATH}/s/${this.projectKey}` this.getProjectStatus() }, diff --git a/src/views/form/write/index.vue b/src/views/form/write/index.vue index 3b65377..01ccd02 100644 --- a/src/views/form/write/index.vue +++ b/src/views/form/write/index.vue @@ -1,3 +1,12 @@ +