Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hls-xcmg-vue-app
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
xugong
hls-xcmg-vue-app
Commits
a51b2793
Commit
a51b2793
authored
Oct 23, 2019
by
李晓兵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'我的收藏'
parent
edd7e3c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
115 additions
and
2 deletions
+115
-2
my-product-list.Vue
src/pages/myProductCollection/my-product-list.Vue
+115
-2
No files found.
src/pages/myProductCollection/my-product-list.Vue
View file @
a51b2793
...
...
@@ -17,6 +17,30 @@
<img
src=
"@/assets/distributorSign/search.png"
alt=
""
>
</div>
</div>
<list-item
v-for=
"item in productList"
:key=
"item.product_id"
>
<item
:proportion=
"[1,4]"
@
click
.
native=
"goDetailed(item.product_id,item.collect_status)"
>
<div
slot=
"name"
class=
"item-pic"
>
<img
src=
"@/assets/homePage/WechatIMG2 Copy@2x.png"
alt=
""
>
</div>
<div
slot=
"content"
class=
"item-content"
>
<div
class=
"centers"
>
<p
class=
"firsts1"
>
经销商
</p>
<p
class=
"seconds1"
>
{{
item
.
bp_name
}}
</p>
</div>
<div
class=
"centers"
>
<p
class=
"firsts1"
>
参数项
</p>
<p
class=
"seconds1"
>
{{
item
.
product_code
}}
</p>
</div>
<div
class=
"centers"
>
<p
class=
"firsts1"
>
产品名称
</p>
<p
class=
"seconds1"
>
{{
item
.
product_name
}}
</p>
</div>
</div>
<div
slot=
"right-icon"
>
<img
class=
"arrow"
src=
"@/assets/productQuery/getIn.png"
alt=
""
>
</div>
</item>
</list-item>
</h-content>
</h-view>
</
template
>
...
...
@@ -24,7 +48,9 @@
<
script
>
export
default
{
data
()
{
return
{}
return
{
productList
:
[],
}
},
created
:
function
()
{
},
...
...
@@ -34,7 +60,40 @@
},
destroyed
:
function
()
{
},
methods
:
{}
beforeRouteEnter
(
to
,
from
,
next
)
{
next
(
vm
=>
{
if
(
from
.
name
===
'MyInfo'
)
{
vm
.
getList
()
}
})
},
methods
:
{
getList
(){
let
vm
=
this
let
url
=
$config
.
basePath
+
'my_collection_query'
let
param
=
{
user_phone
:
window
.
localStorage
.
getItem
(
'user_phone'
),
}
vm
.
$post
(
url
,
param
).
then
(
function
(
res
)
{
if
(
res
.
result
===
'S'
)
{
vm
.
productList
=
res
.
lists
}
else
{
hlsPopup
.
showLongCenter
(
res
.
message
)
}
})
},
// val:产品id, status: 收藏状态
goDetailed
(
val
,
status
)
{
// 进入产品查询功能明细页面
window
.
sessionStorage
.
setItem
(
'collect_status'
,
status
)
this
.
$router
.
push
({
name
:
'ProDetailed'
,
params
:
{
product_id
:
val
,
// collect_status: status,
},
})
},
}
}
</
script
>
...
...
@@ -87,4 +146,58 @@
}
}
}
.arrow {
width: 16px;
height: 16px;
// margin-left: 30px;
margin-top: 16px;
}
.item-pic {
width: 100px;
//height: 110px;
img {
width: 100%;
height: 100%;
}
}
.item-content {
// height: 102px;
width: 100%;
margin-left: 20px;
.centers:nth-of-type(1) {
margin-top: 16px;
}
.centers:nth-of-type(2) {
margin-top: 6px;
}
.centers:nth-of-type(3) {
margin-top: 6px;
}
.centers {
// margin-top: 6px;
// white-space: nowrap;
// width: 100%;
font-family: PingFangSC-Semibold;
font-size: 13px;
color: rgba(56,63,69,0.60);
letter-spacing: 0.5px;
display: flex;
flex-direction: row;
.firsts1 {
width: 60px;
height: 17px;
font-family: PingFangSC-Regular;
font-size: 13px;
color: rgba(56,63,69,0.60);
}
.seconds1 {
width: 70%;
margin-left: 16px;
height: auto;
font-family: PingFangSC-Regular;
font-size: 13px;
color: #383F45;
}
}
}
</
style
>
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