|
@@ -846,77 +846,13 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if(buyArea !== ""&&buyArea !== undefined){
|
|
|
- for(let province in buyArea){
|
|
|
- let citys = buyArea[province];
|
|
|
- if(citys.length===0){
|
|
|
- allBuyArea[province] = [];
|
|
|
- }else{
|
|
|
- allBuyArea[province] = citys;
|
|
|
- }
|
|
|
- }
|
|
|
- for(let province in vipArea){
|
|
|
- let citys = vipArea[province];
|
|
|
- if(allBuyArea[province] === undefined){
|
|
|
- allBuyArea[province] = citys
|
|
|
- }else{
|
|
|
- if(checkObj(citys)){
|
|
|
- allBuyArea[province] = [];
|
|
|
- }else{
|
|
|
- let cityArr = [];
|
|
|
- for(let i in citys){
|
|
|
- cityArr.push(citys[i]);
|
|
|
- }
|
|
|
- for(let i in allBuyArea[province]){
|
|
|
- cityArr.push(allBuyArea[province][i]);
|
|
|
- }
|
|
|
- //
|
|
|
- for (var x = 0; x < cityArr.length; x++) {
|
|
|
- for (var j =x+1; j <cityArr.length; ) {
|
|
|
- if (cityArr[x] === cityArr[j]){
|
|
|
- cityArr.splice(j, 1);
|
|
|
- }
|
|
|
- else j++;
|
|
|
- }
|
|
|
- }
|
|
|
- //
|
|
|
- allBuyArea[province] = cityArr;
|
|
|
- }
|
|
|
- }
|
|
|
- if(province === "全国"){
|
|
|
- allBuyArea = {"全国":[]};
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- // if(sessionStorage.vipSubSelectAreaAdd!==""&&sessionStorage.vipSubSelectAreaAdd!==undefined){
|
|
|
- // areasArr = addAreaObj();
|
|
|
- // }else{
|
|
|
- // areasArr = null;
|
|
|
- // }
|
|
|
+
|
|
|
if(buyCheck){
|
|
|
$(".save_upgrade").removeAttr("disabled");
|
|
|
}
|
|
|
}else{
|
|
|
areas_arr = null
|
|
|
// areasArr = null
|
|
|
- if(buyArea !== ""&&buyArea !== undefined){
|
|
|
- // for(let province in buyArea){
|
|
|
- // let citys = buyArea[province];
|
|
|
- // if(citys.length===0){
|
|
|
- // allArea[province] = [];
|
|
|
- // }else{
|
|
|
- // allArea[province] = citys;
|
|
|
- // }
|
|
|
- // }
|
|
|
- for(let province in buyArea){
|
|
|
- let citys = buyArea[province];
|
|
|
- if(citys.length===0){
|
|
|
- allBuyArea[province] = [];
|
|
|
- }else{
|
|
|
- allBuyArea[province] = citys;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
if(area !== ""&&area !== undefined){
|
|
|
for(let province in area){
|
|
|
let citys = area[province];
|
|
@@ -929,33 +865,6 @@
|
|
|
}
|
|
|
}
|
|
|
//
|
|
|
- // if(sessionStorage.vipSubSelectIndustryAdd!==""&&sessionStorage.vipSubSelectIndustryAdd!==undefined){
|
|
|
- // var vipIndustry = JSON.parse(sessionStorage.vipSubSelectIndustryAdd);
|
|
|
- // for(let i in vipIndustry){
|
|
|
- // let industry = vipIndustry[i];
|
|
|
- // industrysArr.push(industry);
|
|
|
- // }
|
|
|
- // for(let i in vipIndustry){
|
|
|
- // if(industry === "全部行业"){
|
|
|
- // industrysArr = ["全部行业"];
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- //
|
|
|
- // if(sessionStorage.vipSubSelectIndustryAdd!==""&&sessionStorage.vipSubSelectIndustryAdd!==undefined){
|
|
|
- // var vipIndustry = JSON.parse(sessionStorage.vipSubSelectIndustryAdd);
|
|
|
- // for(let i in vipIndustry){
|
|
|
- // let industry = vipIndustry[i];
|
|
|
- // industrysArr.push(industry);
|
|
|
- // }
|
|
|
- // for(let i in vipIndustry){
|
|
|
- // if(industry === "全部行业"){
|
|
|
- // industrysArr = ["全部行业"];
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }else{
|
|
|
- // industrysArr = null;
|
|
|
- // }
|
|
|
|
|
|
if(sessionStorage.vipSubSelectIndustryUpgrade!==""&&sessionStorage.vipSubSelectIndustryUpgrade!==undefined){
|
|
|
var vipIndustry = JSON.parse(sessionStorage.vipSubSelectIndustryUpgrade);
|
|
@@ -984,16 +893,6 @@
|
|
|
}
|
|
|
}
|
|
|
//
|
|
|
- // if(industrysArr !== null){
|
|
|
- // for (var x = 0; x < industrysArr.length; x++) {
|
|
|
- // for (var j =x+1; j <industrysArr.length; ) {
|
|
|
- // if (industrysArr[x] === industrysArr[j]){
|
|
|
- // industrysArr.splice(j, 1);
|
|
|
- // }
|
|
|
- // else j++;
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
for (var x = 0; x < allIndustry.length; x++) {
|
|
|
for (var j =x+1; j <allIndustry.length; ) {
|
|
|
if (allIndustry[x] === allIndustry[j]){
|
|
@@ -1077,33 +976,6 @@
|
|
|
|
|
|
//
|
|
|
if(nowUpgradeYear >= 1){
|
|
|
- // ------- 升级价格交叉计算 ---------
|
|
|
- // let addAreaPriceY = 0;
|
|
|
- // let addAreaPriceM = 0;
|
|
|
- // let oldAreaPriceY = 0;
|
|
|
- // let oldAreaPriceM = 0;
|
|
|
- // let addIndustryPriceY = 0;
|
|
|
- // let addIndustryPriceM = 0;
|
|
|
- // if(areasArr !== null&&industrysArr !== null){
|
|
|
- // addAreaPriceY = getsubVipOrderPrice(areasArr,industrysArr,[nowUpgradeYear,1]);
|
|
|
- // addAreaPriceM = getsubVipOrderPrice(areasArr,industrysArr,[nowUpgrade,2]);
|
|
|
- // }
|
|
|
- // if(areasArr !== null){
|
|
|
- // oldAreaPriceY = getsubVipOrderPrice(areasArr,buyIndustry,[nowUpgradeYear,1]);
|
|
|
- // oldAreaPriceM = getsubVipOrderPrice(areasArr,buyIndustry,[nowUpgrade,2]);
|
|
|
- // }
|
|
|
- // if(industrysArr !== null){
|
|
|
- // addIndustryPriceY = getsubVipOrderPrice(buyArea,industrysArr,[nowUpgradeYear,1]);
|
|
|
- // addIndustryPriceM = getsubVipOrderPrice(buyArea,industrysArr,[nowUpgrade,2]);
|
|
|
- // }
|
|
|
- // price = addAreaPriceY + addAreaPriceM + oldAreaPriceY + oldAreaPriceM + addIndustryPriceY + addIndustryPriceM;
|
|
|
- // ------- 升级价格交叉计算 ---------
|
|
|
- // ------- 升级价格差价计算 ---------
|
|
|
- // let buyset = getBuySet(buyArea,buyIndustry)
|
|
|
- // let newPriceY = getsubVipOrderPrice(allBuyArea,allIndustry,[nowUpgradeYear,1]);
|
|
|
- // let newPriceM = getsubVipOrderPrice(allBuyArea,allIndustry,[nowUpgrade,2]);
|
|
|
- // let yearprice = getsubVipOrderPrice(allBuyArea,allIndustry,[nowUpgradeYear,1]);
|
|
|
- // let monthprice = getsubVipOrderPrice(allBuyArea,allIndustry,[nowUpgrade,2]);
|
|
|
let newPriceY = getsubVipOrderPriceBybuyset(newBuysetObj(areaObj()),[nowUpgradeYear,1]);
|
|
|
let newPriceM = getsubVipOrderPriceBybuyset(newBuysetObj(areaObj()),[nowUpgrade,2]);
|
|
|
let yearprice = getsubVipOrderPriceBybuyset(newBuysetObj(areaObj()),[nowUpgradeYear,1]);
|
|
@@ -1122,22 +994,6 @@
|
|
|
console.log("monthprice",monthprice);
|
|
|
console.log(">=1",price);
|
|
|
}else{
|
|
|
- // ------- 升级价格交叉计算 ---------
|
|
|
- // let addAreaPriceM = 0;
|
|
|
- // let oldAreaPriceM = 0;
|
|
|
- // let addIndustryPriceM = 0;
|
|
|
- // if(areasArr !== null&&industrysArr !== null){
|
|
|
- // addAreaPriceM = getsubVipOrderPrice(areasArr,industrysArr,[nowUpgrade,2]);
|
|
|
- // }
|
|
|
- // if(areasArr !== null){
|
|
|
- // oldAreaPriceM = getsubVipOrderPrice(areasArr,buyIndustry,[nowUpgrade,2]);
|
|
|
- // }
|
|
|
- // if(industrysArr !== null){
|
|
|
- // addIndustryPriceM = getsubVipOrderPrice(buyArea,industrysArr,[nowUpgrade,2]);
|
|
|
- // }
|
|
|
- // price = addAreaPriceM + oldAreaPriceM + addIndustryPriceM;
|
|
|
- // // ------- 升级价格交叉计算 ---------
|
|
|
- // let monthprice = getsubVipOrderPrice(allBuyArea,allIndustry,[nowUpgrade,2]);
|
|
|
let monthprice = getsubVipOrderPriceBybuyset(newBuysetObj(areaObj()),[nowUpgrade,2]);
|
|
|
|
|
|
// ------- 升级价格差价计算 ---------
|
|
@@ -1218,45 +1074,7 @@
|
|
|
return
|
|
|
}
|
|
|
$(".save_upgrade").attr("disabled","disabled");
|
|
|
- //
|
|
|
- // let areas = areasArr;
|
|
|
- // let industrys = null;
|
|
|
- // if(sessionStorage.vipSubSelectIndustryUpgrade !== undefined){
|
|
|
- // industrys = JSON.parse(sessionStorage.vipSubSelectIndustryUpgrade);
|
|
|
- // }
|
|
|
- // let industryArr = "";
|
|
|
- // let areaArr = "";
|
|
|
- // if(areas !== null){
|
|
|
- // if(areas["全国"]){
|
|
|
- // areas={};
|
|
|
- // }
|
|
|
- // areaArr = JSON.stringify(areas);
|
|
|
- // }else{
|
|
|
- // areaArr = "no";
|
|
|
- // }
|
|
|
- // if(industrys !== null){
|
|
|
- // if(industrys.length==1&&industrys[0]=="全部行业"){
|
|
|
- // industrys=[];
|
|
|
- // }
|
|
|
- // industryArr = industrys.join(",");
|
|
|
- // }else{
|
|
|
- // industryArr = "no";
|
|
|
- // }
|
|
|
- //
|
|
|
- // if(areas_arr !== null){
|
|
|
- // if(areas_arr["全国"]){
|
|
|
- // areas_arr={};
|
|
|
- // }
|
|
|
- // areas_arr = JSON.stringify(areas_arr);
|
|
|
- // }else{
|
|
|
- // areas_arr = "no";
|
|
|
- // }
|
|
|
- if(allBuyArea["全国"]){
|
|
|
- allBuyArea={};
|
|
|
- }
|
|
|
//
|
|
|
- let areaarr = buyArea;
|
|
|
- let industryarr = buyIndustry;
|
|
|
let allIndustryArr = allIndustry;
|
|
|
if(allArea["全国"]){
|
|
|
allArea={};
|
|
@@ -1286,12 +1104,6 @@
|
|
|
}
|
|
|
//
|
|
|
var param = {
|
|
|
- // "area": areas_arr,
|
|
|
- // "industry": industryArr,
|
|
|
- // "areas": JSON.stringify(areaarr),
|
|
|
- // "areas_arr": areaArr,
|
|
|
- // "industryarr": industryarr.join(","),
|
|
|
- // "allArea": JSON.stringify(allAreaArr),
|
|
|
"allIndustry": allIndustryArr.join(","),
|
|
|
"allBuyArea": JSON.stringify(allArea),
|
|
|
"payWay": "wx_js",
|
|
@@ -1300,7 +1112,6 @@
|
|
|
"addCount":vipCount,
|
|
|
"addIndustryCount": vipIndustry,
|
|
|
"buyset":JSON.stringify(areaObj()),
|
|
|
- "oldbuyset":JSON.stringify(oldBuyset),
|
|
|
}
|
|
|
console.log(param)
|
|
|
$DoPost("/subscribepay/renewUpgrade/renewUpgradeCreateOrder",param,function(r){
|