|
@@ -385,53 +385,53 @@
|
|
|
$('.pay_mode .select_payment .choose_way.info').html(checkValue);
|
|
|
});
|
|
|
// 选择生效日期
|
|
|
- $('.choose_effect_date > a').click(function () {
|
|
|
- $('#effective_date').show(200);
|
|
|
- var nowMonths = new Date().getMonth()+1;
|
|
|
- var nowYears = new Date().getFullYear();
|
|
|
- var as = nowMonths +1;
|
|
|
- if(as > 12){
|
|
|
- as = as-12;
|
|
|
- nowYears = nowYears +1;
|
|
|
- }
|
|
|
- var bs = nowYears+"/"+as+"/1";
|
|
|
- var effects = new Date(bs).getTime() /1000;
|
|
|
- var a = nowYears+"."+as+".01";
|
|
|
- $(".notnownow").text(a + " - " + endTime.replace(/-/g, "."))
|
|
|
- if(ends < effects){
|
|
|
- $(".effect_next").hide();
|
|
|
-// $(".box").css("height", "2.7rem");
|
|
|
- }
|
|
|
- })
|
|
|
- //
|
|
|
- var effectiveName = new Date().getMonth()+2;
|
|
|
- if(effectiveName > 12){
|
|
|
- effectiveName = effectiveName - 12
|
|
|
- }
|
|
|
- var effectiveNames = effectiveName+"月1日生效"
|
|
|
- $(".effective_name.notnow").text(effectiveNames);
|
|
|
- $('#nextMonth').val(effectiveNames);
|
|
|
-
|
|
|
- // 对生效日期方式选择的input绑定点击事件
|
|
|
- $('#effective_date input:radio[name="date"]').click(function () {
|
|
|
- var checkValue = $('input:radio[name="date"]:checked').val();
|
|
|
-// console.log(checkValue);
|
|
|
- $('#effective_date').hide(200);
|
|
|
- var effective = "";
|
|
|
- var effectiveName = new Date().getMonth()+2;
|
|
|
- if(effectiveName > 12){
|
|
|
- effectiveName = effectiveName - 12
|
|
|
- }
|
|
|
- var effectiveNames = effectiveName+"月1日生效"
|
|
|
- if(checkValue === "立即生效,需支付当月费用差价"){
|
|
|
- effective = "now";
|
|
|
- }else if(checkValue === effectiveNames){
|
|
|
- effective = "notnow";
|
|
|
- }
|
|
|
- sessionStorage.effectiveDate = effective;
|
|
|
- $('#effect_date_name').html(checkValue);
|
|
|
- FinallyPrice();
|
|
|
- });
|
|
|
+// $('.choose_effect_date > a').click(function () {
|
|
|
+// $('#effective_date').show(200);
|
|
|
+// var nowMonths = new Date().getMonth()+1;
|
|
|
+// var nowYears = new Date().getFullYear();
|
|
|
+// var as = nowMonths +1;
|
|
|
+// if(as > 12){
|
|
|
+// as = as-12;
|
|
|
+// nowYears = nowYears +1;
|
|
|
+// }
|
|
|
+// var bs = nowYears+"/"+as+"/1";
|
|
|
+// var effects = new Date(bs).getTime() /1000;
|
|
|
+// var a = nowYears+"."+as+".01";
|
|
|
+// $(".notnownow").text(a + " - " + endTime.replace(/-/g, "."))
|
|
|
+// if(ends < effects){
|
|
|
+// $(".effect_next").hide();
|
|
|
+//// $(".box").css("height", "2.7rem");
|
|
|
+// }
|
|
|
+// })
|
|
|
+// //
|
|
|
+// var effectiveName = new Date().getMonth()+2;
|
|
|
+// if(effectiveName > 12){
|
|
|
+// effectiveName = effectiveName - 12
|
|
|
+// }
|
|
|
+// var effectiveNames = effectiveName+"月1日生效"
|
|
|
+// $(".effective_name.notnow").text(effectiveNames);
|
|
|
+// $('#nextMonth').val(effectiveNames);
|
|
|
+//
|
|
|
+// // 对生效日期方式选择的input绑定点击事件
|
|
|
+// $('#effective_date input:radio[name="date"]').click(function () {
|
|
|
+// var checkValue = $('input:radio[name="date"]:checked').val();
|
|
|
+//// console.log(checkValue);
|
|
|
+// $('#effective_date').hide(200);
|
|
|
+// var effective = "";
|
|
|
+// var effectiveName = new Date().getMonth()+2;
|
|
|
+// if(effectiveName > 12){
|
|
|
+// effectiveName = effectiveName - 12
|
|
|
+// }
|
|
|
+// var effectiveNames = effectiveName+"月1日生效"
|
|
|
+// if(checkValue === "立即生效,需支付当月费用差价"){
|
|
|
+// effective = "now";
|
|
|
+// }else if(checkValue === effectiveNames){
|
|
|
+// effective = "notnow";
|
|
|
+// }
|
|
|
+// sessionStorage.effectiveDate = effective;
|
|
|
+// $('#effect_date_name').html(checkValue);
|
|
|
+// FinallyPrice();
|
|
|
+// });
|
|
|
|
|
|
|
|
|
// 选择周期
|
|
@@ -752,25 +752,25 @@
|
|
|
}
|
|
|
}
|
|
|
//生效时间
|
|
|
- if(sessionStorage.effectiveDate !== ""&&sessionStorage.effectiveDate!==undefined){
|
|
|
- var effective = sessionStorage.effectiveDate;
|
|
|
- var effectiveHtml = "";
|
|
|
- if(effective === "now"){
|
|
|
- effectiveHtml = "立即生效,需支付当月费用差价";
|
|
|
- }else if(effective === "notnow"){
|
|
|
- var effectiveName = new Date().getMonth()+2;
|
|
|
- if(effectiveName > 12){
|
|
|
- effectiveName = effectiveName - 12
|
|
|
- }
|
|
|
- effectiveHtml = effectiveName+"月1日生效";
|
|
|
- }
|
|
|
- $(".effective_name").each(function(){
|
|
|
- if($(this).text() === effectiveHtml){
|
|
|
- $(this).parent().next().find("input").prop("checked", true);
|
|
|
- }
|
|
|
- })
|
|
|
- $('#effect_date_name').html(effectiveHtml);
|
|
|
- }
|
|
|
+// if(sessionStorage.effectiveDate !== ""&&sessionStorage.effectiveDate!==undefined){
|
|
|
+// var effective = sessionStorage.effectiveDate;
|
|
|
+// var effectiveHtml = "";
|
|
|
+// if(effective === "now"){
|
|
|
+// effectiveHtml = "立即生效,需支付当月费用差价";
|
|
|
+// }else if(effective === "notnow"){
|
|
|
+// var effectiveName = new Date().getMonth()+2;
|
|
|
+// if(effectiveName > 12){
|
|
|
+// effectiveName = effectiveName - 12
|
|
|
+// }
|
|
|
+// effectiveHtml = effectiveName+"月1日生效";
|
|
|
+// }
|
|
|
+// $(".effective_name").each(function(){
|
|
|
+// if($(this).text() === effectiveHtml){
|
|
|
+// $(this).parent().next().find("input").prop("checked", true);
|
|
|
+// }
|
|
|
+// })
|
|
|
+// $('#effect_date_name').html(effectiveHtml);
|
|
|
+// }
|
|
|
//支付方式
|
|
|
if(sessionStorage.payType!==""&&sessionStorage.payType!==undefined){
|
|
|
var payType = sessionStorage.payType;
|
|
@@ -831,8 +831,8 @@
|
|
|
var ends = "";
|
|
|
$DoPost("/subscribepay/renewUpgrade/getBuyMsg", {}, function (data) {
|
|
|
if (data) {
|
|
|
- area = data.area;
|
|
|
- buyerclass = data.buyerclass;
|
|
|
+ area = data.allarea;
|
|
|
+ buyerclass = data.allindustry;
|
|
|
cycleunit = data.cycleunit;
|
|
|
cyclecount = data.cyclecount;
|
|
|
startTime = data.start;
|
|
@@ -840,47 +840,47 @@
|
|
|
endTime = data.end;
|
|
|
ends = data.endtime;
|
|
|
//
|
|
|
- var areaArr = [];
|
|
|
- var areaHtml = "";
|
|
|
- var buyerclassArr = [];
|
|
|
- var buyerclassHtml = "";
|
|
|
- // var dateName = "";
|
|
|
- // var dateHtml = "";
|
|
|
- if (area !== "" && area !== undefined){
|
|
|
- for(var province in area){
|
|
|
- var citys = area[province]
|
|
|
- // console.log(citys);
|
|
|
- if(citys.length===0){
|
|
|
- areaArr.push(province);
|
|
|
- }else{
|
|
|
- for(var i in citys){
|
|
|
- areaArr.push(citys[i]);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- areaHtml = areaArr.toString().replace(/,/g, " ");
|
|
|
- // $(".item_area .label_for").text(areaHtml);
|
|
|
- if(checkObj(area)){
|
|
|
- areaHtml = "全国";
|
|
|
- }
|
|
|
- $('#area').attr("placeholder",areaHtml);
|
|
|
- }
|
|
|
- if(buyerclass !== "" && buyerclass !== undefined){
|
|
|
- for(var i in buyerclass){
|
|
|
- var industry = buyerclass[i];
|
|
|
- buyerclassArr.push(industry);
|
|
|
- buyerclassHtml = buyerclassArr.toString().replace(/,/g, " ");
|
|
|
- }
|
|
|
- // $(".item_industry .label_for").text(buyerclassHtml);
|
|
|
- if(checkObj(buyerclass)){
|
|
|
- buyerclassHtml = "全行业";
|
|
|
- }
|
|
|
- $('#buyerclass').attr("placeholder",buyerclassHtml);
|
|
|
- }
|
|
|
+// var areaArr = [];
|
|
|
+// var areaHtml = "";
|
|
|
+// var buyerclassArr = [];
|
|
|
+// var buyerclassHtml = "";
|
|
|
+// // var dateName = "";
|
|
|
+// // var dateHtml = "";
|
|
|
+// if (area !== "" && area !== undefined){
|
|
|
+// for(var province in area){
|
|
|
+// var citys = area[province]
|
|
|
+// // console.log(citys);
|
|
|
+// if(citys.length===0){
|
|
|
+// areaArr.push(province);
|
|
|
+// }else{
|
|
|
+// for(var i in citys){
|
|
|
+// areaArr.push(citys[i]);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// areaHtml = areaArr.toString().replace(/,/g, " ");
|
|
|
+// // $(".item_area .label_for").text(areaHtml);
|
|
|
+// if(checkObj(area)){
|
|
|
+// areaHtml = "全国";
|
|
|
+// }
|
|
|
+// $('#area').attr("placeholder",areaHtml);
|
|
|
+// }
|
|
|
+// if(buyerclass !== "" && buyerclass !== undefined){
|
|
|
+// for(var i in buyerclass){
|
|
|
+// var industry = buyerclass[i];
|
|
|
+// buyerclassArr.push(industry);
|
|
|
+// buyerclassHtml = buyerclassArr.toString().replace(/,/g, " ");
|
|
|
+// }
|
|
|
+// // $(".item_industry .label_for").text(buyerclassHtml);
|
|
|
+// if(checkObj(buyerclass)){
|
|
|
+// buyerclassHtml = "全行业";
|
|
|
+// }
|
|
|
+// $('#buyerclass').attr("placeholder",buyerclassHtml);
|
|
|
+// }
|
|
|
//
|
|
|
- var nowDate = data.now.replace(/-/g, ".");
|
|
|
- var a = nowDate+ " - " +endTime;
|
|
|
- $(".nownow").text(nowDate+ " - " +endTime.replace(/-/g, "."))
|
|
|
+// var nowDate = data.now.replace(/-/g, ".");
|
|
|
+// var a = nowDate+ " - " +endTime;
|
|
|
+// $(".nownow").text(nowDate+ " - " +endTime.replace(/-/g, "."))
|
|
|
|
|
|
}
|
|
|
},false);
|
|
@@ -891,22 +891,25 @@
|
|
|
var oldMonthPrice = 0;
|
|
|
var areasArr = {};
|
|
|
var industrysArr = [];
|
|
|
+ var allArea = {};
|
|
|
+ var allIndustry = [];
|
|
|
var nowRenew = "";
|
|
|
function FinallyPrice(){
|
|
|
$(".save_upgrade").attr('disabled','disabled');
|
|
|
var nowUpgrade = "";
|
|
|
//
|
|
|
- var nowMonth = new Date(startTime).getMonth()+1;
|
|
|
- var nowYear = new Date(startTime).getFullYear();
|
|
|
- var nowDay = new Date(startTime).getDate();
|
|
|
+ var nowMonth = new Date().getMonth()+1;
|
|
|
+ var nowYear = new Date().getFullYear();
|
|
|
+ var nowDay = new Date().getDate();
|
|
|
//
|
|
|
var endMonth = new Date(endTime).getMonth()+1;
|
|
|
var endYear = new Date(endTime).getFullYear();
|
|
|
var endDay = new Date(endTime).getDate();
|
|
|
var oldPrice = "";
|
|
|
var price = "";
|
|
|
- var effect = "";
|
|
|
+// var effect = "";
|
|
|
var buyCheck = true;
|
|
|
+ var cPrice = 0;
|
|
|
if(sessionStorage.buyCheck!==undefined&&sessionStorage.buyCheck!==""){
|
|
|
let bcheck = sessionStorage.buyCheck;
|
|
|
if(bcheck === "true"){
|
|
@@ -917,26 +920,42 @@
|
|
|
}
|
|
|
if(sessionStorage.vipSubSelectAreaUpgrade!==""&&sessionStorage.vipSubSelectAreaUpgrade!==undefined){
|
|
|
var vipArea = JSON.parse(sessionStorage.vipSubSelectAreaUpgrade);
|
|
|
+ for(let province in vipArea){
|
|
|
+ let citys = vipArea[province];
|
|
|
+ if(citys.length===0){
|
|
|
+ areasArr[province] = [];
|
|
|
+ }else{
|
|
|
+ areasArr[province] = citys;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for(let province in vipArea){
|
|
|
+ if(province === "全国"){
|
|
|
+ areasArr = {"全国":[]};
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(buyCheck){
|
|
|
+ $(".save_upgrade").removeAttr("disabled");
|
|
|
+ }
|
|
|
if(area !== ""&&area !== undefined){
|
|
|
for(let province in area){
|
|
|
let citys = area[province];
|
|
|
if(citys.length===0){
|
|
|
- areasArr[province] = [];
|
|
|
+ allArea[province] = [];
|
|
|
}else{
|
|
|
- areasArr[province] = citys;
|
|
|
+ allArea[province] = citys;
|
|
|
}
|
|
|
}
|
|
|
for(let province in vipArea){
|
|
|
let citys = vipArea[province];
|
|
|
- if(areasArr[province] === undefined){
|
|
|
- areasArr[province] = citys
|
|
|
+ if(allArea[province] === undefined){
|
|
|
+ allArea[province] = citys
|
|
|
}else{
|
|
|
let cityArr = [];
|
|
|
for(let i in citys){
|
|
|
cityArr.push(citys[i]);
|
|
|
}
|
|
|
- for(let i in areasArr[province]){
|
|
|
- cityArr.push(areasArr[province][i]);
|
|
|
+ for(let i in allArea[province]){
|
|
|
+ cityArr.push(allArea[province][i]);
|
|
|
}
|
|
|
//
|
|
|
for (var x = 0; x < cityArr.length; x++) {
|
|
@@ -948,42 +967,105 @@
|
|
|
}
|
|
|
}
|
|
|
//
|
|
|
- areasArr[province] = cityArr;
|
|
|
+ allArea[province] = cityArr;
|
|
|
}
|
|
|
if(province === "全国"){
|
|
|
- areasArr = {"全国":[]};
|
|
|
+ allArea = {"全国":[]};
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- console.log($(".save_upgrade").attr("disabled"))
|
|
|
- if(buyCheck){
|
|
|
- $(".save_upgrade").removeAttr("disabled");
|
|
|
- }
|
|
|
}else{
|
|
|
+ areasArr = null;
|
|
|
if(area !== ""&&area !== undefined){
|
|
|
for(let province in area){
|
|
|
let citys = area[province];
|
|
|
if(citys.length===0){
|
|
|
- areasArr[province] = [];
|
|
|
+ allArea[province] = [];
|
|
|
}else{
|
|
|
- areasArr[province] = citys;
|
|
|
+ allArea[province] = citys;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+// if(sessionStorage.vipSubSelectAreaUpgrade!==""&&sessionStorage.vipSubSelectAreaUpgrade!==undefined){
|
|
|
+// var vipArea = JSON.parse(sessionStorage.vipSubSelectAreaUpgrade);
|
|
|
+// if(area !== ""&&area !== undefined){
|
|
|
+// for(let province in area){
|
|
|
+// let citys = area[province];
|
|
|
+// if(citys.length===0){
|
|
|
+// areasArr[province] = [];
|
|
|
+// }else{
|
|
|
+// areasArr[province] = citys;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// for(let province in vipArea){
|
|
|
+// let citys = vipArea[province];
|
|
|
+// if(areasArr[province] === undefined){
|
|
|
+// areasArr[province] = citys
|
|
|
+// }else{
|
|
|
+// let cityArr = [];
|
|
|
+// for(let i in citys){
|
|
|
+// cityArr.push(citys[i]);
|
|
|
+// }
|
|
|
+// for(let i in areasArr[province]){
|
|
|
+// cityArr.push(areasArr[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++;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// //
|
|
|
+// areasArr[province] = cityArr;
|
|
|
+// }
|
|
|
+// if(province === "全国"){
|
|
|
+// areasArr = {"全国":[]};
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// console.log($(".save_upgrade").attr("disabled"))
|
|
|
+// if(buyCheck){
|
|
|
+// $(".save_upgrade").removeAttr("disabled");
|
|
|
+// }
|
|
|
+// }else{
|
|
|
+// if(area !== ""&&area !== undefined){
|
|
|
+// for(let province in area){
|
|
|
+// let citys = area[province];
|
|
|
+// if(citys.length===0){
|
|
|
+// areasArr[province] = [];
|
|
|
+// }else{
|
|
|
+// areasArr[province] = citys;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+
|
|
|
console.log("areasArr",areasArr)
|
|
|
- if(sessionStorage.vipSubSelectIndustryUpgrade!==""&&sessionStorage.vipSubSelectIndustryUpgrade!==undefined){
|
|
|
- var vipIndustry = JSON.parse(sessionStorage.vipSubSelectIndustryUpgrade);
|
|
|
+ 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(buyerclass!==""&&buyerclass!==undefined){
|
|
|
for(let i in buyerclass){
|
|
|
let industry = buyerclass[i];
|
|
|
- industrysArr.push(industry);
|
|
|
+ allIndustry.push(industry);
|
|
|
}
|
|
|
for(let i in vipIndustry){
|
|
|
let industry = vipIndustry[i];
|
|
|
- industrysArr.push(industry);
|
|
|
+ allIndustry.push(industry);
|
|
|
if(industry === "全部行业"){
|
|
|
- industrysArr = ["全部行业"];
|
|
|
+ allIndustry = ["全部行业"];
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -991,34 +1073,71 @@
|
|
|
$(".save_upgrade").removeAttr("disabled");
|
|
|
}
|
|
|
}else{
|
|
|
+ industrysArr = null;
|
|
|
if(buyerclass!==""&&buyerclass!==undefined){
|
|
|
for(let i in buyerclass){
|
|
|
let industry = buyerclass[i];
|
|
|
- industrysArr.push(industry);
|
|
|
+ allIndustry.push(industry);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- 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);
|
|
|
+// if(sessionStorage.vipSubSelectIndustryUpgrade!==""&&sessionStorage.vipSubSelectIndustryUpgrade!==undefined){
|
|
|
+// var vipIndustry = JSON.parse(sessionStorage.vipSubSelectIndustryUpgrade);
|
|
|
+// if(buyerclass!==""&&buyerclass!==undefined){
|
|
|
+// for(let i in buyerclass){
|
|
|
+// let industry = buyerclass[i];
|
|
|
+// industrysArr.push(industry);
|
|
|
+// }
|
|
|
+// for(let i in vipIndustry){
|
|
|
+// let industry = vipIndustry[i];
|
|
|
+// industrysArr.push(industry);
|
|
|
+// if(industry === "全部行业"){
|
|
|
+// industrysArr = ["全部行业"];
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// if(buyCheck){
|
|
|
+// $(".save_upgrade").removeAttr("disabled");
|
|
|
+// }
|
|
|
+// }else{
|
|
|
+// if(buyerclass!==""&&buyerclass!==undefined){
|
|
|
+// for(let i in buyerclass){
|
|
|
+// let industry = buyerclass[i];
|
|
|
+// industrysArr.push(industry);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+ 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]){
|
|
|
+ allIndustry.splice(j, 1);
|
|
|
}
|
|
|
else j++;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
console.log("industrysArr",industrysArr);
|
|
|
- if(sessionStorage.effectiveDate !== ""&&sessionStorage.effectiveDate!==undefined){
|
|
|
- let eff = sessionStorage.effectiveDate;
|
|
|
- if(eff === "now"){
|
|
|
- effect = "now";
|
|
|
- }else{
|
|
|
- effect = "notnow";
|
|
|
- }
|
|
|
- }else{
|
|
|
- effect = "now";
|
|
|
- }
|
|
|
+// if(sessionStorage.effectiveDate !== ""&&sessionStorage.effectiveDate!==undefined){
|
|
|
+// let eff = sessionStorage.effectiveDate;
|
|
|
+// if(eff === "now"){
|
|
|
+// effect = "now";
|
|
|
+// }else{
|
|
|
+// effect = "notnow";
|
|
|
+// }
|
|
|
+// }else{
|
|
|
+// effect = "now";
|
|
|
+// }
|
|
|
//
|
|
|
if(endYear === nowYear){
|
|
|
if(endMonth === nowMonth){
|
|
@@ -1054,12 +1173,12 @@
|
|
|
nowRenew = nowUpgrade;
|
|
|
console.log("monthold",nowUpgrade)
|
|
|
//
|
|
|
- if(effect === "notnow"){
|
|
|
- nowUpgrade = nowUpgrade -1;
|
|
|
- }
|
|
|
- if(nowUpgrade == 0){
|
|
|
- nowUpgrade = 1;
|
|
|
- }
|
|
|
+// if(effect === "notnow"){
|
|
|
+// nowUpgrade = nowUpgrade -1;
|
|
|
+// }
|
|
|
+// if(nowUpgrade == 0){
|
|
|
+// nowUpgrade = 1;
|
|
|
+// }
|
|
|
|
|
|
//
|
|
|
var nowUpgradeYear = 0;
|
|
@@ -1098,9 +1217,30 @@
|
|
|
|
|
|
//
|
|
|
if(nowUpgradeYear >= 1){
|
|
|
- let yearprice = getsubVipOrderPrice(areasArr,industrysArr,[nowUpgradeYear,1]);
|
|
|
- let monthprice = getsubVipOrderPrice(areasArr,industrysArr,[nowUpgrade,2]);
|
|
|
- price = yearprice + monthprice;
|
|
|
+ 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,buyerclass,[nowUpgradeYear,1]);
|
|
|
+ oldAreaPriceM = getsubVipOrderPrice(areasArr,buyerclass,[nowUpgrade,2]);
|
|
|
+ }
|
|
|
+ if(industrysArr !== null){
|
|
|
+ addIndustryPriceY = getsubVipOrderPrice(area,industrysArr,[nowUpgradeYear,1]);
|
|
|
+ addIndustryPriceM = getsubVipOrderPrice(area,industrysArr,[nowUpgrade,2]);
|
|
|
+ }
|
|
|
+ let yearprice = getsubVipOrderPrice(allArea,allIndustry,[nowUpgradeYear,1]);
|
|
|
+ let monthprice = getsubVipOrderPrice(allArea,allIndustry,[nowUpgrade,2]);
|
|
|
+// price = yearprice + monthprice;
|
|
|
+ price = addAreaPriceY + addAreaPriceM + oldAreaPriceY + oldAreaPriceM + addIndustryPriceY + addIndustryPriceM;
|
|
|
+// let yearprice = addAreaPriceY + oldAreaPriceY + addIndustryPriceY;
|
|
|
+// let monthprice = addAreaPriceM + oldAreaPriceM + addIndustryPriceM;
|
|
|
if(monthprice === 0){
|
|
|
completeMonth = ((yearprice / nowUpgradeYear) / 10).toFixed(1);
|
|
|
completeYear = (yearprice / nowUpgradeYear).toFixed(1);
|
|
@@ -1112,16 +1252,30 @@
|
|
|
console.log("monthprice",monthprice);
|
|
|
console.log(">=1",price);
|
|
|
}else{
|
|
|
- price = getsubVipOrderPrice(areasArr,industrysArr,[nowUpgrade,2]);
|
|
|
- completeMonth = (price / nowUpgrade).toFixed(1);
|
|
|
- completeYear = ((price / nowUpgrade)*10).toFixed(1);
|
|
|
+ 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,buyerclass,[nowUpgrade,2]);
|
|
|
+ }
|
|
|
+ if(industrysArr !== null){
|
|
|
+ addIndustryPriceM = getsubVipOrderPrice(area,industrysArr,[nowUpgrade,2]);
|
|
|
+ }
|
|
|
+ let monthprice = getsubVipOrderPrice(allArea,allIndustry,[nowUpgrade,2]);
|
|
|
+// price = getsubVipOrderPrice(areasArr,industrysArr,[nowUpgrade,2]);
|
|
|
+ price = addAreaPriceM + oldAreaPriceM + addIndustryPriceM;
|
|
|
+ completeMonth = (monthprice / nowUpgrade).toFixed(1);
|
|
|
+ completeYear = ((monthprice / nowUpgrade)*10).toFixed(1);
|
|
|
console.log("<1",price)
|
|
|
}
|
|
|
|
|
|
console.log("oldPrice", oldPrice);
|
|
|
if(sessionStorage.vipSubSelectAreaUpgrade===undefined&&sessionStorage.vipSubSelectIndustryUpgrade===undefined){
|
|
|
- completeMonth = oldMonthPrice
|
|
|
- completeYear = oldYearPrice
|
|
|
+ completeMonth = oldMonthPrice;
|
|
|
+ completeYear = oldYearPrice;
|
|
|
}
|
|
|
console.log("completeMonth",completeMonth)
|
|
|
console.log("completeYear",completeYear)
|
|
@@ -1136,10 +1290,10 @@
|
|
|
sessionStorage.proPrice = price;
|
|
|
}
|
|
|
}
|
|
|
- var cPrice = 0;
|
|
|
- if(price>0){
|
|
|
- var cPrice = (price - oldPrice).toFixed(1);
|
|
|
- }
|
|
|
+
|
|
|
+ if(price>0){
|
|
|
+ var cPrice = (price).toFixed(1);
|
|
|
+ }
|
|
|
console.log(cPrice);
|
|
|
if(sessionStorage.proPrice!==""&&sessionStorage.proPrice!==undefined){
|
|
|
let proPrice = sessionStorage.proPrice;
|
|
@@ -1172,32 +1326,54 @@
|
|
|
//
|
|
|
$(".save_upgrade").on("click", function(){
|
|
|
$(".save_upgrade").attr("disabled","disabled")
|
|
|
- let effective = $("#effect_date_name").text();
|
|
|
- var effect = "now";
|
|
|
- if(effective !== "立即生效,需支付当月费用差价"){
|
|
|
- let nowMonth = new Date().getMonth()+1;
|
|
|
- let nowYear = new Date().getFullYear();
|
|
|
- let a = nowMonth +1
|
|
|
- if(a > 12){
|
|
|
- a = a-12;
|
|
|
- nowYear = nowYear +1;
|
|
|
- }
|
|
|
- let b = nowYear+"/"+a+"/1";
|
|
|
- effect = new Date(b).getTime() /1000;
|
|
|
- }
|
|
|
+// let effective = $("#effect_date_name").text();
|
|
|
+// var effect = "now";
|
|
|
+// if(effective !== "立即生效,需支付当月费用差价"){
|
|
|
+// let nowMonth = new Date().getMonth()+1;
|
|
|
+// let nowYear = new Date().getFullYear();
|
|
|
+// let a = nowMonth +1
|
|
|
+// if(a > 12){
|
|
|
+// a = a-12;
|
|
|
+// nowYear = nowYear +1;
|
|
|
+// }
|
|
|
+// let b = nowYear+"/"+a+"/1";
|
|
|
+// effect = new Date(b).getTime() /1000;
|
|
|
+// }
|
|
|
//
|
|
|
let areas = areasArr;
|
|
|
- let industrys = industrysArr;
|
|
|
- if(areas["全国"]){
|
|
|
- areas={};
|
|
|
- }
|
|
|
- if(industrys.length==1&&industrys[0]=="全部行业"){
|
|
|
- industrys=[];
|
|
|
- }
|
|
|
+ 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";
|
|
|
+ }
|
|
|
//
|
|
|
let areaarr = area;
|
|
|
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 times = "";
|
|
@@ -1212,15 +1388,17 @@
|
|
|
}
|
|
|
//
|
|
|
var param = {
|
|
|
- "area": JSON.stringify(areas),
|
|
|
- "industry": industrys.join(","),
|
|
|
+ "area": areaArr,
|
|
|
+ "industry": industryArr,
|
|
|
"areas": JSON.stringify(areaarr),
|
|
|
"industryarr": industryarr.join(","),
|
|
|
+ "allArea": JSON.stringify(allAreaArr),
|
|
|
+ "allIndustry": allIndustryArr.join(","),
|
|
|
"payWay": payType,
|
|
|
- "effect": effect,
|
|
|
+// "effect": effect,
|
|
|
"pay_source" : "Upgrade",
|
|
|
"time": times,
|
|
|
- "nowUp": Number(nowRenew),
|
|
|
+// "nowUp": Number(nowRenew),
|
|
|
}
|
|
|
console.log(param)
|
|
|
$DoPost("/subscribepay/renewUpgrade/renewUpgradeCreateOrder", param, function (r) {
|
|
@@ -1238,6 +1416,7 @@
|
|
|
alert(e)
|
|
|
}
|
|
|
clearSessionStorage();
|
|
|
+ $(".save_upgrade").removeAttr("disabled")
|
|
|
} else {
|
|
|
$(".save_upgrade").removeAttr("disabled")
|
|
|
}
|
|
@@ -1252,7 +1431,8 @@
|
|
|
sessionStorage.removeItem("proPrice");
|
|
|
sessionStorage.removeItem("vipSubSelectAreaUpgrade");
|
|
|
sessionStorage.removeItem("vipSubSelectIndustryUpgrade");
|
|
|
- sessionStorage.removeItem("effectiveDate");
|
|
|
+ sessionStorage.removeItem("vipSubSelectIndustryAdd");
|
|
|
+// sessionStorage.removeItem("effectiveDate");
|
|
|
sessionStorage.removeItem("buyCheck");
|
|
|
}
|
|
|
//
|