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
bd97eefd
Commit
bd97eefd
authored
Aug 21, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 订单详情_底部按钮点击事件
parent
c89d0be0
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
15 deletions
+24
-15
orderDetail.js
src/pages/orderDetail/orderDetail.js
+13
-1
orderDetail.wxml
src/pages/orderDetail/orderDetail.wxml
+8
-11
project.config.json
src/project.config.json
+3
-3
No files found.
src/pages/orderDetail/orderDetail.js
View file @
bd97eefd
...
...
@@ -23,7 +23,7 @@ wxService.page({
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
const
{
id
}
=
this
.
options
const
{
id
}
=
this
.
options
let
detailOrderList
=
wx
.
getStorageSync
(
'orderList'
)
let
currentDetail
=
detailOrderList
.
filter
(
item
=>
item
.
id
==
id
)
...
...
@@ -32,6 +32,18 @@ wxService.page({
detail
:
currentDetail
[
0
]
})
},
// 删除订单
handelDelOrder
()
{
console
.
log
(
'删除订单'
)
},
// 立即支付
handelToPay
()
{
console
.
log
(
'立即支付'
)
},
// 取消订单
handelCancelOrder
()
{
console
.
log
(
'取消订单'
)
},
// 申请退款
handelRequestRefund
()
{
console
.
log
(
'申请退款'
)
},
// 确认收货
handelConfirmReceipt
()
{
console
.
log
(
'确认收货'
)
},
copy
(
e
)
{
wx
.
setClipboardData
({
//准备复制的数据
...
...
src/pages/orderDetail/orderDetail.wxml
View file @
bd97eefd
<view class="page-order-detail">
<view class="header-wrap" style="background-image:url('/assets/imgs/7_1_0/rf_bgc.jpg')">
<view class="refund-status">
...
...
@@ -48,7 +47,7 @@
<view class="pro-wrap">
<block wx:for="{{detail.skuVOList}}" wx:for-item="item" wx:key="">
<view class="pro-list">
<image class="pro-img" src="{{item.mainImgUrl}}"></image
>
<image class="pro-img" src="{{item.mainImgUrl}}" /
>
<view class="pro-info">
<view class="pro-name">{{item.productName}}</view>
<view class="pro-desc">
...
...
@@ -100,23 +99,21 @@
</view>
<!-- 底部按钮 -->
<view class="button-wrap" wx-if="{{detail.status == 'C'}}">
<button class="btn btn-primary btn-lg
">删除订单</button>
<button class="btn btn-primary btn-lg" bindtap="handelDelOrder
">删除订单</button>
</view>
<view class="button-wrap" wx-if="{{detail.status == 'N'}}">
<button class="btn btn-primary btn-lg
">立即支付</button>
<button class="btn btn-lg btn-gray
">取消订单</button>
<button class="btn btn-primary btn-lg" bindtap="handelToPay
">立即支付</button>
<button class="btn btn-lg btn-gray" bindtap="handelCancelOrder
">取消订单</button>
</view>
<view class="button-wrap" wx-if="{{detail.status == 'P'}}">
<button class="btn btn-lg btn-gray
">申请退款</button>
<button class="btn btn-lg btn-gray" bindtap="handelRequestRefund
">申请退款</button>
</view>
<view class="button-wrap" wx-if="{{detail.status == 'D'}}">
<button class="btn btn-primary btn-lg
">申请退款</button>
<button class="btn btn-lg btn-gray
">确认收货</button>
<button class="btn btn-primary btn-lg" bindtap="handelRequestRefund
">申请退款</button>
<button class="btn btn-lg btn-gray" bindtap="handelCancelOrder
">确认收货</button>
</view>
<view class="button-wrap" wx-if="{{detail.status == 'R'}}">
<button class="btn btn-lg btn-gray
">申请退款</button>
<button class="btn btn-lg btn-gray" bindtap="handelConfirmReceipt
">申请退款</button>
</view>
</view>
src/project.config.json
View file @
bd97eefd
...
...
@@ -39,7 +39,7 @@
"list"
:
[]
},
"miniprogram"
:
{
"current"
:
36
,
"current"
:
25
,
"list"
:
[
{
"id"
:
-1
,
...
...
@@ -203,10 +203,10 @@
"scene"
:
null
},
{
"id"
:
-1
,
"id"
:
25
,
"name"
:
"订单详情"
,
"pathName"
:
"pages/orderDetail/orderDetail"
,
"query"
:
""
,
"query"
:
"
id=613402110104571904
"
,
"scene"
:
null
},
{
...
...
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