Commit cc3c445a authored by pengguangpu's avatar pengguangpu

Merge branch 'dev-1.0' of…

Merge branch 'dev-1.0' of https://gitlab.infra.miyatech.com/pengguangpu/doublescreen-front into dev-1.0
parents f5071335 97e347c7
...@@ -64,7 +64,7 @@ Page({ ...@@ -64,7 +64,7 @@ Page({
if (totalPrice != null) { if (totalPrice != null) {
this.setData({ this.setData({
payPrice: totalPrice - totalDisc, payPrice: payUtils.fen2Yuan(payUtils.yuan2Fen(totalPrice) - payUtils.yuan2Fen(totalDisc)),
totalPrice: totalPrice, totalPrice: totalPrice,
couponPrice: totalDisc, couponPrice: totalDisc,
}) })
......
...@@ -62,11 +62,11 @@ Page({ ...@@ -62,11 +62,11 @@ Page({
}) })
} else if (res.action == ACTION_MEMBER) { } else if (res.action == ACTION_MEMBER) {
let showPhone = res.data.substring(0,3)+"****"+res.data.substring(7,11) let showPhone = res.data.substring(0, 3) + "****" + res.data.substring(7, 11)
context.setData({ context.setData({
memberPhone: res.data, memberPhone: res.data,
showMemberPhone:showPhone, showMemberPhone: showPhone,
memberPoint:2130 memberPoint: 2130
}) })
} }
else if (res.action == ACTION_GO_BALANCE) { else if (res.action == ACTION_GO_BALANCE) {
...@@ -80,11 +80,11 @@ Page({ ...@@ -80,11 +80,11 @@ Page({
my.reLaunch({ my.reLaunch({
url: "/pages/home/home", url: "/pages/home/home",
}); });
}else if (res.action == ACTION_USE_COUPON) { } else if (res.action == ACTION_USE_COUPON) {
//优惠券 //优惠券
context.setData({ context.setData({
scanDialogDisplay: res.data.discCouponState, scanDialogDisplay: res.data.discCouponState,
totalDisc:res.data. discCouponPrice totalDisc: res.data.discCouponPrice
}); });
if (res.data.discCouponState == 1) { if (res.data.discCouponState == 1) {
...@@ -125,7 +125,7 @@ Page({ ...@@ -125,7 +125,7 @@ Page({
let totalDiscTemp = this.data.totalDisc + Math.round(Math.random() * 4) + 1; let totalDiscTemp = this.data.totalDisc + Math.round(Math.random() * 4) + 1;
//超额 //超额
if(totalDiscTemp > this.data.totalPrice){ if (totalDiscTemp > this.data.totalPrice) {
let req = {} let req = {}
req.discCouponMsg = "超额优惠券" req.discCouponMsg = "超额优惠券"
req.discCouponState = 4; req.discCouponState = 4;
...@@ -136,7 +136,7 @@ Page({ ...@@ -136,7 +136,7 @@ Page({
let req = {} let req = {}
req.discCouponPrice = totalDiscTemp; req.discCouponPrice = totalDiscTemp;
req.discCouponState = 3; req.discCouponState = 3;
this.useCouponCallback(ACTION_USE_COUPON,req) this.useCouponCallback(ACTION_USE_COUPON, req)
}, 700); }, 700);
}, },
...@@ -153,7 +153,7 @@ Page({ ...@@ -153,7 +153,7 @@ Page({
success: (res) => { success: (res) => {
console.info(`sendBuddyMessage success: ${JSON.stringify(res)}`); console.info(`sendBuddyMessage success: ${JSON.stringify(res)}`);
//用券成功 //用券成功
if(result.discCouponState == 3){ if (result.discCouponState == 3) {
//模拟数据 1 - 5 随机整数 //模拟数据 1 - 5 随机整数
context.setData({ scanDialogDisplay: 0, totalDisc: result.discCouponPrice }) context.setData({ scanDialogDisplay: 0, totalDisc: result.discCouponPrice })
my.showToast({ my.showToast({
...@@ -165,13 +165,13 @@ Page({ ...@@ -165,13 +165,13 @@ Page({
}, },
}); });
//用券失败 //用券失败
}else if(result.discCouponState == 4){ } else if (result.discCouponState == 4) {
context.setData({ scanDialogDisplay: 4 }) context.setData({ scanDialogDisplay: 4 })
} }
}, },
fail: (res) => { fail: (res) => {
console.info(`sendBuddyMessage failed: ${JSON.stringify(res)}`); console.info(`sendBuddyMessage failed: ${JSON.stringify(res)}`);
context.useCouponCallback(action,result) context.useCouponCallback(action, result)
} }
}); });
}, },
......
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