Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
micro-portal
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
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit cdebe64f
authored
Oct 20, 2021
by
jack
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
动态根据域名更换logo
1 parent
840fc479
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
16 deletions
public/favicon.ico
src/components/DesktopLeftSider/Sub/Logo.vue
src/components/Header/HomeHeader.vue
src/components/Header/Sub/Logo.vue
src/components/HomeContent/Sub/LoginForm.vue
src/main.js
public/favicon.ico
View file @
cdebe64
No preview for this file type
src/components/DesktopLeftSider/Sub/Logo.vue
View file @
cdebe64
<
template
>
<
template
>
<div
class=
"home-logo-wrapper"
>
<div
class=
"home-logo-wrapper"
>
<img
class=
"home-logo-img"
src=
"@/assets/images/company-logo-sub.png"
alt=
"home-logo"
>
<!--
<img
class=
"home-logo-img"
src=
"@/assets/images/company-logo-sub.png"
alt=
"home-logo"
>
-->
<img
class=
"home-logo-img"
:src=
"smallLogo"
alt=
"home-logo"
>
<!--
<img
v-show=
"collapsed"
class=
"home-logo-img home-thumbnail-logo"
src=
"@/assets/images/logo-thumbnail.png"
alt=
"home-logo"
>
-->
<!--
<img
v-show=
"collapsed"
class=
"home-logo-img home-thumbnail-logo"
src=
"@/assets/images/logo-thumbnail.png"
alt=
"home-logo"
>
-->
</div>
</div>
</
template
>
</
template
>
...
@@ -14,7 +15,8 @@
...
@@ -14,7 +15,8 @@
// collapsed: Boolean
// collapsed: Boolean
// },
// },
setup
()
{
setup
()
{
const
smallLogo
=
localStorage
.
getItem
(
'smallLogo'
);
return
{
smallLogo
}
}
}
}
}
</
script
>
</
script
>
...
...
src/components/Header/HomeHeader.vue
View file @
cdebe64
...
@@ -28,8 +28,8 @@
...
@@ -28,8 +28,8 @@
.header
{
.header
{
width
:
100%
;
width
:
100%
;
height
:
139px
!important
;
height
:
auto
!important
;
padding
:
45
px
50px
0
50px
;
padding
:
20
px
50px
0
50px
;
background-color
:
#fff
;
background-color
:
#fff
;
}
}
</
style
>
</
style
>
\ No newline at end of file
\ No newline at end of file
src/components/Header/Sub/Logo.vue
View file @
cdebe64
<
template
>
<
template
>
<div
class=
"home-logo-wrapper"
>
<div
class=
"home-logo-wrapper"
>
<img
class=
"home-logo-img"
src=
"@/assets/images/company-logo.png"
alt=
"company-logo"
>
<!--
<img
class=
"home-logo-img"
src=
"@/assets/images/company-logo.png"
alt=
"company-logo"
>
-->
<img
class=
"home-logo-img"
:src=
"logoPath"
alt=
"company-logo"
>
<span
class=
"home-logo-title"
>
{{
homeTitle
}}
</span>
<span
class=
"home-logo-title"
>
{{
homeTitle
}}
</span>
</div>
</div>
</
template
>
</
template
>
...
@@ -12,8 +13,8 @@
...
@@ -12,8 +13,8 @@
name
:
'Logo'
,
name
:
'Logo'
,
setup
()
{
setup
()
{
const
homeTitle
=
ref
(
''
);
const
homeTitle
=
ref
(
''
);
const
logoPath
=
localStorage
.
getItem
(
'logo'
)
return
{
homeTitle
};
return
{
homeTitle
,
logoPath
};
}
}
}
}
</
script
>
</
script
>
...
@@ -24,7 +25,8 @@
...
@@ -24,7 +25,8 @@
font-size
:
20px
;
font-size
:
20px
;
.home-logo-img
{
.home-logo-img
{
width
:
480px
;
//
width
:
480px
;
height
:
67px
;
margin-right
:
10px
;
margin-right
:
10px
;
}
}
...
...
src/components/HomeContent/Sub/LoginForm.vue
View file @
cdebe64
This diff is collapsed.
Click to expand it.
src/main.js
View file @
cdebe64
...
@@ -4,14 +4,33 @@ import router from './router'
...
@@ -4,14 +4,33 @@ import router from './router'
import
store
from
'./store'
import
store
from
'./store'
import
elementUI
from
'@/utils/globalUI/element'
import
elementUI
from
'@/utils/globalUI/element'
import
'element-plus/lib/theme-chalk/index.css'
import
'element-plus/lib/theme-chalk/index.css'
;
// import './assets/css/resets.css'
// import './assets/css/resets.css'
const
app
=
createApp
(
App
);
const
app
=
createApp
(
App
)
const
URL
=
'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config'
const
getConfig
=
(
url
=
URL
+
'/e-sheild-portal-config'
)
=>
{
return
new
Promise
((
resolve
)
=>
{
const
xhr
=
new
XMLHttpRequest
()
xhr
.
onreadystatechange
=
()
=>
{
if
(
xhr
.
readyState
===
4
&&
xhr
.
status
===
200
)
{
let
o
=
xhr
.
responseText
?
JSON
.
parse
(
xhr
.
responseText
)
:
{}
console
.
log
(
o
.
logo
)
localStorage
.
setItem
(
'logo'
,
o
.
logo
)
localStorage
.
setItem
(
'title'
,
o
.
title
)
localStorage
.
setItem
(
'smallLogo'
,
o
.
smallLogo
)
// window.localStorage.setItem(
// 'GLSX_COMMODITY_CENTER_CONFIG',
// xhr.responseText,
// )
}
}
xhr
.
open
(
'GET'
,
url
)
xhr
.
send
()
})
}
app
.
use
(
store
)
getConfig
()
.
use
(
router
)
.
use
(
elementUI
)
.
mount
(
'#app'
);
\ No newline at end of file
\ No newline at end of file
app
.
use
(
store
).
use
(
router
).
use
(
elementUI
).
mount
(
'#app'
)
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