Commit 31cc245d authored by jiangjiantao's avatar jiangjiantao

优惠券

parent d10ddffd
...@@ -18,6 +18,7 @@ import { ACTION_REFUND_SUCCESS } from '../../const/actioncmd' ...@@ -18,6 +18,7 @@ import { ACTION_REFUND_SUCCESS } from '../../const/actioncmd'
import { ACTION_REFUND_FAILED } from '../../const/actioncmd' import { ACTION_REFUND_FAILED } from '../../const/actioncmd'
import { ACTION_PRINT_LAST_ORDER } from '../../const/actioncmd' import { ACTION_PRINT_LAST_ORDER } from '../../const/actioncmd'
import { FLOW_IDLE, FLOW_COLLECTIONS, FLOW_REFUND } from '../../const/actioncmd' import { FLOW_IDLE, FLOW_COLLECTIONS, FLOW_REFUND } from '../../const/actioncmd'
import { ACTION_USE_COUPON } from '../../const/actioncmd'
Page({ Page({
...@@ -235,12 +236,10 @@ Page({ ...@@ -235,12 +236,10 @@ Page({
}else if(res.action == ACTION_USE_COUPON){ }else if(res.action == ACTION_USE_COUPON){
//优惠券 //优惠券
let coupon = res.data let coupon = res.data
let discCouponPrice = context.data.discCouponPrice
discCouponPrice = discCouponPrice + coupon.discCouponPrice
context.setData({ context.setData({
discCouponState:coupon.discCouponState, discCouponState:coupon.discCouponState,
discCouponMsg:coupon.discCouponMsg, discCouponMsg:coupon.discCouponMsg,
discCouponPrice:discCouponPrice discCouponPrice:coupon.discCouponPrice
}) })
} }
...@@ -726,7 +725,9 @@ Page({ ...@@ -726,7 +725,9 @@ Page({
//兑换券界面关闭 //兑换券界面关闭
convertCouponClose(e) { convertCouponClose(e) {
this.setData({ convertCouponState: 0 }) this.setData({ convertCouponState: 0 })
this.sendConvertCouponToFront(0) var request = {};
request.convertCouponState = 0;
this.sendConvertCouponToFront(request)
}, },
...@@ -776,7 +777,10 @@ Page({ ...@@ -776,7 +777,10 @@ Page({
//使用券 //使用券
useCoupon(e) { useCoupon(e) {
this.setData({ discCouponState: 1 }) this.setData({ discCouponState: 1 })
this.sendDiscCouponToFront(1) var request = {};
request.convertCouponState = 1;
request.discCouponPrice = this.data.discCouponPrice
this.sendDiscCouponToFront(request)
}, },
//发送退款金额.以分为单位 //发送退款金额.以分为单位
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment