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
d1b65078
Commit
d1b65078
authored
May 25, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 订单列表
parent
747bbc4c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
47 deletions
+45
-47
IntegralMall.js
src/pages/IntegralMall/IntegralMall.js
+1
-1
mySpend.js
src/pages/mySpend/mySpend.js
+38
-44
mySpend.json
src/pages/mySpend/mySpend.json
+3
-1
mySpend.wxml
src/pages/mySpend/mySpend.wxml
+3
-1
No files found.
src/pages/IntegralMall/IntegralMall.js
View file @
d1b65078
...
...
@@ -79,7 +79,7 @@ wxService.page({
noMore
:
true
})
this
.
initIntegralCouponList
(
this
.
data
.
pageNo
,
this
.
data
.
pageSize
)
}
else
{
}
else
{
this
.
setData
({
noMore
:
true
})
...
...
src/pages/mySpend/mySpend.js
View file @
d1b65078
...
...
@@ -9,79 +9,74 @@ wxService.page({
* 页面的初始数据
*/
data
:
{
pa
rams
:{
pageNo
:
'1'
,
pageSize
:
'10'
}
,
totalPages
:
''
pa
geNo
:
1
,
pageSize
:
10
,
totalPages
:
''
,
orderList
:
[]
,
noMore
:
false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
},
onLoad
:
function
(
options
)
{},
/**
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
this
.
initOrderList
()
// const { orderNo } = this.options
const
orderNo
=
'700000000013498'
if
(
orderNo
){
this
.
initOrderList
(
this
.
data
.
pageNo
,
this
.
data
.
pageSize
,
orderNo
)
}
},
//获取消费列表
initOrderList
(
type
){
initOrderList
(
pageNo
,
pageSize
,
orderNo
){
wx
.
showLoading
({
title
:
'加载中'
})
wxService
.
post
(
`/sale/order/list?pageNo=
${
this
.
data
.
params
.
pageNo
}
&pageSize=
${
this
.
data
.
params
.
pageSize
}
`
,{
memberId
:
546456
}).
then
(
res
=>
{
let
orderList
=
[];
orderList
=
this
.
data
.
params
.
pageNo
==
1
?
res
.
data
.
data
.
content
:
this
.
data
.
orderList
.
concat
(
res
.
data
.
data
.
content
);
this
.
setData
({
orderList
,
totalPages
:
res
.
data
.
data
.
totalPages
,
})
wx
.
hideLoading
();
if
(
type
&&
type
.
pullDown
)
wx
.
stopPullDownRefresh
();
const
params
=
{
memberId
:
orderNo
}
wxService
.
post
(
`/sale/order/list?pageNo=
${
pageNo
}
&pageSize=
${
pageSize
}
`
,
params
).
then
(
res
=>
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
){
wx
.
hideLoading
()
// 数量
this
.
setData
({
orderList
:
this
.
data
.
pageNo
==
1
?
[...
data
.
content
]:
[...
this
.
data
.
orderList
,...
data
.
content
],
totalPages
:
data
.
totalPages
})
}
}).
finally
(()
=>
{
wx
.
hideLoading
();
this
.
setData
({
orderList
:
''
})
})
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
this
.
setData
({
params
:
{
pageNo
:
1
,
pageSize
:
10
,
},
})
this
.
initOrderList
({
pullDown
:
true
});
},
onPullDownRefresh
:
function
()
{},
/**
* 页面上拉触底事件的处理函数
*/
bindDownLoad
:
function
()
{
if
(
this
.
data
.
params
.
pageNo
<
this
.
data
.
totalPages
)
{
onReachBottom
:
function
()
{
if
(
this
.
data
.
pageNo
<
this
.
data
.
totalPages
)
{
this
.
setData
({
pageNo
:
this
.
data
.
pageNo
+
1
,
pageSize
:
10
,
noMore
:
true
})
this
.
initOrderList
(
this
.
data
.
pageNo
,
this
.
data
.
pageSize
)
}
else
{
this
.
setData
({
params
:
{
pageNo
:
this
.
data
.
params
.
pageNo
+
1
,
pageSize
:
10
},
loadDataDone
:
true
noMore
:
true
})
this
.
initOrderList
()
}
},
})
\ No newline at end of file
src/pages/mySpend/mySpend.json
View file @
d1b65078
{
"navigationBarTitleText"
:
"我的消费"
,
"usingComponents"
:
{},
"usingComponents"
:
{
"no-more"
:
"/component/noMore/noMore"
},
"enablePullDownRefresh"
:
true
,
"onPullDownRefresh"
:
true
,
"onReachBottom"
:
true
...
...
src/pages/mySpend/mySpend.wxml
View file @
d1b65078
<!--pages/userCenter.wxml-->
<view class='page-mySpend'>
<scroll-view scroll-y bindscrolltolower="bindDownLoad">
<!-- <view class='spend-wrap' wx:for='{{orderList}}' wx:
key='{{index}}'
> -->
<!-- <view class='spend-wrap' wx:for='{{orderList}}' wx:
for-item="item" wx:for-index="k" wx:key="{{k}}"
> -->
<navigator url='/pages/consumptionDetails/consumptionDetails' hover-class='none'>
<view class='spend-list'>
<view class='spend-id fs-22'>订单编号:{{item.orderId}}</view>
...
...
@@ -12,4 +12,6 @@
</navigator>
<!-- </view> -->
</scroll-view>
<no-more wx:if="{{noMore}}"/>
</view>
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