Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7-Eleven
Overview
Overview
Details
Activity
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
高淑倩
7-Eleven
Commits
9c42da3c
Commit
9c42da3c
authored
Aug 23, 2019
by
赵雅纹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分类商品列表更改
parent
e318015e
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
176 additions
and
2 deletions
+176
-2
app.json
src/app.json
+2
-1
category-style-01.png
src/assets/imgs/7_1_0/category-style-01.png
+0
-0
category-style-02.png
src/assets/imgs/7_1_0/category-style-02.png
+0
-0
category.wxml
src/pages/category/category.wxml
+1
-1
categoryPro.js
src/subPackage/page/pages/categoryPro/categoryPro.js
+117
-0
categoryPro.json
src/subPackage/page/pages/categoryPro/categoryPro.json
+8
-0
categoryPro.wxml
src/subPackage/page/pages/categoryPro/categoryPro.wxml
+22
-0
categoryPro.wxss
src/subPackage/page/pages/categoryPro/categoryPro.wxss
+26
-0
No files found.
src/app.json
View file @
9c42da3c
...
@@ -45,7 +45,8 @@
...
@@ -45,7 +45,8 @@
"pages/myInvite/myInvite"
,
"pages/myInvite/myInvite"
,
"pages/share/share"
,
"pages/share/share"
,
"pages/paymentStatus/paymentStatus"
,
"pages/paymentStatus/paymentStatus"
,
"pages/fun/fun"
"pages/fun/fun"
,
"pages/categoryPro/categoryPro"
]
]
}
}
],
],
...
...
src/assets/imgs/7_1_0/category-style-01.png
0 → 100644
View file @
9c42da3c
1.16 KB
src/assets/imgs/7_1_0/category-style-02.png
0 → 100644
View file @
9c42da3c
799 Bytes
src/pages/category/category.wxml
View file @
9c42da3c
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
<view class="menu-list">
<view class="menu-list">
<view wx:for="{{menuSec.children}}" wx:key="{{k}}" wx:for-index="k" wx:for-item="menuThr" class="menu-third" >
<view wx:for="{{menuSec.children}}" wx:key="{{k}}" wx:for-index="k" wx:for-item="menuThr" class="menu-third" >
<view data-id="{{menuThr.id}}" data-name="{{menuThr.label}}" bindtap="navPage">
<view data-id="{{menuThr.id}}" data-name="{{menuThr.label}}" bindtap="navPage">
<navigator hover-class="none" class="sec-menu-image" open-type="navigate" url="/subPackage/page/pages/
fun/fun
?id={{menuThr.id}}&name={{menuThr.label}}">
<navigator hover-class="none" class="sec-menu-image" open-type="navigate" url="/subPackage/page/pages/
categoryPro/categoryPro
?id={{menuThr.id}}&name={{menuThr.label}}">
<image src="{{menuThr.image}}" class="thr-menu-image" ></image>
<image src="{{menuThr.image}}" class="thr-menu-image" ></image>
<view class="thr-menu-name">{{menuThr.label}}</view>
<view class="thr-menu-name">{{menuThr.label}}</view>
</navigator>
</navigator>
...
...
src/subPackage/page/pages/categoryPro/categoryPro.js
0 → 100644
View file @
9c42da3c
// subPackage/page/pages/fun/fun.js
const
wxService
=
require
(
'../../../../utils/wxService'
)
wxService
.
page
({
/**
* 页面的初始数据
*/
data
:
{
proData
:
[],
pageNo
:
1
,
pageSize
:
10
,
totalPages
:
''
,
form
:
{
queryDto
:
{
mallCategoryId
:
''
}
},
proStyle
:
false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
console
.
log
(
options
)
if
(
options
&&
options
.
id
)
{
this
.
setData
({
form
:
{
queryDto
:
{
mallCategoryId
:
options
.
id
}
}
})
}
},
/**
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
this
.
getProList
();
},
//获取商品列表
getProList
()
{
wx
.
showLoading
({
title
:
'加载中'
})
wxService
.
post
(
`/sale/product/buyer/listPageByCategoryId?pageNo=
${
this
.
data
.
pageNo
}
&pageSize=
${
this
.
data
.
pageSize
}
`
,
this
.
data
.
form
.
queryDto
).
then
(
res
=>
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
&&
data
.
content
)
{
wx
.
hideLoading
()
this
.
setData
({
proData
:
this
.
data
.
pageNo
==
1
?
[...
data
.
content
]
:
[...
this
.
data
.
proData
,
...
data
.
content
],
totalPages
:
data
.
totalPages
,
totalElements
:
data
.
totalElements
})
}
}).
finally
(()
=>
{
wx
.
hideLoading
()
})
},
// 切换列表样式
switchProStyle
(){
this
.
setData
({
proStyle
:
!
this
.
data
.
proStyle
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
:
function
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
:
function
()
{
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
this
.
setData
({
pageNo
:
1
,
})
this
.
getProList
()
wx
.
stopPullDownRefresh
();
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
const
{
pageNo
,
pageSize
,
totalPages
}
=
this
.
data
if
(
pageNo
<
totalPages
)
{
this
.
setData
({
pageNo
:
pageNo
+
1
,
})
this
.
getProList
()
}
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
:
function
()
{
}
})
\ No newline at end of file
src/subPackage/page/pages/categoryPro/categoryPro.json
0 → 100644
View file @
9c42da3c
{
"navigationBarTitleText"
:
"聚FUN"
,
"usingComponents"
:
{
"product-list-style-one"
:
"/component/productListStyleOne/productListStyleOne"
,
"product-list-style-two"
:
"/component/productListStyleTwo/productListStyleTwo"
}
}
\ No newline at end of file
src/subPackage/page/pages/categoryPro/categoryPro.wxml
0 → 100644
View file @
9c42da3c
<!--subPackage/page/pages/categoryPro/categoryPro.wxml-->
<view class="page-category-pro">
<view class="pro-nav-wrap">
<view class="nav-list">
<view class="nav-item nav-active">推荐</view>
<view class="nav-item">最新</view>
<view class="nav-item">最热</view>
<view class="nav-item">价格</view>
</view>
<view class="pro-style" bindtap="switchProStyle">
<image mode="widthFix" src="{{!proStyle ? '/assets/imgs/7_1_0/category-style-01.png' : '/assets/imgs/7_1_0/category-style-02.png'}}"></image>
</view>
</view>
<product-list-style-one image-data="{{proData}}" wx:if="{{!proStyle}}" />
<product-list-style-two image-data="{{proData}}" wx:if="{{proStyle}}" />
<view class="empty" wx:if="{{proData.length < 1}}">
暂无商品哦~
</view>
</view>
\ No newline at end of file
src/subPackage/page/pages/categoryPro/categoryPro.wxss
0 → 100644
View file @
9c42da3c
/* subPackage/page/pages/categoryPro/categoryPro.wxss */
.empty{
width: 300rpx;
color: #808080;
margin: 40% auto;
text-align: center;
}
.pro-nav-wrap{
padding: 16rpx 54rpx 16rpx 30rpx;
display: flex;
justify-content: space-between;
}
.nav-list{
display: flex;
}
.nav-item{
margin-right: 50rpx;
font-size: 24rpx;
color: #787878;
}
.nav-active{
color: #c09a74;
}
.pro-style image{
width: 30rpx;
}
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