|
@@ -501,7 +501,7 @@
|
|
|
|
|
|
/* -------- 控制年份number_box的事件 点击1年 2年 3年触发的事件------- */
|
|
|
$('#number_box_year').on('click', 'span', function (e) {
|
|
|
- console.log(e.target.dataset.id)
|
|
|
+ // console.log(e.target.dataset.id)
|
|
|
let id = e.target.dataset.id;
|
|
|
// 当续费时间 + 当前已经买的时间超过36个月,给出提醒
|
|
|
if((id*12+nowRenew)>36){
|
|
@@ -741,7 +741,7 @@
|
|
|
oldBuyset = data.data.buyset;
|
|
|
}
|
|
|
},false);
|
|
|
- console.log("666666666333",oldBuyset)
|
|
|
+ // console.log("666666666333",oldBuyset)
|
|
|
//
|
|
|
var completeMonth = 0;
|
|
|
var completeYear = 0;
|
|
@@ -894,7 +894,7 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- console.log("industrysArr",industrysArr);
|
|
|
+ // console.log("industrysArr",industrysArr);
|
|
|
//
|
|
|
if(endYear === nowYear){
|
|
|
if(endMonth === nowMonth){
|
|
@@ -928,7 +928,7 @@
|
|
|
}
|
|
|
}
|
|
|
nowRenew = nowUpgrade;
|
|
|
- console.log("monthold",nowUpgrade)
|
|
|
+ // console.log("monthold",nowUpgrade)
|
|
|
//
|
|
|
var nowUpgradeYear = 0;
|
|
|
if(nowUpgrade >= 12 && nowUpgrade < 24){
|
|
@@ -942,8 +942,8 @@
|
|
|
nowUpgradeYear = nowUpgradeYear + 1;
|
|
|
nowUpgrade = 0;
|
|
|
}
|
|
|
- console.log("year",nowUpgradeYear)
|
|
|
- console.log("month",nowUpgrade)
|
|
|
+ // console.log("year",nowUpgradeYear)
|
|
|
+ // console.log("month",nowUpgrade)
|
|
|
//
|
|
|
if (nowUpgradeYear >= 1) {
|
|
|
// let monthprice = getsubVipOrderPrice(buyArea, buyIndustry, [nowUpgrade, 2])
|
|
@@ -963,8 +963,8 @@
|
|
|
oldMonthPrice = (oldPrice / nowUpgrade)
|
|
|
oldYearPrice = ((oldPrice / nowUpgrade) * 10).toFixed(1);
|
|
|
}
|
|
|
- console.log("oldYearPrice",oldYearPrice)
|
|
|
- console.log("oldMonthPrice",oldMonthPrice)
|
|
|
+ // console.log("oldYearPrice",oldYearPrice)
|
|
|
+ // console.log("oldMonthPrice",oldMonthPrice)
|
|
|
|
|
|
//
|
|
|
if(nowUpgradeYear >= 1){
|
|
@@ -982,32 +982,32 @@
|
|
|
completeYear = ((monthprice / nowUpgrade)*10).toFixed(1);
|
|
|
}
|
|
|
// ------- 升级延长周期价格计算 ---------
|
|
|
- console.log("yearprice",yearprice);
|
|
|
- console.log("monthprice",monthprice);
|
|
|
- console.log(">=1",price);
|
|
|
+ // console.log("yearprice",yearprice);
|
|
|
+ // console.log("monthprice",monthprice);
|
|
|
+ // console.log(">=1",price);
|
|
|
}else{
|
|
|
- let monthprice = getsubVipOrderPriceBybuyset(newBuysetObj(areaObj()),[nowUpgrade,2]);
|
|
|
+ let monthprice = getsubVipOrderPriceBybuyset(buySetObj(newBuysetObj(areaObj())),[nowUpgrade,2]);
|
|
|
|
|
|
// ------- 升级价格差价计算 ---------
|
|
|
|
|
|
// let newPrice = getsubVipOrderPrice(allBuyArea,allIndustry,[nowUpgrade,2]);
|
|
|
- let newPrice = getsubVipOrderPriceBybuyset(newBuysetObj(areaObj()),[nowUpgrade,2]);
|
|
|
+ let newPrice = getsubVipOrderPriceBybuyset(buySetObj(newBuysetObj(areaObj())),[nowUpgrade,2]);
|
|
|
price = newPrice - oldPrice;
|
|
|
// ------- 升级价格差价计算 ---------
|
|
|
// ------- 升级延长周期价格计算 ---------
|
|
|
completeMonth = (monthprice / nowUpgrade).toFixed(1);
|
|
|
completeYear = ((monthprice / nowUpgrade)*10).toFixed(1);
|
|
|
// ------- 升级延长周期价格计算 ---------
|
|
|
- console.log("<1",price)
|
|
|
+ // console.log("<1",price)
|
|
|
}
|
|
|
|
|
|
- console.log("oldPrice", oldPrice);
|
|
|
+ // console.log("oldPrice", oldPrice);
|
|
|
if(sessionStorage.vipSubSelectAreaUpgrade===undefined&&sessionStorage.vipSubSelectIndustryUpgrade===undefined){
|
|
|
completeMonth = oldMonthPrice;
|
|
|
completeYear = oldYearPrice;
|
|
|
}
|
|
|
- console.log("completeMonth",completeMonth)
|
|
|
- console.log("completeYear",completeYear)
|
|
|
+ // console.log("completeMonth",completeMonth)
|
|
|
+ // console.log("completeYear",completeYear)
|
|
|
// ------- 延长周期价格赋值 ---------
|
|
|
if(sessionStorage.upgrade_cyclecount !== undefined && sessionStorage.upgrade_cycleunit !== undefined){
|
|
|
if(sessionStorage.upgrade_cycleunit === "1"){
|
|
@@ -1027,14 +1027,14 @@
|
|
|
if(price>0){
|
|
|
var cPrice = (price).toFixed(1);
|
|
|
}
|
|
|
- console.log(cPrice);
|
|
|
+ // console.log(cPrice);
|
|
|
if(sessionStorage.proPrice!==""&&sessionStorage.proPrice!==undefined){
|
|
|
let proPrice = sessionStorage.proPrice;
|
|
|
console.log("proprice",proPrice);
|
|
|
cPrice = (Number(cPrice) + Number(proPrice)).toFixed(1);
|
|
|
}
|
|
|
if(cPrice <= 0){
|
|
|
- cPrice = 0;
|
|
|
+ cPrice = (0).toFixed(2);
|
|
|
}
|
|
|
$(".finally_price").html("¥"+cPrice);
|
|
|
//
|
|
@@ -1103,7 +1103,7 @@
|
|
|
"time": times,
|
|
|
"addCount":vipCount,
|
|
|
"addIndustryCount": vipIndustry,
|
|
|
- "buyset":JSON.stringify(areaObj()),
|
|
|
+ "buyset":JSON.stringify(buySetObj(areaObj())),
|
|
|
}
|
|
|
console.log(param)
|
|
|
$DoPost("/subscribepay/renewUpgrade/renewUpgradeCreateOrder",param,function(r){
|
|
@@ -1175,7 +1175,7 @@
|
|
|
newbuyset.buyerclasscount = oldset.buyerclasscount;
|
|
|
newbuyset.citys = oldset.citys;
|
|
|
// let buyset = oldBuyset
|
|
|
- console.log("11111",newbuyset)
|
|
|
+ // console.log("11111",newbuyset)
|
|
|
if(sessionStorage.vipSubSelectAreaAdd!==undefined&&sessionStorage.vipSubSelectAreaAdd!==""){
|
|
|
let addbuyset = JSON.parse(sessionStorage.vipSubSelectAreaAdd);
|
|
|
if(addbuyset.country !== -1){
|
|
@@ -1206,7 +1206,7 @@
|
|
|
newbuyset.buyerclasscount = newbuyset.buyerclasscount + addindustrys.length;
|
|
|
}
|
|
|
}
|
|
|
- console.log(JSON.stringify(newbuyset))
|
|
|
+ // console.log(JSON.stringify(newbuyset))
|
|
|
return newbuyset
|
|
|
}
|
|
|
|
|
@@ -1221,6 +1221,29 @@
|
|
|
}
|
|
|
return newset
|
|
|
}
|
|
|
+
|
|
|
+ function buySetObj(buyset){
|
|
|
+ let nowset = JSON.parse(JSON.stringify(buyset));
|
|
|
+ if(sessionStorage.vipSubSelectAreaUpgrade!==undefined&&sessionStorage.vipSubSelectAreaUpgrade!==""){
|
|
|
+ let vip_area = JSON.parse(sessionStorage.vipSubSelectAreaUpgrade);
|
|
|
+ for(let province in nowset.citys){
|
|
|
+ if(nowset.citys[province] > 0){
|
|
|
+ if(checkObj(vip_area[province])){
|
|
|
+ let cityarr = nowset.citys
|
|
|
+ delete cityarr[province]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // for(let n in nowset.citys){
|
|
|
+ // if(nowset.citys[n] > 2){
|
|
|
+ // let cityarr = nowset.citys
|
|
|
+ // delete cityarr[n]
|
|
|
+ // nowset.areacount += 1
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ }
|
|
|
+ return nowset
|
|
|
+ }
|
|
|
|
|
|
</script>
|
|
|
</body>
|