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 6598e432
authored
Aug 23, 2023
by
liimin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
放弃cdn菜单css
1 parent
7404616e
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
19 deletions
src/common/constants.js
src/common/helper.js
src/layout/components/NavUpdateLog.vue
src/main.js
src/store/modules/app.js
vue.config.js
src/common/constants.js
View file @
6598e43
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* @Author: limin
* @Author: limin
* @Date: 2021-09-18 09:35:02
* @Date: 2021-09-18 09:35:02
* @LastEditors: limin
* @LastEditors: limin
* @LastEditTime: 2023-0
6-28 10:02:02
* @LastEditTime: 2023-0
8-23 16:33:24
* @FilePath: \scrm-base\src\common\constants.js
* @FilePath: \scrm-base\src\common\constants.js
*/
*/
export
default
{
export
default
{
...
@@ -25,11 +25,11 @@ export default {
...
@@ -25,11 +25,11 @@ export default {
CODE
:
'101'
,
CODE
:
'101'
,
MESSAGE
:
'未分配任何子菜单'
MESSAGE
:
'未分配任何子菜单'
}
}
}
}
,
//
ICONS: (() => {
ICONS
:
(()
=>
{
//
const iconFiles = require.context('../assets/images/icons', true, /\.png$/)
const
iconFiles
=
require
.
context
(
'../assets/images/icons'
,
true
,
/
\.
png$/
)
//
return iconFiles.keys().map(iconPath => iconPath.replace(/^\.\/(.*)\.\w+$/, '$1'))
return
iconFiles
.
keys
().
map
(
iconPath
=>
iconPath
.
replace
(
/^
\.\/(
.*
)\.\w
+$/
,
'$1'
))
//
})(),
})(),
// DEFAULT_ICON_NAME: 'dataview',
DEFAULT_ICON_NAME
:
'dataview'
// SCRM_BASE_UPDATE_LOG_VERSION: 'SCRM_BASE_UPDATE_LOG_CONFIG'
// SCRM_BASE_UPDATE_LOG_VERSION: 'SCRM_BASE_UPDATE_LOG_CONFIG'
}
}
src/common/helper.js
View file @
6598e43
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
* @LastEditTime: 2022-12-19 09:36:48
* @LastEditTime: 2022-12-19 09:36:48
* @FilePath: \scrm-base\src\common\helper.js
* @FilePath: \scrm-base\src\common\helper.js
*/
*/
//
import constants from './constants'
import
constants
from
'./constants'
export
function
customized
(
cdn
,
{
assets
,
title
})
{
export
function
customized
(
cdn
,
{
assets
,
title
})
{
var
link
=
document
.
querySelector
(
"link[rel*='icon']"
)
||
document
.
createElement
(
'link'
)
var
link
=
document
.
querySelector
(
"link[rel*='icon']"
)
||
document
.
createElement
(
'link'
)
link
.
type
=
'image/x-icon'
link
.
type
=
'image/x-icon'
...
@@ -16,10 +16,10 @@ export function customized(cdn, { assets, title }) {
...
@@ -16,10 +16,10 @@ export function customized(cdn, { assets, title }) {
document
.
getElementsByTagName
(
'head'
)[
0
].
appendChild
(
link
)
document
.
getElementsByTagName
(
'head'
)[
0
].
appendChild
(
link
)
document
.
title
=
title
document
.
title
=
title
}
}
//
export function getIcon(iconName) {
export
function
getIcon
(
iconName
)
{
//
const { ICONS, DEFAULT_ICON_NAME } = constants
const
{
ICONS
,
DEFAULT_ICON_NAME
}
=
constants
//
return ICONS.includes(iconName) && ICONS.includes(iconName + '-active') ? iconName : DEFAULT_ICON_NAME
return
ICONS
.
includes
(
iconName
)
&&
ICONS
.
includes
(
iconName
+
'-active'
)
?
iconName
:
DEFAULT_ICON_NAME
//
}
}
export
function
locationPath
()
{
export
function
locationPath
()
{
return
new
Map
(
return
new
Map
(
location
.
search
location
.
search
...
...
src/layout/components/NavUpdateLog.vue
View file @
6598e43
...
@@ -7,7 +7,6 @@
...
@@ -7,7 +7,6 @@
<
script
>
<
script
>
import
{
Version
}
from
'glsx-common-sdk'
import
{
Version
}
from
'glsx-common-sdk'
import
{
helper
}
from
'@/common'
const
version
=
new
Version
({
const
version
=
new
Version
({
request
:
{
request
:
{
baseUrl
:
'https://config-center-backend.glsx.com.cn/glsxAdmin/config'
,
baseUrl
:
'https://config-center-backend.glsx.com.cn/glsxAdmin/config'
,
...
@@ -27,8 +26,6 @@ export default {
...
@@ -27,8 +26,6 @@ export default {
methods
:
{
methods
:
{
async
getUpdateLogCofig
()
{
async
getUpdateLogCofig
()
{
this
.
v
=
await
version
.
get
({
moduleUrl
:
'scrm-sp'
,
env
:
'update'
})
this
.
v
=
await
version
.
get
({
moduleUrl
:
'scrm-sp'
,
env
:
'update'
})
const
{
cdn
}
=
this
.
$config
helper
.
createLink
(
`
${
cdn
}
/test/icons/sprite.css?v=
${
this
.
v
.
version
}
`
)
},
},
clickHandler
()
{
clickHandler
()
{
this
.
v
=
version
.
set
()
this
.
v
=
version
.
set
()
...
...
src/main.js
View file @
6598e43
...
@@ -9,7 +9,7 @@ import '@/common/reg-prototype.js'
...
@@ -9,7 +9,7 @@ import '@/common/reg-prototype.js'
import
'@/common/error-handler.js'
import
'@/common/error-handler.js'
import
{
fetchConfig
,
config
}
from
'@/config/index'
import
{
fetchConfig
,
config
}
from
'@/config/index'
import
'@/assets/style/index.scss'
import
'@/assets/style/index.scss'
//
import '@/assets/images/sprite/sprite.css'
import
'@/assets/images/sprite/sprite.css'
import
'./components'
import
'./components'
import
'./filters'
import
'./filters'
import
{
Message
}
from
'./plugins/element.js'
import
{
Message
}
from
'./plugins/element.js'
...
...
src/store/modules/app.js
View file @
6598e43
import
{
utils
}
from
'glsx-common'
import
{
utils
}
from
'glsx-common'
import
Layout
from
'@/views/Layout'
import
Layout
from
'@/views/Layout'
import
{
constants
}
from
'@/common'
import
{
constants
,
helper
}
from
'@/common'
import
router
from
'@/router'
import
router
from
'@/router'
const
app
=
{
const
app
=
{
namespaced
:
true
,
namespaced
:
true
,
...
@@ -97,7 +97,7 @@ function formatData(menus, parentMenu) {
...
@@ -97,7 +97,7 @@ function formatData(menus, parentMenu) {
if
(
!
path
.
includes
(
'@'
))
continue
if
(
!
path
.
includes
(
'@'
))
continue
;[
entry
,
name
]
=
path
.
split
(
'@'
)
;[
entry
,
name
]
=
path
.
split
(
'@'
)
menu
.
entry
=
entry
menu
.
entry
=
entry
menu
.
icon
=
name
//
helper.getIcon(name)
menu
.
icon
=
helper
.
getIcon
(
name
)
menu
.
name
=
name
menu
.
name
=
name
menu
.
id
=
`
${
id
}
`
menu
.
id
=
`
${
id
}
`
}
else
{
}
else
{
...
...
vue.config.js
View file @
6598e43
...
@@ -4,7 +4,7 @@ const resolve = dir => path.join(__dirname, dir)
...
@@ -4,7 +4,7 @@ const resolve = dir => path.join(__dirname, dir)
const
SpritesmithPlugin
=
require
(
'webpack-spritesmith'
)
const
SpritesmithPlugin
=
require
(
'webpack-spritesmith'
)
const
CDN_DOMAIN
=
'https://img02.glsx.com.cn/ajax/libs'
const
CDN_DOMAIN
=
'https://img02.glsx.com.cn/ajax/libs'
const
cdn
=
{
const
cdn
=
{
css
:
[
`
${
CDN_DOMAIN
}
/element-ui/2.11.1/theme-chalk/index.css`
,
'https://img02.glsx.com.cn/gl-iconfont/iconfont.css'
,
'https://img02.glsx.com.cn/weapp/resource/saas/scrm/assets/images/icons/sprite.css'
],
css
:
[
`
${
CDN_DOMAIN
}
/element-ui/2.11.1/theme-chalk/index.css`
,
'https://img02.glsx.com.cn/gl-iconfont/iconfont.css'
],
js
:
[
`
${
CDN_DOMAIN
}
/rxjs/7.3.0/rxjs.umd.min.js`
]
js
:
[
`
${
CDN_DOMAIN
}
/rxjs/7.3.0/rxjs.umd.min.js`
]
}
}
module
.
exports
=
{
module
.
exports
=
{
...
...
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