|
@@ -419,7 +419,7 @@
|
|
|
}
|
|
|
sessionStorage.effectiveDate = effective;
|
|
|
$('#effect_date_name').html(checkValue);
|
|
|
- window.location.reload();
|
|
|
+ FinallyPrice();
|
|
|
});
|
|
|
|
|
|
|
|
@@ -593,8 +593,11 @@
|
|
|
$('.choose_item.lengthen .info').text(val)
|
|
|
})
|
|
|
var proPrice = $(".computed_price").html().replace("¥","")
|
|
|
+ if(val === "不延长"){
|
|
|
+ proPrice = 0;
|
|
|
+ }
|
|
|
sessionStorage.proPrice = proPrice;
|
|
|
- window.location.reload();
|
|
|
+ FinallyPrice();
|
|
|
})
|
|
|
//新增区域
|
|
|
if(sessionStorage.vipSubSelectArea!==""&&sessionStorage.vipSubSelectArea!==undefined){
|
|
@@ -773,6 +776,9 @@
|
|
|
}
|
|
|
areaHtml = areaArr.toString().replace(/,/g, " ");
|
|
|
// $(".item_area .label_for").text(areaHtml);
|
|
|
+ if(checkObj(area)){
|
|
|
+ areaHtml = "全国";
|
|
|
+ }
|
|
|
$('#area').val(areaHtml);
|
|
|
}
|
|
|
if(buyerclass !== "" && buyerclass !== undefined){
|
|
@@ -782,6 +788,9 @@
|
|
|
buyerclassHtml = buyerclassArr.toString().replace(/,/g, " ");
|
|
|
}
|
|
|
// $(".item_industry .label_for").text(buyerclassHtml);
|
|
|
+ if(checkObj(buyerclass)){
|
|
|
+ buyerclassHtml = "全行业";
|
|
|
+ }
|
|
|
$('#buyerclass').val(buyerclassHtml);
|
|
|
}
|
|
|
//
|
|
@@ -952,6 +961,8 @@
|
|
|
oldMonthPrice = r.oldmonthprice;
|
|
|
}
|
|
|
},false);
|
|
|
+ console.log("oldYearPrice",oldYearPrice)
|
|
|
+ console.log("oldMonthPrice",oldMonthPrice)
|
|
|
if(nowUpgradeYear >= 1){
|
|
|
let yearprice = getsubVipOrderPrice(areasArr,industrysArr,[nowUpgradeYear,1]);
|
|
|
let monthprice = getsubVipOrderPrice(areasArr,industrysArr,[nowUpgrade,2]);
|
|
@@ -972,10 +983,18 @@
|
|
|
completeYear = ((price / nowUpgrade)*10-oldYearPrice).toFixed(1);
|
|
|
console.log("<1",price)
|
|
|
}
|
|
|
+
|
|
|
+ console.log("oldPrice", oldPrice);
|
|
|
+ if(sessionStorage.vipSubSelectArea===undefined&&sessionStorage.vipSubSelectIndustry===undefined){
|
|
|
+ completeMonth = oldMonthPrice
|
|
|
+ completeYear = oldYearPrice
|
|
|
+ }
|
|
|
console.log("completeMonth",completeMonth)
|
|
|
console.log("completeYear",completeYear)
|
|
|
- console.log("oldPrice", oldPrice);
|
|
|
- var cPrice = (price - oldPrice).toFixed(1);
|
|
|
+ var cPrice = 0;
|
|
|
+ if(price>0){
|
|
|
+ var cPrice = (price - oldPrice).toFixed(1);
|
|
|
+ }
|
|
|
console.log(cPrice);
|
|
|
if(sessionStorage.proPrice!==""&&sessionStorage.proPrice!==undefined){
|
|
|
let proPrice = sessionStorage.proPrice;
|
|
@@ -1040,11 +1059,29 @@
|
|
|
|
|
|
//
|
|
|
function clearSessionStorage(){
|
|
|
- sessionStorage.removeItem("renew_cyclecount");
|
|
|
- sessionStorage.removeItem("renew_cycleunit");
|
|
|
- sessionStorage.removeItem("renew_price");
|
|
|
- sessionStorage.removeItem("renew_finally_price");
|
|
|
+ sessionStorage.removeItem("upgrade_cyclecount");
|
|
|
+ sessionStorage.removeItem("upgrade_cycleunit");
|
|
|
+ sessionStorage.removeItem("upgrade_price");
|
|
|
+ sessionStorage.removeItem("proPrice");
|
|
|
+ sessionStorage.removeItem("vipSubSelectArea");
|
|
|
+ sessionStorage.removeItem("vipSubSelectIndustry");
|
|
|
+ sessionStorage.removeItem("effectiveDate");
|
|
|
}
|
|
|
+
|
|
|
+ //
|
|
|
+ //
|
|
|
+ function checkObj(obj) {
|
|
|
+ //检验数组
|
|
|
+ if (Array.prototype.isPrototypeOf(obj) && obj.length === 0) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ //检验对象
|
|
|
+ if (Object.prototype.isPrototypeOf(obj) && Object.keys(obj).length === 0) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
</script>
|
|
|
</body>
|
|
|
|