Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sensorConsult
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhanglw
sensorConsult
Commits
a20c9ac9
Commit
a20c9ac9
authored
Jun 27, 2023
by
zhanglw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资讯详情
parent
9365911a
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
553 additions
and
4 deletions
+553
-4
index.js
src/router/index.js
+2
-1
routers.js
src/router/routers.js
+8
-0
index.vue
src/views/homepage/index.vue
+3
-3
details.vue
src/views/homepage/information/details.vue
+535
-0
index.vue
src/views/homepage/information/index.vue
+5
-0
No files found.
src/router/index.js
View file @
a20c9ac9
...
@@ -59,7 +59,8 @@ router.beforeEach((to, from, next) => {
...
@@ -59,7 +59,8 @@ router.beforeEach((to, from, next) => {
/* has no token*/
/* has no token*/
if
(
to
.
path
===
'
/
'
)
{
// 根路由重定向到前台home页
if
(
to
.
path
===
'
/
'
)
{
// 根路由重定向到前台home页
next
(
'
/home
'
)
next
(
'
/home
'
)
}
else
if
(
whiteList
.
indexOf
(
to
.
path
)
!==
-
1
)
{
// 在免登录白名单,直接进入
}
else
if
(
findUrl
(
whiteList
,
to
.
path
))
{
// 在免登录白名单,直接进入
// } else if (whiteList.indexOf(to.path) !== -1) { // 在免登录白名单,直接进入
next
()
next
()
}
else
if
(
findUrl
(
backUrlList
,
to
.
path
))
{
// 后台路由重定向到后台登录
}
else
if
(
findUrl
(
backUrlList
,
to
.
path
))
{
// 后台路由重定向到后台登录
next
(
`/backlogin?redirect=
${
to
.
fullPath
}
`
)
next
(
`/backlogin?redirect=
${
to
.
fullPath
}
`
)
...
...
src/router/routers.js
View file @
a20c9ac9
...
@@ -92,6 +92,14 @@ export const constantRouterMap = [
...
@@ -92,6 +92,14 @@ export const constantRouterMap = [
},
},
hidden
:
true
hidden
:
true
},
},
{
path
:
'
/information/details/:id
'
,
meta
:
{
title
:
'
资讯详情
'
,
noCache
:
true
},
component
:
(
resolve
)
=>
{
return
require
([
'
@/views/homepage/information/details
'
],
resolve
)
},
hidden
:
true
},
{
{
path
:
'
/backstage
'
,
path
:
'
/backstage
'
,
component
:
Layout
,
component
:
Layout
,
...
...
src/views/homepage/index.vue
View file @
a20c9ac9
...
@@ -117,7 +117,7 @@
...
@@ -117,7 +117,7 @@
>
{{
item
.
name
}}
</div>
>
{{
item
.
name
}}
</div>
</div></el-col>
</div></el-col>
<el-col
:span=
"8"
><div
class=
"box-toplist"
>
<el-col
:span=
"8"
><div
class=
"box-toplist"
>
<div
class=
"title"
>
供应商TOP8
</div>
<div
class=
"t
oplist-t
itle"
>
供应商TOP8
</div>
<ul
class=
"contact-list"
>
<ul
class=
"contact-list"
>
<li
v-for=
"(item, index) in topSuppliers"
:key=
"'ts_'+index"
class=
"contact-item"
>
<li
v-for=
"(item, index) in topSuppliers"
:key=
"'ts_'+index"
class=
"contact-item"
>
<img
src=
"@/assets/home_images/to_like_b.png"
>
<img
src=
"@/assets/home_images/to_like_b.png"
>
...
@@ -126,7 +126,7 @@
...
@@ -126,7 +126,7 @@
</ul>
</ul>
</div></el-col>
</div></el-col>
<el-col
:span=
"8"
><div
class=
"box-toplist"
>
<el-col
:span=
"8"
><div
class=
"box-toplist"
>
<div
class=
"title"
>
产品TOP8
</div>
<div
class=
"t
oplist-t
itle"
>
产品TOP8
</div>
<ul
class=
"contact-list"
>
<ul
class=
"contact-list"
>
<li
v-for=
"(item, index) in topProducts"
:key=
"'tp_'+index"
class=
"contact-item"
>
<li
v-for=
"(item, index) in topProducts"
:key=
"'tp_'+index"
class=
"contact-item"
>
<img
src=
"@/assets/home_images/to_like_a.png"
>
<img
src=
"@/assets/home_images/to_like_a.png"
>
...
@@ -594,7 +594,7 @@ export default {
...
@@ -594,7 +594,7 @@ export default {
border-radius
:
10px
;
border-radius
:
10px
;
font-size
:
22px
;
font-size
:
22px
;
letter-spacing
:
2px
;
letter-spacing
:
2px
;
.title
{
.t
oplist-t
itle
{
width
:
100%
;
width
:
100%
;
padding
:
10px
15px
;
padding
:
10px
15px
;
background
:
#0457C7
;
background
:
#0457C7
;
...
...
src/views/homepage/information/details.vue
0 → 100644
View file @
a20c9ac9
This diff is collapsed.
Click to expand it.
src/views/homepage/information/index.vue
View file @
a20c9ac9
...
@@ -171,6 +171,11 @@ export default {
...
@@ -171,6 +171,11 @@ export default {
// 跳转到详情
// 跳转到详情
goToDetails
(
item
,
type
)
{
goToDetails
(
item
,
type
)
{
console
.
log
(
item
,
type
)
console
.
log
(
item
,
type
)
switch
(
type
)
{
case
'
information
'
:
this
.
$router
.
push
({
path
:
`/information/details/
${
item
.
id
||
123
}
`
})
break
}
},
},
pageChange
(
e
)
{
pageChange
(
e
)
{
this
.
page
=
e
this
.
page
=
e
...
...
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