|
@@ -30,11 +30,11 @@ $(function () {
|
|
|
$(".productType").text("超级订阅(试用)");
|
|
|
}
|
|
|
}
|
|
|
- if (r.data.order.discount_price==undefined) {
|
|
|
+ if (!r.data.order.discount_price || (r.data.order.discount_price && r.data.order.discount_price <= 0)) {
|
|
|
$(".discountPrice").parent().hide();
|
|
|
}
|
|
|
//价格
|
|
|
- $(".price").text("¥ " + formatMoney(parseFloat(r.data.order.order_money) / 100));
|
|
|
+ $(".price").text("¥ " + formatMoney(parseFloat(r.data.order.pay_money || r.data.order.order_money) / 100));
|
|
|
$(".totalPrice").text("¥ " + formatMoney(parseFloat(r.data.order.order_money) / 100) + "元");
|
|
|
if (!r.data.order.isLiveActive) {
|
|
|
$(".origin-price-container").hide();
|
|
@@ -304,9 +304,11 @@ $(function () {
|
|
|
discount_price = r.data.order.discount_price;
|
|
|
var totalPrice = Number(r.data.order.discount_price)+Number(r.data.order.order_money);
|
|
|
$(".totalPrice").text('¥'+ formatMoney(totalPrice / 100)+'元')
|
|
|
- $(".discountPrice").text('-¥'+ formatMoney(parseFloat(r.data.order.discount_price) / 100)+'元')
|
|
|
+ if (r.data.order.discount_price && r.data.order.discount_price > 0) {
|
|
|
+ $(".discountPrice").text('-¥'+ formatMoney(parseFloat(r.data.order.discount_price) / 100)+'元')
|
|
|
+ }
|
|
|
}
|
|
|
- $(".payPrice").text("¥ " + formatMoney(parseFloat(r.data.order.order_money) / 100) + "元");
|
|
|
+ $(".payPrice").text("¥ " + formatMoney(parseFloat(r.data.order.pay_money || r.data.order.order_money) / 100) + "元");
|
|
|
//未支付
|
|
|
$("#card-header-bg").addClass("bg nopay-bg")
|
|
|
$("#pageTitle").addClass("status")
|
|
@@ -358,9 +360,11 @@ $(function () {
|
|
|
discount_price = r.data.order.discount_price;
|
|
|
var totalPrice = Number(r.data.order.discount_price)+Number(r.data.order.order_money);
|
|
|
$(".totalPrice").text('¥'+ formatMoney(totalPrice / 100)+'元')
|
|
|
- $(".discountPrice").text('-¥'+ formatMoney(parseFloat(r.data.order.discount_price) / 100)+'元')
|
|
|
+ if (r.data.order.discount_price && r.data.order.discount_price > 0) {
|
|
|
+ $(".discountPrice").text('-¥'+ formatMoney(parseFloat(r.data.order.discount_price) / 100)+'元')
|
|
|
+ }
|
|
|
}
|
|
|
- $(".payPrice").text("¥ " + formatMoney(parseFloat(r.data.order.order_money) / 100) + "元");
|
|
|
+ $(".payPrice").text("¥ " + formatMoney(parseFloat(r.data.order.pay_money || r.data.order.order_money) / 100) + "元");
|
|
|
|
|
|
|
|
|
|