|
@@ -474,7 +474,7 @@
|
|
{{if eq .T.orderType 5 }}
|
|
{{if eq .T.orderType 5 }}
|
|
tipTxt = "已购买 ";
|
|
tipTxt = "已购买 ";
|
|
{{end}}
|
|
{{end}}
|
|
- $(".choose_industry").val(tipTxt+ this.industrySelect.length + " 个行业");
|
|
|
|
|
|
+ $(".choose_industry").val(tipTxt + this.industrySelect.length + " 个行业");
|
|
} else if (this.industrySelect.length > 0 && this.industrySelect[0] == "全部行业") {
|
|
} else if (this.industrySelect.length > 0 && this.industrySelect[0] == "全部行业") {
|
|
$(".choose_industry").val("全部行业");
|
|
$(".choose_industry").val("全部行业");
|
|
} else {
|
|
} else {
|
|
@@ -496,16 +496,28 @@
|
|
if (this.timeSelect[0] >= 10) {
|
|
if (this.timeSelect[0] >= 10) {
|
|
$('.profit_tips').text("已选择" + this.timeSelect[0] + "个月,建议“按年订阅”").show();
|
|
$('.profit_tips').text("已选择" + this.timeSelect[0] + "个月,建议“按年订阅”").show();
|
|
}
|
|
}
|
|
|
|
+ if (this.timeSelect[0] == 1) {
|
|
|
|
+ $('#number_box_month button:eq(0)').attr("disabled", "disabled");
|
|
|
|
+ } else {
|
|
|
|
+ $('#number_box_month button:eq(0)').removeAttr("disabled");
|
|
|
|
+ }
|
|
}
|
|
}
|
|
$(".info.choose_time").val(tmp);
|
|
$(".info.choose_time").val(tmp);
|
|
},
|
|
},
|
|
- flushPrice: function () {
|
|
|
|
|
|
+ flushPrice: function (time, flag) {
|
|
if (this.vipSubisTrial) {
|
|
if (this.vipSubisTrial) {
|
|
$('.price strong').text('¥0.00');
|
|
$('.price strong').text('¥0.00');
|
|
} else {
|
|
} else {
|
|
- var price = getsubVipOrderPrice(this.areaSelect, this.industrySelect, this.timeSelect, this.price);
|
|
|
|
- $('.price strong').text('¥' + price);
|
|
|
|
- $('.computed_price').html('¥' + price);
|
|
|
|
|
|
+ var price = getsubVipOrderPrice(this.areaSelect, this.industrySelect, time, this.price);
|
|
|
|
+ if (flag === 1) {
|
|
|
|
+ $('.price strong').text('¥' + price);
|
|
|
|
+ } else if (flag === 2) {
|
|
|
|
+ $('.computed_price').html('¥' + price);
|
|
|
|
+ } else {
|
|
|
|
+ $('.price strong').text('¥' + price);
|
|
|
|
+ $('.computed_price').html('¥' + price);
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|
|
@@ -517,7 +529,7 @@
|
|
purchase.showIndustry();
|
|
purchase.showIndustry();
|
|
purchase.showPrice();
|
|
purchase.showPrice();
|
|
purchase.showTime();
|
|
purchase.showTime();
|
|
- purchase.flushPrice();
|
|
|
|
|
|
+ purchase.flushPrice(purchase.timeSelect);
|
|
checkOk();
|
|
checkOk();
|
|
var time_limit;//定义一个周期变量
|
|
var time_limit;//定义一个周期变量
|
|
/*------ 关闭弹窗事件 点击取消或遮罩层 -----*/
|
|
/*------ 关闭弹窗事件 点击取消或遮罩层 -----*/
|
|
@@ -592,8 +604,8 @@
|
|
.numboxStep;
|
|
.numboxStep;
|
|
}
|
|
}
|
|
$number.text(currentNum);
|
|
$number.text(currentNum);
|
|
- purchase.timeSelect = [Number(currentNum), 2];
|
|
|
|
- purchase.flushPrice();
|
|
|
|
|
|
+ purchase.timeSelect_tmp = [Number(currentNum), 2];
|
|
|
|
+ purchase.flushPrice(purchase.timeSelect_tmp, 2);
|
|
//var price = (5.8 * currentNum).toFixed(1);
|
|
//var price = (5.8 * currentNum).toFixed(1);
|
|
//$('.computed_price').html('¥' + price)
|
|
//$('.computed_price').html('¥' + price)
|
|
var firstButton = $('#number_box_month button:first');
|
|
var firstButton = $('#number_box_month button:first');
|
|
@@ -630,8 +642,8 @@
|
|
// 渲染结果 保留一位小数
|
|
// 渲染结果 保留一位小数
|
|
//let result = (Number(id) * 58).toFixed(1);
|
|
//let result = (Number(id) * 58).toFixed(1);
|
|
//$('.computed_price').html('¥' + result)
|
|
//$('.computed_price').html('¥' + result)
|
|
- purchase.timeSelect = [Number(id), 1];
|
|
|
|
- purchase.flushPrice();
|
|
|
|
|
|
+ purchase.timeSelect_tmp = [Number(id), 1]
|
|
|
|
+ purchase.flushPrice(purchase.timeSelect_tmp, 2);
|
|
});
|
|
});
|
|
|
|
|
|
/* -------- 选择按月订阅 radio触发的事件------- */
|
|
/* -------- 选择按月订阅 radio触发的事件------- */
|
|
@@ -648,8 +660,8 @@
|
|
}
|
|
}
|
|
//let result = (Number(val) * 5.8).toFixed(1);
|
|
//let result = (Number(val) * 5.8).toFixed(1);
|
|
//$('.computed_price').html('¥' + result);
|
|
//$('.computed_price').html('¥' + result);
|
|
- purchase.timeSelect = [Number(val), 2];
|
|
|
|
- purchase.flushPrice();
|
|
|
|
|
|
+ purchase.timeSelect_tmp = [Number(val), 2];
|
|
|
|
+ purchase.flushPrice(purchase.timeSelect_tmp, 2);
|
|
|
|
|
|
});
|
|
});
|
|
/* -------- 选择按年订阅 radio触发的事件------- */
|
|
/* -------- 选择按年订阅 radio触发的事件------- */
|
|
@@ -663,8 +675,8 @@
|
|
if (isChecked) {
|
|
if (isChecked) {
|
|
$('#number_box_year span:eq(0)').addClass('active').siblings().removeClass('active')
|
|
$('#number_box_year span:eq(0)').addClass('active').siblings().removeClass('active')
|
|
}
|
|
}
|
|
- purchase.timeSelect = [Number(val), 1];
|
|
|
|
- purchase.flushPrice();
|
|
|
|
|
|
+ purchase.timeSelect_tmp = [Number(val), 1];
|
|
|
|
+ purchase.flushPrice(purchase.timeSelect_tmp, 2);
|
|
});
|
|
});
|
|
|
|
|
|
// 确认订阅周期
|
|
// 确认订阅周期
|
|
@@ -677,16 +689,17 @@
|
|
$('#time_cycle').hide(function () {
|
|
$('#time_cycle').hide(function () {
|
|
$('.choose_time').val(val)
|
|
$('.choose_time').val(val)
|
|
});
|
|
});
|
|
- purchase.timeSelect = [parseInt(val[0]), 1]
|
|
|
|
|
|
+ purchase.timeSelect_tmp = [parseInt(val[0]), 1]
|
|
} else if ($(v).is(':checked') === true) {
|
|
} else if ($(v).is(':checked') === true) {
|
|
val = $('.month_number').html();
|
|
val = $('.month_number').html();
|
|
$('#time_cycle').hide(function () {
|
|
$('#time_cycle').hide(function () {
|
|
$('.choose_time').val(val + '个月')
|
|
$('.choose_time').val(val + '个月')
|
|
});
|
|
});
|
|
- purchase.timeSelect = [parseInt(val), 2]
|
|
|
|
|
|
+ purchase.timeSelect_tmp = [parseInt(val), 2]
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- purchase.flushPrice();
|
|
|
|
|
|
+ purchase.timeSelect = purchase.timeSelect_tmp;
|
|
|
|
+ purchase.flushPrice(purchase.timeSelect, 1);
|
|
sessionStorage.setItem("vipSubSelectTime", JSON.stringify(purchase.timeSelect));
|
|
sessionStorage.setItem("vipSubSelectTime", JSON.stringify(purchase.timeSelect));
|
|
});
|
|
});
|
|
$("input").bind("input propertychange change", function (event) {
|
|
$("input").bind("input propertychange change", function (event) {
|
|
@@ -763,7 +776,7 @@
|
|
sessionStorage.removeItem("vipSubSelectTime");
|
|
sessionStorage.removeItem("vipSubSelectTime");
|
|
sessionStorage.removeItem("vipSub_read");
|
|
sessionStorage.removeItem("vipSub_read");
|
|
sessionStorage.removeItem("historypushDataCache");
|
|
sessionStorage.removeItem("historypushDataCache");
|
|
- sessionStorage.To_introducePage=2;
|
|
|
|
|
|
+ sessionStorage.To_introducePage = 2;
|
|
}
|
|
}
|
|
|
|
|
|
/******* 获取url参数(正则)********/
|
|
/******* 获取url参数(正则)********/
|