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)) } })