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
47a6aefa
Commit
47a6aefa
authored
Aug 21, 2023
by
zhanglw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页地区排名
parent
2b3f44fd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
15 deletions
+19
-15
index.vue
src/views/homepage/index.vue
+14
-14
index.vue
src/views/homepage/information/index.vue
+5
-1
No files found.
src/views/homepage/index.vue
View file @
47a6aefa
...
...
@@ -215,6 +215,20 @@ export default {
}).
then
((
res
)
=>
{
this
.
topSuppliers
=
res
.
data
.
topSuppliers
this
.
topProducts
=
res
.
data
.
topProducts
const
random
=
(
min
,
max
)
=>
{
return
Math
.
floor
(
Math
.
random
()
*
(
max
-
min
))
+
min
}
const
arr
=
res
.
data
.
topArea
[
0
].
topArea
arr
.
forEach
((
item
,
index
)
=>
{
this
.
topAreas
.
push
({
name
:
item
,
top
:
`
${
random
(
0
,
382
)}
px`
,
left
:
`
${
random
(
0
,
324
)}
px`
,
size
:
`
${
Math
.
max
(
80
-
index
*
7
,
12
)}
px`
})
})
this
.
topAreas
[
0
].
top
=
'
180px
'
this
.
topAreas
[
0
].
left
=
'
120px
'
})
HttpReq
.
webClientApi
.
homePageGetPartners
({
preview
:
false
...
...
@@ -226,20 +240,6 @@ export default {
}).
then
((
res
)
=>
{
this
.
showcaseSuppliers
=
res
.
data
.
showcaseSuppliers
})
const
random
=
(
min
,
max
)
=>
{
return
Math
.
floor
(
Math
.
random
()
*
(
max
-
min
))
+
min
}
const
arr
=
[
'
北京
'
,
'
上海
'
,
'
广州
'
,
'
深圳
'
,
'
青岛
'
,
'
南京
'
,
'
杭州
'
,
'
天津
'
,
'
石家庄
'
,
'
济南
'
,
'
烟台
'
,
'
威海
'
,
'
大连
'
,
'
连云港
'
,
'
潍坊
'
]
arr
.
forEach
((
item
,
index
)
=>
{
this
.
topAreas
.
push
({
name
:
item
,
top
:
`
${
random
(
0
,
382
)}
px`
,
left
:
`
${
random
(
0
,
324
)}
px`
,
size
:
`
${
Math
.
max
(
80
-
index
*
7
,
12
)}
px`
})
})
this
.
topAreas
[
0
].
top
=
'
180px
'
this
.
topAreas
[
0
].
left
=
'
120px
'
})
},
methods
:
{
...
...
src/views/homepage/information/index.vue
View file @
47a6aefa
...
...
@@ -158,7 +158,11 @@ export default {
}).
then
((
res
)
=>
{
this
.
informationList
=
res
.
data
.
information
.
data
this
.
total
=
res
.
data
.
information
.
total
this
.
promotionObj
=
res
.
data
.
advertisement
.
data
[
0
]
||
{
imgSrc
:
''
,
url
:
''
}
if
(
res
.
data
.
advertisement
.
data
)
{
this
.
promotionObj
=
res
.
data
.
advertisement
.
data
[
0
]
}
else
{
this
.
promotionObj
=
{
imgSrc
:
''
,
url
:
''
}
}
if
(
this
.
page
===
1
)
{
this
.
topList
=
[]
if
(
this
.
informationList
[
0
])
{
...
...
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