|
@@ -21,6 +21,14 @@
|
|
|
font-size: .26rem;
|
|
|
color: #FE737A;
|
|
|
}
|
|
|
+
|
|
|
+ .weui-toast {
|
|
|
+ z-index: 999999;
|
|
|
+ }
|
|
|
+
|
|
|
+ button[disabled] {
|
|
|
+ opacity: .5;
|
|
|
+ }
|
|
|
</style>
|
|
|
</head>
|
|
|
|
|
@@ -475,7 +483,6 @@
|
|
|
}
|
|
|
}
|
|
|
this.timeValue = tmp;
|
|
|
- this.flushSelectTime();
|
|
|
},
|
|
|
flushPrice: function (time, flag) {
|
|
|
//var price = getsubVipOrderPrice(this.areaSelect, this.industrySelect, time, this.price);
|
|
@@ -489,15 +496,20 @@
|
|
|
$('.billing-price').text('¥' + showPrice);
|
|
|
$('.computed_price').html('¥' + showPrice);
|
|
|
}
|
|
|
+ this.flushSelectTime(time, flag === undefined ? 1 : flag);
|
|
|
},
|
|
|
- flushSelectTime() {
|
|
|
- $(".select_cycle .month").text(this.timeValue);
|
|
|
+ flushSelectTime(thisValue, flag) {
|
|
|
if (this.endTime) {
|
|
|
var time1 = new Date(this.endTime * 1000).pattern('yyyy年MM月dd日');
|
|
|
- var end = getVipEndDate(this.timeSelect[1], this.timeSelect[0], this.endTime);
|
|
|
+ var end = getVipEndDate(thisValue[1], thisValue[0], this.endTime);
|
|
|
var time2 = new Date(end * 1000).pattern('yyyy年MM月dd日');
|
|
|
- $(".select_cycle .duration").text(time1 + "-" + time2);
|
|
|
- $(".select_cycle .duration").show();
|
|
|
+
|
|
|
+ if (flag === 1) {
|
|
|
+ $(".select_cycle .month").text(this.timeValue);
|
|
|
+ $(".select_cycle .duration").text(time1 + "-" + time2);
|
|
|
+ $(".select_cycle .duration").show();
|
|
|
+ }
|
|
|
+
|
|
|
//是否超过三年
|
|
|
var now = Math.floor(new Date().getTime() / 1000);
|
|
|
var MaxEnd = getVipEndDate(1, 3, now);
|
|
@@ -514,16 +526,16 @@
|
|
|
duration: 3000,
|
|
|
className: 'jy-toast',
|
|
|
});
|
|
|
- this.timeCheckOk = false;
|
|
|
+ if (flag === 1) this.timeCheckOk = false;
|
|
|
+ if (flag === 2) $("#enter_period").prop("disabled", true);
|
|
|
} else {
|
|
|
- this.timeCheckOk = true;
|
|
|
+ if (flag === 1) this.timeCheckOk = true;
|
|
|
+ if (flag === 2) $("#enter_period").prop("disabled", false);
|
|
|
}
|
|
|
this.flushSubmit();
|
|
|
-
|
|
|
} else {
|
|
|
$(".select_cycle .duration").hide();
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
showTip() {//是否展示即将到期
|
|
|
var timeSub = this.endTime * 1000 - new Date().getTime();
|
|
@@ -669,7 +681,6 @@
|
|
|
// 渲染结果 保留一位小数
|
|
|
//var result = (Number(id) * 58).toFixed(1);
|
|
|
//$('.computed_price').html('¥' + result)
|
|
|
- console.log("xxxxxxxxx", Number(id));
|
|
|
purchase.timeSelect_tmp = [Number(id), 1];
|
|
|
purchase.flushPrice(purchase.timeSelect_tmp, 2);
|
|
|
});
|
|
@@ -688,7 +699,6 @@
|
|
|
//$('.computed_price').html('¥' + result);
|
|
|
purchase.timeSelect_tmp = [Number(val), 2];
|
|
|
purchase.flushPrice(purchase.timeSelect_tmp, 2);
|
|
|
-
|
|
|
});
|
|
|
//计价清单
|
|
|
$('.billing-list-btn').on('click', function () {
|
|
@@ -735,18 +745,17 @@
|
|
|
purchase.timeSelect_tmp = [parseInt(val), 1];
|
|
|
$('#time_cycle').hide(function () {
|
|
|
purchase.timeValue = val + "年";
|
|
|
- purchase.flushSelectTime()
|
|
|
});
|
|
|
} else if (selectedDOM.val() === 'month') {
|
|
|
val = $('#number_box_month .month_number').text();
|
|
|
purchase.timeSelect_tmp = [parseInt(val), 2];
|
|
|
$('#time_cycle').hide(function () {
|
|
|
purchase.timeValue = val + "个月";
|
|
|
- purchase.flushSelectTime()
|
|
|
});
|
|
|
}
|
|
|
|
|
|
purchase.timeSelect = purchase.timeSelect_tmp;
|
|
|
+ purchase.showTime();
|
|
|
purchase.flushPrice(purchase.timeSelect, 1);
|
|
|
sessionStorage.setItem("vipSubSelectTime", JSON.stringify(purchase.timeSelect));
|
|
|
});
|