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
d51177cd
Commit
d51177cd
authored
Aug 20, 2019
by
daqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify: 订单详情
parent
7c7a5950
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
7 deletions
+15
-7
order.js
src/pages/order/order.js
+5
-2
order.wxml
src/pages/order/order.wxml
+1
-1
orderDetail.js
src/pages/orderDetail/orderDetail.js
+9
-4
No files found.
src/pages/order/order.js
View file @
d51177cd
...
...
@@ -61,8 +61,9 @@ wxService.page({
this
.
initOrderList
(
this
.
data
.
pageNo
,
this
.
data
.
pageSize
,
this
.
data
.
trade
)
},
handelDetail
(
e
)
{
const
{
detail
}
=
e
.
currentTarget
.
dataset
wxService
.
router
(
`/pages/orderDetail/orderDetail`
).
search
(
detail
)
// const {detail} = e.currentTarget.dataset
const
{
id
}
=
e
.
currentTarget
.
dataset
wxService
.
router
(
`/pages/orderDetail/orderDetail?id=
${
id
}
`
)
},
initOrderList
(
pageNo
,
pageSize
,
trade
)
{
wx
.
showLoading
({
...
...
@@ -78,6 +79,8 @@ wxService.page({
this
.
setData
({
orderList
:
this
.
data
.
pageNo
==
1
?
[...
data
]
:
[...
this
.
data
.
orderList
,
...
data
],
noMoreFlag
:
data
.
length
<
pageSize
?
true
:
false
},()
=>
{
wx
.
setStorageSync
(
'orderList'
,
this
.
data
.
orderList
)
})
}
}
...
...
src/pages/order/order.wxml
View file @
d51177cd
...
...
@@ -32,7 +32,7 @@
<text class="order-status" wx-if="{{item.status == 'D'}}">待收货</text>
<text class="order-status" wx-if="{{item.status == 'R'}}">已完成</text>
</view>
<view class="pro-list" data-detail="{{item}}" bindtap="handelDetail">
<view class="pro-list" data-detail="{{item}}"
data-id="{{item.id}}"
bindtap="handelDetail">
<scroll-view scroll-x="true">
<view class="uploadWrap" scroll-x="true">
<block wx:for='{{item.skuVOList}}' wx:for-item="sub" wx:key="s" >
...
...
src/pages/orderDetail/orderDetail.js
View file @
d51177cd
...
...
@@ -62,10 +62,15 @@ wxService.page({
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
if
(
!
Object
.
keys
(
this
.
options
).
length
){
return
}
this
.
setData
({
detail
:
this
.
options
})
const
{
id
}
=
this
.
options
let
detailOrderList
=
wx
.
getStorageSync
(
'orderList'
)
let
currentDetail
=
detailOrderList
.
filter
(
item
=>
item
.
id
==
id
)
console
.
log
(
"currentDetail"
,
currentDetail
)
// if (!Object.keys(this.options).length){ return }
// this.setData({
// detail: this.options
// })
},
copy
(
e
)
{
wx
.
setClipboardData
({
...
...
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