Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
company-portal-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
company-portal-ui
Commits
0ca7451b
Commit
0ca7451b
authored
Dec 04, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改配置文件
parent
966a179c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
11 deletions
+29
-11
admin/src/components/common/header/Header.vue
admin/src/components/common/header/Header.vue
+22
-5
admin/src/router.js
admin/src/router.js
+1
-0
admin/src/views/portal/NewsView.vue
admin/src/views/portal/NewsView.vue
+6
-6
No files found.
admin/src/components/common/header/Header.vue
View file @
0ca7451b
...
@@ -8,20 +8,20 @@
...
@@ -8,20 +8,20 @@
<div
class=
"header-item"
>
<div
class=
"header-item"
>
<i
style=
"color:#7c6aa6"
class=
"contact-icon am-icon-phone"
></i>
<i
style=
"color:#7c6aa6"
class=
"contact-icon am-icon-phone"
></i>
<div
class=
"item"
>
<div
class=
"item"
>
<strong>
15284734573
</strong>
<strong>
{{
companyInfo
.
name
}}
</strong>
<span>
周一 ~ 周五, 8:30 - 17:30
</span>
<span>
周一 ~ 周五, 8:30 - 17:30
</span>
</div>
</div>
</div>
</div>
<div
class=
"header-item"
>
<div
class=
"header-item"
>
<i
style=
"color:#7c6aa6"
class=
"contact-icon am-icon-map-marker"
></i>
<i
style=
"color:#7c6aa6"
class=
"contact-icon am-icon-map-marker"
></i>
<div
class=
"item"
>
<div
class=
"item"
>
<strong>
四川省成都市高新区
</strong>
<strong>
{{
companyInfo
.
address
}}
</strong>
<span>
四川XXXX有限公司
</span>
<span>
{{
companyInfo
.
name
}}
</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"header-right"
>
<div
class=
"header-right"
>
<a
href=
"tel:+18583266628
"
class=
""
>
<a
:href=
"'tel:'+companyInfo.phone
"
class=
""
>
<button
type=
"button"
>
联系我们
</button>
<button
type=
"button"
>
联系我们
</button>
</a>
</a>
</div>
</div>
...
@@ -48,11 +48,27 @@ export default {
...
@@ -48,11 +48,27 @@ export default {
components
:
{},
components
:
{},
data
(){
data
(){
return
{
return
{
companyInfo
:
{},
AppFunctions
,
AppFunctions
,
}
}
},
},
methods
:
{
methods
:
{
getCompanyInfo
()
{
//获取公司信息,默认第一个
this
.
$post
(
"
/company/interlist
"
,
{})
.
then
((
res
)
=>
{
if
(
res
.
code
==
1
)
{
console
.
log
(
res
)
if
(
res
.
data
.
data
.
length
>
0
)
{
this
.
companyInfo
=
res
.
data
.
data
[
0
]
}
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
error
.
message
);
});
},
toggleStickyHeader
()
{
toggleStickyHeader
()
{
const
scrolled
=
document
.
documentElement
.
scrollTop
;
const
scrolled
=
document
.
documentElement
.
scrollTop
;
if
(
scrolled
>
100
)
{
if
(
scrolled
>
100
)
{
...
@@ -66,6 +82,7 @@ export default {
...
@@ -66,6 +82,7 @@ export default {
window
.
addEventListener
(
'
scroll
'
,
this
.
toggleStickyHeader
);
window
.
addEventListener
(
'
scroll
'
,
this
.
toggleStickyHeader
);
},
},
mounted
()
{
mounted
()
{
this
.
getCompanyInfo
()
this
.
toggleStickyHeader
();
this
.
toggleStickyHeader
();
},
},
beforeDestroy
()
{
beforeDestroy
()
{
...
...
admin/src/router.js
View file @
0ca7451b
...
@@ -19,6 +19,7 @@ Router.prototype.push = function push(location, onResolve, onReject) {
...
@@ -19,6 +19,7 @@ Router.prototype.push = function push(location, onResolve, onReject) {
const
router
=
new
Router
({
const
router
=
new
Router
({
routes
:
[
routes
:
[
//不需要鉴权的页面
//不需要鉴权的页面
builder
(
"
/
"
,
"
portal/IndexView
"
),
builder
(
"
/index
"
,
"
portal/IndexView
"
),
builder
(
"
/index
"
,
"
portal/IndexView
"
),
builder
(
"
/product
"
,
"
portal/ProductView
"
),
builder
(
"
/product
"
,
"
portal/ProductView
"
),
builder
(
"
/product/productId/:productId
"
,
"
portal/ProductDetailsView
"
),
builder
(
"
/product/productId/:productId
"
,
"
portal/ProductDetailsView
"
),
...
...
admin/src/views/portal/NewsView.vue
View file @
0ca7451b
...
@@ -130,15 +130,15 @@ export default {
...
@@ -130,15 +130,15 @@ export default {
let
date
=
new
Date
(
Number
(
time
));
let
date
=
new
Date
(
Number
(
time
));
let
Y
=
date
.
getFullYear
()
+
'
-
'
;
let
Y
=
date
.
getFullYear
()
+
'
-
'
;
let
M
=
(
date
.
getMonth
()
+
1
<
10
?
'
0
'
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
)
+
'
-
'
;
let
M
=
(
date
.
getMonth
()
+
1
<
10
?
'
0
'
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
)
+
'
-
'
;
let
D
=
panLeft
(
date
.
getDate
())
+
'
'
;
let
D
=
this
.
panLeft
(
date
.
getDate
())
+
'
'
;
let
h
=
panLeft
(
date
.
getHours
())
+
'
:
'
;
let
h
=
this
.
panLeft
(
date
.
getHours
())
+
'
:
'
;
let
m
=
panLeft
(
date
.
getMinutes
())
+
'
:
'
;
let
m
=
this
.
panLeft
(
date
.
getMinutes
())
+
'
:
'
;
let
s
=
panLeft
(
date
.
getSeconds
());
let
s
=
this
.
panLeft
(
date
.
getSeconds
());
return
Y
+
M
+
D
+
h
+
m
+
s
;
return
Y
+
M
+
D
+
h
+
m
+
s
;
},
},
panLeft
(
num
)
{
panLeft
(
num
)
{
return
num
<
10
?
'
0
'
+
num
:
num
;
return
num
<
10
?
'
0
'
+
num
:
num
;
}
}
}
}
}
}
</
script
>
</
script
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment