|
@@ -0,0 +1,1307 @@
|
|
|
|
+<!DOCTYPE html>
|
|
|
|
+<html lang="en">
|
|
|
|
+
|
|
|
|
+<head>
|
|
|
|
+ <meta charset="UTF-8">
|
|
|
|
+ <meta name="viewport"
|
|
|
|
+ content="width=device-width, initial-scale=1.0,minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
|
|
|
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
|
|
+ <title>VIP订阅升级</title>
|
|
|
|
+ <meta name="apple-mobile-web-app-capable" content="yes">
|
|
|
|
+ <meta name="apple-mobile-web-app-status-bar-style" content="black">
|
|
|
|
+ <script src="/jyapp/vipsubscribe/js/rem.js?v={{Msg "seo" "version"}}"></script>
|
|
|
|
+ <link rel="stylesheet" type="text/css" href="/jyapp/vipsubscribe/css/weui.min.css?v={{Msg "seo" "version"}}" />
|
|
|
|
+ <link rel="stylesheet" type="text/css" href="/jyapp/vipsubscribe/css/base.css?v={{Msg "seo" "version"}}" />
|
|
|
|
+ <link rel="stylesheet" type="text/css" href="/jyapp/vipsubscribe/iconfont/iconfont.css?v={{Msg "seo" "version"}}" />
|
|
|
|
+ <link rel="stylesheet" href="/jyapp/vipsubscribe/css/public.css?v={{Msg "seo" "version"}}">
|
|
|
|
+ <link rel="stylesheet" href="/jyapp/vipsubscribe/css/vip_update.css?v={{Msg "seo" "version"}}4">
|
|
|
|
+ {{include "/common/weixin.html"}}
|
|
|
|
+</head>
|
|
|
|
+<style type="text/css">
|
|
|
|
+ body,html {
|
|
|
|
+ height: 100%;
|
|
|
|
+ }
|
|
|
|
+ ::-webkit-input-placeholder { /* Chrome/Opera/Safari */
|
|
|
|
+ color: #686868;
|
|
|
|
+ }
|
|
|
|
+ .vip_update .fixed-bottom-box, .vip_renew .fixed-bottom-box {
|
|
|
|
+ width: 100%;
|
|
|
|
+ position: fixed;
|
|
|
|
+ bottom: 0;
|
|
|
|
+ left: 0;
|
|
|
|
+ }
|
|
|
|
+</style>
|
|
|
|
+<body class="no-touch">
|
|
|
|
+ <div class="vip_update">
|
|
|
|
+ <div class="choose_condition">
|
|
|
|
+ <p class="update_tip">提示:订阅升级可在已购买的服务基础上,增加区域、行业、以及延长订阅周期!</p>
|
|
|
|
+ <ul class="chooseList">
|
|
|
|
+ <li class="choose_item">
|
|
|
|
+ <a href="/jyapp/front/vipsubscribe/toChooseAreaUpgrade">
|
|
|
|
+ <span class="label">区域</span>
|
|
|
|
+ <input type="text" id="area" value="" onfocus="this.blur();" placeholder="选择全国、省份、地市" class="info">
|
|
|
|
+ <i class="iconfont icon-arrow"></i>
|
|
|
|
+ </a>
|
|
|
|
+ <p class="add_tips area-list" style="display: none;">已新增 1 个省级区域、4 个地市</p>
|
|
|
|
+ </li>
|
|
|
|
+ <li class="choose_item">
|
|
|
|
+ <a href="/jyapp/front/vipsubscribe/toChooseIndustryUpgrade">
|
|
|
|
+ <span class="label">行业</span>
|
|
|
|
+ <input type="text" id="buyerclass" onfocus="this.blur();" value="" placeholder="选择采购单位行业" class="info">
|
|
|
|
+ <i class="iconfont icon-arrow"></i>
|
|
|
|
+ </a>
|
|
|
|
+ <p class="add_tips industry-list" style="display: none;">已新增 2 个行业</p>
|
|
|
|
+ </li>
|
|
|
|
+ <!-- <li class="choose_item select_cycle">
|
|
|
|
+ <a href="javascript:;">
|
|
|
|
+ <span class="label">订阅周期</span>
|
|
|
|
+ <input type="text" disabled value="" placeholder="选择年、月" class="info choose_time">
|
|
|
|
+ <i class="iconfont icon-arrow choose_time"></i>
|
|
|
|
+ </a>
|
|
|
|
+ </li> -->
|
|
|
|
+ <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>
|
|
|
|
+ </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>
|
|
|
|
+ </ul>
|
|
|
|
+ <div class="pay_mode">
|
|
|
|
+ <div class="select_payment choose_item">
|
|
|
|
+ <a href="javascript:;">
|
|
|
|
+ <span class="label">支付方式</span>
|
|
|
|
+ <span class="info choose_way weixin_pay">微信支付</span>
|
|
|
|
+ <i class="iconfont icon-arrow choose_way"></i>
|
|
|
|
+ </a>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="vip_rules">
|
|
|
|
+ <div class="vip_prise_table">
|
|
|
|
+ <table class="monthly">
|
|
|
|
+ <caption class="table_title">- VIP订阅价格 -</caption>
|
|
|
|
+ <tr>
|
|
|
|
+ <td colspan="2">按月购买</td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td><span>5.8</span>元 月/市/行业</td>
|
|
|
|
+ <td><span>18</span>元 月/市/全行业</td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td><span>11.8</span>元 月/省/行业</td>
|
|
|
|
+ <td><span>38</span>元 月/省/全行业</td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td><span>118</span>元 月/全国/行业</td>
|
|
|
|
+ <td><span>388</span>元 月/全国/全行业</td>
|
|
|
|
+ </tr>
|
|
|
|
+ </table>
|
|
|
|
+ <table class="yearly">
|
|
|
|
+ <tr>
|
|
|
|
+ <td colspan="2">按年购买</td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td><span>58</span>元 年/市/行业</td>
|
|
|
|
+ <td><span>180</span>元 年/市/全行业</td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td><span>118</span>元 年/省/行业</td>
|
|
|
|
+ <td><span>380</span>元 年/省/全行业</td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td><span>1180</span>元 年/全国/行业</td>
|
|
|
|
+ <td><span>3880</span>元 年/全国/全行业</td>
|
|
|
|
+ </tr>
|
|
|
|
+ </table>
|
|
|
|
+ <dl class="tips">
|
|
|
|
+ <dt>购买须知:</dt>
|
|
|
|
+ <dd>套餐周期内,不支持套餐降级,续费可降级;</dd>
|
|
|
|
+ <dd>用户最多购买/续费3年套餐;</dd>
|
|
|
|
+ <dd>支持套餐升级,补差价(按月进行补差价,不足一个月按一个月计算)。</dd>
|
|
|
|
+ </dl>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="fixed-bottom-box">
|
|
|
|
+ <div class="weui-cells weui-cells_checkbox radio-form">
|
|
|
|
+ <label class="weui-cell weui-check__label" for="buy">
|
|
|
|
+ <div class="weui-cell__hd">
|
|
|
|
+ <input type="checkbox" class="weui-check" checked="checked" name="buyService" id="buy"/>
|
|
|
|
+ <i class="weui-icon-checked"></i>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="weui-cell__bd read">
|
|
|
|
+ <p>
|
|
|
|
+ 我已阅读,理解并接受
|
|
|
|
+ <a href="/jyapp/front/staticPage/wx-serviceterms.html">
|
|
|
|
+ 《剑鱼标讯线上购买与服务条款》
|
|
|
|
+ </a>
|
|
|
|
+ </p>
|
|
|
|
+ </div>
|
|
|
|
+ </label>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="price">
|
|
|
|
+ <label>需补差价:</label>
|
|
|
|
+ <p>
|
|
|
|
+ <!--<span class="old_price">¥610.80</span>-->
|
|
|
|
+ <strong class="finally_price">¥0.00</strong>
|
|
|
|
+ </p>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="form-btn">
|
|
|
|
+ <button class="btn enter save_upgrade" disabled>立即升级</button>
|
|
|
|
+ </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>
|
|
|
|
+ <span class="cancel">取消</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="box_bd">
|
|
|
|
+ <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">
|
|
|
|
+ <input type="radio" class="weui-check monthly" name="time" value="month"
|
|
|
|
+ id="monthly" />
|
|
|
|
+ <i class="weui-icon-checked"></i>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="weui-cell__bd">
|
|
|
|
+ <p>按月订阅</p>
|
|
|
|
+ </div>
|
|
|
|
+ </label>
|
|
|
|
+ <div class="number_box" id="number_box_month" data-numbox-step="1" data-numbox-min="1"
|
|
|
|
+ data-numbox-max="12">
|
|
|
|
+ <button class="weui-btn weui-btn_plain-default" type="button">
|
|
|
|
+ <div class="jy_icon decrease"></div>
|
|
|
|
+ </button>
|
|
|
|
+ <span class="month_number">1</span>
|
|
|
|
+ <button class="weui-btn weui-btn_plain-default add" type="button">
|
|
|
|
+ <div class="jy_icon increase"></div>
|
|
|
|
+ </button>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="weui-cells weui-cells_checkbox choose-form">
|
|
|
|
+ <label class="weui-cell weui-check__label yearly_label" for="yearly">
|
|
|
|
+ <div class="weui-cell__hd">
|
|
|
|
+ <input type="radio" class="weui-check yearly" name="time" value="year"
|
|
|
|
+ id="yearly" />
|
|
|
|
+ <i class="weui-icon-checked"></i>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="weui-cell__bd">
|
|
|
|
+ <p>按年订阅</p>
|
|
|
|
+ </div>
|
|
|
|
+ </label>
|
|
|
|
+ <div class="number_box" id="number_box_year">
|
|
|
|
+ <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" id="enter_period">确认</button>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <!-- 选择生效日期 -->
|
|
|
|
+ <div class="js_dialog effective_date" id="effective_date" style="display: none;">
|
|
|
|
+ <div class="weui-mask"></div>
|
|
|
|
+ <div class="box">
|
|
|
|
+ <div class="box_hd">
|
|
|
|
+ <span style="font-size:0.32rem;">生效日期</span>
|
|
|
|
+ <h3></h3>
|
|
|
|
+ <span class="cancel">取消</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="box_bd">
|
|
|
|
+ <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 now">立即生效,需支付当月费用差价</p>
|
|
|
|
+ <p class="effective_time nownow">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 />
|
|
|
|
+ <i class="weui-icon-checked"></i>
|
|
|
|
+ </div>
|
|
|
|
+ </label>
|
|
|
|
+ <label class="weui-cell weui-check__label next_label effect_next" for="nextMonth">
|
|
|
|
+ <div class="weui-cell__bd read">
|
|
|
|
+ <p class="effective_name notnow"></p>
|
|
|
|
+ <p class="effective_time notnownow">2019.09.01 - 2020.06.06</p>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="weui-cell__hd">
|
|
|
|
+ <input type="radio" class="weui-check" name="date" value="" id="nextMonth" />
|
|
|
|
+ <i class="weui-icon-checked"></i>
|
|
|
|
+ </div>
|
|
|
|
+ </label>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <!-- 选择支付方式 -->
|
|
|
|
+ <div class="js_dialog pay_way" id="pay_way" style="display: none;">
|
|
|
|
+ <div class="weui-mask"></div>
|
|
|
|
+ <div class="box">
|
|
|
|
+ <div class="box_hd">
|
|
|
|
+ <span></span>
|
|
|
|
+ <h3>支付方式</h3>
|
|
|
|
+ <span class="cancel">取消</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="box_bd">
|
|
|
|
+ <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="/jyapp/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">
|
|
|
|
+ <div class="weui-cell__bd read">
|
|
|
|
+ <p><img src="/jyapp/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>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <script src="/jyapp/vipsubscribe/js/jquery-2.1.4.js"></script>
|
|
|
|
+ <!--<script src="/vipsubscribe/js/fastclick.js?v={{Msg "seo" "version"}}"></script>-->
|
|
|
|
+ <script src="/jyapp/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
|
|
|
|
+ <script src="/jyapp/vipsubscribe/js/common.js?v={{Msg "seo" "version"}}3"></script>
|
|
|
|
+ <script type="text/javascript">
|
|
|
|
+ //
|
|
|
|
+ try{
|
|
|
|
+ var signature = {{.T.signature}};
|
|
|
|
+ var isConfigSuccess = true;
|
|
|
|
+ var id = {{.T._id}}
|
|
|
|
+ if(signature && signature.length == 4){
|
|
|
|
+ wx.config({
|
|
|
|
+ debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
|
|
|
|
+ appId: signature[0], // 必填,公众号的唯一标识
|
|
|
|
+ timestamp:signature[1], // 必填,生成签名的时间戳
|
|
|
|
+ nonceStr: signature[2], // 必填,生成签名的随机串
|
|
|
|
+ signature: signature[3],// 必填,签名,见附录1
|
|
|
|
+ jsApiList: ['chooseWXPay','hideAllNonBaseMenuItem'] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
|
|
|
|
+ });
|
|
|
|
+ wx.ready(function(){
|
|
|
|
+ if(!isConfigSuccess){
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ wx.hideAllNonBaseMenuItem();
|
|
|
|
+ });
|
|
|
|
+ wx.error(function(res){
|
|
|
|
+ //config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。
|
|
|
|
+ //alert(res);
|
|
|
|
+ isConfigSuccess = false;
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ //调用微信支付接口
|
|
|
|
+ function onBridgeReady(res,ordercode){
|
|
|
|
+ WeixinJSBridge.invoke('getBrandWCPayRequest',{
|
|
|
|
+ "appId": res["appId"],
|
|
|
|
+ "timeStamp": res["timestamp"],
|
|
|
|
+ "nonceStr": res["nonceStr"],
|
|
|
|
+ "package": res["prepayId"],
|
|
|
|
+ "signType": res["signType"],
|
|
|
|
+ "paySign": res["sign"]
|
|
|
|
+ },
|
|
|
|
+ function(r){
|
|
|
|
+ if(r.err_msg == "get_brand_wcpay_request:ok"){
|
|
|
|
+ //
|
|
|
|
+ clearSessionStorage();
|
|
|
|
+ setTimeout(function(){
|
|
|
|
+ window.location.replace("/jyapp/front/vipsubscribe/toPaySuccessPage?orderCode="+ordercode);
|
|
|
|
+ },500)
|
|
|
|
+ }
|
|
|
|
+// }else if(r.err_msg == "get_brand_wcpay_request:cancel"){
|
|
|
|
+//// alert("开发环境【支付跳转完成】")
|
|
|
|
+// try{
|
|
|
|
+//// window.location.replace("/front/vipsubscribe/toPaySuccessPage?orderCode="+ordercode);
|
|
|
|
+//// window.location.reload();
|
|
|
|
+// }catch(e){
|
|
|
|
+// alert(e)
|
|
|
|
+// }
|
|
|
|
+// }else{
|
|
|
|
+// weui.toast("系统异常,请稍微再试",{
|
|
|
|
+// duration: 2000,
|
|
|
|
+// className: 'custom-toast',
|
|
|
|
+// });
|
|
|
|
+// }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }catch(e){
|
|
|
|
+ console.log(e)
|
|
|
|
+ }
|
|
|
|
+ </script>
|
|
|
|
+ <script>
|
|
|
|
+ $(function () {
|
|
|
|
+ var isPageHide = false;
|
|
|
|
+ window.addEventListener('pageshow', function () {
|
|
|
|
+ if (isPageHide) {
|
|
|
|
+ location.reload();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ window.addEventListener('pagehide', function () {
|
|
|
|
+ isPageHide = true;
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ //加载价格
|
|
|
|
+ $DoPost("/subscribepay/vipsubscribe/getPrice",{},function(r){
|
|
|
|
+ if(r){
|
|
|
|
+ $('.monthly span:eq(0)').text(r.month.oneCity_oneBuyerClass/100);
|
|
|
|
+ $('.monthly span:eq(1)').text(r.month.oneCity_allBuyerClass/100);
|
|
|
|
+ $('.monthly span:eq(2)').text(r.month.oneProvince_oneBuyerClass/100);
|
|
|
|
+ $('.monthly span:eq(3)').text(r.month.oneProvince_allBuyerClass/100);
|
|
|
|
+ $('.monthly span:eq(4)').text(r.month.allProvince_oneBuyerClass/100);
|
|
|
|
+ $('.monthly span:eq(5)').text(r.month.allProvince_allBuyerClass/100);
|
|
|
|
+
|
|
|
|
+ $('.yearly span:eq(0)').text(r.year.oneCity_oneBuyerClass/100);
|
|
|
|
+ $('.yearly span:eq(1)').text(r.year.oneCity_allBuyerClass/100);
|
|
|
|
+ $('.yearly span:eq(2)').text(r.year.oneProvince_oneBuyerClass/100);
|
|
|
|
+ $('.yearly span:eq(3)').text(r.year.oneProvince_allBuyerClass/100);
|
|
|
|
+ $('.yearly span:eq(4)').text(r.year.allProvince_oneBuyerClass/100);
|
|
|
|
+ $('.yearly span:eq(5)').text(r.year.allProvince_allBuyerClass/100);
|
|
|
|
+ }
|
|
|
|
+ },false)
|
|
|
|
+ //
|
|
|
|
+ if(sessionStorage.vipSubSelectAreaUpgrade!==undefined&&sessionStorage.vipSubSelectAreaUpgrade!==""){
|
|
|
|
+ if(checkObj(JSON.parse(sessionStorage.vipSubSelectAreaUpgrade))){
|
|
|
|
+ sessionStorage.removeItem("vipSubSelectAreaUpgrade");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(sessionStorage.vipSubSelectIndustryUpgrade!==undefined&&sessionStorage.vipSubSelectIndustryUpgrade!==""){
|
|
|
|
+ if(checkObj(JSON.parse(sessionStorage.vipSubSelectIndustryUpgrade))){
|
|
|
|
+ sessionStorage.removeItem("vipSubSelectIndustryUpgrade");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //
|
|
|
|
+ var monthPrice = "";
|
|
|
|
+ var yearPrice = "";
|
|
|
|
+
|
|
|
|
+ // 隐藏dialog选择框事件
|
|
|
|
+ function hideDialog() {
|
|
|
|
+ $('#pay_way').hide(200);
|
|
|
|
+ $('#time_cycle').hide(200);
|
|
|
|
+ $('#effective_date').hide(200);
|
|
|
|
+ }
|
|
|
|
+ $('.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();
|
|
|
|
+ var payHtml = "";
|
|
|
|
+ if(checkValue === "微信支付"){
|
|
|
|
+ payHtml = "wx";
|
|
|
|
+ }else if(checkValue === "支付宝支付"){
|
|
|
|
+ payHtml = "alipy";
|
|
|
|
+ }
|
|
|
|
+ sessionStorage.payType = payHtml;
|
|
|
|
+// 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);
|
|
|
|
+ var nowDates = new Date().toLocaleDateString();
|
|
|
|
+ nowDates = nowDates.split("/");
|
|
|
|
+ var nowMonths = Number(nowDates[1]);
|
|
|
|
+ var nowYears = Number(nowDates[0]);
|
|
|
|
+ var as = nowMonths +1
|
|
|
|
+ if(as > 12){
|
|
|
|
+ as = nowMonths-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");
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ //
|
|
|
|
+ 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();
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ // 选择周期
|
|
|
|
+ $('.lengthen > a').click(function () {
|
|
|
|
+ if((nowRenew)>=36){
|
|
|
|
+ var overtimeWarning = `最长订阅周期不可超过3年<br />当前订阅周期:${nowRenew}个月`
|
|
|
|
+ weui.toast(overtimeWarning, {
|
|
|
|
+ duration: 3000,
|
|
|
|
+ className: 'custom-toast',
|
|
|
|
+ callback: function() {
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ $('#time_cycle').show(200);
|
|
|
|
+ })
|
|
|
|
+ // 对订阅时间选择的 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();
|
|
|
|
+
|
|
|
|
+ $('#number_box_month').addClass('active');
|
|
|
|
+ $('#number_box_year span').removeClass('active');
|
|
|
|
+ } else if($(e.target).hasClass('yearly')){
|
|
|
|
+ $('.computed_price').show()
|
|
|
|
+ // 按年订阅
|
|
|
|
+ // $('#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 .month_number');
|
|
|
|
+ var $monthlyInput = $('#monthly');
|
|
|
|
+ // 未整理的data数组,里面的值都是字符串
|
|
|
|
+ var preData = e.delegateTarget.dataset
|
|
|
|
+ var currentNum = parseInt($number.text());
|
|
|
|
+ var data = {};
|
|
|
|
+ // 把字符串转换成数字
|
|
|
|
+ for (var i in preData) {
|
|
|
|
+ data[i] = preData[i] - 0
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (!$monthlyInput.prop('checked')) {
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ // 判断是点击的是+ 还是-
|
|
|
|
+ if ($(e.target).hasClass('add')) {
|
|
|
|
+ // 点的+
|
|
|
|
+ // currentNum = currentNum >= 12 ? 12 : currentNum + 1;
|
|
|
|
+ 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;
|
|
|
|
+ }
|
|
|
|
+ // 当续费时间 + 当前已经买的时间超过36个月,给出提醒
|
|
|
|
+ if((currentNum+nowRenew)>36){
|
|
|
|
+ var overtimeWarning = `最长订阅周期不可超过3年<br />当前订阅周期:${nowRenew}个月`
|
|
|
|
+ weui.toast(overtimeWarning, {
|
|
|
|
+ duration: 3000,
|
|
|
|
+ className: 'custom-toast',
|
|
|
|
+ callback: function() {
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ $(".computed_price").show();
|
|
|
|
+ if (currentNum >= 10) {
|
|
|
|
+ $('.profit_tips').text("已选择"+currentNum+"个月,建议“按年订阅”更划算哦~");
|
|
|
|
+ $('.profit_tips').show();
|
|
|
|
+ if(currentNum==12){ //12个月自动跳转1年
|
|
|
|
+ $("#number_box_year .year_number:eq(0)").trigger("click");
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ $('.profit_tips').hide()
|
|
|
|
+ }
|
|
|
|
+ $number.text(currentNum)
|
|
|
|
+ if(currentNum >= 10 && currentNum<= 11){
|
|
|
|
+ currentNum = 10;
|
|
|
|
+ }
|
|
|
|
+ var price = (completeMonth * 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)
|
|
|
|
+ } else {
|
|
|
|
+ firstButton.removeAttr('disabled')
|
|
|
|
+ }
|
|
|
|
+ // 如果为操作后的结果为12,则锁定加号按钮
|
|
|
|
+ if (currentNum === data.numboxMax) {
|
|
|
|
+ lastButton.attr('disabled', true)
|
|
|
|
+ } else {
|
|
|
|
+ lastButton.removeAttr('disabled')
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ /* -------- 控制年份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;
|
|
|
|
+ // 当续费时间 + 当前已经买的时间超过36个月,给出提醒
|
|
|
|
+ if((id*12+nowRenew)>36){
|
|
|
|
+ var overtimeWarning = `最长订阅周期不可超过3年<br />当前订阅周期:${nowRenew}个月`
|
|
|
|
+ weui.toast(overtimeWarning, {
|
|
|
|
+ duration: 3000,
|
|
|
|
+ className: 'custom-toast',
|
|
|
|
+ callback: function() {
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ $(".computed_price").show();
|
|
|
|
+ $('.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) * completeYear).toFixed(1);
|
|
|
|
+ $('.computed_price').html('¥' + result)
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ /* -------- 选择按月订阅 radio触发的事件------- */
|
|
|
|
+ $('#monthly').on('change', function (e) {
|
|
|
|
+ let isChecked = $(this).is(':checked')
|
|
|
|
+ let val = $('.month_number').text();
|
|
|
|
+ if (val >= 10) {
|
|
|
|
+ $('.profit_tips').text("已选择"+val+"个月,建议“按年订阅”更划算哦~");
|
|
|
|
+ $('.profit_tips').show();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (!isChecked) {
|
|
|
|
+ $('#number_box_month button').attr('disabled', true)
|
|
|
|
+ } else {
|
|
|
|
+ $('#number_box_month button').removeAttr('disabled')
|
|
|
|
+ }
|
|
|
|
+ if(val==="1"){
|
|
|
|
+ $('#number_box_month button:first').attr('disabled', true);
|
|
|
|
+ }
|
|
|
|
+ if(Number(val)>=10){
|
|
|
|
+ val = 10
|
|
|
|
+ }
|
|
|
|
+ let result = (Number(val) * completeMonth).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) * completeYear)
|
|
|
|
+ if (isChecked) {
|
|
|
|
+ $('#number_box_year span:eq(0)').addClass('active').siblings().removeClass('active')
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ // 确认订阅周期
|
|
|
|
+ $('#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)
|
|
|
|
+ })
|
|
|
|
+ var proPrice = $(".computed_price").html().replace("¥","")
|
|
|
|
+ if(val === "不延长"){
|
|
|
|
+ proPrice = 0;
|
|
|
|
+ }
|
|
|
|
+ sessionStorage.proPrice = proPrice;
|
|
|
|
+ FinallyPrice();
|
|
|
|
+ })
|
|
|
|
+ //
|
|
|
|
+ $("#buy").on("click", function(){
|
|
|
|
+ if(!$("#buy").prop("checked")){
|
|
|
|
+ $("#buy").attr("checked", false);
|
|
|
|
+ sessionStorage.buyCheck = false;
|
|
|
|
+ if($(".save_upgrade").attr("disabled")!=="undefined"){
|
|
|
|
+ $(".save_upgrade").attr("disabled",true);
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ $("#buy").attr("checked", true);
|
|
|
|
+ sessionStorage.buyCheck = true;
|
|
|
|
+ if(sessionStorage.vipSubSelectAreaUpgrade!==undefined || sessionStorage.vipSubSelectIndustryUpgrade!==undefined || (sessionStorage.upgrade_cycleunit!==undefined&&sessionStorage.upgrade_cycleunit!=="")){
|
|
|
|
+ $(".save_upgrade").removeAttr("disabled");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ //
|
|
|
|
+ if(sessionStorage.buyCheck!==undefined&&sessionStorage.buyCheck!==""){
|
|
|
|
+ let buyCheck = sessionStorage.buyCheck;
|
|
|
|
+ let bCheck = "";
|
|
|
|
+ if(buyCheck === "true"){
|
|
|
|
+ bCheck = true;
|
|
|
|
+ }else{
|
|
|
|
+ bCheck = false;
|
|
|
|
+ }
|
|
|
|
+ $("#buy").prop("checked", bCheck);
|
|
|
|
+ }
|
|
|
|
+ //新增区域
|
|
|
|
+ if(sessionStorage.vipSubSelectAreaUpgrade!==""&&sessionStorage.vipSubSelectAreaUpgrade!==undefined){
|
|
|
|
+ var vipSubSelectArea = JSON.parse(sessionStorage.vipSubSelectAreaUpgrade);
|
|
|
|
+ var provinceArr = [];
|
|
|
|
+ var cityArr = [];
|
|
|
|
+ var isAll = "";
|
|
|
|
+ $(".area-list").show();
|
|
|
|
+ for (var province in vipSubSelectArea){
|
|
|
|
+ if(vipSubSelectArea[province].length > 0){
|
|
|
|
+ var citys = vipSubSelectArea[province];
|
|
|
|
+ for (var i in citys){
|
|
|
|
+ var city = citys[i];
|
|
|
|
+ cityArr.push(city);
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ provinceArr.push(province);
|
|
|
|
+ }
|
|
|
|
+ if(province === "全国"){
|
|
|
|
+ isAll = "all";
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ var provinceLen = provinceArr.length;
|
|
|
|
+ var cityLen = cityArr.length;
|
|
|
|
+ if(isAll === ""){
|
|
|
|
+ $(".area-list").text("已新增 "+ provinceLen +" 个省级区域、"+ cityLen +" 个地市");
|
|
|
|
+ }else{
|
|
|
|
+ $(".area-list").text("已新增为 : 全国");
|
|
|
|
+ }
|
|
|
|
+ if(provinceLen === 0 && cityLen === 0){
|
|
|
|
+ $(".area-list").hide();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //新增行业
|
|
|
|
+ if(sessionStorage.vipSubSelectIndustryUpgrade!==""&&sessionStorage.vipSubSelectIndustryUpgrade!==undefined){
|
|
|
|
+ var vipSubSelectIndustry = JSON.parse(sessionStorage.vipSubSelectIndustryUpgrade);
|
|
|
|
+ var industryArr = [];
|
|
|
|
+ var isAll = "";
|
|
|
|
+ $(".industry-list").show();
|
|
|
|
+ for(var i in vipSubSelectIndustry){
|
|
|
|
+ var industry = vipSubSelectIndustry[i];
|
|
|
|
+ industryArr.push(industry);
|
|
|
|
+ if(industry === "全部行业"){
|
|
|
|
+ isAll = "all";
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ var industryLen = industryArr.length
|
|
|
|
+ if(isAll === ""){
|
|
|
|
+ $(".industry-list").text("已新增 "+ industryLen +" 个行业");
|
|
|
|
+ }else{
|
|
|
|
+ $(".industry-list").text("已新增为 : 全部行业");
|
|
|
|
+ }
|
|
|
|
+ if(industryLen === 0){
|
|
|
|
+ $(".industry-list").hide();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //生效时间
|
|
|
|
+ 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;
|
|
|
|
+ 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);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if(sessionStorage.upgrade_cyclecount!==undefined&&sessionStorage.upgrade_cycleunit!==undefined){
|
|
|
|
+ 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.vipSubSelectArea!==""&&sessionStorage.vipSubSelectArea!==undefined&&)
|
|
|
|
+
|
|
|
|
+ //
|
|
|
|
+ var area = "";
|
|
|
|
+ var buyerclass = "";
|
|
|
|
+ var cycleunit = "";
|
|
|
|
+ var cyclecount = "";
|
|
|
|
+ var startTime = "";
|
|
|
|
+ var starts = "";
|
|
|
|
+ var endTime = "";
|
|
|
|
+ var ends = "";
|
|
|
|
+ $DoPost("/subscribepay/renewUpgrade/getBuyMsg", {}, function (data) {
|
|
|
|
+ if (data) {
|
|
|
|
+ area = data.area;
|
|
|
|
+ buyerclass = data.buyerclass;
|
|
|
|
+ cycleunit = data.cycleunit;
|
|
|
|
+ cyclecount = data.cyclecount;
|
|
|
|
+ startTime = data.start;
|
|
|
|
+ starts = data.starttime;
|
|
|
|
+ endTime = data.end;
|
|
|
|
+ ends = data.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);
|
|
|
|
+ if(checkObj(area)){
|
|
|
|
+ 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, " ");
|
|
|
|
+ }
|
|
|
|
+ // $(".item_industry .label_for").text(buyerclassHtml);
|
|
|
|
+ if(checkObj(buyerclass)){
|
|
|
|
+ buyerclassHtml = "全行业";
|
|
|
|
+ }
|
|
|
|
+ $('#buyerclass').val(buyerclassHtml);
|
|
|
|
+ }
|
|
|
|
+ //
|
|
|
|
+ var nowDate = data.now.replace(/-/g, ".");
|
|
|
|
+ var a = nowDate+ " - " +endTime;
|
|
|
|
+ $(".nownow").text(nowDate+ " - " +endTime.replace(/-/g, "."))
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ },false);
|
|
|
|
+ //
|
|
|
|
+ var completeMonth = 0;
|
|
|
|
+ var completeYear = 0;
|
|
|
|
+ var oldYearPrice = 0;
|
|
|
|
+ var oldMonthPrice = 0;
|
|
|
|
+ var areasArr = {};
|
|
|
|
+ var industrysArr = [];
|
|
|
|
+ var nowRenew = "";
|
|
|
|
+ function FinallyPrice(){
|
|
|
|
+ $(".save_upgrade").attr('disabled','disabled');
|
|
|
|
+ var nowUpgrade = "";
|
|
|
|
+ //
|
|
|
|
+ var nowDate = new Date(startTime).toLocaleDateString();
|
|
|
|
+ nowDate = nowDate.split("/");
|
|
|
|
+ var nowMonth = Number(nowDate[1]);
|
|
|
|
+ var nowYear = Number(nowDate[0]);
|
|
|
|
+ var nowDay = Number(nowDate[2]);
|
|
|
|
+ //
|
|
|
|
+ var endDate = new Date(endTime).toLocaleDateString();
|
|
|
|
+ endDate = endDate.split("/");
|
|
|
|
+ var endMonth = Number(endDate[1]);
|
|
|
|
+ var endYear = Number(endDate[0]);
|
|
|
|
+ var endDay = Number(endDate[2]);
|
|
|
|
+ var oldPrice = "";
|
|
|
|
+ var price = "";
|
|
|
|
+ var effect = "";
|
|
|
|
+ var buyCheck = true;
|
|
|
|
+ if(sessionStorage.buyCheck!==undefined&&sessionStorage.buyCheck!==""){
|
|
|
|
+ let bcheck = sessionStorage.buyCheck;
|
|
|
|
+ if(bcheck === "true"){
|
|
|
|
+ buyCheck = true;
|
|
|
|
+ }else{
|
|
|
|
+ buyCheck = false;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(sessionStorage.vipSubSelectAreaUpgrade!==""&&sessionStorage.vipSubSelectAreaUpgrade!==undefined){
|
|
|
|
+ var vipArea = JSON.parse(sessionStorage.vipSubSelectAreaUpgrade);
|
|
|
|
+ if(area !== ""&&area !== undefined){
|
|
|
|
+ for(let province in area){
|
|
|
|
+ let citys = area[province];
|
|
|
|
+ if(citys.length===0){
|
|
|
|
+ areasArr[province] = [];
|
|
|
|
+ }else{
|
|
|
|
+ areasArr[province] = citys;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ for(let province in vipArea){
|
|
|
|
+ let citys = vipArea[province];
|
|
|
|
+ if(areasArr[province] === undefined){
|
|
|
|
+ areasArr[province] = citys
|
|
|
|
+ }else{
|
|
|
|
+ let cityArr = [];
|
|
|
|
+ for(let i in citys){
|
|
|
|
+ cityArr.push(citys[i]);
|
|
|
|
+ }
|
|
|
|
+ for(let i in areasArr[province]){
|
|
|
|
+ cityArr.push(areasArr[province][i]);
|
|
|
|
+ }
|
|
|
|
+ //
|
|
|
|
+ for (var x = 0; x < cityArr.length; x++) {
|
|
|
|
+ for (var j =x+1; j <cityArr.length; ) {
|
|
|
|
+ if (cityArr[x] === cityArr[j]){
|
|
|
|
+ cityArr.splice(j, 1);
|
|
|
|
+ }
|
|
|
|
+ else j++;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //
|
|
|
|
+ areasArr[province] = cityArr;
|
|
|
|
+ }
|
|
|
|
+ if(province === "全国"){
|
|
|
|
+ areasArr = {"全国":[]};
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ console.log($(".save_upgrade").attr("disabled"))
|
|
|
|
+ if(buyCheck){
|
|
|
|
+ $(".save_upgrade").removeAttr("disabled");
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ if(area !== ""&&area !== undefined){
|
|
|
|
+ for(let province in area){
|
|
|
|
+ let citys = area[province];
|
|
|
|
+ if(citys.length===0){
|
|
|
|
+ areasArr[province] = [];
|
|
|
|
+ }else{
|
|
|
|
+ areasArr[province] = citys;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ console.log("areasArr",areasArr)
|
|
|
|
+ if(sessionStorage.vipSubSelectIndustryUpgrade!==""&&sessionStorage.vipSubSelectIndustryUpgrade!==undefined){
|
|
|
|
+ var vipIndustry = JSON.parse(sessionStorage.vipSubSelectIndustryUpgrade);
|
|
|
|
+ if(buyerclass!==""&&buyerclass!==undefined){
|
|
|
|
+ for(let i in buyerclass){
|
|
|
|
+ let industry = buyerclass[i];
|
|
|
|
+ industrysArr.push(industry);
|
|
|
|
+ }
|
|
|
|
+ for(let i in vipIndustry){
|
|
|
|
+ let industry = vipIndustry[i];
|
|
|
|
+ industrysArr.push(industry);
|
|
|
|
+ if(industry === "全部行业"){
|
|
|
|
+ industrysArr = ["全部行业"];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(buyCheck){
|
|
|
|
+ $(".save_upgrade").removeAttr("disabled");
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ if(buyerclass!==""&&buyerclass!==undefined){
|
|
|
|
+ for(let i in buyerclass){
|
|
|
|
+ let industry = buyerclass[i];
|
|
|
|
+ industrysArr.push(industry);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ for (var x = 0; x < industrysArr.length; x++) {
|
|
|
|
+ for (var j =x+1; j <industrysArr.length; ) {
|
|
|
|
+ if (industrysArr[x] === industrysArr[j]){
|
|
|
|
+ industrysArr.splice(j, 1);
|
|
|
|
+ }
|
|
|
|
+ else j++;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ 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(endYear === nowYear){
|
|
|
|
+ if(endMonth === nowMonth){
|
|
|
|
+ nowUpgrade = 1;
|
|
|
|
+ }else{
|
|
|
|
+ if(endDay > nowDay){
|
|
|
|
+ nowUpgrade = endMonth - nowMonth +1;
|
|
|
|
+ }else{
|
|
|
|
+ nowUpgrade = endMonth - nowMonth;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ if(endMonth === nowMonth){
|
|
|
|
+ if(endDay <= nowDay){
|
|
|
|
+ nowUpgrade = (endYear - nowYear) * 12;
|
|
|
|
+ }else{
|
|
|
|
+ nowUpgrade = (endYear - nowYear) * 12 +1;
|
|
|
|
+ }
|
|
|
|
+ }else if(endMonth > nowMonth){
|
|
|
|
+ if(endDay <= nowDay){
|
|
|
|
+ nowUpgrade = (endYear - nowYear) * 12 + (endMonth - nowMonth);
|
|
|
|
+ }else{
|
|
|
|
+ nowUpgrade = (endYear - nowYear) * 12 + (endMonth - nowMonth)+1;
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ if(endDay <= nowDay){
|
|
|
|
+ nowUpgrade = (endYear - nowYear-1) * 12 + (12-nowMonth+endMonth);
|
|
|
|
+ }else{
|
|
|
|
+ nowUpgrade = (endYear - nowYear-1) * 12 + (12-nowMonth+endMonth)+1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ nowRenew = nowUpgrade;
|
|
|
|
+ console.log("monthold",nowUpgrade)
|
|
|
|
+ //
|
|
|
|
+ if(effect === "notnow"){
|
|
|
|
+ nowUpgrade = nowUpgrade -1;
|
|
|
|
+ }
|
|
|
|
+ if(nowUpgrade == 0){
|
|
|
|
+ nowUpgrade = 1;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //
|
|
|
|
+ var nowUpgradeYear = 0;
|
|
|
|
+ if(nowUpgrade >= 12 && nowUpgrade < 24){
|
|
|
|
+ nowUpgradeYear = Math.floor(nowUpgrade / 12);
|
|
|
|
+ nowUpgrade = nowUpgrade - 12;
|
|
|
|
+ }else if(nowUpgrade >= 24){
|
|
|
|
+ nowUpgradeYear = Math.floor(nowUpgrade / 12);
|
|
|
|
+ nowUpgrade = nowUpgrade - 24;
|
|
|
|
+ }
|
|
|
|
+ if(nowUpgrade >= 10){
|
|
|
|
+ nowUpgradeYear = nowUpgradeYear + 1;
|
|
|
|
+ nowUpgrade = 0;
|
|
|
|
+ }
|
|
|
|
+ console.log("year",nowUpgradeYear)
|
|
|
|
+ console.log("month",nowUpgrade)
|
|
|
|
+ //
|
|
|
|
+ if (nowUpgradeYear >= 1) {
|
|
|
|
+ let monthprice = getsubVipOrderPrice(area, buyerclass, [nowUpgrade, 2])
|
|
|
|
+ let yearprice = getsubVipOrderPrice(area, buyerclass, [nowUpgradeYear, 1])
|
|
|
|
+ oldPrice = yearprice + monthprice
|
|
|
|
+ if (monthprice == 0) {
|
|
|
|
+ oldMonthPrice = ((yearprice / nowUpgradeYear) / 10).toFixed(1);
|
|
|
|
+ oldYearPrice = (yearprice / nowUpgradeYear).toFixed(1);
|
|
|
|
+ } else {
|
|
|
|
+ oldMonthPrice = (monthprice / nowUpgrade).toFixed(1);
|
|
|
|
+ oldYearPrice = ((monthprice / nowUpgrade) * 10).toFixed(1);
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ oldPrice = getsubVipOrderPrice(area, buyerclass, [nowUpgrade, 2])
|
|
|
|
+ oldMonthPrice = (oldPrice / nowUpgrade)
|
|
|
|
+ oldYearPrice = ((oldPrice / nowUpgrade) * 10).toFixed(1);
|
|
|
|
+ }
|
|
|
|
+ console.log("oldYearPrice",oldYearPrice)
|
|
|
|
+ console.log("oldMonthPrice",oldMonthPrice)
|
|
|
|
+
|
|
|
|
+ //
|
|
|
|
+ if(nowUpgradeYear >= 1){
|
|
|
|
+ let yearprice = getsubVipOrderPrice(areasArr,industrysArr,[nowUpgradeYear,1]);
|
|
|
|
+ let monthprice = getsubVipOrderPrice(areasArr,industrysArr,[nowUpgrade,2]);
|
|
|
|
+ price = yearprice + monthprice;
|
|
|
|
+ if(monthprice === 0){
|
|
|
|
+ completeMonth = ((yearprice / nowUpgradeYear) / 10).toFixed(1);
|
|
|
|
+ completeYear = (yearprice / nowUpgradeYear).toFixed(1);
|
|
|
|
+ }else{
|
|
|
|
+ completeMonth = (monthprice / nowUpgrade).toFixed(1);
|
|
|
|
+ completeYear = ((monthprice / nowUpgrade)*10).toFixed(1);
|
|
|
|
+ }
|
|
|
|
+ console.log("yearprice",yearprice);
|
|
|
|
+ console.log("monthprice",monthprice);
|
|
|
|
+ console.log(">=1",price);
|
|
|
|
+ }else{
|
|
|
|
+ price = getsubVipOrderPrice(areasArr,industrysArr,[nowUpgrade,2]);
|
|
|
|
+ completeMonth = (price / nowUpgrade).toFixed(1);
|
|
|
|
+ completeYear = ((price / nowUpgrade)*10).toFixed(1);
|
|
|
|
+ console.log("<1",price)
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ console.log("oldPrice", oldPrice);
|
|
|
|
+ if(sessionStorage.vipSubSelectAreaUpgrade===undefined&&sessionStorage.vipSubSelectIndustryUpgrade===undefined){
|
|
|
|
+ completeMonth = oldMonthPrice
|
|
|
|
+ completeYear = oldYearPrice
|
|
|
|
+ }
|
|
|
|
+ console.log("completeMonth",completeMonth)
|
|
|
|
+ console.log("completeYear",completeYear)
|
|
|
|
+ if(sessionStorage.upgrade_cyclecount !== undefined && sessionStorage.upgrade_cycleunit !== undefined){
|
|
|
|
+ if(sessionStorage.upgrade_cycleunit === "1"){
|
|
|
|
+ let price = (Number(sessionStorage.upgrade_cyclecount)*completeYear).toFixed(1);
|
|
|
|
+ sessionStorage.upgrade_price = "¥"+price;
|
|
|
|
+ sessionStorage.proPrice = price;
|
|
|
|
+ }else if(sessionStorage.upgrade_cycleunit === "2"){
|
|
|
|
+ let price = (Number(sessionStorage.upgrade_cyclecount)*completeMonth).toFixed(1);
|
|
|
|
+ sessionStorage.upgrade_price = "¥"+price;
|
|
|
|
+ sessionStorage.proPrice = price;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ var cPrice = 0;
|
|
|
|
+ if(price>0){
|
|
|
|
+ var cPrice = (price - oldPrice).toFixed(1);
|
|
|
|
+ }
|
|
|
|
+ console.log(cPrice);
|
|
|
|
+ if(sessionStorage.proPrice!==""&&sessionStorage.proPrice!==undefined){
|
|
|
|
+ let proPrice = sessionStorage.proPrice;
|
|
|
|
+ console.log("proprice",proPrice);
|
|
|
|
+ cPrice = (Number(cPrice) + Number(proPrice)).toFixed(1);
|
|
|
|
+ }
|
|
|
|
+// if(effect === "notnow"){
|
|
|
|
+// cPrice = cPrice -(completeMonth - oldMonthPrice);
|
|
|
|
+// }
|
|
|
|
+ if(cPrice < 0){
|
|
|
|
+ cPrice = 0;
|
|
|
|
+ }
|
|
|
|
+ $(".finally_price").html("¥"+cPrice);
|
|
|
|
+ //
|
|
|
|
+ if (cPrice>0){
|
|
|
|
+ if(buyCheck){
|
|
|
|
+ $(".save_upgrade").removeAttr("disabled");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ FinallyPrice();
|
|
|
|
+ //
|
|
|
|
+ if(sessionStorage.upgrade_price!==""&&sessionStorage.upgrade_price!==undefined){
|
|
|
|
+ $(".computed_price").html(sessionStorage.upgrade_price);
|
|
|
|
+ }
|
|
|
|
+ if(sessionStorage.upgrade_finally_price!==""&&sessionStorage.upgrade_finally_price!==undefined){
|
|
|
|
+ $(".finally_price").html(sessionStorage.renew_finally_price);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //
|
|
|
|
+ $(".save_upgrade").on("click", function(){
|
|
|
|
+ $(".save_upgrade").attr("disabled","disabled")
|
|
|
|
+ let effective = $("#effect_date_name").text();
|
|
|
|
+ var effect = "now";
|
|
|
|
+ if(effective !== "立即生效,需支付当月费用差价"){
|
|
|
|
+ let nowDate = new Date().toLocaleDateString();
|
|
|
|
+ nowDate = nowDate.split("/");
|
|
|
|
+ let nowMonth = Number(nowDate[1]);
|
|
|
|
+ let nowYear = Number(nowDate[0]);
|
|
|
|
+ let a = nowMonth +1
|
|
|
|
+ if(a > 12){
|
|
|
|
+ a = nowMonth-12;
|
|
|
|
+ nowYear = nowYear +1;
|
|
|
|
+ }
|
|
|
|
+ let b = nowYear+"/"+a+"/1";
|
|
|
|
+ effect = new Date(b).getTime() /1000;
|
|
|
|
+ }
|
|
|
|
+ //
|
|
|
|
+ let areas = areasArr;
|
|
|
|
+ let industrys = industrysArr;
|
|
|
|
+ if(areas["全国"]){
|
|
|
|
+ areas={};
|
|
|
|
+ }
|
|
|
|
+ if(industrys.length==1&&industrys[0]=="全部行业"){
|
|
|
|
+ industrys=[];
|
|
|
|
+ }
|
|
|
|
+ //
|
|
|
|
+ let areaarr = area;
|
|
|
|
+ let industryarr = buyerclass;
|
|
|
|
+
|
|
|
|
+ //
|
|
|
|
+ let renew_time = $('.choose_item.lengthen .info').text();
|
|
|
|
+ let times = "";
|
|
|
|
+ if(renew_time !== "不延长"){
|
|
|
|
+ times = $('.choose_item.lengthen .info').text();
|
|
|
|
+ }
|
|
|
|
+ //
|
|
|
|
+ var param = {
|
|
|
|
+ "area": JSON.stringify(areas),
|
|
|
|
+ "industry": industrys.join(","),
|
|
|
|
+ "areas": JSON.stringify(areaarr),
|
|
|
|
+ "industryarr": industryarr.join(","),
|
|
|
|
+ "payWay": "wx_js",
|
|
|
|
+ "effect": effect,
|
|
|
|
+ "pay_source" : "Upgrade",
|
|
|
|
+ "time": times,
|
|
|
|
+ "nowUp": Number(nowRenew),
|
|
|
|
+ }
|
|
|
|
+ console.log(param)
|
|
|
|
+ $DoPost("/subscribepay/renewUpgrade/renewUpgradeCreateOrder",param,function(r){
|
|
|
|
+ if(r.success){
|
|
|
|
+ onBridgeReady(JSON.parse(r.data.res),r.data.code);
|
|
|
|
+ }
|
|
|
|
+ $(".save_upgrade").removeAttr("disabled");
|
|
|
|
+ })
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ //
|
|
|
|
+ function clearSessionStorage(){
|
|
|
|
+ sessionStorage.removeItem("upgrade_cyclecount");
|
|
|
|
+ sessionStorage.removeItem("upgrade_cycleunit");
|
|
|
|
+ sessionStorage.removeItem("upgrade_price");
|
|
|
|
+ sessionStorage.removeItem("proPrice");
|
|
|
|
+ sessionStorage.removeItem("vipSubSelectAreaUpgrade");
|
|
|
|
+ sessionStorage.removeItem("vipSubSelectIndustryUpgrade");
|
|
|
|
+ sessionStorage.removeItem("effectiveDate");
|
|
|
|
+ sessionStorage.removeItem("buyCheck");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //
|
|
|
|
+ //
|
|
|
|
+ function checkObj(obj) {
|
|
|
|
+ //检验数组
|
|
|
|
+ if (Array.prototype.isPrototypeOf(obj) && obj.length === 0) {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ //检验对象
|
|
|
|
+ if (Object.prototype.isPrototypeOf(obj) && Object.keys(obj).length === 0) {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ </script>
|
|
|
|
+</body>
|
|
|
|
+
|
|
|
|
+</html>
|