diff --git a/cloud/bigscreen-design/src/mixins/index.js b/cloud/bigscreen-design/src/mixins/index.js index 0284ad7..3d7fec8 100644 --- a/cloud/bigscreen-design/src/mixins/index.js +++ b/cloud/bigscreen-design/src/mixins/index.js @@ -41,7 +41,16 @@ export default { handler (val) { this.configData.forEach(ele => { let result = getFunction(val[ele], true) - window.$glob[ele] = typeof result === 'function' && result() || {} + // 默认基础参数 + const defaultGlob = {} + switch (ele) { + case 'header': + defaultGlob['Authorization'] = window.$glob.header['Authorization'] + break + case 'query': + break + } + window.$glob[ele] = Object.assign(typeof result === 'function' && result() || {}, defaultGlob) delete window.$glob[ele][''] }) window.$glob.url = val.url