|
@@ -975,6 +975,8 @@
|
|
var oldMonthPrice = 0;
|
|
var oldMonthPrice = 0;
|
|
var areasArr = {};
|
|
var areasArr = {};
|
|
var industrysArr = [];
|
|
var industrysArr = [];
|
|
|
|
+ var allArea = {};
|
|
|
|
+ var allIndustry = [];
|
|
var nowRenew = "";
|
|
var nowRenew = "";
|
|
function FinallyPrice(){
|
|
function FinallyPrice(){
|
|
$(".save_upgrade").attr('disabled','disabled');
|
|
$(".save_upgrade").attr('disabled','disabled');
|
|
@@ -1018,8 +1020,56 @@
|
|
if(buyCheck){
|
|
if(buyCheck){
|
|
$(".save_upgrade").removeAttr("disabled");
|
|
$(".save_upgrade").removeAttr("disabled");
|
|
}
|
|
}
|
|
|
|
+ if(area !== ""&&area !== undefined){
|
|
|
|
+ for(let province in area){
|
|
|
|
+ let citys = area[province];
|
|
|
|
+ if(citys.length===0){
|
|
|
|
+ allArea[province] = [];
|
|
|
|
+ }else{
|
|
|
|
+ allArea[province] = citys;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ for(let province in vipArea){
|
|
|
|
+ let citys = vipArea[province];
|
|
|
|
+ if(allArea[province] === undefined){
|
|
|
|
+ allArea[province] = citys
|
|
|
|
+ }else{
|
|
|
|
+ let cityArr = [];
|
|
|
|
+ for(let i in citys){
|
|
|
|
+ cityArr.push(citys[i]);
|
|
|
|
+ }
|
|
|
|
+ for(let i in allArea[province]){
|
|
|
|
+ cityArr.push(allArea[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++;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //
|
|
|
|
+ allArea[province] = cityArr;
|
|
|
|
+ }
|
|
|
|
+ if(province === "全国"){
|
|
|
|
+ allArea = {"全国":[]};
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}else{
|
|
}else{
|
|
areasArr = null;
|
|
areasArr = null;
|
|
|
|
+ if(area !== ""&&area !== undefined){
|
|
|
|
+ for(let province in area){
|
|
|
|
+ let citys = area[province];
|
|
|
|
+ if(citys.length===0){
|
|
|
|
+ allArea[province] = [];
|
|
|
|
+ }else{
|
|
|
|
+ allArea[province] = citys;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
// if(sessionStorage.vipSubSelectAreaUpgrade!==""&&sessionStorage.vipSubSelectAreaUpgrade!==undefined){
|
|
// if(sessionStorage.vipSubSelectAreaUpgrade!==""&&sessionStorage.vipSubSelectAreaUpgrade!==undefined){
|
|
// var vipArea = JSON.parse(sessionStorage.vipSubSelectAreaUpgrade);
|
|
// var vipArea = JSON.parse(sessionStorage.vipSubSelectAreaUpgrade);
|
|
@@ -1090,11 +1140,30 @@
|
|
industrysArr = ["全部行业"];
|
|
industrysArr = ["全部行业"];
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ if(buyerclass!==""&&buyerclass!==undefined){
|
|
|
|
+ for(let i in buyerclass){
|
|
|
|
+ let industry = buyerclass[i];
|
|
|
|
+ allIndustry.push(industry);
|
|
|
|
+ }
|
|
|
|
+ for(let i in vipIndustry){
|
|
|
|
+ let industry = vipIndustry[i];
|
|
|
|
+ allIndustry.push(industry);
|
|
|
|
+ if(industry === "全部行业"){
|
|
|
|
+ allIndustry = ["全部行业"];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
if(buyCheck){
|
|
if(buyCheck){
|
|
$(".save_upgrade").removeAttr("disabled");
|
|
$(".save_upgrade").removeAttr("disabled");
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
industrysArr = null;
|
|
industrysArr = null;
|
|
|
|
+ if(buyerclass!==""&&buyerclass!==undefined){
|
|
|
|
+ for(let i in buyerclass){
|
|
|
|
+ let industry = buyerclass[i];
|
|
|
|
+ allIndustry.push(industry);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
// if(sessionStorage.vipSubSelectIndustryUpgrade!==""&&sessionStorage.vipSubSelectIndustryUpgrade!==undefined){
|
|
// if(sessionStorage.vipSubSelectIndustryUpgrade!==""&&sessionStorage.vipSubSelectIndustryUpgrade!==undefined){
|
|
@@ -1133,6 +1202,14 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ for (var x = 0; x < allIndustry.length; x++) {
|
|
|
|
+ for (var j =x+1; j <allIndustry.length; ) {
|
|
|
|
+ if (allIndustry[x] === allIndustry[j]){
|
|
|
|
+ allIndustry.splice(j, 1);
|
|
|
|
+ }
|
|
|
|
+ else j++;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
console.log("industrysArr",industrysArr);
|
|
console.log("industrysArr",industrysArr);
|
|
// if(sessionStorage.effectiveDate !== ""&&sessionStorage.effectiveDate!==undefined){
|
|
// if(sessionStorage.effectiveDate !== ""&&sessionStorage.effectiveDate!==undefined){
|
|
@@ -1242,12 +1319,12 @@
|
|
addIndustryPriceY = getsubVipOrderPrice(area,industrysArr,[nowUpgradeYear,1]);
|
|
addIndustryPriceY = getsubVipOrderPrice(area,industrysArr,[nowUpgradeYear,1]);
|
|
addIndustryPriceM = getsubVipOrderPrice(area,industrysArr,[nowUpgrade,2]);
|
|
addIndustryPriceM = getsubVipOrderPrice(area,industrysArr,[nowUpgrade,2]);
|
|
}
|
|
}
|
|
-// let yearprice = getsubVipOrderPrice(areasArr,industrysArr,[nowUpgradeYear,1]);
|
|
|
|
-// let monthprice = getsubVipOrderPrice(areasArr,industrysArr,[nowUpgrade,2]);
|
|
|
|
|
|
+ let yearprice = getsubVipOrderPrice(allArea,allIndustry,[nowUpgradeYear,1]);
|
|
|
|
+ let monthprice = getsubVipOrderPrice(allArea,allIndustry,[nowUpgrade,2]);
|
|
// price = yearprice + monthprice;
|
|
// price = yearprice + monthprice;
|
|
price = addAreaPriceY + addAreaPriceM + oldAreaPriceY + oldAreaPriceM + addIndustryPriceY + addIndustryPriceM;
|
|
price = addAreaPriceY + addAreaPriceM + oldAreaPriceY + oldAreaPriceM + addIndustryPriceY + addIndustryPriceM;
|
|
- let yearprice = addAreaPriceY + oldAreaPriceY + addIndustryPriceY;
|
|
|
|
- let monthprice = addAreaPriceM + oldAreaPriceM + addIndustryPriceM;
|
|
|
|
|
|
+// let yearprice = addAreaPriceY + oldAreaPriceY + addIndustryPriceY;
|
|
|
|
+// let monthprice = addAreaPriceM + oldAreaPriceM + addIndustryPriceM;
|
|
if(monthprice === 0){
|
|
if(monthprice === 0){
|
|
completeMonth = ((yearprice / nowUpgradeYear) / 10).toFixed(1);
|
|
completeMonth = ((yearprice / nowUpgradeYear) / 10).toFixed(1);
|
|
completeYear = (yearprice / nowUpgradeYear).toFixed(1);
|
|
completeYear = (yearprice / nowUpgradeYear).toFixed(1);
|
|
@@ -1271,10 +1348,11 @@
|
|
if(industrysArr !== null){
|
|
if(industrysArr !== null){
|
|
addIndustryPriceM = getsubVipOrderPrice(area,industrysArr,[nowUpgrade,2]);
|
|
addIndustryPriceM = getsubVipOrderPrice(area,industrysArr,[nowUpgrade,2]);
|
|
}
|
|
}
|
|
|
|
+ let monthprice = getsubVipOrderPrice(allArea,allIndustry,[nowUpgrade,2]);
|
|
// price = getsubVipOrderPrice(areasArr,industrysArr,[nowUpgrade,2]);
|
|
// price = getsubVipOrderPrice(areasArr,industrysArr,[nowUpgrade,2]);
|
|
price = addAreaPriceM + oldAreaPriceM + addIndustryPriceM;
|
|
price = addAreaPriceM + oldAreaPriceM + addIndustryPriceM;
|
|
- completeMonth = (price / nowUpgrade).toFixed(1);
|
|
|
|
- completeYear = ((price / nowUpgrade)*10).toFixed(1);
|
|
|
|
|
|
+ completeMonth = (monthprice / nowUpgrade).toFixed(1);
|
|
|
|
+ completeYear = ((monthprice / nowUpgrade)*10).toFixed(1);
|
|
console.log("<1",price)
|
|
console.log("<1",price)
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1369,7 +1447,14 @@
|
|
//
|
|
//
|
|
let areaarr = area;
|
|
let areaarr = area;
|
|
let industryarr = buyerclass;
|
|
let industryarr = buyerclass;
|
|
-
|
|
|
|
|
|
+ let allAreaArr = allArea;
|
|
|
|
+ let allIndustryArr = allIndustry;
|
|
|
|
+ if(allAreaArr["全国"]){
|
|
|
|
+ allAreaArr={};
|
|
|
|
+ }
|
|
|
|
+ if(allIndustryArr.length==1&&allIndustryArr[0]=="全部行业"){
|
|
|
|
+ allIndustryArr=[];
|
|
|
|
+ }
|
|
//
|
|
//
|
|
let renew_time = $('.choose_item.lengthen .info').text();
|
|
let renew_time = $('.choose_item.lengthen .info').text();
|
|
let times = "";
|
|
let times = "";
|
|
@@ -1382,11 +1467,13 @@
|
|
"industry": industryArr,
|
|
"industry": industryArr,
|
|
"areas": JSON.stringify(areaarr),
|
|
"areas": JSON.stringify(areaarr),
|
|
"industryarr": industryarr.join(","),
|
|
"industryarr": industryarr.join(","),
|
|
|
|
+ "allArea": JSON.stringify(allAreaArr),
|
|
|
|
+ "allIndustry": allIndustryArr.join(","),
|
|
"payWay": "wx_js",
|
|
"payWay": "wx_js",
|
|
// "effect": effect,
|
|
// "effect": effect,
|
|
"pay_source" : "Upgrade",
|
|
"pay_source" : "Upgrade",
|
|
"time": times,
|
|
"time": times,
|
|
- "nowUp": Number(nowRenew),
|
|
|
|
|
|
+// "nowUp": Number(nowRenew),
|
|
// "isvalidOk" : isvalidOk,
|
|
// "isvalidOk" : isvalidOk,
|
|
}
|
|
}
|
|
console.log(param)
|
|
console.log(param)
|