diff --git a/public/sysConfig.json b/public/sysConfig.json new file mode 100644 index 0000000..302aef0 --- /dev/null +++ b/public/sysConfig.json @@ -0,0 +1,3 @@ +{ + "apiurl": "http://140.143.162.39:9529" +} \ No newline at end of file diff --git a/src/views/login/Login.vue b/src/views/login/Login.vue index b15cc2a..3752a4f 100644 --- a/src/views/login/Login.vue +++ b/src/views/login/Login.vue @@ -94,8 +94,8 @@ export default { async getSysConfig() { try { - let res = await axios.get('/sysConfig.html', { timeout: 50000 }) // , { timeout: 50000 } - console.log('axios.get /sysConfig.html',res) + let res = await axios.get('/sysConfig.json', { timeout: 50000 }) // , { timeout: 50000 } + console.log('axios.get /sysConfig.json',res) if(!res.data.apiurl) this.$message.error({ showClose: true, message: `获取配置参数错误,请重新刷新本页面!` }) this.sysConfig = res.data window.sessionStorage.setItem('sysConfig', JSON.stringify(res.data))