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 7d8629e4
authored
May 04, 2023
by
liimin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改完善直接返回缓存配置的逻辑
1 parent
92cd9d9c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
42 deletions
src/assets/images/sprite/sprite.css
src/assets/images/sprite/sprite.png
src/config/index.js
src/assets/images/sprite/sprite.css
View file @
7d8629e
.i
{
display
:
inline-block
;
vertical-align
:
middle
;
background-image
:
url(./sprite.png)
}
.i-activity-active
{
width
:
20px
;
height
:
20px
;
background-position
:
-6
1px
-42
px
;
}
.i-activity-active
{
width
:
20px
;
height
:
20px
;
background-position
:
-6
0px
-104
px
;
}
.i-activity
{
width
:
20px
;
height
:
20px
;
background-position
:
-90px
-104px
;
}
.i-activityCenter-active
{
width
:
20px
;
height
:
21px
;
background-position
:
-42px
0px
;
}
.i-activityCenter
{
width
:
20px
;
height
:
20px
;
background-position
:
-120px
-104px
;
}
.i-arrow-down
{
width
:
20px
;
height
:
20px
;
background-position
:
-16
2
px
0px
;
}
.i-authorize-active
{
width
:
20px
;
height
:
20px
;
background-position
:
-16
2
px
-30px
;
}
.i-authorize
{
width
:
20px
;
height
:
20px
;
background-position
:
-16
2
px
-60px
;
}
.i-arrow-down
{
width
:
20px
;
height
:
20px
;
background-position
:
-16
3
px
0px
;
}
.i-authorize-active
{
width
:
20px
;
height
:
20px
;
background-position
:
-16
3
px
-30px
;
}
.i-authorize
{
width
:
20px
;
height
:
20px
;
background-position
:
-16
3
px
-60px
;
}
.i-avatar
{
width
:
32px
;
height
:
32px
;
background-position
:
0px
0px
;
}
.i-back
{
width
:
10px
;
height
:
10px
;
background-position
:
-130px
-225px
;
}
.i-checked
{
width
:
20px
;
height
:
20px
;
background-position
:
-162px
-90px
;
}
.i-checked
{
width
:
20px
;
height
:
20px
;
background-position
:
-163px
-90px
;
}
.i-commodity-active
{
width
:
20px
;
height
:
21px
;
background-position
:
-72px
0px
;
}
.i-commodity
{
width
:
20px
;
height
:
21px
;
background-position
:
0px
-42px
;
}
.i-contact
{
width
:
16px
;
height
:
16px
;
background-position
:
-30px
-225px
;
}
.i-content-active
{
width
:
20px
;
height
:
21px
;
background-position
:
-
72px
0
px
;
}
.i-content
{
width
:
20px
;
height
:
21px
;
background-position
:
0px
-42px
;
}
.i-content-active
{
width
:
20px
;
height
:
21px
;
background-position
:
-
30px
-42
px
;
}
.i-content
{
width
:
20px
;
height
:
21px
;
background-position
:
-6
0px
-42px
;
}
.i-custom-active
{
width
:
20px
;
height
:
20px
;
background-position
:
0px
-135px
;
}
.i-custom
{
width
:
20px
;
height
:
20px
;
background-position
:
-30px
-135px
;
}
.i-dataview-active
{
width
:
20px
;
height
:
20px
;
background-position
:
-60px
-135px
;
}
.i-dataview
{
width
:
20px
;
height
:
20px
;
background-position
:
-90px
-135px
;
}
.i-discover-active
{
width
:
20px
;
height
:
20px
;
background-position
:
-120px
-135px
;
}
.i-discover
{
width
:
21px
;
height
:
20px
;
background-position
:
-
30px
-42
px
;
}
.i-discover
{
width
:
21px
;
height
:
20px
;
background-position
:
-
102px
0
px
;
}
.i-dot
{
width
:
12px
;
height
:
12px
;
background-position
:
-108px
-225px
;
}
.i-drainage-active
{
width
:
20px
;
height
:
20px
;
background-position
:
-150px
-135px
;
}
.i-drainage
{
width
:
20px
;
height
:
20px
;
background-position
:
-19
2
px
0px
;
}
.i-edit-active
{
width
:
20px
;
height
:
20px
;
background-position
:
-19
2
px
-30px
;
}
.i-edit
{
width
:
20px
;
height
:
20px
;
background-position
:
-19
2
px
-60px
;
}
.i-equity-active
{
width
:
20px
;
height
:
20px
;
background-position
:
-19
2
px
-90px
;
}
.i-equity
{
width
:
20px
;
height
:
20px
;
background-position
:
-19
2
px
-120px
;
}
.i-drainage
{
width
:
20px
;
height
:
20px
;
background-position
:
-19
3
px
0px
;
}
.i-edit-active
{
width
:
20px
;
height
:
20px
;
background-position
:
-19
3
px
-30px
;
}
.i-edit
{
width
:
20px
;
height
:
20px
;
background-position
:
-19
3
px
-60px
;
}
.i-equity-active
{
width
:
20px
;
height
:
20px
;
background-position
:
-19
3
px
-90px
;
}
.i-equity
{
width
:
20px
;
height
:
20px
;
background-position
:
-19
3
px
-120px
;
}
.i-exchange-active
{
width
:
20px
;
height
:
20px
;
background-position
:
0px
-165px
;
}
.i-exchange-disabled
{
width
:
20px
;
height
:
20px
;
background-position
:
-30px
-165px
;
}
.i-exchange
{
width
:
20px
;
height
:
20px
;
background-position
:
-60px
-165px
;
}
...
...
@@ -32,41 +34,39 @@
.i-finance
{
width
:
20px
;
height
:
20px
;
background-position
:
-120px
-165px
;
}
.i-home-active
{
width
:
20px
;
height
:
20px
;
background-position
:
-150px
-165px
;
}
.i-home
{
width
:
20px
;
height
:
20px
;
background-position
:
-180px
-165px
;
}
.i-inventory-active
{
width
:
20px
;
height
:
20px
;
background-position
:
-22
2
px
0px
;
}
.i-inventory
{
width
:
20px
;
height
:
20px
;
background-position
:
-22
2
px
-30px
;
}
.i-inventory-active
{
width
:
20px
;
height
:
20px
;
background-position
:
-22
3
px
0px
;
}
.i-inventory
{
width
:
20px
;
height
:
20px
;
background-position
:
-22
3
px
-30px
;
}
.i-left
{
width
:
10px
;
height
:
9px
;
background-position
:
-150px
-225px
;
}
.i-link-active
{
width
:
20px
;
height
:
21px
;
background-position
:
-102px
0px
;
}
.i-link
{
width
:
20px
;
height
:
21px
;
background-position
:
-102px
-31
px
;
}
.i-live-active
{
width
:
20px
;
height
:
20px
;
background-position
:
-22
2
px
-60px
;
}
.i-live
{
width
:
20px
;
height
:
20px
;
background-position
:
-22
2
px
-90px
;
}
.i-logoff-active
{
width
:
20px
;
height
:
20px
;
background-position
:
-22
2
px
-120px
;
}
.i-logoff
{
width
:
20px
;
height
:
20px
;
background-position
:
-22
2
px
-150px
;
}
.i-link-active
{
width
:
20px
;
height
:
21px
;
background-position
:
-102px
-3
0px
;
}
.i-link
{
width
:
20px
;
height
:
21px
;
background-position
:
0px
-73
px
;
}
.i-live-active
{
width
:
20px
;
height
:
20px
;
background-position
:
-22
3
px
-60px
;
}
.i-live
{
width
:
20px
;
height
:
20px
;
background-position
:
-22
3
px
-90px
;
}
.i-logoff-active
{
width
:
20px
;
height
:
20px
;
background-position
:
-22
3
px
-120px
;
}
.i-logoff
{
width
:
20px
;
height
:
20px
;
background-position
:
-22
3
px
-150px
;
}
.i-mall-active
{
width
:
20px
;
height
:
20px
;
background-position
:
0px
-195px
;
}
.i-mall
{
width
:
20px
;
height
:
20px
;
background-position
:
-30px
-195px
;
}
.i-mapping-active
{
width
:
20px
;
height
:
21px
;
background-position
:
0px
-73px
;
}
.i-mapping
{
width
:
20px
;
height
:
21px
;
background-position
:
-
3
0px
-73px
;
}
.i-mapping-active
{
width
:
20px
;
height
:
21px
;
background-position
:
-3
0px
-73px
;
}
.i-mapping
{
width
:
20px
;
height
:
21px
;
background-position
:
-
6
0px
-73px
;
}
.i-marketing-active
{
width
:
20px
;
height
:
20px
;
background-position
:
-60px
-195px
;
}
.i-marketing
{
width
:
20px
;
height
:
20px
;
background-position
:
-90px
-195px
;
}
.i-message-active
{
width
:
16px
;
height
:
16px
;
background-position
:
-56px
-225px
;
}
.i-message
{
width
:
16px
;
height
:
16px
;
background-position
:
-82px
-225px
;
}
.i-outbound-active
{
width
:
20px
;
height
:
21px
;
background-position
:
-60px
-73px
;
}
.i-ordermanage-active
{
width
:
20px
;
height
:
21px
;
background-position
:
-90px
-73px
;
}
.i-ordermanage
{
width
:
20px
;
height
:
21px
;
background-position
:
-133px
0px
;
}
.i-outbound-active
{
width
:
20px
;
height
:
21px
;
background-position
:
-133px
-31px
;
}
.i-outbound
{
width
:
20px
;
height
:
20px
;
background-position
:
-120px
-195px
;
}
.i-password
{
width
:
20px
;
height
:
20px
;
background-position
:
-150px
-195px
;
}
.i-provider-active
{
width
:
20px
;
height
:
21px
;
background-position
:
-
90px
-73
px
;
}
.i-provider-active
{
width
:
20px
;
height
:
21px
;
background-position
:
-
133px
-62
px
;
}
.i-provider
{
width
:
20px
;
height
:
20px
;
background-position
:
-180px
-195px
;
}
.i-purchase-active
{
width
:
20px
;
height
:
20px
;
background-position
:
-210px
-195px
;
}
.i-purchase
{
width
:
20px
;
height
:
20px
;
background-position
:
-25
2
px
0px
;
}
.i-purchase
{
width
:
20px
;
height
:
20px
;
background-position
:
-25
3
px
0px
;
}
.i-right
{
width
:
8px
;
height
:
8px
;
background-position
:
-170px
-225px
;
}
.i-salepre-active
{
width
:
20px
;
height
:
20px
;
background-position
:
-252px
-30px
;
}
.i-salepre
{
width
:
20px
;
height
:
20px
;
background-position
:
-252px
-60px
;
}
.i-services-active
{
width
:
20px
;
height
:
20px
;
background-position
:
-252px
-90px
;
}
.i-services
{
width
:
20px
;
height
:
20px
;
background-position
:
-252px
-120px
;
}
.i-settings-active
{
width
:
20px
;
height
:
20px
;
background-position
:
-252px
-150px
;
}
.i-settings
{
width
:
20px
;
height
:
20px
;
background-position
:
-252px
-180px
;
}
.i-subscription-active
{
width
:
20px
;
height
:
21px
;
background-position
:
-132px
0px
;
}
.i-subscription
{
width
:
20px
;
height
:
21px
;
background-position
:
-132px
-31px
;
}
.i-user
{
width
:
20px
;
height
:
20px
;
background-position
:
0px
-225px
;
}
.i-ordermanage
{
width
:
20px
;
height
:
21px
;
background-position
:
-132px
-62px
;
}
.i-ordermanage-active
{
width
:
20px
;
height
:
21px
;
background-position
:
0px
-104px
;
}
.i-commodity-active
{
width
:
20px
;
height
:
21px
;
background-position
:
-30px
-104px
;
}
.i-commodity
{
width
:
20px
;
height
:
21px
;
background-position
:
-60px
-104px
;
}
\ No newline at end of file
.i-salepre-active
{
width
:
20px
;
height
:
20px
;
background-position
:
-253px
-30px
;
}
.i-salepre
{
width
:
20px
;
height
:
20px
;
background-position
:
-253px
-60px
;
}
.i-services-active
{
width
:
20px
;
height
:
20px
;
background-position
:
-253px
-90px
;
}
.i-services
{
width
:
20px
;
height
:
20px
;
background-position
:
-253px
-120px
;
}
.i-settings-active
{
width
:
20px
;
height
:
20px
;
background-position
:
-253px
-150px
;
}
.i-settings
{
width
:
20px
;
height
:
20px
;
background-position
:
-253px
-180px
;
}
.i-subscription-active
{
width
:
20px
;
height
:
21px
;
background-position
:
0px
-104px
;
}
.i-subscription
{
width
:
20px
;
height
:
21px
;
background-position
:
-30px
-104px
;
}
.i-user
{
width
:
20px
;
height
:
20px
;
background-position
:
0px
-225px
;
}
\ No newline at end of file
src/assets/images/sprite/sprite.png
View file @
7d8629e
32 KB
|
W:
|
H:
31.8 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/config/index.js
View file @
7d8629e
...
...
@@ -4,24 +4,29 @@
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: limin
* @LastEditTime: 2023-0
4-18 18:37:49
* @LastEditTime: 2023-0
5-04 15:12:41
*/
// 根据环境引入不同配置 process.env.VUE_APP_ENV
let
cfg
=
require
(
'./conf.js'
)
import
{
Http
}
from
'glsx-common'
import
{
utils
}
from
'glsx-common'
import
{
constants
}
from
'@/common'
import
router
from
'../router'
const
sw
=
!!+
process
.
env
.
VUE_APP_CONFIG_SWITCH_LOCAL
export
const
fetchConfig
=
(
isEnv
=
sw
)
=>
{
if
(
isEnv
)
{
return
Promise
.
resolve
(
cfg
)
}
const
_config
=
utils
.
storage
.
getSession
(
constants
.
SCRM_BASE_CONFIG
)
const
_session
=
utils
.
storage
.
getSession
(
constants
.
SCRM_BASE_SESSION
)
const
_pathname
=
location
.
pathname
if
(
_config
&&
_pathname
!==
'/'
)
{
const
_login_path
=
_session
?.
loginpath
const
_constRoutes
=
router
.
constantRoutes
.
map
(({
path
})
=>
path
)
// 如果存在配置缓存,并且当前路径不是用以区分不同产品的路由(oss:运营版,login:基础版,sp:服务商版).说明是刷新页面,则直接返回缓存的配置.另外如果当前路由与登录时缓存的路由一致,也直接返回缓存配置.
if
((
_config
&&
!
_constRoutes
.
includes
(
_pathname
))
||
_pathname
===
_login_path
||
(
_pathname
===
'/'
&&
_login_path
===
'/login'
))
{
return
Promise
.
resolve
(
_config
)
}
return
new
Http
({
headers
:
{
refererurl
:
_pathname
},
request
:
{
timeout
:
30000
}
}).
get
(
'https://oss-config.
test
.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
)
{
...
...
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