Ver a proveniência

支付添加couponChannelId

tags/2.2.4
Stormeye.Wu há 6 anos
ascendente
cometimento
19f421f43d
1 ficheiros alterados com 10 adições e 8 eliminações
  1. +10
    -8
      pages/coupon/detail/index.js

+ 10
- 8
pages/coupon/detail/index.js Ver ficheiro

@@ -5,6 +5,7 @@ const util = require("../../../utils/util");
Page({
data: {
data: {},
couponChannelId: null,
couponId: null,
orderId: "",
day: "",
@@ -15,7 +16,7 @@ Page({
let that = this;
console.log(options.id);
that.setData({
couponId:options.id
couponId: options.id
})
console.log(options.targetAd);
wx.showLoading({
@@ -29,7 +30,7 @@ Page({
url: config.api.couponDetail,
data: {
couponId: options.id,
targetAd:options.targetAd
targetAd: options.targetAd
}
}).then(res => {
console.log(res);
@@ -62,6 +63,7 @@ Page({
wx.hideLoading();
that.setData({
data: res.data,
couponChannelId: res.data.couponChannelId
});
});
}
@@ -159,13 +161,14 @@ Page({
// TODO 选取用户下的车牌
} else {
Http.post({
url: config.api.checkPhoneStatus,
data: {}
})
url: config.api.checkPhoneStatus,
data: {}
})
.then(res => {
return Http.post({
url: config.api.orderSave,
url: config.api.freeCoupon,
data: {
couponChannelId: that.data.couponChannelId,
couponId: that.data.couponId
}
});
@@ -207,8 +210,7 @@ Page({
});
} else {
// 免费券
that
.payOrderUpdate(orderId, "0", 1) // 支付成功
that.payOrderUpdate(orderId, "0", 1) // 支付成功
.then(res => {
wx.showToast({
title: "支付成功",


Carregando…
Cancelar
Guardar