Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
singleStore
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
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Max
singleStore
Commits
23c26165
Commit
23c26165
authored
Sep 05, 2021
by
June
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:分组商品上下拉
parent
b828866c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
35 deletions
+51
-35
pages/category/index.vue
pages/category/index.vue
+51
-35
No files found.
pages/category/index.vue
View file @
23c26165
...
...
@@ -60,44 +60,50 @@
<view
class=
"cates_title"
>
{{
cate_name
}}
</view>
<pull-list
ref=
"pullList"
:refresherEnabled=
"false"
@
refresh=
"refresh"
@
tolower=
"tolower"
>
<view
class=
"goods-item flex j-start a-center"
v-for=
"good in goods_list"
:key=
"good.goods_id"
@
click=
"navDetail(good)"
<block
v-for=
"(goods, goodsidx) in goods_list"
:key=
"goodsidx"
>
<image
class=
"goods-cover mr-2"
lazy-load
:src=
"baseUrl + '/' + good.goods_thumb"
mode=
"aspectFit"
/>
<view
class=
"goods-price flex-1 flex flex-column j-between font-28"
>
<view
class=
"title"
>
{{
good
.
goods_name
}}
</view>
<view
class=
"descColor desc font-24 w-100 flex j-between a-center"
>
<text
class=
"flex-1"
>
{{
good
.
specification
}}
</text>
<text
class=
"sale-count text-right"
>
销量:
{{
good
.
virtual_quantity_sold
}}
</text>
</view>
<view
class=
"w-100 flex j-between a-center"
>
<view
class=
"flex j-start a-center"
>
<price
:is_inquiry=
"good.is_inquiry"
:price=
"good.shop_price"
<view
class=
"goods-item flex j-start a-center"
v-for=
"good in goods"
:key=
"good.goods_id"
@
click=
"navDetail(good)"
>
<image
class=
"goods-cover mr-2"
lazy-load
:src=
"baseUrl + '/' + good.goods_thumb"
mode=
"aspectFit"
/>
<view
class=
"goods-price flex-1 flex flex-column j-between font-28"
>
<view
class=
"title"
>
{{
good
.
goods_name
}}
</view>
<view
class=
"descColor desc font-24 w-100 flex j-between a-center"
>
<text
class=
"flex-1"
>
{{
good
.
specification
}}
</text>
<text
class=
"sale-count text-right"
>
销量:
{{
good
.
virtual_quantity_sold
}}
</text>
</view>
<view
class=
"w-100 flex j-between a-center"
>
<view
class=
"flex j-start a-center"
>
<price
:is_inquiry=
"good.is_inquiry"
:price=
"good.shop_price"
/>
<text
class=
"primaryColor font-28"
>
{{
good
.
least_str
}}
</text>
</view>
<image
class=
"cart-icon"
src=
"/static/images/common/icon-cart.png"
mode=
"aspectFit"
@
click.stop=
"handlePop(good)"
/>
<text
class=
"primaryColor font-28"
>
{{
good
.
least_str
}}
</text>
</view>
<image
class=
"cart-icon"
src=
"/static/images/common/icon-cart.png"
mode=
"aspectFit"
@
click.stop=
"handlePop(good)"
/>
</view>
</view>
</
view
>
</
block
>
<view
class=
"empty-text text-center mt-4 p-2"
>
到底了,看看别的分类吧~
</view>
...
...
@@ -192,6 +198,7 @@ export default {
cat_id
=
cate_list
[
index
].
id
this
.
cate_name
=
cate_list
[
index
].
cat_name
this
.
loadMore
.
resetParams
()
this
.
goods_list
=
[]
this
.
getCateGoods
()
},
...
...
@@ -201,10 +208,7 @@ export default {
const
{
status
,
data
}
=
await
this
.
loadMore
.
getList
({
cat_id
},
cateGoodsList
)
if
(
status
)
{
this
.
goods_list
=
data
this
.
cate
}
else
{
this
.
goods_list
=
[]
this
.
$set
(
this
.
goods_list
,
this
.
goods_list
.
length
,
data
)
}
}
catch
(
e
){
console
.
log
(
e
)
...
...
@@ -212,6 +216,18 @@ export default {
}
},
tolower
()
{
console
.
log
(
'
tolower
'
)
this
.
getCateGoods
()
},
refresh
()
{
console
.
log
(
'
refresh
'
)
this
.
loadMore
.
resetParams
()
this
.
goods_list
=
[]
this
.
getCateGoods
()
},
// 切换分类 type === 1 分类1 type === 2 分类2, cate1_idx 分类一的下表
cateChange
(
type
,
cate_id
,
cate1_idx
,
cate2_idx
)
{
if
(
cat_id
===
cate_id
)
return
...
...
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