|
|
@ -131,7 +131,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
computed: { |
|
|
computed: { |
|
|
...mapState(['sysConfig']), |
|
|
|
|
|
|
|
|
...mapState(['sysConfig','dict']), |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
methods: { |
|
|
methods: { |
|
|
@ -139,9 +139,12 @@ export default { |
|
|
async getSysConfig() { |
|
|
async getSysConfig() { |
|
|
try { |
|
|
try { |
|
|
let res = await axios.get(`/sysConfig.json?r=${Math.random()}`, { timeout: 50000 }) // , { timeout: 50000 } |
|
|
let res = await axios.get(`/sysConfig.json?r=${Math.random()}`, { timeout: 50000 }) // , { timeout: 50000 } |
|
|
console.log('axios.get /sysConfig.json', res) |
|
|
|
|
|
|
|
|
//console.log('axios.get /sysConfig.json', res) |
|
|
if (!res.data.apiurl) this.$message.error({ showClose: true, message: `获取配置参数错误,请重新刷新本页面!` }) |
|
|
if (!res.data.apiurl) this.$message.error({ showClose: true, message: `获取配置参数错误,请重新刷新本页面!` }) |
|
|
|
|
|
// 设置应用参数 |
|
|
this.setData({ key: "sysConfig", value: res.data }); |
|
|
this.setData({ key: "sysConfig", value: res.data }); |
|
|
|
|
|
if(res.data?.dict?.completeFlag) this.dict.completeFlag = res.data.dict.completeFlag |
|
|
|
|
|
|
|
|
// this.sysConfig = res.data |
|
|
// this.sysConfig = res.data |
|
|
window.sessionStorage.setItem('sysConfig', JSON.stringify(res.data)) |
|
|
window.sessionStorage.setItem('sysConfig', JSON.stringify(res.data)) |
|
|
} catch (error) { |
|
|
} catch (error) { |
|
|
|