diff --git a/env.py b/env.py
index fb49b8553e..95c3ba5bb1 100644
--- a/env.py
+++ b/env.py
@@ -113,6 +113,8 @@
# 获取 PaaS 注入的蓝鲸域名
BKPAAS_BK_DOMAIN = os.getenv("BKPAAS_BK_DOMAIN", "") or os.getenv("BK_DOMAIN", "")
+# PaaS 注入的蓝鲸共享资源域名
+BKPAAS_SHARED_RES_URL = os.getenv("BKPAAS_SHARED_RES_URL", "")
# 获取加密类型
BKPAAS_BK_CRYPTO_TYPE = (
diff --git a/frontend/desktop/package.json b/frontend/desktop/package.json
index d6e6fc822d..6d28499abe 100644
--- a/frontend/desktop/package.json
+++ b/frontend/desktop/package.json
@@ -15,6 +15,7 @@
"@blueking/crypto-js-sdk": "0.0.5",
"@blueking/login-modal": "^1.0.1",
"@blueking/notice-component-vue2": "^2.0.1",
+ "@blueking/platform-config": "^1.0.2",
"@blueking/user-selector": "^1.0.5-beta.2",
"@vue/babel-preset-jsx": "^1.3.0",
"ajv": "^6.10.2",
diff --git a/frontend/desktop/src/App.vue b/frontend/desktop/src/App.vue
index 6291207b5b..ad576b2915 100644
--- a/frontend/desktop/src/App.vue
+++ b/frontend/desktop/src/App.vue
@@ -109,7 +109,7 @@
this.handleRouteChange(id)
}
},
- created () {
+ async created () {
window.msg_list = []
bus.$on('showLoginModal', args => {
const { has_plain, login_url, width, height, method } = args
@@ -166,7 +166,8 @@
})
})
}
- this.getPageFooter()
+ await this.getPageFooter()
+ this.getGlobalConfig()
window.addEventListener('message', this.messageHandler, false)
},
mounted () {
@@ -176,7 +177,9 @@
...mapActions([
'getPermissionMeta',
'queryUserPermission',
- 'getFooterContent'
+ 'getFooterContent',
+ 'getFooterInfo',
+ 'getGlobalConfig'
]),
...mapActions('appmaker/', [
'loadAppmakerDetail'
@@ -202,7 +205,7 @@
'setProjectConfig'
]),
...mapMutations([
- 'setPageFooter',
+ 'setFooterInfo',
'setAdminPerm',
'setStatisticsPerm'
]),
@@ -281,12 +284,11 @@
async getPageFooter () {
try {
this.footerLoading = true
- const resp = await this.getFooterContent()
+ const resp = await this.getFooterInfo()
if (resp.result) {
- this.setPageFooter(resp.data)
+ this.setFooterInfo(resp.data)
}
} catch (e) {
- this.setPageFooter(`
`)
console.log(e)
} finally {
this.footerLoading = false
diff --git a/frontend/desktop/src/api/index.js b/frontend/desktop/src/api/index.js
index b62629ceee..628784c9d2 100644
--- a/frontend/desktop/src/api/index.js
+++ b/frontend/desktop/src/api/index.js
@@ -86,11 +86,14 @@ axios.interceptors.response.use(
bus.$emit('createSnapshot', true) // 创建模板快照
}
- const successUrl = `${window.location.origin}${window.SITE_URL}static/bk_sops/login_success.html`
- let [loginUrl] = data.login_url.split('?')
- loginUrl = `${loginUrl}?c_url=${encodeURIComponent(successUrl)}`
-
- showLoginModal({ loginUrl })
+ // 退出登录接口不打开登录弹框
+ if (response.config.url.indexOf('/logout') === -1) {
+ const successUrl = `${window.location.origin}${window.SITE_URL}static/bk_sops/login_success.html`
+ let [loginUrl] = data.login_url.split('?')
+ loginUrl = `${loginUrl}?c_url=${encodeURIComponent(successUrl)}`
+
+ showLoginModal({ loginUrl })
+ }
}
break
case 499:
diff --git a/frontend/desktop/src/assets/html/index.html b/frontend/desktop/src/assets/html/index.html
index 2bef9dad5c..8975278ddc 100644
--- a/frontend/desktop/src/assets/html/index.html
+++ b/frontend/desktop/src/assets/html/index.html
@@ -52,6 +52,10 @@
var BK_DOMAIN = '{{BK_DOMAIN}}';
var BK_PAAS_ESB_HOST = '{{BK_PAAS_ESB_HOST}}'
var TASK_LIST_STATUS_FILTER_DAYS = {{TASK_LIST_STATUS_FILTER_DAYS}}
+ var LOGIN_URL = '{{LOGIN_URL}}'
+ var BK_PAAS_SHARED_RES_URL = '{{BK_PAAS_SHARED_RES_URL}}'
+ var APP_NAME = '{{APP_NAME}}'
+ var RUN_VER_NAME = '{{RUN_VER_NAME}}'
// 是否开启通知中心
var ENABLE_NOTICE_CENTER = {{ENABLE_NOTICE_CENTER}}
function getCookie(name) {
diff --git a/frontend/desktop/src/components/layout/CopyrightFooter.vue b/frontend/desktop/src/components/layout/CopyrightFooter.vue
index 0f450f64b0..4a331b9551 100644
--- a/frontend/desktop/src/components/layout/CopyrightFooter.vue
+++ b/frontend/desktop/src/components/layout/CopyrightFooter.vue
@@ -10,7 +10,12 @@
* specific language governing permissions and limitations under the License.
*/
-
+