From 9b0a0ba9c799bb619f8e7e529850ea5ea87ef984 Mon Sep 17 00:00:00 2001 From: liwei Date: Mon, 26 Jul 2021 17:45:18 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=BB=98=E8=AE=A4=E9=80=89?= =?UTF-8?q?=E9=A1=B9=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production | 2 +- src/views/login/index.vue | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.env.production b/.env.production index 00ec3bb..a9c8119 100644 --- a/.env.production +++ b/.env.production @@ -5,4 +5,4 @@ NODE_ENV = 'production' # 正式环境 VUE_APP_BASE_API = 'http://8.140.133.55:8096' # 测试环境 -#VUE_APP_BASE_API = 'http://8.140.133.55:8090' +# VUE_APP_BASE_API = 'http://8.140.133.55:8090' diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 20de427..dc904e8 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -79,7 +79,7 @@ export default { loginForm: { userid: '', password: '', - pid: 100 + pid: "" }, loginRules: { pid: [{ required: true, trigger: 'blur', message: '不能为空' }], @@ -123,7 +123,8 @@ export default { getPlants() { getCourts().then((res) => { if (res.code === 200) { - this.options = res.data + this.options = res.data || []; + this.loginForm.pid = this.options[0].cid || ""; localStorage.setItem('cid', JSON.stringify(this.options)) } })