|
@@ -237,6 +237,16 @@
|
|
|
|
|
|
// 选择订阅周期
|
|
|
$('.select_cycle > a').click(function () {
|
|
|
+ if((nowUpgrade)>=36){
|
|
|
+ var overtimeWarning = `最长订阅周期不可超过3年<br />当前订阅周期:${nowUpgrade}个月`
|
|
|
+ weui.toast(overtimeWarning, {
|
|
|
+ duration: 3000,
|
|
|
+ className: 'custom-toast',
|
|
|
+ callback: function() {
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
$('#time_cycle').show(200);
|
|
|
})
|
|
|
// 选择支付方式
|
|
@@ -311,6 +321,16 @@
|
|
|
currentNum = currentNum <= data.numboxMin ? data.numboxMin : currentNum - data
|
|
|
.numboxStep;
|
|
|
}
|
|
|
+ if((currentNum+nowUpgrade)>36){
|
|
|
+ var overtimeWarning = `最长订阅周期不可超过3年<br />当前订阅周期:${nowUpgrade}个月`
|
|
|
+ weui.toast(overtimeWarning, {
|
|
|
+ duration: 3000,
|
|
|
+ className: 'custom-toast',
|
|
|
+ callback: function() {
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
if (currentNum >= 10) {
|
|
|
$('.profit_tips').text("已选择"+currentNum+"个月,建议“按年订阅”更划算哦~");
|
|
|
$('.profit_tips').show();
|
|
@@ -351,8 +371,17 @@
|
|
|
|
|
|
/* -------- 控制年份number_box的事件 点击1年 2年 3年触发的事件------- */
|
|
|
$('#number_box_year').on('click', 'span', function (e) {
|
|
|
- console.log(e.target.dataset.id)
|
|
|
let id = e.target.dataset.id;
|
|
|
+ if((id*12+nowUpgrade)>36){
|
|
|
+ var overtimeWarning = `最长订阅周期不可超过3年<br />当前订阅周期:${nowUpgrade}个月`
|
|
|
+ weui.toast(overtimeWarning, {
|
|
|
+ duration: 3000,
|
|
|
+ className: 'custom-toast',
|
|
|
+ callback: function() {
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
$('.profit_tips').hide()
|
|
|
$('#number_box_month').removeClass('active');
|
|
|
$(this).addClass('active').siblings().removeClass('active')
|
|
@@ -713,7 +742,6 @@
|
|
|
}
|
|
|
//
|
|
|
$(".save_renew").on("click", function(){
|
|
|
- console.log(nowUpgrade)
|
|
|
// let times = $('.choose_item.select_cycle .info').attr('placeholder');
|
|
|
let times = $('.choose_item.select_cycle .info').val();
|
|
|
if (times.match("月") !== null){
|
|
@@ -721,18 +749,6 @@
|
|
|
}else if (times.match("年") !== null){
|
|
|
times = 12 * Number(times.replace("年",""));
|
|
|
}
|
|
|
- // 当续费时间 + 当前已经买的时间超过36个月,给出提醒
|
|
|
- if(times > 36-nowUpgrade){
|
|
|
- var overtimeWarning = `最长订阅周期不可超过3年<br />当前订阅周期:${nowUpgrade}个月`
|
|
|
- weui.toast(overtimeWarning, {
|
|
|
- duration: 3000,
|
|
|
- className: 'custom-toast',
|
|
|
- callback: function() {
|
|
|
-
|
|
|
- }
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
//
|
|
|
let payTypes = sessionStorage.payTypes;
|
|
|
let payType = "";
|