From fbcf97cf4531a299c3ad790304c48b0989f14f1c Mon Sep 17 00:00:00 2001 From: wangxiang <1827945911@qq.com> Date: Mon, 10 Jul 2023 07:34:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B8=8D=E8=83=BD=E8=A6=86=E7=9B=96?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cloud/bigscreen-design/src/mixins/index.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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