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
0e679342
Commit
0e679342
authored
Jun 06, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 消费列表
parent
2edb060e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
10 deletions
+15
-10
mySpend.js
src/pages/mySpend/mySpend.js
+8
-9
mySpend.wxml
src/pages/mySpend/mySpend.wxml
+3
-1
mySpend.wxss
src/pages/mySpend/mySpend.wxss
+4
-0
No files found.
src/pages/mySpend/mySpend.js
View file @
0e679342
...
@@ -26,12 +26,7 @@ wxService.page({
...
@@ -26,12 +26,7 @@ wxService.page({
*/
*/
onShow
:
function
()
{
onShow
:
function
()
{
// const { orderNo } = this.options
// const { orderNo } = this.options
// 取会员id
this
.
initOrderList
(
this
.
data
.
pageNo
,
this
.
data
.
pageSize
)
const
{
memberId
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
const
orderNo
=
memberId
if
(
orderNo
){
this
.
initOrderList
(
this
.
data
.
pageNo
,
this
.
data
.
pageSize
,
orderNo
)
}
},
},
goDetail
(
e
)
{
goDetail
(
e
)
{
const
{
orderNo
}
=
e
.
currentTarget
.
dataset
const
{
orderNo
}
=
e
.
currentTarget
.
dataset
...
@@ -39,12 +34,15 @@ wxService.page({
...
@@ -39,12 +34,15 @@ wxService.page({
wxService
.
router
(
`/pages/consumptionDetails/consumptionDetails?orderNo=
${
orderNo
}
`
)
wxService
.
router
(
`/pages/consumptionDetails/consumptionDetails?orderNo=
${
orderNo
}
`
)
},
},
//获取消费列表
//获取消费列表
initOrderList
(
pageNo
,
pageSize
,
orderNo
){
initOrderList
(
pageNo
,
pageSize
){
wx
.
showLoading
({
wx
.
showLoading
({
title
:
'加载中'
title
:
'加载中'
})
})
// 取会员id
const
{
memberId
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
const
params
=
{
const
params
=
{
memberId
:
orderNo
memberId
}
}
wxService
.
post
(
`/sale/order/list?pageNo=
${
pageNo
}
&pageSize=
${
pageSize
}
`
,
params
).
then
(
res
=>
{
wxService
.
post
(
`/sale/order/list?pageNo=
${
pageNo
}
&pageSize=
${
pageSize
}
`
,
params
).
then
(
res
=>
{
const
{
result
,
data
}
=
res
.
data
const
{
result
,
data
}
=
res
.
data
...
@@ -77,7 +75,8 @@ wxService.page({
...
@@ -77,7 +75,8 @@ wxService.page({
pageSize
:
10
,
pageSize
:
10
,
noMore
:
true
noMore
:
true
})
})
this
.
initOrderList
(
this
.
data
.
pageNo
,
this
.
data
.
pageSize
)
//
this
.
initOrderList
(
this
.
data
.
pageNo
,
this
.
data
.
pageSize
,)
}
else
{
}
else
{
this
.
setData
({
this
.
setData
({
noMore
:
true
noMore
:
true
...
...
src/pages/mySpend/mySpend.wxml
View file @
0e679342
...
@@ -10,5 +10,7 @@
...
@@ -10,5 +10,7 @@
</view>
</view>
</view>
</view>
</scroll-view>
</scroll-view>
<no-more wx:if="{{noMore}}"/>
<view class="no-bottom">
<no-more wx:if="{{noMore}}"/>
</view>
</view>
</view>
src/pages/mySpend/mySpend.wxss
View file @
0e679342
...
@@ -27,4 +27,7 @@ page{
...
@@ -27,4 +27,7 @@ page{
}
}
.fail-status{
.fail-status{
color: #999999;
color: #999999;
}
.no-bottom {
margin: 50rpx 0;
}
}
\ No newline at end of file
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