From 51ebef72ab4cefe998a0f0fd6ea57094f8da2a04 Mon Sep 17 00:00:00 2001 From: luofann Date: Wed, 15 Nov 2023 19:29:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=AF=8C=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E9=A2=84=E8=A7=88=E7=9A=84=E6=A0=B7=E5=BC=8F=E9=97=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=9Binit=E6=8E=A5=E5=8F=A3=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/form/richTextEditor/richTextEditor.vue.vue | 6 ++++++ frontend/pc/src/store/index.js | 4 +++- frontend/pc/src/store/modules/common.js | 6 +++--- frontend/pc/src/utils/ajax.js | 6 +----- .../pc/src/views/commonComponent/fieldPreview/index.vue | 8 +++++--- 5 files changed, 18 insertions(+), 12 deletions(-) diff --git a/frontend/pc/src/components/form/richTextEditor/richTextEditor.vue.vue b/frontend/pc/src/components/form/richTextEditor/richTextEditor.vue.vue index ed31c1b39..ef323b72a 100644 --- a/frontend/pc/src/components/form/richTextEditor/richTextEditor.vue.vue +++ b/frontend/pc/src/components/form/richTextEditor/richTextEditor.vue.vue @@ -201,4 +201,10 @@ color: #63656E; } } + /deep/ { + .tui-editor-defaultUI, + .tui-editor-contents { + font-family: inherit; + } + } diff --git a/frontend/pc/src/store/index.js b/frontend/pc/src/store/index.js index 8fd22ed3c..f3d7efbf7 100644 --- a/frontend/pc/src/store/index.js +++ b/frontend/pc/src/store/index.js @@ -377,7 +377,9 @@ export default new Vuex.Store({ return jsonp(bkPaasEsbHost + '/api/c/compapi/v2/usermanage/fe_update_user_language/', language); }, getPlatformPreData() { - return ajax.get(`${SITE_URL}init/`).then((response) => { + return ajax.get('init/', { + baseURL: window.SITE_URL + }).then((response) => { if (response.data.data.need_target && response.data.data.location) { window.location.href = `//${window.location.host}${response.data.data.location}`; return; diff --git a/frontend/pc/src/store/modules/common.js b/frontend/pc/src/store/modules/common.js index 0dd4a1b4a..d9071873d 100644 --- a/frontend/pc/src/store/modules/common.js +++ b/frontend/pc/src/store/modules/common.js @@ -91,14 +91,14 @@ export default { }); }, getManagePermission({ commitm }) { - return ajax.get(`/iam/permission/platform_permission/`).then((response) => { + return ajax.get(`iam/permission/platform_permission/`).then((response) => { const res = response.data; return res; }); }, // 获取项目资源的权限结构树 getPermissionMeta({ commit, state, dispatch }) { - return ajax.get(`/iam/permission/meta/`).then((response) => { + return ajax.get(`iam/permission/meta/`).then((response) => { const res = response.data; commit("setPermissionMeta", res.data); return res; @@ -106,7 +106,7 @@ export default { }, // 获取权限中心跳转链接 getIamUrl({ commit }, data) { - return ajax.post(`/iam/permission/query_apply_permission_url/`, data).then((response) => { + return ajax.post(`iam/permission/query_apply_permission_url/`, data).then((response) => { const res = response.data; return res; }); diff --git a/frontend/pc/src/utils/ajax.js b/frontend/pc/src/utils/ajax.js index 20b7016b5..948ce8528 100644 --- a/frontend/pc/src/utils/ajax.js +++ b/frontend/pc/src/utils/ajax.js @@ -66,10 +66,6 @@ bus.$on('processData', (response) => { */ instance.interceptors.request.use( (config) => { - // 接口请求如果已经配置了以SITE_URL开头,则不需要添加baseURL - if (new RegExp(`^${SITE_URL}`).test(config.url)) { - config.baseURL = ''; - } // 添加工单查看权限 const token = sessionStorage.getItem('itsm_token'); if (token && config.url.indexOf('ticket/') === 0) { @@ -83,7 +79,7 @@ instance.interceptors.request.use( instance.interceptors.response.use( (response) => { - if (response.config.url === `${SITE_URL}init/`) { + if (response.config.url === 'init/') { if (response.status === 401) { const { login_url } = response.data; const url = `${login_url.split('c_url=')[0]}c_url=${encodeURIComponent(location.href)}`; diff --git a/frontend/pc/src/views/commonComponent/fieldPreview/index.vue b/frontend/pc/src/views/commonComponent/fieldPreview/index.vue index 1b6ef2c72..9f954df2e 100644 --- a/frontend/pc/src/views/commonComponent/fieldPreview/index.vue +++ b/frontend/pc/src/views/commonComponent/fieldPreview/index.vue @@ -71,9 +71,9 @@ :class="{ 'bk-big-width': item.layout === 'COL_12' }" :key="index"> {{item.name}}: - - +
+ +