Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-base
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 16cff8a7
authored
Apr 11, 2023
by
liimin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
调整刷新获取配置的逻辑,刷新页面不再重新调用配置服务
1 parent
fcaa134f
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
9 deletions
src/common/constants.js
src/config/index.js
src/layout/components/NavMenu.vue
src/layout/components/SubMenu.vue
src/layout/components/SubMenuItem.vue
src/common/constants.js
View file @
16cff8a
...
@@ -4,13 +4,12 @@
...
@@ -4,13 +4,12 @@
* @Author: limin
* @Author: limin
* @Date: 2021-09-18 09:35:02
* @Date: 2021-09-18 09:35:02
* @LastEditors: limin
* @LastEditors: limin
* @LastEditTime: 202
2-07-21 09:56:39
* @LastEditTime: 202
3-04-11 10:21:58
* @FilePath: \scrm
\scrm
-base\src\common\constants.js
* @FilePath: \scrm-base\src\common\constants.js
*/
*/
export
default
{
export
default
{
SCRM_BASE_SESSION
:
'SCRM_BASE_SESSION'
,
SCRM_BASE_SESSION
:
'SCRM_BASE_SESSION'
,
SCRM_BASE_MENULIST
:
'SCRM_BASE_MENULIST'
,
SCRM_BASE_MENULIST
:
'SCRM_BASE_MENULIST'
,
SCRM_BASE_CONFIG
:
'SCRM_BASE_CONFIG'
,
SCRM_BASE_FUNCTIONAL_FLAG
:
'function'
,
SCRM_BASE_FUNCTIONAL_FLAG
:
'function'
,
SCRM_BASE_USERTYPE
:
{
SCRM_BASE_USERTYPE
:
{
MERCHANT
:
'1'
,
MERCHANT
:
'1'
,
...
...
src/config/index.js
View file @
16cff8a
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* @Author: limin
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @Date: 2021-06-07 14:12:32
* @LastEditors: limin
* @LastEditors: limin
* @LastEditTime: 2023-04-10 1
7:37:40
* @LastEditTime: 2023-04-10 1
8:06:48
*/
*/
// 根据环境引入不同配置 process.env.VUE_APP_ENV
// 根据环境引入不同配置 process.env.VUE_APP_ENV
let
cfg
=
require
(
'./conf.js'
)
let
cfg
=
require
(
'./conf.js'
)
...
@@ -17,10 +17,11 @@ export const fetchConfig = (isEnv = sw) => {
...
@@ -17,10 +17,11 @@ export const fetchConfig = (isEnv = sw) => {
return
Promise
.
resolve
(
cfg
)
return
Promise
.
resolve
(
cfg
)
}
}
const
_config
=
utils
.
storage
.
getSession
(
constants
.
SCRM_BASE_CONFIG
)
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
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
=
{
export
const
config
=
{
install
(
vue
,
cfg
)
{
install
(
vue
,
cfg
)
{
...
...
src/layout/components/NavMenu.vue
View file @
16cff8a
...
@@ -18,7 +18,8 @@
...
@@ -18,7 +18,8 @@
<span
class=
"nav-text"
slot=
"reference"
style=
"cursor: pointer"
>
消息
</span>
<span
class=
"nav-text"
slot=
"reference"
style=
"cursor: pointer"
>
消息
</span>
</el-popover>
</el-popover>
</div>
</div>
<div
class=
"menu-icons"
>
<!-- PC0008 服务商 屏蔽联系我们 -->
<div
class=
"menu-icons"
v-if=
"$config.productCode !== 'PC0008'"
>
<span
class=
"menu-icon"
>
<span
class=
"menu-icon"
>
<el-badge
class=
"item"
>
<el-badge
class=
"item"
>
<i
class=
"i i-contact"
/>
<i
class=
"i i-contact"
/>
...
...
src/layout/components/SubMenu.vue
View file @
16cff8a
...
@@ -83,7 +83,7 @@ export default {
...
@@ -83,7 +83,7 @@ export default {
line-height
:
40px
;
line-height
:
40px
;
background-color
:
transparent
!important
;
background-color
:
transparent
!important
;
border-radius
:
4px
;
border-radius
:
4px
;
padding-left
:
2
5
px
!important
;
padding-left
:
2
8
px
!important
;
&:hover
{
&:hover
{
background-color
:
#fff
!important
;
background-color
:
#fff
!important
;
span
{
span
{
...
...
src/layout/components/SubMenuItem.vue
View file @
16cff8a
...
@@ -32,7 +32,7 @@ export default {
...
@@ -32,7 +32,7 @@ export default {
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
@import
'~@/assets/style/collapse.scss'
;
@import
'~@/assets/style/collapse.scss'
;
$
active-background-color
:
rgba
(
88
,
80
,
255
,
0
.2
)
!
important
;
$
active-background-color
:
rgba
(
88
,
80
,
255
,
0
.2
)
!
important
;
$
menu-item-width
:
17
6
px
!
important
;
$
menu-item-width
:
17
3
px
!
important
;
.scrm-base-submenu-item
{
.scrm-base-submenu-item
{
/deep/.el-menu-item-group__title
{
/deep/.el-menu-item-group__title
{
display
:
none
;
display
:
none
;
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment