|
@@ -14,7 +14,7 @@
|
|
|
<link rel="stylesheet" type="text/css" href="/vipsubscribe/css/base.css?v={{Msg "seo" "version"}}" />
|
|
|
<link rel="stylesheet" type="text/css" href="/vipsubscribe/iconfont/iconfont.css?v={{Msg "seo" "version"}}" />
|
|
|
<link rel="stylesheet" href="/vipsubscribe/css/public.css?v={{Msg "seo" "version"}}">
|
|
|
- <link rel="stylesheet" href="/vipsubscribe/css/vip_update.css?v={{Msg "seo" "version"}}">
|
|
|
+ <link rel="stylesheet" href="/vipsubscribe/css/vip_update.css?v={{Msg "seo" "version"}}3">
|
|
|
</head>
|
|
|
|
|
|
<body class="no-touch">
|
|
@@ -23,20 +23,20 @@
|
|
|
<p class="update_tip">提示:订阅升级可在已购买的服务基础上,增加区域、行业、以及延长订阅周期!</p>
|
|
|
<ul class="chooseList">
|
|
|
<li class="choose_item">
|
|
|
- <a href="/front/vipsubscribe/toChooseArea">
|
|
|
+ <a href="/front/vipsubscribe/toChooseAreaUpgrade">
|
|
|
<span class="label">区域</span>
|
|
|
- <input type="text" disabled value="" placeholder="选择全国、省份、地市" class="info">
|
|
|
+ <input type="text" id="area" value="" placeholder="选择全国、省份、地市" class="info">
|
|
|
<i class="iconfont icon-arrow"></i>
|
|
|
</a>
|
|
|
- <p class="add_tips area-list">已新增 1 个省级区域、4 个地市</p>
|
|
|
+ <p class="add_tips area-list" style="display: none;">已新增 1 个省级区域、4 个地市</p>
|
|
|
</li>
|
|
|
<li class="choose_item">
|
|
|
- <a href="/front/vipsubscribe/toChooseIndustry">
|
|
|
+ <a href="/front/vipsubscribe/toChooseIndustryUpgrade">
|
|
|
<span class="label">行业</span>
|
|
|
- <input type="text" disabled value="" placeholder="选择采购单位行业" class="info">
|
|
|
+ <input type="text" id="buyerclass" disabled value="" placeholder="选择采购单位行业" class="info">
|
|
|
<i class="iconfont icon-arrow"></i>
|
|
|
</a>
|
|
|
- <p class="add_tips industry-list">已新增 2 个行业</p>
|
|
|
+ <p class="add_tips industry-list" style="display: none;">已新增 2 个行业</p>
|
|
|
</li>
|
|
|
<!-- <li class="choose_item select_cycle">
|
|
|
<a href="javascript:;">
|
|
@@ -48,7 +48,16 @@
|
|
|
<li class="choose_item choose_effect_date">
|
|
|
<a href="javascript:;">
|
|
|
<span class="label">生效日期</span>
|
|
|
- <span class="info" id="effect_date_name">立即生效,需支付本月费用</span>
|
|
|
+ <span class="info" id="effect_date_name">立即生效,需支付当月费用差价</span>
|
|
|
+ <i class="iconfont icon-arrow choose_time"></i>
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ <ul class="chooseList">
|
|
|
+ <li class="choose_item lengthen">
|
|
|
+ <a href="javascript:;">
|
|
|
+ <span class="label">延长订阅周期</span>
|
|
|
+ <span class="info">不延长</span>
|
|
|
<i class="iconfont icon-arrow choose_time"></i>
|
|
|
</a>
|
|
|
</li>
|
|
@@ -57,7 +66,7 @@
|
|
|
<div class="select_payment choose_item">
|
|
|
<a href="javascript:;">
|
|
|
<span class="label">支付方式</span>
|
|
|
- <span class="info choose_way" id="payType">微信支付</span>
|
|
|
+ <span class="info choose_way">微信支付</span>
|
|
|
<i class="iconfont icon-arrow choose_way"></i>
|
|
|
</a>
|
|
|
</div>
|
|
@@ -128,8 +137,8 @@
|
|
|
<div class="price">
|
|
|
<label>需补差价:</label>
|
|
|
<p>
|
|
|
- <span id="oldPrice">¥610.80</span>
|
|
|
- <strong id="newPrice">¥0.00</strong>
|
|
|
+ <span>¥610.80</span>
|
|
|
+ <strong>¥0.00</strong>
|
|
|
</p>
|
|
|
</div>
|
|
|
<div class="form-btn">
|
|
@@ -137,22 +146,30 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <!-- 选择周期 暂时不加 -->
|
|
|
+ <!-- 选择周期 -->
|
|
|
<div class="js_dialog time_cycle" id="time_cycle" style="display: none;">
|
|
|
<div class="weui-mask"></div>
|
|
|
<div class="box">
|
|
|
<div class="box_hd">
|
|
|
- <h3>订阅周期</h3>
|
|
|
+ <h3>延长订阅周期</h3>
|
|
|
<span class="cancel">取消</span>
|
|
|
</div>
|
|
|
<div class="box_bd">
|
|
|
- <div class="tips monthly_tips" style="display: none">
|
|
|
- 3-6个月6折,大于6个月5折
|
|
|
- </div>
|
|
|
- <div class="tips yearly_tips" style="display: none">
|
|
|
- 1-2年5折,3年4折
|
|
|
- </div>
|
|
|
+ <div class="tips profit_tips" style="display: none">已选择10个月,建议“按年订阅”更换算哦~</div>
|
|
|
+ <div class="computed_price" style="display: none;">¥58.0</div>
|
|
|
<div class="bd_select">
|
|
|
+ <div class="weui-cells weui-cells_checkbox">
|
|
|
+ <label class="weui-cell weui-check__label prolong_label" style="padding-left: 0.26rem" for="prolong">
|
|
|
+ <div class="weui-cell__hd">
|
|
|
+ <input type="radio" class="weui-check prolong" name="time" value="prolong"
|
|
|
+ id="prolong" checked />
|
|
|
+ <i class="weui-icon-checked"></i>
|
|
|
+ </div>
|
|
|
+ <div class="weui-cell__bd">
|
|
|
+ <p>不延长</p>
|
|
|
+ </div>
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
<div class="weui-cells weui-cells_checkbox choose-form">
|
|
|
<label class="weui-cell weui-check__label monthly_label" for="monthly">
|
|
|
<div class="weui-cell__hd">
|
|
@@ -187,15 +204,16 @@
|
|
|
</div>
|
|
|
</label>
|
|
|
<div class="number_box" id="number_box_year">
|
|
|
- <span class="year_number">1年</span>
|
|
|
- <span class="year_number">2年</span>
|
|
|
- <span class="year_number">3年</span>
|
|
|
+ <span class="year_number" data-id="1">1年</span>
|
|
|
+ <span class="year_number" data-id="2">2年</span>
|
|
|
+ <span class="year_number" data-id="3">3年</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-btn">
|
|
|
- <button class="btn enter" disabled id="enter_period">确认</button>
|
|
|
+ <!-- <button class="btn enter" disabled id="enter_period">确认</button> -->
|
|
|
+ <button class="btn enter" id="enter_period">确认</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -212,21 +230,21 @@
|
|
|
<div class="weui-cells weui-cells_checkbox choose-form">
|
|
|
<label class="weui-cell weui-check__label now_label" for="nowTime">
|
|
|
<div class="weui-cell__bd read">
|
|
|
- <p class="effective_name">立即生效,需支付本月费用</p>
|
|
|
+ <p class="effective_name now">立即生效,需支付当月费用差价</p>
|
|
|
<p class="effective_time">2019.08.23 - 2020.06.06</p>
|
|
|
</div>
|
|
|
<div class="weui-cell__hd">
|
|
|
- <input type="radio" class="weui-check" name="date" value="立即生效,需支付本月费用" id="nowTime" checked />
|
|
|
+ <input type="radio" class="weui-check" name="date" value="立即生效,需支付当月费用差价" id="nowTime" checked />
|
|
|
<i class="weui-icon-checked"></i>
|
|
|
</div>
|
|
|
</label>
|
|
|
<label class="weui-cell weui-check__label next_label" for="nextMonth">
|
|
|
<div class="weui-cell__bd read">
|
|
|
- <p class="effective_name">9月1日生效</p>
|
|
|
+ <p class="effective_name notnow"></p>
|
|
|
<p class="effective_time">2019.09.01 - 2020.06.06</p>
|
|
|
</div>
|
|
|
<div class="weui-cell__hd">
|
|
|
- <input type="radio" class="weui-check" name="date" value="9月1日生效" id="nextMonth" />
|
|
|
+ <input type="radio" class="weui-check" name="date" value="" id="nextMonth" />
|
|
|
<i class="weui-icon-checked"></i>
|
|
|
</div>
|
|
|
</label>
|
|
@@ -247,32 +265,42 @@
|
|
|
<div class="weui-cells weui-cells_checkbox choose-form">
|
|
|
<label class="weui-cell weui-check__label wx_label" for="wx">
|
|
|
<div class="weui-cell__bd read">
|
|
|
- <p><img src="/vipsubscribe/image/weixin.png?v={{Msg "seo" "version"}}">微信支付</p>
|
|
|
+ <p><img src="/vipsubscribe/image/weixin.png">微信支付</p>
|
|
|
</div>
|
|
|
<div class="weui-cell__hd">
|
|
|
<input type="radio" class="weui-check" name="way" value="微信支付" id="wx" checked />
|
|
|
<i class="weui-icon-checked"></i>
|
|
|
</div>
|
|
|
</label>
|
|
|
- <label class="weui-cell weui-check__label zfb_label" for="zfb">
|
|
|
+ <!--<label class="weui-cell weui-check__label zfb_label" for="zfb">
|
|
|
<div class="weui-cell__bd read">
|
|
|
- <p><img src="/vipsubscribe/image/zhifubao.png?v={{Msg "seo" "version"}}">支付宝支付</p>
|
|
|
+ <p><img src="/vipsubscribe/image/zhifubao.png">支付宝支付</p>
|
|
|
</div>
|
|
|
<div class="weui-cell__hd">
|
|
|
<input type="radio" class="weui-check" name="way" value="支付宝支付" id="zfb" />
|
|
|
<i class="weui-icon-checked"></i>
|
|
|
</div>
|
|
|
- </label>
|
|
|
+ </label>-->
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <script src="/vipsubscribe/js/jquery-2.1.4.js?v={{Msg "seo" "version"}}"></script>
|
|
|
+ <script src="/vipsubscribe/js/jquery-2.1.4.js"></script>
|
|
|
<script src="/vipsubscribe/js/fastclick.js?v={{Msg "seo" "version"}}"></script>
|
|
|
- <script src="https://res.wx.qq.com/open/libs/weuijs/1.1.4/weui.min.js"></script>
|
|
|
+ <script src="/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
|
|
|
<script>
|
|
|
- // 隐藏dialog选择框
|
|
|
+ // 当续费时间 + 当前已经买的时间超过36个月,给出提醒
|
|
|
+// var overtimeWarning = `最长订阅周期不可超过3年<br />当前订阅周期:16个月`
|
|
|
+// weui.toast(overtimeWarning, {
|
|
|
+// duration: 3000,
|
|
|
+// className: 'custom-toast',
|
|
|
+// callback: function() {
|
|
|
+// console.log('close')
|
|
|
+// }
|
|
|
+// })
|
|
|
+
|
|
|
+ // 隐藏dialog选择框事件
|
|
|
function hideDialog() {
|
|
|
$('#pay_way').hide(200);
|
|
|
$('#time_cycle').hide(200);
|
|
@@ -280,25 +308,18 @@
|
|
|
}
|
|
|
$('.weui-mask').click(hideDialog);
|
|
|
$('.cancel').click(hideDialog);
|
|
|
-
|
|
|
|
|
|
// 选择支付方式
|
|
|
- $('.select_payment .choose_way').click(function () {
|
|
|
- $('#pay_way').show(200);
|
|
|
- })
|
|
|
- // 对支付方式选择的input绑定点击事件
|
|
|
- $('#pay_way input:radio[name="way"]').click(function () {
|
|
|
- var checkValue = $('input:radio[name="way"]:checked').val();
|
|
|
- $('.pay_way').hide(200);
|
|
|
- $('.pay_mode .select_payment .choose_way.info').html(checkValue);
|
|
|
- var payType = "";
|
|
|
- if(checkValue === "微信支付"){
|
|
|
- payType = "wx";
|
|
|
- }else if(checkValue === "支付宝支付"){
|
|
|
- payType = "alipy";
|
|
|
- }
|
|
|
- sessionStorage.payType = payType
|
|
|
- });
|
|
|
+// $('.select_payment .choose_way').click(function () {
|
|
|
+// $('#pay_way').show(200);
|
|
|
+// })
|
|
|
+// // 对支付方式选择的input绑定点击事件
|
|
|
+// $('#pay_way input:radio[name="way"]').click(function () {
|
|
|
+// var checkValue = $('input:radio[name="way"]:checked').val();
|
|
|
+// console.log(checkValue);
|
|
|
+// $('.pay_way').hide(200);
|
|
|
+// $('.pay_mode .select_payment .choose_way.info').html(checkValue);
|
|
|
+// });
|
|
|
// 选择生效日期
|
|
|
$('.choose_effect_date > a').click(function () {
|
|
|
$('#effective_date').show(200);
|
|
@@ -306,51 +327,67 @@
|
|
|
// 对生效日期方式选择的input绑定点击事件
|
|
|
$('#effective_date input:radio[name="date"]').click(function () {
|
|
|
var checkValue = $('input:radio[name="date"]:checked').val();
|
|
|
+// console.log(checkValue);
|
|
|
$('#effective_date').hide(200);
|
|
|
- $('#effect_date_name').html(checkValue);
|
|
|
var effective = "";
|
|
|
- if(checkValue === "立即生效,需支付本月费用"){
|
|
|
+ var effectiveName = new Date().getMonth()+1;
|
|
|
+ var effectiveNames = effectiveName+"月1日生效"
|
|
|
+ if(checkValue === "立即生效,需支付当月费用差价"){
|
|
|
effective = "now";
|
|
|
- }else if(checkValue === "9月1日生效"){
|
|
|
+ }else if(checkValue === effectiveNames){
|
|
|
effective = "notnow";
|
|
|
}
|
|
|
sessionStorage.effectiveDate = effective;
|
|
|
+ $('#effect_date_name').html(checkValue);
|
|
|
});
|
|
|
+ //
|
|
|
+ var effectiveName = new Date().getMonth()+1;
|
|
|
+ var effectiveNames = effectiveName+"月1日生效"
|
|
|
+ $(".effective_name.notnow").text(effectiveNames);
|
|
|
+ $('#nextMonth').val(effectiveNames);
|
|
|
|
|
|
-
|
|
|
- /*
|
|
|
- // 选择周期
|
|
|
- $('.select_cycle > a').click(function () {
|
|
|
+ // 选择周期
|
|
|
+ $('.lengthen > a').click(function () {
|
|
|
$('#time_cycle').show(200);
|
|
|
})
|
|
|
- // 对订阅时间选择的input绑定点击事件
|
|
|
+ // 对订阅时间选择的 input绑定点击事件
|
|
|
$('#time_cycle input:radio[name="time"]').on('click', function (e) {
|
|
|
// 解除确认按钮的锁定
|
|
|
$('#time_cycle .form-btn button').removeAttr('disabled')
|
|
|
|
|
|
if ($(e.target).hasClass('monthly')) {
|
|
|
// 按月订阅
|
|
|
+ $('.computed_price').show()
|
|
|
// 显示隐藏tips提示
|
|
|
- $('#time_cycle .tips.monthly_tips').show();
|
|
|
- $('#time_cycle .tips.yearly_tips').hide();
|
|
|
+ // $('#time_cycle .tips.monthly_tips').show();
|
|
|
+ // $('#time_cycle .tips.yearly_tips').hide();
|
|
|
|
|
|
$('#number_box_month').addClass('active');
|
|
|
$('#number_box_year span').removeClass('active');
|
|
|
- } else {
|
|
|
+ } else if($(e.target).hasClass('yearly')){
|
|
|
+ $('.computed_price').show()
|
|
|
// 按年订阅
|
|
|
- $('#time_cycle .tips.yearly_tips').show();
|
|
|
- $('#time_cycle .tips.monthly_tips').hide();
|
|
|
+ // $('#time_cycle .tips.yearly_tips').show();
|
|
|
+ // $('#time_cycle .tips.monthly_tips').hide();
|
|
|
|
|
|
$('#number_box_month').removeClass('active');
|
|
|
$('#number_box_year span:eq(0)').addClass('active');
|
|
|
+ }else{
|
|
|
+ $('.computed_price').hide()
|
|
|
+ $('#number_box_month').removeClass('active');
|
|
|
+ $('#number_box_year span').removeClass('active');
|
|
|
}
|
|
|
})
|
|
|
// 控制月份number_box的事件
|
|
|
+ /* --------控制月份number_box的事件 点击加减号触发的事件------- */
|
|
|
$('#number_box_month').on('click', 'button', function (e) {
|
|
|
+ // 点击加减号让input radio选中
|
|
|
+ $("#monthly").prop('checked', true);
|
|
|
+ $('#number_box_month').addClass('active')
|
|
|
+ $('.number_box span').removeClass('active')
|
|
|
+
|
|
|
var $number = $('#number_box_month span.month_number');
|
|
|
- // var $input = $('#time_cycle input:radio[name="time"]');
|
|
|
var $monthlyInput = $('#monthly');
|
|
|
-
|
|
|
// 未整理的data数组,里面的值都是字符串
|
|
|
var preData = e.delegateTarget.dataset
|
|
|
var currentNum = parseInt($number.text());
|
|
@@ -367,17 +404,24 @@
|
|
|
if ($(e.target).hasClass('add')) {
|
|
|
// 点的+
|
|
|
// currentNum = currentNum >= 12 ? 12 : currentNum + 1;
|
|
|
- currentNum = currentNum >= data.numboxMax ? data.numboxMax : currentNum + data.numboxStep;
|
|
|
+ currentNum = currentNum >= data.numboxMax ? data.numboxMax : currentNum + data
|
|
|
+ .numboxStep;
|
|
|
} else {
|
|
|
// 点的-
|
|
|
// currentNum = currentNum <= 1 ? 1 : currentNum - 1;
|
|
|
- currentNum = currentNum <= data.numboxMin ? data.numboxMin : currentNum - data.numboxStep;
|
|
|
+ currentNum = currentNum <= data.numboxMin ? data.numboxMin : currentNum - data
|
|
|
+ .numboxStep;
|
|
|
}
|
|
|
$number.text(currentNum)
|
|
|
-
|
|
|
+ var price = (5.8 * currentNum).toFixed(1);
|
|
|
+ $('.computed_price').html('¥' + price)
|
|
|
var firstButton = $('#number_box_month button:first')
|
|
|
var lastButton = $('#number_box_month button:last')
|
|
|
-
|
|
|
+ if (currentNum >= 10) {
|
|
|
+ $('.profit_tips').show()
|
|
|
+ } else {
|
|
|
+ $('.profit_tips').hide()
|
|
|
+ }
|
|
|
// 如果为操作后的结果为1,则锁定减号按钮
|
|
|
if (currentNum === data.numboxMin) {
|
|
|
firstButton.attr('disabled', true)
|
|
@@ -392,40 +436,89 @@
|
|
|
}
|
|
|
})
|
|
|
|
|
|
- // 控制年份number_box的事件
|
|
|
+ /* -------- 控制年份number_box的事件 点击1年 2年 3年触发的事件------- */
|
|
|
$('#number_box_year').on('click', 'span', function (e) {
|
|
|
- // var $input = $('#time_cycle input:radio[name="time"]');
|
|
|
- var $yearlyInput = $('#yearly');
|
|
|
+ console.log(e.target.dataset.id)
|
|
|
+ let id = e.target.dataset.id;
|
|
|
+ $('.profit_tips').hide()
|
|
|
+ $('#number_box_month').removeClass('active');
|
|
|
+ $(this).addClass('active').siblings().removeClass('active')
|
|
|
+ $('#yearly').prop('checked', true);
|
|
|
+ $("#monthly").prop('checked', false);
|
|
|
+ // 渲染结果 保留一位小数
|
|
|
+ let result = (Number(id) * 58).toFixed(1);
|
|
|
+ $('.computed_price').html('¥' + result)
|
|
|
+ })
|
|
|
|
|
|
- if (!$yearlyInput.prop('checked')) {
|
|
|
- return
|
|
|
+ /* -------- 选择按月订阅 radio触发的事件------- */
|
|
|
+ $('#monthly').on('change', function (e) {
|
|
|
+ let isChecked = $(this).is(':checked')
|
|
|
+ let val = $('.month_number').text();
|
|
|
+ if (val >= 10) {
|
|
|
+ $('.profit_tips').show()
|
|
|
}
|
|
|
- $(this).addClass('active').siblings().removeClass('active')
|
|
|
+ console.log(val)
|
|
|
+ if (!isChecked) {
|
|
|
+ $('#number_box_month button').attr('disabled', true)
|
|
|
+ } else {
|
|
|
+ $('#number_box_month button').removeAttr('disabled')
|
|
|
+ }
|
|
|
+ let result = (Number(val) * 5.8).toFixed(1);
|
|
|
+ $('.computed_price').html('¥' + result)
|
|
|
+
|
|
|
})
|
|
|
+ /* -------- 选择按年订阅 radio触发的事件------- */
|
|
|
+ $('#yearly').on('change', function (e) {
|
|
|
+ $('.profit_tips').hide()
|
|
|
+ // console.log($(this).is(':checked'))
|
|
|
+ let isChecked = $(this).is(':checked')
|
|
|
+ // 按年订阅默认选择1年
|
|
|
+ let val = 1;
|
|
|
+ $('.computed_price').html('¥' + Number(val) * 58)
|
|
|
+ if (isChecked) {
|
|
|
+ $('#number_box_year span:eq(0)').addClass('active').siblings().removeClass('active')
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
// 确认订阅周期
|
|
|
- $('#enter_period').on('click',function(){
|
|
|
- var val;
|
|
|
- $('input[name="time"]').each(function (i,v) {
|
|
|
- let isChecked = $(v).is(':checked')
|
|
|
- if($(v).is(':checked') === true && $('.year_number').hasClass('active')){
|
|
|
- val = $('.active').html()
|
|
|
- $('#time_cycle').hide(function () {
|
|
|
- $('.choose_time').val(val)
|
|
|
- })
|
|
|
- }else if($(v).is(':checked') === true){
|
|
|
- val = $('.month_number').html();
|
|
|
- $('#time_cycle').hide(function () {
|
|
|
- $('.choose_time').val(val + '个月')
|
|
|
- })
|
|
|
- }
|
|
|
+ $('#enter_period').on('click', function () {
|
|
|
+ var checked = $('#time_cycle input[name="time"]:checked')
|
|
|
+ // 获取其label的for属性,通过for属性来怕短板
|
|
|
+ // prolong 不延长
|
|
|
+ // monthly 按月
|
|
|
+ // yearly 按年
|
|
|
+ var flag = checked.parents('label').attr('for')
|
|
|
+ var val = '不延长';
|
|
|
+ var flagVal = ""; //1-年,2-月
|
|
|
+ var flagValLen = "";
|
|
|
+ if (flag === 'prolong') {
|
|
|
+ val = '不延长'
|
|
|
+ } else if (flag === 'monthly') {
|
|
|
+ val = $('#number_box_month .month_number').text() + '个月'
|
|
|
+ flagVal = 2;
|
|
|
+ flagValLen = Number($('#number_box_month .month_number').text());
|
|
|
+ } else if (flag === 'yearly') {
|
|
|
+ val = $('#number_box_year .year_number.active').text();
|
|
|
+ flagVal = 1;
|
|
|
+ flagValLen = Number($('#number_box_year .year_number.active').text().replace("年",""));
|
|
|
+ }
|
|
|
+ sessionStorage.upgrade_cycleunit = flagVal;
|
|
|
+ sessionStorage.upgrade_cyclecount = flagValLen;
|
|
|
+ sessionStorage.upgrade_price = $(".computed_price").html();
|
|
|
+ $('#time_cycle').hide(function () {
|
|
|
+ $('.choose_item.lengthen .info').text(val)
|
|
|
})
|
|
|
- })*/
|
|
|
+ })
|
|
|
+
|
|
|
//新增区域
|
|
|
if(sessionStorage.vipSubSelectArea!==""&&sessionStorage.vipSubSelectArea!==undefined){
|
|
|
var vipSubSelectArea = JSON.parse(sessionStorage.vipSubSelectArea);
|
|
|
var provinceArr = [];
|
|
|
var cityArr = [];
|
|
|
var isAll = "";
|
|
|
+ $(".area-list").show();
|
|
|
for (var province in vipSubSelectArea){
|
|
|
provinceArr.push(province);
|
|
|
if(vipSubSelectArea[province].length > 0){
|
|
@@ -450,8 +543,9 @@
|
|
|
//新增行业
|
|
|
if(sessionStorage.vipSubSelectIndustry!==""&&sessionStorage.vipSubSelectIndustry!==undefined){
|
|
|
var vipSubSelectIndustry = JSON.parse(sessionStorage.vipSubSelectIndustry);
|
|
|
- industryArr = [];
|
|
|
+ var industryArr = [];
|
|
|
var isAll = "";
|
|
|
+ $(".industry-list").show();
|
|
|
for(var i in vipSubSelectIndustry){
|
|
|
var industry = vipSubSelectIndustry[i];
|
|
|
industryArr.push(industry);
|
|
@@ -471,28 +565,118 @@
|
|
|
var effective = sessionStorage.effectiveDate;
|
|
|
var effectiveHtml = "";
|
|
|
if(effective === "now"){
|
|
|
- effectiveHtml = "立即生效,需支付本月费用";
|
|
|
+ effectiveHtml = "立即生效,需支付当月费用差价";
|
|
|
}else if(effective === "notnow"){
|
|
|
- effectiveHtml = "9月1日生效";
|
|
|
+ var effectiveName = new Date().getMonth()+1;
|
|
|
+ effectiveHtml = effectiveName+"月1日生效";
|
|
|
}
|
|
|
- $('#effective_date input:radio[name="date"]').val(effectiveHtml);
|
|
|
- $('#effective_date input:radio[name="date"]').prop("checked", true);
|
|
|
- $("#effect_date_name").text(effectiveHtml);
|
|
|
+ $(".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;
|
|
|
- var payHtml = "";
|
|
|
- if(payType === "wx"){
|
|
|
- payHtml = "微信支付";
|
|
|
- }else if(payType === "alipy"){
|
|
|
- payHtml = "支付宝支付";
|
|
|
+// //支付方式
|
|
|
+// if(sessionStorage.payType!==""&&sessionStorage.payType!==undefined){
|
|
|
+// var payType = sessionStorage.payType;
|
|
|
+// var payHtml = "";
|
|
|
+// if(payType === "wx"){
|
|
|
+// payHtml = "微信支付";
|
|
|
+// }else if(payType === "alipy"){
|
|
|
+// payHtml = "支付宝支付";
|
|
|
+// }
|
|
|
+// $('input:radio[name="way"]').val(payHtml);
|
|
|
+// $('input:radio[name="way"]').prop("checked", true);
|
|
|
+// $("#payType").text(payHtml);
|
|
|
+// }
|
|
|
+
|
|
|
+ //
|
|
|
+ var area = {{.T.area}};
|
|
|
+ var buyerclass = {{.T.buyerclass}};
|
|
|
+ var cycleunit = {{.T.cycleunit}};
|
|
|
+ var cyclecount = {{.T.cyclecount}};
|
|
|
+ var startTime = {{.T.starttime}};
|
|
|
+ var endTime = {{.T.endtime}};
|
|
|
+ //
|
|
|
+ var areaArr = [];
|
|
|
+ var areaHtml = "";
|
|
|
+ var buyerclassArr = [];
|
|
|
+ var buyerclassHtml = "";
|
|
|
+// var dateName = "";
|
|
|
+// var dateHtml = "";
|
|
|
+ if (area !== "" && area !== undefined){
|
|
|
+ for(var province in area){
|
|
|
+ var citys = area[province]
|
|
|
+// console.log(citys);
|
|
|
+ if(citys.length===0){
|
|
|
+ areaArr.push(province);
|
|
|
+ }else{
|
|
|
+ for(var i in citys){
|
|
|
+ areaArr.push(citys[i]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ areaHtml = areaArr.toString().replace(/,/g, " ");
|
|
|
+// $(".item_area .label_for").text(areaHtml);
|
|
|
+ $('#area').val(areaHtml);
|
|
|
+ }
|
|
|
+ if(buyerclass !== "" && buyerclass !== undefined){
|
|
|
+ for(var i in buyerclass){
|
|
|
+ var industry = buyerclass[i];
|
|
|
+ buyerclassArr.push(industry);
|
|
|
+ buyerclassHtml = buyerclassArr.toString().replace(/,/g, " ");
|
|
|
}
|
|
|
- $('input:radio[name="way"]').val(payHtml);
|
|
|
- $('input:radio[name="way"]').prop("checked", true);
|
|
|
- $("#payType").text(payHtml);
|
|
|
+// $(".item_industry .label_for").text(buyerclassHtml);
|
|
|
+ $('#buyerclass').val(buyerclassHtml);
|
|
|
}
|
|
|
-
|
|
|
+// if(cycleunit !== "" && cycleunit !== undefined){
|
|
|
+// if(cycleunit === 1){
|
|
|
+// dateName = cyclecount + " 年";
|
|
|
+// }else if(cycleunit === 2){
|
|
|
+// dateName = cyclecount + " 个月";
|
|
|
+// }
|
|
|
+// $(".item_cycle .label_for").text(dateName);
|
|
|
+// }
|
|
|
+// if(startTime !== "" && endTime !== ""){
|
|
|
+// var start = startTime.replace(/-/g, ".");
|
|
|
+// var end = endTime.replace(/-/g, ".");
|
|
|
+// dateHtml = start + " - " + end;
|
|
|
+// $(".item_validity .label_for").text(dateHtml);
|
|
|
+// }
|
|
|
+ if(sessionStorage.upgrade_cyclecount!==""&&sessionStorage.upgrade_cycleunit!==""){
|
|
|
+ var cycleunit = sessionStorage.upgrade_cycleunit;
|
|
|
+ var cyclecount = sessionStorage.upgrade_cyclecount;
|
|
|
+ var dateName = "";
|
|
|
+ if(cycleunit === "1"){
|
|
|
+ $("#yearly").prop("checked", true);
|
|
|
+ $('#number_box_month').removeClass('active');
|
|
|
+ $("#number_box_year span").each(function(){
|
|
|
+ if($(this).attr("data-id") === cyclecount){
|
|
|
+ $(this).addClass("active");
|
|
|
+ }
|
|
|
+ })
|
|
|
+ dateName = cyclecount + "年";
|
|
|
+ $(".computed_price").show();
|
|
|
+ $('.choose_item.lengthen .info').text(dateName);
|
|
|
+ }else if(cycleunit === "2"){
|
|
|
+ $("#monthly").prop("checked", true);
|
|
|
+ $('#number_box_month').addClass('active');
|
|
|
+ $('#number_box_year span').removeClass('active');
|
|
|
+ $(".month_number").text(cyclecount);
|
|
|
+ dateName = cyclecount + "个月";
|
|
|
+ $(".computed_price").show();
|
|
|
+ $('.choose_item.lengthen .info').text(dateName);
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ $("#prolong").prop("checked", true);
|
|
|
+ $('.choose_item.lengthen .info').text("不延长");
|
|
|
+ $(".computed_price").hide();
|
|
|
+ }
|
|
|
+ if(sessionStorage.upgrade_price!==""&&sessionStorage.upgrade_price!==undefined){
|
|
|
+ $(".computed_price").html(sessionStorage.upgrade_price);
|
|
|
+ }
|
|
|
+
|
|
|
</script>
|
|
|
</body>
|
|
|
|