|
@@ -721,6 +721,7 @@
|
|
var starts = "";
|
|
var starts = "";
|
|
var endTime = "";
|
|
var endTime = "";
|
|
var ends = "";
|
|
var ends = "";
|
|
|
|
+ var oldBuyset = "";
|
|
$DoPost("/subscribepay/renewUpgrade/getBuyMsg", {}, function (data) {
|
|
$DoPost("/subscribepay/renewUpgrade/getBuyMsg", {}, function (data) {
|
|
if (data) {
|
|
if (data) {
|
|
area = data.area;
|
|
area = data.area;
|
|
@@ -733,8 +734,10 @@
|
|
starts = data.starttime;
|
|
starts = data.starttime;
|
|
endTime = data.end;
|
|
endTime = data.end;
|
|
ends = data.endtime;
|
|
ends = data.endtime;
|
|
|
|
+ oldBuyset = data.buyset;
|
|
}
|
|
}
|
|
},false);
|
|
},false);
|
|
|
|
+ console.log("666666666333",oldBuyset)
|
|
//
|
|
//
|
|
var completeMonth = 0;
|
|
var completeMonth = 0;
|
|
var completeYear = 0;
|
|
var completeYear = 0;
|
|
@@ -914,7 +917,6 @@
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|
|
//
|
|
//
|
|
- console.log("areasArr",areasArr)
|
|
|
|
// if(sessionStorage.vipSubSelectIndustryAdd!==""&&sessionStorage.vipSubSelectIndustryAdd!==undefined){
|
|
// if(sessionStorage.vipSubSelectIndustryAdd!==""&&sessionStorage.vipSubSelectIndustryAdd!==undefined){
|
|
// var vipIndustry = JSON.parse(sessionStorage.vipSubSelectIndustryAdd);
|
|
// var vipIndustry = JSON.parse(sessionStorage.vipSubSelectIndustryAdd);
|
|
// for(let i in vipIndustry){
|
|
// for(let i in vipIndustry){
|
|
@@ -1028,8 +1030,10 @@
|
|
console.log("month",nowUpgrade)
|
|
console.log("month",nowUpgrade)
|
|
//
|
|
//
|
|
if (nowUpgradeYear >= 1) {
|
|
if (nowUpgradeYear >= 1) {
|
|
- let monthprice = getsubVipOrderPrice(buyArea, buyIndustry, [nowUpgrade, 2])
|
|
|
|
- let yearprice = getsubVipOrderPrice(buyArea, buyIndustry, [nowUpgradeYear, 1])
|
|
|
|
|
|
+ // let monthprice = getsubVipOrderPrice(buyArea, buyIndustry, [nowUpgrade, 2])
|
|
|
|
+ // let yearprice = getsubVipOrderPrice(buyArea, buyIndustry, [nowUpgradeYear, 1])
|
|
|
|
+ let monthprice = getsubVipOrderPriceBybuyset(oldBuyset, [nowUpgrade, 2])
|
|
|
|
+ let yearprice = getsubVipOrderPriceBybuyset(oldBuyset, [nowUpgradeYear,1]);
|
|
oldPrice = yearprice + monthprice
|
|
oldPrice = yearprice + monthprice
|
|
if (monthprice == 0) {
|
|
if (monthprice == 0) {
|
|
oldMonthPrice = ((yearprice / nowUpgradeYear) / 10).toFixed(1);
|
|
oldMonthPrice = ((yearprice / nowUpgradeYear) / 10).toFixed(1);
|
|
@@ -1039,8 +1043,7 @@
|
|
oldYearPrice = ((monthprice / nowUpgrade) * 10).toFixed(1);
|
|
oldYearPrice = ((monthprice / nowUpgrade) * 10).toFixed(1);
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- console.log(buyArea)
|
|
|
|
- oldPrice = getsubVipOrderPrice(buyArea, buyIndustry, [nowUpgrade, 2])
|
|
|
|
|
|
+ oldPrice = getsubVipOrderPriceBybuyset(oldBuyset, [nowUpgrade, 2])
|
|
oldMonthPrice = (oldPrice / nowUpgrade)
|
|
oldMonthPrice = (oldPrice / nowUpgrade)
|
|
oldYearPrice = ((oldPrice / nowUpgrade) * 10).toFixed(1);
|
|
oldYearPrice = ((oldPrice / nowUpgrade) * 10).toFixed(1);
|
|
}
|
|
}
|
|
@@ -1071,7 +1074,7 @@
|
|
// price = addAreaPriceY + addAreaPriceM + oldAreaPriceY + oldAreaPriceM + addIndustryPriceY + addIndustryPriceM;
|
|
// price = addAreaPriceY + addAreaPriceM + oldAreaPriceY + oldAreaPriceM + addIndustryPriceY + addIndustryPriceM;
|
|
// ------- 升级价格交叉计算 ---------
|
|
// ------- 升级价格交叉计算 ---------
|
|
// ------- 升级价格差价计算 ---------
|
|
// ------- 升级价格差价计算 ---------
|
|
- let buyset = getBuySet(buyArea,buyIndustry)
|
|
|
|
|
|
+ // let buyset = getBuySet(buyArea,buyIndustry)
|
|
// let newPriceY = getsubVipOrderPrice(allBuyArea,allIndustry,[nowUpgradeYear,1]);
|
|
// let newPriceY = getsubVipOrderPrice(allBuyArea,allIndustry,[nowUpgradeYear,1]);
|
|
// let newPriceM = getsubVipOrderPrice(allBuyArea,allIndustry,[nowUpgrade,2]);
|
|
// let newPriceM = getsubVipOrderPrice(allBuyArea,allIndustry,[nowUpgrade,2]);
|
|
// let yearprice = getsubVipOrderPrice(allBuyArea,allIndustry,[nowUpgradeYear,1]);
|
|
// let yearprice = getsubVipOrderPrice(allBuyArea,allIndustry,[nowUpgradeYear,1]);
|
|
@@ -1344,17 +1347,23 @@
|
|
// return areasObj
|
|
// return areasObj
|
|
// }
|
|
// }
|
|
function areaObj(){
|
|
function areaObj(){
|
|
- let buyset = getBuySet(buyArea,buyIndustry)
|
|
|
|
|
|
+ let newbuyset = {}
|
|
|
|
+ let oldset = JSON.parse(JSON.stringify(oldBuyset))
|
|
|
|
+ newbuyset.areacount = oldset.areacount;
|
|
|
|
+ newbuyset.buyerclasscount = oldset.buyerclasscount;
|
|
|
|
+ newbuyset.citys = oldset.citys;
|
|
|
|
+ // let buyset = oldBuyset
|
|
|
|
+ console.log("11111",newbuyset)
|
|
if(sessionStorage.vipSubSelectAreaAdd!==undefined&&sessionStorage.vipSubSelectAreaAdd!==""){
|
|
if(sessionStorage.vipSubSelectAreaAdd!==undefined&&sessionStorage.vipSubSelectAreaAdd!==""){
|
|
let addbuyset = JSON.parse(sessionStorage.vipSubSelectAreaAdd);
|
|
let addbuyset = JSON.parse(sessionStorage.vipSubSelectAreaAdd);
|
|
if(addbuyset.country !== -1){
|
|
if(addbuyset.country !== -1){
|
|
if(addbuyset.province !== 0){
|
|
if(addbuyset.province !== 0){
|
|
- buyset.areacount = buyset.areacount + addbuyset.province;
|
|
|
|
|
|
+ newbuyset.areacount = newbuyset.areacount + addbuyset.province;
|
|
}
|
|
}
|
|
if(!checkObj(addbuyset.city)){
|
|
if(!checkObj(addbuyset.city)){
|
|
let cityArr = addbuyset.city
|
|
let cityArr = addbuyset.city
|
|
for(var i in cityArr){
|
|
for(var i in cityArr){
|
|
- let citysArr = buyset.citys
|
|
|
|
|
|
+ let citysArr = newbuyset.citys
|
|
if(citysArr[i] !== undefined){
|
|
if(citysArr[i] !== undefined){
|
|
citysArr[i] = citysArr[i] + cityArr[i]
|
|
citysArr[i] = citysArr[i] + cityArr[i]
|
|
}else{
|
|
}else{
|
|
@@ -1363,19 +1372,20 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
- buyset.areacount = -1;
|
|
|
|
- buyset.citys = {};
|
|
|
|
|
|
+ newbuyset.areacount = -1;
|
|
|
|
+ newbuyset.citys = {};
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if(sessionStorage.vipSubSelectIndustryAdd!==undefined){
|
|
if(sessionStorage.vipSubSelectIndustryAdd!==undefined){
|
|
var addindustrys = JSON.parse(sessionStorage.vipSubSelectIndustryAdd);
|
|
var addindustrys = JSON.parse(sessionStorage.vipSubSelectIndustryAdd);
|
|
if(addindustrys.length === 1 && addindustrys[0] === "全部行业"){
|
|
if(addindustrys.length === 1 && addindustrys[0] === "全部行业"){
|
|
- buyset.buyerclasscount = -1;
|
|
|
|
|
|
+ newbuyset.buyerclasscount = -1;
|
|
}else{
|
|
}else{
|
|
- buyset.buyerclasscount = buyset.buyerclasscount + addindustrys.length;
|
|
|
|
|
|
+ newbuyset.buyerclasscount = newbuyset.buyerclasscount + addindustrys.length;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- return buyset
|
|
|
|
|
|
+ console.log("233333",newbuyset)
|
|
|
|
+ return newbuyset
|
|
}
|
|
}
|
|
|
|
|
|
</script>
|
|
</script>
|