Commit 16cff8a7 by liimin

调整刷新获取配置的逻辑,刷新页面不再重新调用配置服务

1 parent fcaa134f
......@@ -4,13 +4,12 @@
* @Author: limin
* @Date: 2021-09-18 09:35:02
* @LastEditors: limin
* @LastEditTime: 2022-07-21 09:56:39
* @FilePath: \scrm\scrm-base\src\common\constants.js
* @LastEditTime: 2023-04-11 10:21:58
* @FilePath: \scrm-base\src\common\constants.js
*/
export default {
SCRM_BASE_SESSION: 'SCRM_BASE_SESSION',
SCRM_BASE_MENULIST: 'SCRM_BASE_MENULIST',
SCRM_BASE_CONFIG: 'SCRM_BASE_CONFIG',
SCRM_BASE_FUNCTIONAL_FLAG: 'function',
SCRM_BASE_USERTYPE: {
MERCHANT: '1',
......
......@@ -4,7 +4,7 @@
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: limin
* @LastEditTime: 2023-04-10 17:37:40
* @LastEditTime: 2023-04-10 18:06:48
*/
// 根据环境引入不同配置 process.env.VUE_APP_ENV
let cfg = require('./conf.js')
......@@ -17,10 +17,11 @@ export const fetchConfig = (isEnv = sw) => {
return Promise.resolve(cfg)
}
const _config = utils.storage.getSession(constants.SCRM_BASE_CONFIG)
if (_config && location.pathname !== '/') {
const _pathname = location.pathname
if (_config && _pathname !== '/') {
return Promise.resolve(_config)
}
return new Http({ headers: { refererurl: location.pathname }, request: { timeout: 30000 } }).get('https://oss-config.dev.glsx.com.cn/mock/6136bea6ceeb5a5c2bec6950/base/config')
return new Http({ headers: { refererurl: _pathname }, request: { timeout: 30000 } }).get('https://oss-config.dev.glsx.com.cn/mock/6136bea6ceeb5a5c2bec6950/base/config')
}
export const config = {
install(vue, cfg) {
......
......@@ -18,7 +18,8 @@
<span class="nav-text" slot="reference" style="cursor: pointer">消息</span>
</el-popover>
</div>
<div class="menu-icons">
<!-- PC0008 服务商 屏蔽联系我们 -->
<div class="menu-icons" v-if="$config.productCode !== 'PC0008'">
<span class="menu-icon">
<el-badge class="item">
<i class="i i-contact" />
......
......@@ -83,7 +83,7 @@ export default {
line-height: 40px;
background-color: transparent !important;
border-radius: 4px;
padding-left: 25px !important;
padding-left: 28px !important;
&:hover {
background-color: #fff !important;
span {
......
......@@ -32,7 +32,7 @@ export default {
<style lang="scss" scoped>
@import '~@/assets/style/collapse.scss';
$active-background-color: rgba(88, 80, 255, 0.2) !important;
$menu-item-width: 176px !important;
$menu-item-width: 173px !important;
.scrm-base-submenu-item {
/deep/.el-menu-item-group__title {
display: none;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!