|
@@ -22,7 +22,7 @@ function calcAccountNum(order) {
|
|
var filter_vip_new = order.new_filter ? JSON.parse(order.new_filter) : {}
|
|
var filter_vip_new = order.new_filter ? JSON.parse(order.new_filter) : {}
|
|
var buyAccountCount = filterInfo.buyAccountCount || filter_vip_new.buyAccountCount || 0
|
|
var buyAccountCount = filterInfo.buyAccountCount || filter_vip_new.buyAccountCount || 0
|
|
var giftAccountCount = filterInfo.giftAccountCount || filter_vip_new.giftAccountCount || 0
|
|
var giftAccountCount = filterInfo.giftAccountCount || filter_vip_new.giftAccountCount || 0
|
|
- var totalAccountCount = Number(buyAccountCount) + Number(giftAccountCount) + 1
|
|
|
|
|
|
+ var totalAccountCount = Number(buyAccountCount) + Number(giftAccountCount)
|
|
|
|
|
|
var addAreaCount = filterInfo.addAreaCount || filter_vip_new.addAreaCount || 0
|
|
var addAreaCount = filterInfo.addAreaCount || filter_vip_new.addAreaCount || 0
|
|
var onlyAddCount = addAreaCount <= 0 // 仅增购子账号
|
|
var onlyAddCount = addAreaCount <= 0 // 仅增购子账号
|
|
@@ -36,10 +36,6 @@ function calcAccountNum(order) {
|
|
if (buyAccountCount == 0 && giftAccountCount == 0) {
|
|
if (buyAccountCount == 0 && giftAccountCount == 0) {
|
|
buyNumber2 = order.buyNum || filter_vip_new.finalAccountCount || 0
|
|
buyNumber2 = order.buyNum || filter_vip_new.finalAccountCount || 0
|
|
} else {
|
|
} else {
|
|
- // 仅增购子账号,不计算主账号数量
|
|
|
|
- if (onlyAddCount) {
|
|
|
|
- totalAccountCount -= 1
|
|
|
|
- }
|
|
|
|
buyNumber2 = order.buyNum || totalAccountCount || filter_vip_new.finalAccountCount || 0
|
|
buyNumber2 = order.buyNum || totalAccountCount || filter_vip_new.finalAccountCount || 0
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
@@ -48,6 +44,15 @@ function calcAccountNum(order) {
|
|
return buyNumber2
|
|
return buyNumber2
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+function calcIsOnlyAddPower(order) {
|
|
|
|
+ var filter_vip = order.filter ? JSON.parse(order.filter) : {}
|
|
|
|
+ var filter_vip_new = order.new_filter ? JSON.parse(order.new_filter) : {}
|
|
|
|
+ var buyAccountCount = filter_vip.buyAccountCount || filter_vip_new.buyAccountCount || 0
|
|
|
|
+ var giftAccountCount = filter_vip.giftAccountCount || filter_vip_new.giftAccountCount || 0
|
|
|
|
+ var totalAccountCount = Number(buyAccountCount) + Number(giftAccountCount)
|
|
|
|
+ return totalAccountCount <= 0
|
|
|
|
+}
|
|
|
|
+
|
|
$(function () {
|
|
$(function () {
|
|
var canpay = true;
|
|
var canpay = true;
|
|
var orderCode = decodeURIComponent(getParam("orderCode"));
|
|
var orderCode = decodeURIComponent(getParam("orderCode"));
|
|
@@ -85,7 +90,10 @@ $(function () {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
var filterObjNew = JSON.parse(r.data.order.new_filter || '{}');
|
|
var filterObjNew = JSON.parse(r.data.order.new_filter || '{}');
|
|
|
|
+ var order = r.data.order;
|
|
//购买数量
|
|
//购买数量
|
|
|
|
+ var onlyAddPower = calcIsOnlyAddPower(order)
|
|
|
|
+ var upgrade = order.vip_type == 2 || order.service_type == 3
|
|
if(r.data.order.buy_subject=='2'){
|
|
if(r.data.order.buy_subject=='2'){
|
|
var buyAccountNum = calcAccountNum(r.data.order)
|
|
var buyAccountNum = calcAccountNum(r.data.order)
|
|
var num2 = r.data.order.buy_count||buyAccountNum
|
|
var num2 = r.data.order.buy_count||buyAccountNum
|
|
@@ -96,6 +104,10 @@ $(function () {
|
|
$('.membernum').hide();
|
|
$('.membernum').hide();
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+ if (onlyAddPower && upgrade) {
|
|
|
|
+ $('.membernum').parents('.l-item').hide()
|
|
|
|
+ }
|
|
|
|
+
|
|
if (!r.data.order.discount_price || (r.data.order.discount_price && r.data.order.discount_price <= 0)) {
|
|
if (!r.data.order.discount_price || (r.data.order.discount_price && r.data.order.discount_price <= 0)) {
|
|
$(".discountPrice").parent().hide();
|
|
$(".discountPrice").parent().hide();
|
|
}
|
|
}
|