|
@@ -67,13 +67,13 @@
|
|
|
<i class="iconfont icon-arrow choose_time"></i>
|
|
|
</a>
|
|
|
</li> -->
|
|
|
- <li class="choose_item choose_effect_date">
|
|
|
+ <!--<li class="choose_item choose_effect_date">
|
|
|
<a href="javascript:;">
|
|
|
<span class="label">生效日期</span>
|
|
|
<span class="info" id="effect_date_name">立即生效,需支付当月费用差价</span>
|
|
|
<i class="iconfont icon-arrow choose_time"></i>
|
|
|
</a>
|
|
|
- </li>
|
|
|
+ </li>-->
|
|
|
</ul>
|
|
|
<ul class="chooseList">
|
|
|
<li class="choose_item lengthen">
|
|
@@ -131,8 +131,7 @@
|
|
|
</table>
|
|
|
<dl class="tips">
|
|
|
<dt>购买须知:</dt>
|
|
|
- <dd>套餐周期内,不支持套餐降级,续费可降级;</dd>
|
|
|
- <dd>用户最多购买/续费3年套餐;</dd>
|
|
|
+ <dd>套餐周期内,不支持套餐降级,即将到期时续费可降级;</dd>
|
|
|
<dd>支持套餐升级,补差价(按月进行补差价,不足一个月按一个月计算)。</dd>
|
|
|
</dl>
|
|
|
</div>
|
|
@@ -240,7 +239,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 选择生效日期 -->
|
|
|
- <div class="js_dialog effective_date" id="effective_date" style="display: none;">
|
|
|
+ <!--<div class="js_dialog effective_date" id="effective_date" style="display: none;">
|
|
|
<div class="weui-mask"></div>
|
|
|
<div class="box">
|
|
|
<div class="box_hd">
|
|
@@ -273,7 +272,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div>-->
|
|
|
<!-- 选择支付方式 -->
|
|
|
<div class="js_dialog pay_way" id="pay_way" style="display: none;">
|
|
|
<div class="weui-mask"></div>
|
|
@@ -443,62 +442,62 @@
|
|
|
// $('.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");
|
|
|
- }
|
|
|
- if(!isvalidOk){
|
|
|
- console.log(isvalidOk)
|
|
|
- $(".effect_one").hide();
|
|
|
- $(".effective_name").each(function(){
|
|
|
- if($(this).text() === effectiveNames){
|
|
|
- $(this).parent().next().find("input").prop("checked", true);
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
+// $('.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");
|
|
|
+// }
|
|
|
+// if(!isvalidOk){
|
|
|
+// console.log(isvalidOk)
|
|
|
+// $(".effect_one").hide();
|
|
|
+// $(".effective_name").each(function(){
|
|
|
+// if($(this).text() === effectiveNames){
|
|
|
+// $(this).parent().next().find("input").prop("checked", true);
|
|
|
+// }
|
|
|
+// })
|
|
|
+// }
|
|
|
+// })
|
|
|
//
|
|
|
- var effectiveName = new Date().getMonth()+2;
|
|
|
- if(effectiveName > 12){
|
|
|
- effectiveName = effectiveName - 12
|
|
|
- }
|
|
|
- var effectiveNames = effectiveName+"月1日生效"
|
|
|
- $(".effective_name.notnow").text(effectiveNames);
|
|
|
- $('#nextMonth').val(effectiveNames);
|
|
|
+// 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();
|
|
|
- });
|
|
|
+// $('#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();
|
|
|
+// });
|
|
|
|
|
|
|
|
|
// 选择周期
|
|
@@ -819,25 +818,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;
|
|
@@ -893,7 +892,7 @@
|
|
|
var starts = "";
|
|
|
var endTime = "";
|
|
|
var ends = "";
|
|
|
- var isvalidOk = "";
|
|
|
+// var isvalidOk = "";
|
|
|
$DoPost("/subscribepay/renewUpgrade/getBuyMsg", {}, function (data) {
|
|
|
if (data) {
|
|
|
area = data.area;
|
|
@@ -904,9 +903,10 @@
|
|
|
starts = data.starttime;
|
|
|
endTime = data.end;
|
|
|
ends = data.endtime;
|
|
|
- isvalidOk = data.isvalidOk;
|
|
|
+// isvalidOk = data.isvalidOk;
|
|
|
//
|
|
|
- var areaArr = [];
|
|
|
+ var provinceArr = [];
|
|
|
+ var cityArr = [];
|
|
|
var areaHtml = "";
|
|
|
var buyerclassArr = [];
|
|
|
var buyerclassHtml = "";
|
|
@@ -917,17 +917,19 @@
|
|
|
var citys = area[province]
|
|
|
// console.log(citys);
|
|
|
if(citys.length===0){
|
|
|
- areaArr.push(province);
|
|
|
+ provinceArr.push(province);
|
|
|
}else{
|
|
|
for(var i in citys){
|
|
|
- areaArr.push(citys[i]);
|
|
|
+ cityArr.push(citys[i]);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- areaHtml = areaArr.toString().replace(/,/g, " ");
|
|
|
+ var provinceLen = provinceArr.length;
|
|
|
+ var cityLen = cityArr.length;
|
|
|
+ areaHtml = "已购买"+provinceLen+"个省级区域/"+cityLen+"个市";
|
|
|
// $(".item_area .label_for").text(areaHtml);
|
|
|
if(checkObj(area)){
|
|
|
- areaHtml = "全国";
|
|
|
+ areaHtml = "已购买全国";
|
|
|
}
|
|
|
$('#area').attr("placeholder",areaHtml);
|
|
|
}
|
|
@@ -935,11 +937,11 @@
|
|
|
for(var i in buyerclass){
|
|
|
var industry = buyerclass[i];
|
|
|
buyerclassArr.push(industry);
|
|
|
- buyerclassHtml = buyerclassArr.toString().replace(/,/g, " ");
|
|
|
+ buyerclassHtml = "已购买"+buyerclassArr.length+"个行业";
|
|
|
}
|
|
|
// $(".item_industry .label_for").text(buyerclassHtml);
|
|
|
if(checkObj(buyerclass)){
|
|
|
- buyerclassHtml = "全行业";
|
|
|
+ buyerclassHtml = "已购买全行业";
|
|
|
}
|
|
|
$('#buyerclass').attr("placeholder",buyerclassHtml);
|
|
|
}
|
|
@@ -948,14 +950,14 @@
|
|
|
var a = nowDate+ " - " +endTime;
|
|
|
$(".nownow").text(nowDate+ " - " +endTime.replace(/-/g, "."))
|
|
|
//
|
|
|
- if(!isvalidOk){
|
|
|
- var effectiveName = new Date().getMonth()+2;
|
|
|
- if(effectiveName > 12){
|
|
|
- effectiveName = effectiveName - 12
|
|
|
- }
|
|
|
- effectiveHtml = effectiveName+"月1日生效";
|
|
|
- $("#effect_date_name").text(effectiveHtml);
|
|
|
- }
|
|
|
+// if(!isvalidOk){
|
|
|
+// var effectiveName = new Date().getMonth()+2;
|
|
|
+// if(effectiveName > 12){
|
|
|
+// effectiveName = effectiveName - 12
|
|
|
+// }
|
|
|
+// effectiveHtml = effectiveName+"月1日生效";
|
|
|
+// $("#effect_date_name").text(effectiveHtml);
|
|
|
+// }
|
|
|
}
|
|
|
},false);
|
|
|
//
|
|
@@ -979,7 +981,7 @@
|
|
|
var endDay = new Date(endTime).getDate();
|
|
|
var oldPrice = "";
|
|
|
var price = "";
|
|
|
- var effect = "";
|
|
|
+// var effect = "";
|
|
|
var buyCheck = true;
|
|
|
if(sessionStorage.buyCheck!==undefined&&sessionStorage.buyCheck!==""){
|
|
|
let bcheck = sessionStorage.buyCheck;
|
|
@@ -1083,16 +1085,16 @@
|
|
|
}
|
|
|
|
|
|
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){
|
|
@@ -1246,19 +1248,19 @@
|
|
|
//
|
|
|
$(".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;
|
|
@@ -1285,11 +1287,11 @@
|
|
|
"areas": JSON.stringify(areaarr),
|
|
|
"industryarr": industryarr.join(","),
|
|
|
"payWay": "wx_js",
|
|
|
- "effect": effect,
|
|
|
+// "effect": effect,
|
|
|
"pay_source" : "Upgrade",
|
|
|
"time": times,
|
|
|
"nowUp": Number(nowRenew),
|
|
|
- "isvalidOk" : isvalidOk,
|
|
|
+// "isvalidOk" : isvalidOk,
|
|
|
}
|
|
|
console.log(param)
|
|
|
$DoPost("/subscribepay/renewUpgrade/renewUpgradeCreateOrder",param,function(r){
|
|
@@ -1308,7 +1310,7 @@
|
|
|
sessionStorage.removeItem("proPrice");
|
|
|
sessionStorage.removeItem("vipSubSelectAreaUpgrade");
|
|
|
sessionStorage.removeItem("vipSubSelectIndustryUpgrade");
|
|
|
- sessionStorage.removeItem("effectiveDate");
|
|
|
+// sessionStorage.removeItem("effectiveDate");
|
|
|
sessionStorage.removeItem("buyCheck");
|
|
|
}
|
|
|
|