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
2278e7c4
Commit
2278e7c4
authored
Aug 05, 2023
by
zhanglw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
产品卡片可以直接跳转到供应商
parent
1a968448
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
10 deletions
+35
-10
index.vue
src/views/homepage/index.vue
+8
-1
hardware.vue
src/views/homepage/product/hardware.vue
+16
-6
index.vue
src/views/homepage/product/index.vue
+11
-3
No files found.
src/views/homepage/index.vue
View file @
2278e7c4
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
</el-row>
</el-row>
<el-row>
<el-row>
<el-col
:span=
"24"
>
<el-col
:span=
"24"
>
<div
class=
"subTitle
"
:title=
"item.subTitle
"
>
{{
item
.
subTitle
}}
</div>
<div
class=
"subTitle
touch"
:title=
"item.subTitle"
@
click=
"goToDetailsSupplier(item, '/supplier/details')
"
>
{{
item
.
subTitle
}}
</div>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row
style=
"margin-top: 6px"
>
<el-row
style=
"margin-top: 6px"
>
...
@@ -291,6 +291,13 @@ export default {
...
@@ -291,6 +291,13 @@ export default {
this
.
$router
.
push
({
path
:
`
${
path
}
`
})
this
.
$router
.
push
({
path
:
`
${
path
}
`
})
}
}
},
},
goToDetailsSupplier
(
item
,
path
)
{
if
(
item
)
{
this
.
$router
.
push
({
path
:
`
${
path
}
/
${
item
.
customerId
||
123
}
`
})
}
else
{
this
.
$router
.
push
({
path
:
`
${
path
}
`
})
}
},
// 点击地区top
// 点击地区top
areaTopClick
(
text
)
{
areaTopClick
(
text
)
{
console
.
log
(
text
)
console
.
log
(
text
)
...
...
src/views/homepage/product/hardware.vue
View file @
2278e7c4
...
@@ -82,9 +82,10 @@
...
@@ -82,9 +82,10 @@
<img
v-if=
"item.isGood"
src=
"@/assets/home_images/recommend.png"
class=
"stamp"
title=
"推荐"
style=
"top: 10px;right: 8px"
>
<img
v-if=
"item.isGood"
src=
"@/assets/home_images/recommend.png"
class=
"stamp"
title=
"推荐"
style=
"top: 10px;right: 8px"
>
<img
v-if=
"item.isHot"
src=
"@/assets/home_images/hot.png"
class=
"stamp"
title=
"热门"
style=
"top: 0;left: 0"
>
<img
v-if=
"item.isHot"
src=
"@/assets/home_images/hot.png"
class=
"stamp"
title=
"热门"
style=
"top: 0;left: 0"
>
<el-image
<el-image
:src=
"item.imgSrc?imgSrcStart+'/img'+item.imgSrc:defaultImgProduct
"
class=
"touch
"
:
preview-src-list=
"item.imgSrcList.length?item.imgSrcList:[defaultImgProduct]
"
:
src=
"item.imgSrc?imgSrcStart+'/productPic/'+item.imgSrc:defaultImgProduct
"
style=
"width:284px;height: 284px;margin: 0 32px 4px"
style=
"width:284px;height: 284px;margin: 0 32px 4px"
@
click=
"goToDetails(item, '/product/details')"
>
>
<div
slot=
"placeholder"
class=
"image-slot"
>
加载中
<span
class=
"dot"
>
...
</span></div>
<div
slot=
"placeholder"
class=
"image-slot"
>
加载中
<span
class=
"dot"
>
...
</span></div>
</el-image>
</el-image>
...
@@ -99,7 +100,7 @@
...
@@ -99,7 +100,7 @@
</el-row>
</el-row>
<el-row>
<el-row>
<el-col
:span=
"24"
>
<el-col
:span=
"24"
>
<div
class=
"subTitle
"
:title=
"item.subTitle
"
>
{{
item
.
subTitle
}}
</div>
<div
class=
"subTitle
touch"
:title=
"item.subTitle"
@
click=
"goToDetailsSupplier(item, '/supplier/details')
"
>
{{
item
.
subTitle
}}
</div>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row
style=
"margin-top: 6px"
>
<el-row
style=
"margin-top: 6px"
>
...
@@ -161,7 +162,7 @@ export default {
...
@@ -161,7 +162,7 @@ export default {
query
:
{
query
:
{
keyword
:
''
,
keyword
:
''
,
area
:
''
,
area
:
''
,
type
:
''
,
type
:
'
1
'
,
subType
:
''
,
subType
:
''
,
sort
:
false
sort
:
false
},
},
...
@@ -297,13 +298,15 @@ export default {
...
@@ -297,13 +298,15 @@ export default {
},
},
mounted
()
{
mounted
()
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
if
(
this
.
$route
.
params
)
{
this
.
query
=
Object
.
assign
(
this
.
query
,
this
.
$route
.
params
)
this
.
query
=
Object
.
assign
(
this
.
query
,
this
.
$route
.
params
)
}
})
})
},
},
methods
:
{
methods
:
{
onDictReady
(
dict
)
{
onDictReady
(
dict
)
{
this
.
areaOpts
=
[{
value
:
''
,
label
:
'
全部
'
},
...
dict
.
area_province
]
this
.
areaOpts
=
[{
value
:
''
,
label
:
'
全部
'
},
...
dict
.
area_province
]
this
.
title
=
dict
.
product_type
[
this
.
$route
.
params
.
type
-
1
].
label
this
.
title
=
dict
.
product_type
[
this
.
query
.
type
-
1
].
label
this
.
subTypeOpts
=
[{
value
:
''
,
label
:
'
全部
'
},
...
dict
[
'
product_type_
'
+
this
.
query
.
type
]]
this
.
subTypeOpts
=
[{
value
:
''
,
label
:
'
全部
'
},
...
dict
[
'
product_type_
'
+
this
.
query
.
type
]]
},
},
keywordClick
(
item
,
type
)
{
keywordClick
(
item
,
type
)
{
...
@@ -338,6 +341,13 @@ export default {
...
@@ -338,6 +341,13 @@ export default {
this
.
$router
.
push
({
path
:
`
${
path
}
`
})
this
.
$router
.
push
({
path
:
`
${
path
}
`
})
}
}
},
},
goToDetailsSupplier
(
item
,
path
)
{
if
(
item
)
{
this
.
$router
.
push
({
path
:
`
${
path
}
/
${
item
.
customerId
||
123
}
`
})
}
else
{
this
.
$router
.
push
({
path
:
`
${
path
}
`
})
}
},
pageChange
(
e
)
{
pageChange
(
e
)
{
this
.
page
=
e
this
.
page
=
e
this
.
loadData
()
this
.
loadData
()
...
...
src/views/homepage/product/index.vue
View file @
2278e7c4
...
@@ -85,9 +85,10 @@
...
@@ -85,9 +85,10 @@
<img
v-if=
"item.isGood"
src=
"@/assets/home_images/recommend.png"
class=
"stamp"
title=
"推荐"
style=
"top: 10px;right: 8px"
>
<img
v-if=
"item.isGood"
src=
"@/assets/home_images/recommend.png"
class=
"stamp"
title=
"推荐"
style=
"top: 10px;right: 8px"
>
<img
v-if=
"item.isHot"
src=
"@/assets/home_images/hot.png"
class=
"stamp"
title=
"热门"
style=
"top: 0;left: 0"
>
<img
v-if=
"item.isHot"
src=
"@/assets/home_images/hot.png"
class=
"stamp"
title=
"热门"
style=
"top: 0;left: 0"
>
<el-image
<el-image
:src=
"item.imgSrc?imgSrcStart+'/img'+item.imgSrc:defaultImgProduct
"
class=
"touch
"
:
preview-src-list=
"item.imgSrcList.length?item.imgSrcList:[defaultImgProduct]
"
:
src=
"item.imgSrc?imgSrcStart+'/productPic/'+item.imgSrc:defaultImgProduct
"
style=
"width:284px;height: 284px;margin: 0 32px 4px"
style=
"width:284px;height: 284px;margin: 0 32px 4px"
@
click=
"goToDetails(item, '/product/details')"
>
>
<div
slot=
"placeholder"
class=
"image-slot"
>
加载中
<span
class=
"dot"
>
...
</span></div>
<div
slot=
"placeholder"
class=
"image-slot"
>
加载中
<span
class=
"dot"
>
...
</span></div>
</el-image>
</el-image>
...
@@ -102,7 +103,7 @@
...
@@ -102,7 +103,7 @@
</el-row>
</el-row>
<el-row>
<el-row>
<el-col
:span=
"24"
>
<el-col
:span=
"24"
>
<div
class=
"subTitle
"
:title=
"item.subTitle
"
>
{{
item
.
subTitle
}}
</div>
<div
class=
"subTitle
touch"
:title=
"item.subTitle"
@
click=
"goToDetailsSupplier(item, '/supplier/details')
"
>
{{
item
.
subTitle
}}
</div>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row
style=
"margin-top: 6px"
>
<el-row
style=
"margin-top: 6px"
>
...
@@ -335,6 +336,13 @@ export default {
...
@@ -335,6 +336,13 @@ export default {
this
.
$router
.
push
({
path
:
`
${
path
}
`
})
this
.
$router
.
push
({
path
:
`
${
path
}
`
})
}
}
},
},
goToDetailsSupplier
(
item
,
path
)
{
if
(
item
)
{
this
.
$router
.
push
({
path
:
`
${
path
}
/
${
item
.
customerId
||
123
}
`
})
}
else
{
this
.
$router
.
push
({
path
:
`
${
path
}
`
})
}
},
// 点击更多
// 点击更多
moreTo
(
type
)
{
moreTo
(
type
)
{
if
(
type
===
'
product
'
)
{
if
(
type
===
'
product
'
)
{
...
...
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