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
fab3a01b
Commit
fab3a01b
authored
Aug 20, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 我的订单_全部
parent
2f72d947
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
23 deletions
+18
-23
order.js
src/pages/order/order.js
+13
-18
order.wxml
src/pages/order/order.wxml
+5
-5
No files found.
src/pages/order/order.js
View file @
fab3a01b
...
@@ -50,7 +50,8 @@ wxService.page({
...
@@ -50,7 +50,8 @@ wxService.page({
listUrl
:
"https://hwimagecdn.ihotwind.cn//544/201906/1b41a9a3247d42c89e0c461e2faaf6c1_512_512.jpg"
listUrl
:
"https://hwimagecdn.ihotwind.cn//544/201906/1b41a9a3247d42c89e0c461e2faaf6c1_512_512.jpg"
},
{
},
{
listUrl
:
"https://hwimagecdn.ihotwind.cn//544/201906/1b41a9a3247d42c89e0c461e2faaf6c1_512_512.jpg"
listUrl
:
"https://hwimagecdn.ihotwind.cn//544/201906/1b41a9a3247d42c89e0c461e2faaf6c1_512_512.jpg"
}]
}],
trade
:
''
// 订单状态(C:取消;N:新建,P:已支付;D:已发货;R:已收货)
},
},
/**
/**
...
@@ -64,25 +65,25 @@ wxService.page({
...
@@ -64,25 +65,25 @@ wxService.page({
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
:
function
()
{
onShow
:
function
()
{
this
.
initOrderList
(
this
.
data
.
pageNo
,
this
.
data
.
pageSize
)
this
.
initOrderList
(
this
.
data
.
pageNo
,
this
.
data
.
pageSize
,
this
.
data
.
trade
)
},
},
initOrderList
(
pageNo
,
pageSize
)
{
initOrderList
(
pageNo
,
pageSize
,
trade
)
{
if
(
this
.
data
.
noMoreFlag
)
{
// 没有更多数据了,不调用接口
if
(
this
.
data
.
noMoreFlag
)
{
// 没有更多数据了,不调用接口
return
false
return
false
}
}
wx
.
showLoading
({
wx
.
showLoading
({
title
:
'加载中'
,
title
:
'加载中'
,
mask
:
true
mask
:
true
})
})
wxService
.
post
(
`/sale/order/list?pageNo=
${
pageNo
}
&pageSize=
${
pageSize
}
`
).
then
(
res
=>
{
const
params
=
{
trade
}
wxService
.
post
(
`/sale/trade/buyer/history?pageNum=
${
pageNo
}
&pageSize=
${
pageSize
}
`
,
params
).
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
const
{
result
,
data
}
=
res
.
data
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
if
(
result
==
0
)
{
wx
.
hideLoading
()
wx
.
hideLoading
()
this
.
setData
({
this
.
setData
({
orderList
:
this
.
data
.
pageNo
==
1
?
[...
data
.
content
]
:
[...
this
.
data
.
orderList
,
...
data
.
content
],
orderList
:
this
.
data
.
pageNo
==
1
?
[...
data
]
:
[...
this
.
data
.
orderList
,
...
data
],
totalPages
:
data
.
totalPages
noMoreFlag
:
data
.
length
<
pageSize
?
true
:
false
})
})
}
}
}
}
...
@@ -107,17 +108,11 @@ wxService.page({
...
@@ -107,17 +108,11 @@ wxService.page({
* 页面上拉触底事件的处理函数
* 页面上拉触底事件的处理函数
*/
*/
onReachBottom
:
function
()
{
onReachBottom
:
function
()
{
if
(
this
.
data
.
pageNo
<
this
.
data
.
totalPages
)
{
this
.
setData
({
this
.
setData
({
pageNo
:
this
.
data
.
pageNo
+
1
,
pageNo
:
this
.
data
.
pageNo
+
1
,
},
()
=>
{
},
()
=>
{
this
.
initOrderList
(
this
.
data
.
pageNo
,
this
.
data
.
pageSize
,
this
.
data
.
trade
)
this
.
initOrderList
(
this
.
data
.
pageNo
,
this
.
data
.
pageSize
)
})
})
}
else
{
this
.
setData
({
noMoreFlag
:
true
})
}
},
},
/**
/**
...
...
src/pages/order/order.wxml
View file @
fab3a01b
...
@@ -22,26 +22,26 @@
...
@@ -22,26 +22,26 @@
<view class="order-header">
<view class="order-header">
<view class="order-number">
<view class="order-number">
<text>订单号</text>
<text>订单号</text>
<text class="number">{{item.
orderNo
}}</text>
<text class="number">{{item.
id
}}</text>
</view>
</view>
<text class="order-status">待付款</text>
<text class="order-status">待付款</text>
</view>
</view>
<view class="pro-list">
<view class="pro-list">
<scroll-view scroll-x="true">
<scroll-view scroll-x="true">
<view class="uploadWrap" scroll-x="true">
<view class="uploadWrap" scroll-x="true">
<block wx:for='{{
subImgs
}}' wx:for-item="sub" wx:key="s" >
<block wx:for='{{
item.skuVOList
}}' wx:for-item="sub" wx:key="s" >
<view class="upload_Item">
<view class="upload_Item">
<image class="upload_Item_img" src="{{sub.
list
Url}}" bindtap='goProDetail' data-id='{{sub.goodsId}}'></image>
<image class="upload_Item_img" src="{{sub.
mainImg
Url}}" bindtap='goProDetail' data-id='{{sub.goodsId}}'></image>
</view>
</view>
</block>
</block>
</view>
</view>
</scroll-view>
</scroll-view>
</view>
</view>
<view class="pro-number">
<view class="pro-number">
<text class="total-pro">共
5
件商品</text>
<text class="total-pro">共
{{item.skuCount}}
件商品</text>
<view class="total-price">
<view class="total-price">
实付
实付
<text class="price">¥{{item.
realPayMoney/100
}}</text>
<text class="price">¥{{item.
payAmount
}}</text>
</view>
</view>
</view>
</view>
<view class="btn-group">
<view class="btn-group">
...
...
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