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
85525c94
Commit
85525c94
authored
Aug 23, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 订单列表_删除
parent
86f0e529
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
1 deletions
+26
-1
order.js
src/pages/order/order.js
+25
-0
order.wxml
src/pages/order/order.wxml
+1
-1
No files found.
src/pages/order/order.js
View file @
85525c94
...
@@ -80,6 +80,31 @@ wxService.page({
...
@@ -80,6 +80,31 @@ wxService.page({
}
}
})
})
},
},
// 删除订单
handelDelOrder
(
e
)
{
const
{
id
}
=
e
.
currentTarget
.
dataset
wx
.
showLoading
({
title
:
'加载中'
,
mask
:
true
})
wxService
.
post
(
`/sale/trade/buyer/delete/
${
id
}
`
).
then
(
res
=>
{
if
(
res
)
{
const
{
result
}
=
res
.
data
if
(
result
==
0
)
{
wx
.
hideLoading
()
wx
.
showToast
({
title
:
`删除成功!`
,
icon
:
'none'
})
}
else
{
wx
.
showToast
({
title
:
`删除失败!`
,
icon
:
'none'
})
}
}
})
},
handelDetail
(
e
)
{
handelDetail
(
e
)
{
// const {detail} = e.currentTarget.dataset
// const {detail} = e.currentTarget.dataset
const
{
id
}
=
e
.
currentTarget
.
dataset
const
{
id
}
=
e
.
currentTarget
.
dataset
...
...
src/pages/order/order.wxml
View file @
85525c94
...
@@ -62,7 +62,7 @@
...
@@ -62,7 +62,7 @@
</view>
</view>
<view class="btn-group">
<view class="btn-group">
<view class="order-status" wx-if="{{item.status == 'C'}}">
<view class="order-status" wx-if="{{item.status == 'C'}}">
<button class="btn btn-sm btn-default" data-id="{{item.id}}">删除订单</button>
<button class="btn btn-sm btn-default" data-id="{{item.id}}"
bindtap="handelDelOrder"
>删除订单</button>
</view>
</view>
<view class="order-status" wx-if="{{item.status == 'N'}}">
<view class="order-status" wx-if="{{item.status == 'N'}}">
<button class="btn btn-sm btn-primary btn-outline" data-id="{{item.id}}">立即支付</button>
<button class="btn btn-sm btn-primary btn-outline" data-id="{{item.id}}">立即支付</button>
...
...
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