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
a2601669
Commit
a2601669
authored
Mar 28, 2020
by
谢中龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
ede5f6a3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletions
+19
-1
confirmOrder.js
src/pages/confirmOrder/confirmOrder.js
+18
-0
orderDetail.wxml
src/pages/orderDetail/orderDetail.wxml
+1
-1
No files found.
src/pages/confirmOrder/confirmOrder.js
View file @
a2601669
...
@@ -39,6 +39,7 @@ wxService.page({
...
@@ -39,6 +39,7 @@ wxService.page({
plusMemberPrice
:
0
,
// plus 默认价
plusMemberPrice
:
0
,
// plus 默认价
plusMemberName
:
''
,
plusMemberName
:
''
,
defalutCoupon
:
''
,
defalutCoupon
:
''
,
useNotUserCoupon
:
false
,
defalutCouponId
:
''
,
// 默认第一项
defalutCouponId
:
''
,
// 默认第一项
addressId
:
''
,
// 收货地址id
addressId
:
''
,
// 收货地址id
totalGoodsPrice
:
0
,
totalGoodsPrice
:
0
,
...
@@ -224,6 +225,7 @@ wxService.page({
...
@@ -224,6 +225,7 @@ wxService.page({
// faceAmount 抵用多少钱(分) 1 抵用券 2 折扣券 3 定额券
// faceAmount 抵用多少钱(分) 1 抵用券 2 折扣券 3 定额券
if
(
!
e
.
detail
)
{
if
(
!
e
.
detail
)
{
this
.
setData
({
this
.
setData
({
useNotUserCoupon
:
true
,
defalutCoupon
:
0
,
defalutCoupon
:
0
,
couponId
:
''
,
couponId
:
''
,
couponSettingId
:
''
,
couponSettingId
:
''
,
...
@@ -243,6 +245,7 @@ wxService.page({
...
@@ -243,6 +245,7 @@ wxService.page({
let
finCouponName
=
id
?
'couponId'
:
'couponSettingId'
;
let
finCouponName
=
id
?
'couponId'
:
'couponSettingId'
;
if
(
type
==
1
)
{
if
(
type
==
1
)
{
this
.
setData
({
this
.
setData
({
useNotUserCoupon
:
false
,
defalutCoupon
:
true
,
defalutCoupon
:
true
,
defalutCouponId
:
finCouponId
?
''
:
defalutCouponId
,
defalutCouponId
:
finCouponId
?
''
:
defalutCouponId
,
[
finCouponName
]:
finCouponId
,
[
finCouponName
]:
finCouponId
,
...
@@ -257,6 +260,7 @@ wxService.page({
...
@@ -257,6 +260,7 @@ wxService.page({
// let spread = Math.round(orderPrice - discounPrice)
// let spread = Math.round(orderPrice - discounPrice)
this
.
setData
({
this
.
setData
({
defalutCoupon
:
true
,
defalutCoupon
:
true
,
useNotUserCoupon
:
false
,
[
finCouponName
]:
finCouponId
,
[
finCouponName
]:
finCouponId
,
defalutCouponId
:
finCouponId
?
''
:
defalutCouponId
,
defalutCouponId
:
finCouponId
?
''
:
defalutCouponId
,
// couponId: id,
// couponId: id,
...
@@ -270,6 +274,7 @@ wxService.page({
...
@@ -270,6 +274,7 @@ wxService.page({
this
.
setData
({
this
.
setData
({
defalutCoupon
:
true
,
defalutCoupon
:
true
,
useNotUserCoupon
:
false
,
defalutCouponId
:
finCouponId
?
''
:
defalutCouponId
,
defalutCouponId
:
finCouponId
?
''
:
defalutCouponId
,
[
finCouponName
]:
finCouponId
,
[
finCouponName
]:
finCouponId
,
haveCoupon
:
true
,
haveCoupon
:
true
,
...
@@ -606,6 +611,7 @@ wxService.page({
...
@@ -606,6 +611,7 @@ wxService.page({
}
}
//如果没有couponId则认为是第一次进来没有自己选择优惠券
//如果没有couponId则认为是第一次进来没有自己选择优惠券
if
(
!
this
.
data
.
couponId
)
{
if
(
!
this
.
data
.
couponId
)
{
if
(
!
this
.
data
.
useNotUserCoupon
){
//获取优惠券信息
//获取优惠券信息
let
defalutCoupon
=
data
&&
data
.
couponDiscountPreviews
.
length
&&
let
defalutCoupon
=
data
&&
data
.
couponDiscountPreviews
.
length
&&
data
.
couponDiscountPreviews
[
0
].
couponSettingDTO
.
type
==
1
?
data
.
couponDiscountPreviews
[
0
].
couponSettingDTO
.
type
==
1
?
...
@@ -635,6 +641,18 @@ wxService.page({
...
@@ -635,6 +641,18 @@ wxService.page({
this
.
setPayPrice
()
this
.
setPayPrice
()
})
})
}
}
//用户取消使用优惠券
else
{
this
.
setData
({
currentOrderList
:
data
,
orderInitPrice
:
data
.
amount
,
totalGoodsPrice
:
this
.
data
.
totalGoodsPrice
},
()
=>
{
// 实付款
this
.
setPayPrice
()
})
}
}
else
{
else
{
//重新调用之后 不刷新优惠券列表
//重新调用之后 不刷新优惠券列表
this
.
setData
({
this
.
setData
({
...
...
src/pages/orderDetail/orderDetail.wxml
View file @
a2601669
...
@@ -135,7 +135,7 @@
...
@@ -135,7 +135,7 @@
<button class="btn btn-primary btn-lg" data-id="{{detail.id}}" bindtap="handelToPay">立即支付</button>
<button class="btn btn-primary btn-lg" data-id="{{detail.id}}" bindtap="handelToPay">立即支付</button>
<button class="btn btn-lg btn-gray" data-id="{{detail.id}}" bindtap="handelCancelOrder">取消订单</button>
<button class="btn btn-lg btn-gray" data-id="{{detail.id}}" bindtap="handelCancelOrder">取消订单</button>
</view>
</view>
<view class="button-wrap" wx:if="{{detail.orderCanRefund && (detail.status != 'N'
||
detail.status != 'C')}}">
<view class="button-wrap" wx:if="{{detail.orderCanRefund && (detail.status != 'N'
&&
detail.status != 'C')}}">
<button
<button
class="btn btn-gray btn-lg"
class="btn btn-gray btn-lg"
data-id="{{detail.id}}"
data-id="{{detail.id}}"
...
...
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