|
@@ -1,852 +1,882 @@
|
|
<html>
|
|
<html>
|
|
- <head>
|
|
|
|
- <meta charset="utf-8">
|
|
|
|
- <title>数据导出</title>
|
|
|
|
- <meta name="format-detection" content="telephone=no" />
|
|
|
|
- <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
|
|
|
- <meta name="apple-mobile-web-app-capable" content="yes">
|
|
|
|
- <meta name="apple-mobile-web-app-status-bar-style" content="black">
|
|
|
|
- <script src="{{Msg "seo" "cdn"}}/js/rem.js"></script>
|
|
|
|
- <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wx_dataExport/css/weui.min.css?v={{Msg "seo" "version"}}">
|
|
|
|
- <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/wx_dataExport/css/base.css?v={{Msg "seo" "version"}}" />
|
|
|
|
- <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/wx_dataExport/iconfont/iconfont.css?v={{Msg "seo" "version"}}" />
|
|
|
|
- <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wx_dataExport/css/pay_order.css?v={{Msg "seo" "version"}}35">
|
|
|
|
- <script src="{{Msg "seo" "cdn"}}/js/jquery-3.2.1.min.js"></script>
|
|
|
|
- <script src="{{Msg "seo" "cdn"}}/wx_dataExport/js/weui.min.js"></script>
|
|
|
|
- {{include "/common/weixin.html"}}
|
|
|
|
- <script>
|
|
|
|
- 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;
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- </script>
|
|
|
|
- </head>
|
|
|
|
- <body>
|
|
|
|
- <style>
|
|
|
|
- #code{
|
|
|
|
- margin-left: -0.2rem;
|
|
|
|
- }
|
|
|
|
- body{
|
|
|
|
- height: auto;
|
|
|
|
- overflow: auto;
|
|
|
|
- }
|
|
|
|
- </style>
|
|
|
|
- <div class="loading_" style="display:none;">
|
|
|
|
- <p><span></span></p>
|
|
|
|
- </div>
|
|
|
|
- <div id="pay_order">
|
|
|
|
- <main class="main">
|
|
|
|
- <div class="progress">
|
|
|
|
- <div class="p-item">
|
|
|
|
- <p class="p-item-icon">
|
|
|
|
- <i class="icon iconfont"></i>
|
|
|
|
- </p>
|
|
|
|
- <span class="active">条件筛选</span>
|
|
|
|
- <div class="line" style="background: #2CB7CA"></div>
|
|
|
|
- </div>
|
|
|
|
|
|
+<head>
|
|
|
|
+ <meta charset="utf-8">
|
|
|
|
+ <title>数据导出</title>
|
|
|
|
+ <meta name="format-detection" content="telephone=no"/>
|
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
|
|
|
+ <meta name="apple-mobile-web-app-capable" content="yes">
|
|
|
|
+ <meta name="apple-mobile-web-app-status-bar-style" content="black">
|
|
|
|
+ <script src="{{Msg "seo" "cdn"}}/js/rem.js"></script>
|
|
|
|
+ <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wx_dataExport/css/weui.min.css?v={{Msg "seo" "version"}}">
|
|
|
|
+ <link rel="stylesheet" type="text/css"
|
|
|
|
+ href="{{Msg "seo" "cdn"}}/wx_dataExport/css/base.css?v={{Msg "seo" "version"}}"/>
|
|
|
|
+ <link rel="stylesheet" type="text/css"
|
|
|
|
+ href="{{Msg "seo" "cdn"}}/wx_dataExport/iconfont/iconfont.css?v={{Msg "seo" "version"}}"/>
|
|
|
|
+ <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wx_dataExport/css/pay_order.css?v={{Msg "seo" "version"}}35">
|
|
|
|
+ <script src="{{Msg "seo" "cdn"}}/js/jquery-3.2.1.min.js"></script>
|
|
|
|
+ <script src="{{Msg "seo" "cdn"}}/wx_dataExport/js/weui.min.js"></script>
|
|
|
|
+ {{include "/common/weixin.html"}}
|
|
|
|
+ <script>
|
|
|
|
+ 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;
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ </script>
|
|
|
|
+</head>
|
|
|
|
+<body>
|
|
|
|
+<style>
|
|
|
|
+ #code {
|
|
|
|
+ margin-left: -0.2rem;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ body {
|
|
|
|
+ height: auto;
|
|
|
|
+ overflow: auto;
|
|
|
|
+ }
|
|
|
|
+</style>
|
|
|
|
+<div class="loading_" style="display:none;">
|
|
|
|
+ <p><span></span></p>
|
|
|
|
+</div>
|
|
|
|
+<div id="pay_order">
|
|
|
|
+ <main class="main">
|
|
|
|
+ <div class="progress">
|
|
|
|
+ <div class="p-item">
|
|
|
|
+ <p class="p-item-icon">
|
|
|
|
+ <i class="icon iconfont"></i>
|
|
|
|
+ </p>
|
|
|
|
+ <span class="active">条件筛选</span>
|
|
|
|
+ <div class="line" style="background: #2CB7CA"></div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="p-item">
|
|
|
|
+ <p class="p-item-icon">
|
|
|
|
+ <i class="icon iconfont"></i>
|
|
|
|
+ </p>
|
|
|
|
+ <span class="active">支付订单</span>
|
|
|
|
+ <div class="line"></div>
|
|
|
|
+ </div>
|
|
|
|
|
|
- <div class="p-item">
|
|
|
|
- <p class="p-item-icon">
|
|
|
|
- <i class="icon iconfont"></i>
|
|
|
|
|
|
+ <div class="p-item">
|
|
|
|
+ <p class="p-item-icon icon-gray">
|
|
|
|
+ <i class="icon iconfont"></i>
|
|
|
|
+ </p>
|
|
|
|
+ <span>数据导出</span>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="form">
|
|
|
|
+ <div class="form-item">
|
|
|
|
+ <div class="label-title">
|
|
|
|
+ <span class="left">已为您筛选 <strong id="msgCount">{{.T.msgCount}}</strong> 条数据</span>
|
|
|
|
+ <a href="javascript:history.go(-1)" class="right">返回筛选</a>
|
|
|
|
+ </div>
|
|
|
|
+ <!-- 选择字段包 -->
|
|
|
|
+ <div class="choose">
|
|
|
|
+ <div class="choose-item active">
|
|
|
|
+ <h2>标准字段包</h2>
|
|
|
|
+ <p>
|
|
|
|
+ <span class="initial">{{.T.unitPrice_normal}}元/条</span>
|
|
|
|
+ <span class="current">{{.T.unitPrice_normal_final}}元/条</span>
|
|
</p>
|
|
</p>
|
|
- <span class="active">支付订单</span>
|
|
|
|
- <div class="line"></div>
|
|
|
|
|
|
+ <!-- <i class="icon iconfont mark"></i> -->
|
|
|
|
+ <img class="mark" src="/wx_dataExport/images/mark.png">
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
- <div class="p-item">
|
|
|
|
- <p class="p-item-icon icon-gray">
|
|
|
|
- <i class="icon iconfont"></i>
|
|
|
|
|
|
+ <div class="choose-item">
|
|
|
|
+ <h2>
|
|
|
|
+ <i class="icon iconfont crown"></i>
|
|
|
|
+ <span>高级字段包</span>
|
|
|
|
+ </h2>
|
|
|
|
+ <p>
|
|
|
|
+ <span class="initial">{{.T.unitPrice_senior}}元/条</span>
|
|
|
|
+ <span class="current">{{.T.unitPrice_senior_final}}元/条</span>
|
|
</p>
|
|
</p>
|
|
- <span>数据导出</span>
|
|
|
|
|
|
+ <!-- <i class="icon iconfont mark"></i> -->
|
|
|
|
+ <img class="mark" src="/wx_dataExport/images/mark.png">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="form">
|
|
|
|
- <div class="form-item">
|
|
|
|
- <div class="label-title">
|
|
|
|
- <span class="left">已为您筛选 <strong id="msgCount">{{.T.msgCount}}</strong> 条数据</span>
|
|
|
|
- <a href="javascript:history.go(-1)" class="right">返回筛选</a>
|
|
|
|
- </div>
|
|
|
|
- <!-- 选择字段包 -->
|
|
|
|
- <div class="choose">
|
|
|
|
- <div class="choose-item active">
|
|
|
|
- <h2>标准字段包</h2>
|
|
|
|
- <p>
|
|
|
|
- <span class="initial">{{.T.unitPrice_normal}}元/条</span>
|
|
|
|
- <span class="current">{{.T.unitPrice_normal_final}}元/条</span>
|
|
|
|
- </p>
|
|
|
|
- <!-- <i class="icon iconfont mark"></i> -->
|
|
|
|
- <img class="mark" src="/wx_dataExport/images/mark.png">
|
|
|
|
- </div>
|
|
|
|
- <div class="choose-item">
|
|
|
|
- <h2>
|
|
|
|
- <i class="icon iconfont crown"></i>
|
|
|
|
- <span>高级字段包</span>
|
|
|
|
- </h2>
|
|
|
|
- <p>
|
|
|
|
- <span class="initial">{{.T.unitPrice_senior}}元/条</span>
|
|
|
|
- <span class="current">{{.T.unitPrice_senior_final}}元/条</span>
|
|
|
|
- </p>
|
|
|
|
- <!-- <i class="icon iconfont mark"></i> -->
|
|
|
|
- <img class="mark" src="/wx_dataExport/images/mark.png">
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <!-- 字段包提示 -->
|
|
|
|
- <div class="tips">
|
|
|
|
- <span>标准字段包、高级字段包</span>
|
|
|
|
- <i class="icon iconfont tips-icon" data-id="dialog"></i>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div class="form-item phone-number">
|
|
|
|
- <div class="form-control">
|
|
|
|
-<!-- <label for="">手机号:</label>-->
|
|
|
|
- <div class="input">
|
|
|
|
- <input type="text" class="phone_input" maxlength="11" placeholder="手机号" id="phone_input">
|
|
|
|
- <div id="devinput" style="top: -0.05rem;">
|
|
|
|
- <i class="icon iconfont phone_check_ok"></i>
|
|
|
|
- <span class="phone_err_msg">手机号不正确</span>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <p class="msg">*数据导出将发送至邮箱</p>
|
|
|
|
- <div class="form-item" id="verify">
|
|
|
|
- <div class="form-control">
|
|
|
|
-<!-- <label for="">邮箱:</label>-->
|
|
|
|
- <div class="input" id="email-input">
|
|
|
|
- <input type="text" class="email_input" placeholder="邮箱">
|
|
|
|
- <div id="devinput">
|
|
|
|
- <i class="icon iconfont email_check_ok"></i>
|
|
|
|
- <span class="email_err_msg">邮箱不正确</span>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div class="form-control" style="display: none;border-top: 1px solid #e0e0e0;margin-top: 0.06rem;" id="vCode">
|
|
|
|
-<!-- <label for="">验证码:</label>-->
|
|
|
|
- <div class="input" id="codeinput">
|
|
|
|
- <input type="text" value="" readonly=true class="verity_input" id="code" maxlength="6" placeholder="验证码">
|
|
|
|
- <div id="devinput">
|
|
|
|
- <i class="icon iconfont code_check_ok"></i>
|
|
|
|
- <span class="code_err_msg">验证码错误</span>
|
|
|
|
- </div>
|
|
|
|
- <button type="button" class="sendCode" disabled id="sendCode">发送验证码</button>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <!-- 字段包提示 -->
|
|
|
|
+ <div class="tips">
|
|
|
|
+ <span>标准字段包、高级字段包</span>
|
|
|
|
+ <i class="icon iconfont tips-icon" data-id="dialog"></i>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="form-item phone-number">
|
|
|
|
+ <div class="form-control">
|
|
|
|
+ <!-- <label for="">手机号:</label>-->
|
|
|
|
+ <div class="input">
|
|
|
|
+ <input type="text" class="phone_input" maxlength="11" placeholder="手机号" id="phone_input">
|
|
|
|
+ <div id="devinput" style="top: -0.05rem;">
|
|
|
|
+ <i class="icon iconfont phone_check_ok"></i>
|
|
|
|
+ <span class="phone_err_msg">手机号不正确</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="form-item" style="margin-top: .2rem;">
|
|
|
|
- <div class="way">
|
|
|
|
- <span>支付方式</span>
|
|
|
|
- <div class="way-right" id="choose_way"><span class="payment">微信支付</span><i class="iconfont icon-arrow icon-right"></i></div>
|
|
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <p class="msg">*数据导出将发送至邮箱</p>
|
|
|
|
+ <div class="form-item" id="verify">
|
|
|
|
+ <div class="form-control">
|
|
|
|
+ <!-- <label for="">邮箱:</label>-->
|
|
|
|
+ <div class="input" id="email-input">
|
|
|
|
+ <input type="text" class="email_input" placeholder="邮箱">
|
|
|
|
+ <div id="devinput">
|
|
|
|
+ <i class="icon iconfont email_check_ok"></i>
|
|
|
|
+ <span class="email_err_msg">邮箱不正确</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <p class="msg">购买须知:最低起售{{.T.orderMinPrice}}元;标准字段包:原价{{.T.unitPrice_normal}}元/条、{{.T.discount10}}折价{{.T.unitPrice_normal_final}}元/条计费;高级字段包:原价{{.T.unitPrice_senior}}元/条、{{.T.discount10}}折价{{.T.unitPrice_senior_final}}元/条计费;</p>
|
|
|
|
-
|
|
|
|
</div>
|
|
</div>
|
|
- </main>
|
|
|
|
- <div class="fixed-bottom-box" id="bottombox">
|
|
|
|
- <div class="weui-cells weui-cells_checkbox radio-form">
|
|
|
|
- <label class="weui-cell weui-check__label" for="s11">
|
|
|
|
- <div class="weui-cell__hd">
|
|
|
|
- <input type="checkbox" class="weui-check" name="checkbox1" id="s11" />
|
|
|
|
- <i class="weui-icon-checked"></i>
|
|
|
|
- </div>
|
|
|
|
- <div class="weui-cell__bd read">
|
|
|
|
- <p>我已阅读,理解并接受 <a onclick="toRead()" style="color:#2cb7ca">《剑鱼标讯线上购买与服务条款》</a></p>
|
|
|
|
- </div>
|
|
|
|
- </label>
|
|
|
|
- </div>
|
|
|
|
- <div class="price">
|
|
|
|
- <span class="pay_before"></span>
|
|
|
|
- <strong class="pay_discount"></strong>
|
|
|
|
- </div>
|
|
|
|
- <div class="form-btn">
|
|
|
|
- <button class="btn prew dataPreview">预览数据</button>
|
|
|
|
- <button class="btn enter toPay" disabled="disabled">确认支付</button>
|
|
|
|
|
|
+ <div class="form-control" style="display: none;border-top: 1px solid #e0e0e0;margin-top: 0.06rem;"
|
|
|
|
+ id="vCode">
|
|
|
|
+ <!-- <label for="">验证码:</label>-->
|
|
|
|
+ <div class="input" id="codeinput">
|
|
|
|
+ <input type="text" value="" readonly=true class="verity_input" id="code" maxlength="6"
|
|
|
|
+ placeholder="验证码">
|
|
|
|
+ <div id="devinput">
|
|
|
|
+ <i class="icon iconfont code_check_ok"></i>
|
|
|
|
+ <span class="code_err_msg">验证码错误</span>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
- <!-- 引用weui Dialog组件 -->
|
|
|
|
- <div class="js_dialog" id="tipDialog" style="display: none;">
|
|
|
|
- <div class="weui-mask"></div>
|
|
|
|
- <div class="weui-dialog">
|
|
|
|
- <div class="weui-dialog__bd">
|
|
|
|
- <h1 class="dialog-title">字段包说明</h1>
|
|
|
|
- <ul class="info">
|
|
|
|
- <li>
|
|
|
|
- <label>·标准字段包</label>
|
|
|
|
- <p>公告标题、公告内容、剑鱼标讯地址、省份、城市、发布时间、项目名称、采购单位、中标单位、中标价、币种、公告类别</p>
|
|
|
|
- </li>
|
|
|
|
- <li>
|
|
|
|
- <label>·高级字段包</label>
|
|
|
|
- <p>公告标题、公告内容、公告地址、剑鱼标讯地址、省份、城市、发布时间、项目名称、项目编号、采购单位、采购单位联系人、采购单位联系电话、预算、开标日期、中标单位、中标价、招标机构、项目范围、币种、公告类别</p>
|
|
|
|
- </li>
|
|
|
|
- </ul>
|
|
|
|
- </div>
|
|
|
|
- <div class="weui-dialog__ft">
|
|
|
|
- <a href="javascript:;" class="weui-dialog__btn weui-dialog__btn_primary">我知道了</a>
|
|
|
|
|
|
+ <button type="button" class="sendCode" disabled id="sendCode">发送验证码</button>
|
|
</div>
|
|
</div>
|
|
</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="/wx_dataExport/images/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="/wx_dataExport/images/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 class="form-item" style="margin-top: .2rem;">
|
|
|
|
+ <div class="way">
|
|
|
|
+ <span>支付方式</span>
|
|
|
|
+ <div class="way-right" id="choose_way"><span class="payment">微信支付</span><i
|
|
|
|
+ class="iconfont icon-arrow icon-right"></i></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- -->
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
- <script>
|
|
|
|
- //节后待处理:
|
|
|
|
- //用户输入邮箱验证,点击获取验证码,在没有输入验证码的情况下,1.点击预览或者条款,返回后存session的邮件缓存和剩余时间,(返回后页面不会读取后台新的剩余数量,需处理一下。)处理后清除。2.返回上一页,重新点击数据导出到此页面,之前填写的邮件缓存等已不存在,但是剩余时间还在,当下的处理是时间直接显示,存在缺陷,需要出现发送验证按钮 ,如果此次属于邮箱和上次属于邮箱一致,则剩余时间继续减少,否则,重新发送验证。
|
|
|
|
- //记录send_code_*改为发送验证码的时间-返回后重新计算剩余时间(同后台)。
|
|
|
|
- var userId={{session "userId"}}
|
|
|
|
- var msgCount={{.T.msgCount}}
|
|
|
|
- var msgMaxCount={{.T.msgMaxCount}}
|
|
|
|
- var discount={{.T.discount}}
|
|
|
|
- var unitPrice_normal={{.T.unitPrice_normal}}
|
|
|
|
- var unitPrice_senior={{.T.unitPrice_senior}}
|
|
|
|
- var orderMinPrice={{.T.orderMinPrice}}
|
|
|
|
- var finishEmailVerity=false;
|
|
|
|
- var readClause=false;
|
|
|
|
- var dataType=1;
|
|
|
|
- var finishPhoneVerity=false;
|
|
|
|
- //
|
|
|
|
- var email_lastInput={{.T.email}}
|
|
|
|
- var email_lastVerity={{.T.timeSpaceing}}
|
|
|
|
- var previewDataTime={{.T.PreviewData}}
|
|
|
|
- var phone_lastInput={{.T.phone}}
|
|
|
|
- var dataspec={{.T.dataspec}}
|
|
|
|
- //可以支付
|
|
|
|
- var canpay=true;
|
|
|
|
- //订单编号
|
|
|
|
- var order_code = "";
|
|
|
|
- //
|
|
|
|
- var regInt = /[0-9]/;
|
|
|
|
- var lstimes =0;
|
|
|
|
- //处理苹果留白
|
|
|
|
- (/iphone|ipod|ipad/i.test(navigator.appVersion)) && document.addEventListener('blur', (e) => {
|
|
|
|
- // 这里加了个类型判断,因为a等元素也会触发blur事件
|
|
|
|
- ['input', 'textarea'].includes(e.target.localName) && document.body.scrollIntoView(false)
|
|
|
|
- }, true)
|
|
|
|
- //
|
|
|
|
- function accMul(arg1,arg2){
|
|
|
|
- var m=0,s1=arg1.toString(),s2=arg2.toString();
|
|
|
|
- try{m+=s1.split(".")[1].length}catch(e){}
|
|
|
|
- try{m+=s2.split(".")[1].length}catch(e){}
|
|
|
|
- return parseInt(Number(s1.replace(".",""))*Number(s2.replace(".",""))/Math.pow(10,m).toString()*100)/Math.pow(10,2);
|
|
|
|
- }
|
|
|
|
- //
|
|
|
|
- function FormatNum(n){
|
|
|
|
- if(n>=1000){
|
|
|
|
- return Math.floor(n/1000)+","+("0000"+n%1000).slice(-3)
|
|
|
|
- }
|
|
|
|
- return n
|
|
|
|
- }
|
|
|
|
- //
|
|
|
|
- function ChangePayMoney(){
|
|
|
|
- var shouldPay=0;var beforePay=0;
|
|
|
|
- if(dataType==1){
|
|
|
|
- beforePay=accMul(unitPrice_normal,msgCount)
|
|
|
|
- shouldPay=accMul(beforePay,discount)
|
|
|
|
- }else if(dataType==2){
|
|
|
|
- beforePay=accMul(unitPrice_senior,msgCount)
|
|
|
|
- shouldPay=accMul(beforePay,discount)
|
|
|
|
- }
|
|
|
|
- shouldPay=shouldPay>orderMinPrice?shouldPay:orderMinPrice;
|
|
|
|
- beforePay=beforePay>orderMinPrice?beforePay:orderMinPrice;
|
|
|
|
- $(".pay_discount").text("¥"+shouldPay);
|
|
|
|
- $(".pay_before").text("¥"+beforePay)
|
|
|
|
- }
|
|
|
|
- //
|
|
|
|
- function toRead(){
|
|
|
|
- event.preventDefault();
|
|
|
|
- if(regInt.test($(".sendCode").text())){
|
|
|
|
- var email_input = $(".email_input").val().replace(/\s*/g, "");
|
|
|
|
-// if (/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/.test(email_input)){
|
|
|
|
-// sessionStorage.setItem("send_email_"+{{.T._id}}, $(".email_input").val().replace(/\s*/g,""));
|
|
|
|
-// }
|
|
|
|
- }
|
|
|
|
- if($("#phone_input").val()){
|
|
|
|
- sessionStorage.setItem("order_phone"+{{.T._id}}, $("#phone_input").val().replace(/\s*/g,""));
|
|
|
|
- }
|
|
|
|
- window.location.href="/front/staticPage/wx-serviceterms.html";
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- //
|
|
|
|
- $(function() {
|
|
|
|
- //记录用户上次选择的字段包 1标准2高级
|
|
|
|
- if(dataspec){
|
|
|
|
- if(dataspec=="1"){
|
|
|
|
- $(".choose").children().eq(0).addClass("active");
|
|
|
|
- $(".choose").children().eq(1).removeClass("active");
|
|
|
|
- dataType=1;
|
|
|
|
- }else if(dataspec=="2"){
|
|
|
|
- $(".choose").children().eq(1).addClass("active");
|
|
|
|
- $(".choose").children().eq(0).removeClass("active");
|
|
|
|
- dataType=2;
|
|
|
|
- }
|
|
|
|
- ChangePayMoney();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if(sessionStorage.index=="1"){
|
|
|
|
- $(".choose .choose-item").eq(sessionStorage.index).addClass("active").siblings().removeClass("active");
|
|
|
|
- dataType=2;
|
|
|
|
- }
|
|
|
|
- ChangePayMoney();
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- var oHeight = $(document).height(); //浏览器当前的高度
|
|
|
|
- if(!mySysIsIos()){
|
|
|
|
- //软键盘弹起
|
|
|
|
- var isInFocus = false;
|
|
|
|
- var timeObj = null;
|
|
|
|
- $("input").click(function(){
|
|
|
|
- isInFocus = true;
|
|
|
|
- $("#bottombox").hide();
|
|
|
|
- if(timeObj != null){
|
|
|
|
- clearTimeout(timeObj);
|
|
|
|
- }
|
|
|
|
- timeObj = setTimeout(function(){
|
|
|
|
- isInFocus = false;
|
|
|
|
- },500);
|
|
|
|
- }).blur(function(){
|
|
|
|
- isInFocus = false;
|
|
|
|
- $("#bottombox").show();
|
|
|
|
- });
|
|
|
|
- $(window).resize(function(){
|
|
|
|
- if(!isInFocus && $("#bottombox").is(":hidden")){
|
|
|
|
- $("#bottombox").show();
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ <p class="msg">购买须知:最低起售<span></span>元;标准字段包:原价<span></span>元/条、<span></span>
|
|
|
|
+ 折价<span></span>元/条计费;高级字段包:原价<span></span>元/条、<span></span>
|
|
|
|
+ 折价<span></span>元/条计费;</p>
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+ </main>
|
|
|
|
+ <div class="fixed-bottom-box" id="bottombox">
|
|
|
|
+ <div class="weui-cells weui-cells_checkbox radio-form">
|
|
|
|
+ <label class="weui-cell weui-check__label" for="s11">
|
|
|
|
+ <div class="weui-cell__hd">
|
|
|
|
+ <input type="checkbox" class="weui-check" name="checkbox1" id="s11"/>
|
|
|
|
+ <i class="weui-icon-checked"></i>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="weui-cell__bd read">
|
|
|
|
+ <p>我已阅读,理解并接受 <a onclick="toRead()" style="color:#2cb7ca">《剑鱼标讯线上购买与服务条款》</a></p>
|
|
|
|
+ </div>
|
|
|
|
+ </label>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="price">
|
|
|
|
+ <span class="pay_before"></span>
|
|
|
|
+ <strong class="pay_discount"></strong>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="form-btn">
|
|
|
|
+ <button class="btn prew dataPreview">预览数据</button>
|
|
|
|
+ <button class="btn enter toPay" disabled="disabled">确认支付</button>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <!-- 引用weui Dialog组件 -->
|
|
|
|
+ <div class="js_dialog" id="tipDialog" style="display: none;">
|
|
|
|
+ <div class="weui-mask"></div>
|
|
|
|
+ <div class="weui-dialog">
|
|
|
|
+ <div class="weui-dialog__bd">
|
|
|
|
+ <h1 class="dialog-title">字段包说明</h1>
|
|
|
|
+ <ul class="info">
|
|
|
|
+ <li>
|
|
|
|
+ <label>·标准字段包</label>
|
|
|
|
+ <p>公告标题、公告内容、剑鱼标讯地址、省份、城市、发布时间、项目名称、采购单位、中标单位、中标价、币种、公告类别</p>
|
|
|
|
+ </li>
|
|
|
|
+ <li>
|
|
|
|
+ <label>·高级字段包</label>
|
|
|
|
+ <p>
|
|
|
|
+ 公告标题、公告内容、公告地址、剑鱼标讯地址、省份、城市、发布时间、项目名称、项目编号、采购单位、采购单位联系人、采购单位联系电话、预算、开标日期、中标单位、中标价、招标机构、项目范围、币种、公告类别</p>
|
|
|
|
+ </li>
|
|
|
|
+ </ul>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="weui-dialog__ft">
|
|
|
|
+ <a href="javascript:;" class="weui-dialog__btn weui-dialog__btn_primary">我知道了</a>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+</div>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+ //节后待处理:
|
|
|
|
+ //用户输入邮箱验证,点击获取验证码,在没有输入验证码的情况下,1.点击预览或者条款,返回后存session的邮件缓存和剩余时间,(返回后页面不会读取后台新的剩余数量,需处理一下。)处理后清除。2.返回上一页,重新点击数据导出到此页面,之前填写的邮件缓存等已不存在,但是剩余时间还在,当下的处理是时间直接显示,存在缺陷,需要出现发送验证按钮 ,如果此次属于邮箱和上次属于邮箱一致,则剩余时间继续减少,否则,重新发送验证。
|
|
|
|
+ //记录send_code_*改为发送验证码的时间-返回后重新计算剩余时间(同后台)。
|
|
|
|
+ var userId ={{session "userId"}}
|
|
|
|
+ var msgCount ={{.T.msgCount}}
|
|
|
|
+
|
|
|
|
+ var msgMaxCount, discount, unitPrice_normal, unitPrice_senior, orderMinPrice;
|
|
|
|
+
|
|
|
|
+ var finishEmailVerity = false;
|
|
|
|
+ var readClause = false;
|
|
|
|
+ var dataType = 1;
|
|
|
|
+ var finishPhoneVerity = false;
|
|
|
|
+ //
|
|
|
|
+ var email_lastInput ={{.T.email}}
|
|
|
|
+ var email_lastVerity ={{.T.timeSpaceing}}
|
|
|
|
+ var previewDataTime ={{.T.PreviewData}}
|
|
|
|
+ var phone_lastInput ={{.T.phone}}
|
|
|
|
+ var dataspec ={{.T.dataspec}}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ //可以支付
|
|
|
|
+ var canpay = true;
|
|
|
|
+ //订单编号
|
|
|
|
+ var order_code = "";
|
|
|
|
+ //
|
|
|
|
+ var regInt = /[0-9]/;
|
|
|
|
+ var lstimes = 0;
|
|
|
|
+ //处理苹果留白
|
|
|
|
+ (/iphone|ipod|ipad/i.test(navigator.appVersion)) && document.addEventListener('blur', (e) => {
|
|
|
|
+ // 这里加了个类型判断,因为a等元素也会触发blur事件
|
|
|
|
+ ['input', 'textarea'].includes(e.target.localName) && document.body.scrollIntoView(false)
|
|
|
|
+ }, true)
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ $(function () {
|
|
|
|
+
|
|
|
|
+ //加载价格
|
|
|
|
+ $.ajax({
|
|
|
|
+ url: "/jypay/dataexport/getPrice",
|
|
|
|
+ type: "POST",
|
|
|
|
+ async: false,
|
|
|
|
+ dataType: "json",
|
|
|
|
+ success: function (r) {
|
|
|
|
+ if (r) {
|
|
|
|
+ discount = r.discount;
|
|
|
|
+ msgMaxCount = r.unitPrice_normal;
|
|
|
|
+ orderMinPrice = r.orderMinPrice;
|
|
|
|
+ unitPrice_normal = r.unitPrice_normal;
|
|
|
|
+ unitPrice_senior = r.unitPrice_senior;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ //数据规格
|
|
|
|
+ $(".initial:eq(0)").text(unitPrice_normal + "元/条");
|
|
|
|
+ $(".current:eq(0)").text(unitPrice_normal * discount + "元/条");
|
|
|
|
+ $(".initial:eq(1)").text(unitPrice_senior + "元/条");
|
|
|
|
+ $(".current:eq(1)").text(unitPrice_senior * discount + "元/条");
|
|
|
|
+ //购买须知
|
|
|
|
+ $(".msg span:eq(0)").text(orderMinPrice);
|
|
|
|
+ $(".msg span:eq(1)").text(unitPrice_normal);
|
|
|
|
+ $(".msg span:eq(2)").text(discount*10);
|
|
|
|
+ $(".msg span:eq(3)").text(discount*unitPrice_normal);
|
|
|
|
+
|
|
|
|
+ $(".msg span:eq(4)").text(unitPrice_senior);
|
|
|
|
+ $(".msg span:eq(5)").text(discount*10);
|
|
|
|
+ $(".msg span:eq(6)").text(discount*unitPrice_senior);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ //记录用户上次选择的字段包 1标准2高级
|
|
|
|
+ if (dataspec) {
|
|
|
|
+ if (dataspec == "1") {
|
|
|
|
+ $(".choose").children().eq(0).addClass("active");
|
|
|
|
+ $(".choose").children().eq(1).removeClass("active");
|
|
|
|
+ dataType = 1;
|
|
|
|
+ } else if (dataspec == "2") {
|
|
|
|
+ $(".choose").children().eq(1).addClass("active");
|
|
|
|
+ $(".choose").children().eq(0).removeClass("active");
|
|
|
|
+ dataType = 2;
|
|
|
|
+ }
|
|
|
|
+ ChangePayMoney();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (sessionStorage.index == "1") {
|
|
|
|
+ $(".choose .choose-item").eq(sessionStorage.index).addClass("active").siblings().removeClass("active");
|
|
|
|
+ dataType = 2;
|
|
|
|
+ }
|
|
|
|
+ ChangePayMoney();
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ var oHeight = $(document).height(); //浏览器当前的高度
|
|
|
|
+ if (!mySysIsIos()) {
|
|
|
|
+ //软键盘弹起
|
|
|
|
+ var isInFocus = false;
|
|
|
|
+ var timeObj = null;
|
|
|
|
+ $("input").click(function () {
|
|
|
|
+ isInFocus = true;
|
|
|
|
+ $("#bottombox").hide();
|
|
|
|
+ if (timeObj != null) {
|
|
|
|
+ clearTimeout(timeObj);
|
|
|
|
+ }
|
|
|
|
+ timeObj = setTimeout(function () {
|
|
|
|
+ isInFocus = false;
|
|
|
|
+ }, 500);
|
|
|
|
+ }).blur(function () {
|
|
|
|
+ isInFocus = false;
|
|
|
|
+ $("#bottombox").show();
|
|
|
|
+ });
|
|
|
|
+ $(window).resize(function () {
|
|
|
|
+ if (!isInFocus && $("#bottombox").is(":hidden")) {
|
|
|
|
+ $("#bottombox").show();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
// alert(sessionStorage.getItem("send_email_"+userId)!=null)
|
|
// alert(sessionStorage.getItem("send_email_"+userId)!=null)
|
|
// alert(sessionStorage.getItem("send_code_"+{{.T._id}})!=null)
|
|
// alert(sessionStorage.getItem("send_code_"+{{.T._id}})!=null)
|
|
// alert(sessionStorage.getItem("send_email_"+userId)==null)
|
|
// alert(sessionStorage.getItem("send_email_"+userId)==null)
|
|
// alert(localStorage.getItem("new_email_"+userId)!=null)
|
|
// alert(localStorage.getItem("new_email_"+userId)!=null)
|
|
- //缓存 1.如果有sessionStorage邮箱 先显示此邮箱 再发送邮箱五分钟内 显示验证码输入框 2.如果没有 显示localStorage邮箱 3.如果都没得 显示email_lastInput数据库中邮箱
|
|
|
|
|
|
+ //缓存 1.如果有sessionStorage邮箱 先显示此邮箱 再发送邮箱五分钟内 显示验证码输入框 2.如果没有 显示localStorage邮箱 3.如果都没得 显示email_lastInput数据库中邮箱
|
|
// if((sessionStorage.getItem("send_email_"+userId)!=null)&&(sessionStorage.getItem("send_code_"+{{.T._id}})!=null)){
|
|
// if((sessionStorage.getItem("send_email_"+userId)!=null)&&(sessionStorage.getItem("send_code_"+{{.T._id}})!=null)){
|
|
- if((sessionStorage.getItem("send_email_"+userId)!=null)&&(sessionStorage.getItem("send_code_"+userId)!=null)){
|
|
|
|
- //alert("1")
|
|
|
|
- $(".email_check_ok").hide();
|
|
|
|
- $(".email_input").parents('div.form-control').siblings().slideDown();
|
|
|
|
- $(".email_input").val(sessionStorage.getItem("send_email_"+userId));
|
|
|
|
- lstimes = parseInt(sessionStorage.getItem("send_code_"+userId));
|
|
|
|
- $(".verity_input").removeAttr("readonly");
|
|
|
|
- lstimes = lstimes - Date.parse(new Date())/1000 + 60*5;
|
|
|
|
- if (lstimes>0){
|
|
|
|
- sendemailTimer(lstimes);
|
|
|
|
- }
|
|
|
|
- //.getItem("new_email_"+userId)!=null)
|
|
|
|
- }else if((sessionStorage.getItem("send_email_"+userId)==null)&&(localStorage.getItem("new_email_"+userId)!=null)){
|
|
|
|
- //alert("2")
|
|
|
|
- $(".email_check_ok").show();
|
|
|
|
- $(".email_input").val(localStorage.getItem("new_email_"+userId));
|
|
|
|
- finishEmailVerity = true;
|
|
|
|
- }else if (email_lastInput!=""){
|
|
|
|
- //alert("~~")
|
|
|
|
- $(".email_check_ok").show();
|
|
|
|
- $(".email_input").val(email_lastInput);
|
|
|
|
- finishEmailVerity = true;
|
|
|
|
- }else{
|
|
|
|
- $(".email_input").val("");
|
|
|
|
- }
|
|
|
|
- if(email_lastVerity>0){
|
|
|
|
- sendemailTimer(email_lastVerity);
|
|
|
|
- $(".verity_input").removeAttr("readonly");
|
|
|
|
- }else if(lstimes>0){
|
|
|
|
- sendemailTimer(lstimes);
|
|
|
|
- $(".verity_input").removeAttr("readonly");
|
|
|
|
- }
|
|
|
|
- if (sessionStorage.getItem("order_phone"+{{.T._id}})!=null){
|
|
|
|
- if((/^[1][3-9][0-9]{9}$/.test(sessionStorage.getItem("order_phone"+{{.T._id}})))){
|
|
|
|
- $(".phone_check_ok").show();
|
|
|
|
- $(".phone_input").val(sessionStorage.getItem("order_phone"+{{.T._id}}));
|
|
|
|
- finishPhoneVerity=true;
|
|
|
|
- }else{
|
|
|
|
- $(".phone_err_msg").show();
|
|
|
|
- $(".phone_check_ok").hide();
|
|
|
|
- finishPhoneVerity = false;
|
|
|
|
- $(".toPay").attr("disabled", "disabled");
|
|
|
|
- }
|
|
|
|
- }else if(phone_lastInput!=""){
|
|
|
|
- $(".phone_check_ok").show();
|
|
|
|
- $(".phone_input").val(phone_lastInput);
|
|
|
|
- finishPhoneVerity=true;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if(readClause&&finishPhoneVerity&&finishEmailVerity){
|
|
|
|
- $(".toPay").removeAttr("disabled")
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- //判断支付按钮状态
|
|
|
|
- if((sessionStorage.readClause=="true")&&finishPhoneVerity&&finishEmailVerity){
|
|
|
|
- //刷新
|
|
|
|
- if($(".fixed-bottom-box .weui-check").is(":checked")){
|
|
|
|
- $(".toPay").removeAttr("disabled")
|
|
|
|
- readClause=true;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- //数据展示
|
|
|
|
- if (sessionStorage.getItem("order_spec"+{{.T._id}})!=null){
|
|
|
|
- dataType = sessionStorage.getItem("order_spec"+{{.T._id}});
|
|
|
|
- }
|
|
|
|
- if(dataType==1){
|
|
|
|
- $(".switch-dataType .bz").addClass("active")
|
|
|
|
- $(".switch-dataType .gj").removeClass("active")
|
|
|
|
- }else{
|
|
|
|
- $(".switch-dataType .bz").removeClass("active")
|
|
|
|
- $(".switch-dataType .gj").addClass("active")
|
|
|
|
- }
|
|
|
|
- //
|
|
|
|
- $('.choose .choose-item').each(function() {
|
|
|
|
- var index = $(this).index();
|
|
|
|
- $(this).click(function() {
|
|
|
|
- //类型切换
|
|
|
|
- $(this).addClass("active").siblings().removeClass("active");
|
|
|
|
- if(index==0){
|
|
|
|
- dataType=1;
|
|
|
|
- }else if(index==1){
|
|
|
|
- dataType=2;
|
|
|
|
- }
|
|
|
|
- sessionStorage.index=index;
|
|
|
|
- ChangePayMoney();
|
|
|
|
|
|
+ if ((sessionStorage.getItem("send_email_" + userId) != null) && (sessionStorage.getItem("send_code_" + userId) != null)) {
|
|
|
|
+ //alert("1")
|
|
|
|
+ $(".email_check_ok").hide();
|
|
|
|
+ $(".email_input").parents('div.form-control').siblings().slideDown();
|
|
|
|
+ $(".email_input").val(sessionStorage.getItem("send_email_" + userId));
|
|
|
|
+ lstimes = parseInt(sessionStorage.getItem("send_code_" + userId));
|
|
|
|
+ $(".verity_input").removeAttr("readonly");
|
|
|
|
+ lstimes = lstimes - Date.parse(new Date()) / 1000 + 60 * 5;
|
|
|
|
+ if (lstimes > 0) {
|
|
|
|
+ sendemailTimer(lstimes);
|
|
|
|
+ }
|
|
|
|
+ //.getItem("new_email_"+userId)!=null)
|
|
|
|
+ } else if ((sessionStorage.getItem("send_email_" + userId) == null) && (localStorage.getItem("new_email_" + userId) != null)) {
|
|
|
|
+ //alert("2")
|
|
|
|
+ $(".email_check_ok").show();
|
|
|
|
+ $(".email_input").val(localStorage.getItem("new_email_" + userId));
|
|
|
|
+ finishEmailVerity = true;
|
|
|
|
+ } else if (email_lastInput != "") {
|
|
|
|
+ //alert("~~")
|
|
|
|
+ $(".email_check_ok").show();
|
|
|
|
+ $(".email_input").val(email_lastInput);
|
|
|
|
+ finishEmailVerity = true;
|
|
|
|
+ } else {
|
|
|
|
+ $(".email_input").val("");
|
|
|
|
+ }
|
|
|
|
+ if (email_lastVerity > 0) {
|
|
|
|
+ sendemailTimer(email_lastVerity);
|
|
|
|
+ $(".verity_input").removeAttr("readonly");
|
|
|
|
+ } else if (lstimes > 0) {
|
|
|
|
+ sendemailTimer(lstimes);
|
|
|
|
+ $(".verity_input").removeAttr("readonly");
|
|
|
|
+ }
|
|
|
|
+ if (sessionStorage.getItem("order_phone" +{{.T._id}}) != null) {
|
|
|
|
+ if ((/^[1][3-9][0-9]{9}$/.test(sessionStorage.getItem("order_phone" +{{.T._id}})))) {
|
|
|
|
+ $(".phone_check_ok").show();
|
|
|
|
+ $(".phone_input").val(sessionStorage.getItem("order_phone" +{{.T._id}}));
|
|
|
|
+ finishPhoneVerity = true;
|
|
|
|
+ } else {
|
|
|
|
+ $(".phone_err_msg").show();
|
|
|
|
+ $(".phone_check_ok").hide();
|
|
|
|
+ finishPhoneVerity = false;
|
|
|
|
+ $(".toPay").attr("disabled", "disabled");
|
|
|
|
+ }
|
|
|
|
+ } else if (phone_lastInput != "") {
|
|
|
|
+ $(".phone_check_ok").show();
|
|
|
|
+ $(".phone_input").val(phone_lastInput);
|
|
|
|
+ finishPhoneVerity = true;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (readClause && finishPhoneVerity && finishEmailVerity) {
|
|
|
|
+ $(".toPay").removeAttr("disabled")
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //判断支付按钮状态
|
|
|
|
+ if ((sessionStorage.readClause == "true") && finishPhoneVerity && finishEmailVerity) {
|
|
|
|
+ //刷新
|
|
|
|
+ if ($(".fixed-bottom-box .weui-check").is(":checked")) {
|
|
|
|
+ $(".toPay").removeAttr("disabled")
|
|
|
|
+ readClause = true;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //数据展示
|
|
|
|
+ if (sessionStorage.getItem("order_spec" +{{.T._id}}) != null) {
|
|
|
|
+ dataType = sessionStorage.getItem("order_spec" +{{.T._id}});
|
|
|
|
+ }
|
|
|
|
+ if (dataType == 1) {
|
|
|
|
+ $(".switch-dataType .bz").addClass("active")
|
|
|
|
+ $(".switch-dataType .gj").removeClass("active")
|
|
|
|
+ } else {
|
|
|
|
+ $(".switch-dataType .bz").removeClass("active")
|
|
|
|
+ $(".switch-dataType .gj").addClass("active")
|
|
|
|
+ }
|
|
|
|
+ //
|
|
|
|
+ $('.choose .choose-item').each(function () {
|
|
|
|
+ var index = $(this).index();
|
|
|
|
+ $(this).click(function () {
|
|
|
|
+ //类型切换
|
|
|
|
+ $(this).addClass("active").siblings().removeClass("active");
|
|
|
|
+ if (index == 0) {
|
|
|
|
+ dataType = 1;
|
|
|
|
+ } else if (index == 1) {
|
|
|
|
+ dataType = 2;
|
|
|
|
+ }
|
|
|
|
+ sessionStorage.index = index;
|
|
|
|
+ ChangePayMoney();
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ $('.tips-icon').on('click', function () {
|
|
|
|
+ $('#tipDialog').show(200);
|
|
|
|
+ $('.weui-dialog__btn_primary').click(function () {
|
|
|
|
+ $('#tipDialog').hide(200);
|
|
|
|
+ })
|
|
|
|
+ });
|
|
|
|
+ //手机号输入监控
|
|
|
|
+ var Verification = {
|
|
|
|
+ //手机号验证
|
|
|
|
+ isPhone: function (value) {
|
|
|
|
+ return /^[1][3-9][0-9]{9}$/.test(value);
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+ $(".phone_input").on("input propertychange", function () {
|
|
|
|
+ var phone_input = $(this).val().replace(/\s*/g, "");
|
|
|
|
+ if (phone_input.length == 11) {
|
|
|
|
+ if (Verification.isPhone(phone_input)) {
|
|
|
|
+ $.post("/front/dataExport/checkPhoneVerify", {"phone": phone_input}, function (data) {
|
|
|
|
+ if (data.success) {
|
|
|
|
+ $(".phone_check_ok").show();
|
|
|
|
+ $(".phone_err_msg").hide();
|
|
|
|
+ finishPhoneVerity = true;
|
|
|
|
+ if (readClause && finishEmailVerity) {
|
|
|
|
+ $(".toPay").removeAttr("disabled")
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ $(".phone_err_msg").show();
|
|
|
|
+ $(".phone_check_ok").hide();
|
|
|
|
+ finishPhoneVerity = false;
|
|
|
|
+ $(".toPay").attr("disabled", "disabled");
|
|
|
|
+ }
|
|
})
|
|
})
|
|
|
|
+ } else {
|
|
|
|
+ $(".phone_err_msg").show();
|
|
|
|
+ $(".phone_check_ok").hide();
|
|
|
|
+ finishPhoneVerity = false;
|
|
|
|
+ $(".toPay").attr("disabled", "disabled");
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ $(".phone_err_msg").hide();
|
|
|
|
+ $(".phone_check_ok").hide();
|
|
|
|
+ finishPhoneVerity = false;
|
|
|
|
+ $(".toPay").attr("disabled", "disabled");
|
|
|
|
+ }
|
|
|
|
+ }).blur(function () {
|
|
|
|
+ var phone_input = $(this).val().replace(/\s*/g, "");
|
|
|
|
+ if (phone_input.length != 11 && phone_input.length != 0) {
|
|
|
|
+ $(".phone_err_msg").show();
|
|
|
|
+ $(".phone_check_ok").hide();
|
|
|
|
+ finishPhoneVerity = false;
|
|
|
|
+ $(".toPay").attr("disabled", "disabled");
|
|
|
|
+ }
|
|
|
|
+ }).on("focus", function () {
|
|
|
|
+ this.scrollIntoView();
|
|
|
|
+ });
|
|
|
|
+ //邮箱输入监控
|
|
|
|
+ $(".email_input").on("input propertychange", function () {
|
|
|
|
+ var email_input = $(this).val().replace(/\s*/g, "");
|
|
|
|
+ if (email_input.indexOf("@") > 0) {
|
|
|
|
+ if (email_input != email_lastInput) {
|
|
|
|
+ $(this).parents('div.form-control').siblings().slideDown();
|
|
|
|
+ if (email_lastVerity > 0) {
|
|
|
|
+ $("#sendCode").attr("disabled", true);
|
|
|
|
+ //返回后验证码可输入
|
|
|
|
+ if ((localStorage.getItem("new_email_" + userId) != null) && (localStorage.getItem("new_email_" + userId) == email_input)) {
|
|
|
|
+ $(".verity_input").attr("readonly", false);
|
|
|
|
+ } else {
|
|
|
|
+ if (email_lastVerity > 0) {
|
|
|
|
+ $(".verity_input").removeAttr("readonly");
|
|
|
|
+ } else if (lstimes > 0) {
|
|
|
|
+ $(".verity_input").removeAttr("readonly");
|
|
|
|
+ } else {
|
|
|
|
+ $(".verity_input").attr("readonly", true);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ //新用户输入后 从新进来
|
|
|
|
+ $(".verity_input").prop("readonly", false);
|
|
|
|
+ $("#sendCode").prop("disabled", true);
|
|
|
|
+ }
|
|
|
|
+ finishEmailVerity = false;
|
|
|
|
+ $(".toPay").attr("disabled", "disabled");
|
|
|
|
+ if (/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/.test(email_input)) {
|
|
|
|
+ lstimes_ = parseInt(sessionStorage.getItem("send_code_" + userId));
|
|
|
|
+ lstimes_ = lstimes_ - Date.parse(new Date()) / 1000 + 60 * 5;
|
|
|
|
+ if (lstimes_ > 0) {
|
|
|
|
+ $("#sendCode").prop("disabled", true);
|
|
|
|
+ } else {
|
|
|
|
+ $("#sendCode").prop("disabled", false);
|
|
|
|
+ }
|
|
|
|
+ $(".email_err_msg").hide();
|
|
|
|
+ $(".email_check_ok").hide();
|
|
|
|
+ } else {
|
|
|
|
+ $("#sendCode").attr("disabled", true);
|
|
|
|
+ $(".email_check_ok").hide();
|
|
|
|
+ $(".email_err_msg").hide();
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ finishEmailVerity = true;
|
|
|
|
+ if (readClause && finishPhoneVerity) {
|
|
|
|
+ $(".toPay").removeAttr("disabled")
|
|
|
|
+ }
|
|
|
|
+ $("#sendCode").attr("disabled", "disabled");
|
|
|
|
+ $(".verity_input").attr("readonly", true);
|
|
|
|
+ $(".email_err_msg").hide();
|
|
|
|
+ $(".email_check_ok").show();
|
|
|
|
+ //验证通过后 存 localStorage邮箱 此邮箱为验证通过的邮箱 并清除sessionStorage发送验证码的邮箱
|
|
|
|
+ localStorage.setItem("new_email_" + userId, $(".email_input").val().replace(/\s*/g, ""));
|
|
|
|
+ sessionStorage.removeItem("send_email_" + userId);
|
|
|
|
+ $(this).parents('div.form-control').siblings().slideUp();
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ $(this).parents('div.form-control').siblings().slideUp();
|
|
|
|
+ $("#sendCode").attr("disabled", "disabled");
|
|
|
|
+ $(".verity_input").attr("readonly", true);
|
|
|
|
+ $(".email_err_msg").hide();
|
|
|
|
+ $(".email_check_ok").hide();
|
|
|
|
+ }
|
|
|
|
+ }).blur(function () {
|
|
|
|
+ var email = $(".email_input").val().replace(/\s*/g, "");
|
|
|
|
+ if (!/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/.test(email) && ($(".email_input").val().length != 0)) {
|
|
|
|
+ $(".email_err_msg").show();
|
|
|
|
+ $(".email_check_ok").hide();
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if ($(".email_input").val() == email) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ $("#sendCode").removeAttr("disabled");
|
|
|
|
+ $(".email_check_ok").hide();
|
|
|
|
+ $(".email_err_msg").hide();
|
|
|
|
+ }).on("focus", function () {
|
|
|
|
+ this.scrollIntoView();
|
|
|
|
+ });
|
|
|
|
+ //点击发送验证码-邮箱验证
|
|
|
|
+ var canVerify = true;
|
|
|
|
+ $(".sendCode").on("click", function () {
|
|
|
|
+ var email = $(".email_input").val().replace(/\s*/g, "");
|
|
|
|
+ if (!/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/.test(email)) {
|
|
|
|
+ $(".email_err_msg").show();
|
|
|
|
+ $(".email_check_ok").hide();
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (!canVerify) {
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ canVerify = false;
|
|
|
|
+ $.post("/front/dataExport/sendMailVerify", {"email": email}, function (data) {
|
|
|
|
+ canVerify = true;
|
|
|
|
+ if (data.success) {
|
|
|
|
+ if (data.errCode == 4) {
|
|
|
|
+ EasyAlert.show(data.errMsg, "", 3000);
|
|
|
|
+ finishEmailVerity = true;
|
|
|
|
+ $(".email_check_ok").show();
|
|
|
|
+ $(".email_input").parents('div.form-control').siblings().slideUp();
|
|
|
|
+ if (readClause && finishPhoneVerity) {
|
|
|
|
+ $(".toPay").removeAttr("disabled")
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ $(".toPay").attr("disabled", "disabled");
|
|
|
|
+ finishEmailVerity = false;
|
|
|
|
+ //发送成功
|
|
|
|
+ sendemailTimer(60 * 5);
|
|
|
|
+ sessionStorage.email_sign = "1";
|
|
|
|
+ $(".verity_input").removeAttr("readonly");
|
|
|
|
+ $(".sendCode").attr("disabled", "disabled");
|
|
|
|
+ $(".email_input").attr("readonly", true);
|
|
|
|
+ sessionStorage.setItem("send_code_" + userId, Date.parse(new Date()) / 1000);
|
|
|
|
+ //发送验证码后 sessionStorage邮箱
|
|
|
|
+ sessionStorage.setItem("send_email_" + userId, $(".email_input").val().replace(/\s*/g, ""));
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ EasyAlert.show(data.errMsg, "", 3000)
|
|
|
|
+ if (data.errCode == 2) {
|
|
|
|
+ sendemailTimer(data.time);
|
|
|
|
+ $(".sendCode").attr("disabled", "disabled");
|
|
|
|
+ $(".email_input").attr("readonly", true);
|
|
|
|
+ //发送验证码后 sessionStorage邮箱
|
|
|
|
+ sessionStorage.setItem("send_email_" + userId, $(".email_input").val().replace(/\s*/g, ""));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }, "json")
|
|
|
|
+ });
|
|
|
|
+ //校验验证码
|
|
|
|
+ $(".verity_input").bind("input propertychange", function () {
|
|
|
|
+ var verity = $(this).val()
|
|
|
|
+ var email = $(".email_input").val().replace(/\s*/g, "");
|
|
|
|
+ if (verity.length == 6) {
|
|
|
|
+ $.post("/front/dataExport/checkMailVerify", {"emailVerity": verity, "email": email}, function (data) {
|
|
|
|
+ if (data.success) {
|
|
|
|
+ finishEmailVerity = true;
|
|
|
|
+ if (readClause && finishPhoneVerity) {
|
|
|
|
+ $(".toPay").removeAttr("disabled")
|
|
|
|
+ }
|
|
|
|
+ $(".email_check_ok").show();
|
|
|
|
+ $(".email_err_msg").hide();
|
|
|
|
+ $(".verity_input").attr("readonly", true);
|
|
|
|
+ $(".verity_input").val("");
|
|
|
|
+ $(".email_input").parents('div.form-control').siblings().slideUp();
|
|
|
|
+ sessionStorage.setItem("EmailVerity_" +{{.T._id}}, "T");
|
|
|
|
+ //验证通过后 存 localStorage邮箱 此邮箱为验证通过的邮箱 并清除sessionStorage发送验证码的邮箱
|
|
|
|
+ localStorage.setItem("new_email_" + userId, $(".email_input").val().replace(/\s*/g, ""));
|
|
|
|
+ sessionStorage.removeItem("send_email_" + userId);
|
|
|
|
+ } else {
|
|
|
|
+ EasyAlert.show("验证码错误", "", 3000);
|
|
|
|
+ }
|
|
})
|
|
})
|
|
- $('.tips-icon').on('click', function() {
|
|
|
|
- $('#tipDialog').show(200);
|
|
|
|
- $('.weui-dialog__btn_primary').click(function() {
|
|
|
|
- $('#tipDialog').hide(200);
|
|
|
|
- })
|
|
|
|
- });
|
|
|
|
- //手机号输入监控
|
|
|
|
- var Verification = {
|
|
|
|
- //手机号验证
|
|
|
|
- isPhone: function(value) {
|
|
|
|
- return /^[1][3-9][0-9]{9}$/.test(value);
|
|
|
|
- }
|
|
|
|
- };
|
|
|
|
- $(".phone_input").on("input propertychange",function() {
|
|
|
|
- var phone_input = $(this).val().replace(/\s*/g,"");
|
|
|
|
- if (phone_input.length == 11) {
|
|
|
|
- if(Verification.isPhone(phone_input)){
|
|
|
|
- $.post("/front/dataExport/checkPhoneVerify",{"phone":phone_input},function(data){
|
|
|
|
- if(data.success){
|
|
|
|
- $(".phone_check_ok").show();
|
|
|
|
- $(".phone_err_msg").hide();
|
|
|
|
- finishPhoneVerity=true;
|
|
|
|
- if(readClause&&finishEmailVerity){
|
|
|
|
- $(".toPay").removeAttr("disabled")
|
|
|
|
- }
|
|
|
|
- }else{
|
|
|
|
- $(".phone_err_msg").show();
|
|
|
|
- $(".phone_check_ok").hide();
|
|
|
|
- finishPhoneVerity=false;
|
|
|
|
- $(".toPay").attr("disabled","disabled");
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }else{
|
|
|
|
- $(".phone_err_msg").show();
|
|
|
|
- $(".phone_check_ok").hide();
|
|
|
|
- finishPhoneVerity=false;
|
|
|
|
- $(".toPay").attr("disabled","disabled");
|
|
|
|
- }
|
|
|
|
- }else{
|
|
|
|
- $(".phone_err_msg").hide();
|
|
|
|
- $(".phone_check_ok").hide();
|
|
|
|
- finishPhoneVerity=false;
|
|
|
|
- $(".toPay").attr("disabled","disabled");
|
|
|
|
- }
|
|
|
|
- }).blur(function(){
|
|
|
|
- var phone_input = $(this).val().replace(/\s*/g,"");
|
|
|
|
- if (phone_input.length != 11&&phone_input.length!=0) {
|
|
|
|
- $(".phone_err_msg").show();
|
|
|
|
- $(".phone_check_ok").hide();
|
|
|
|
- finishPhoneVerity=false;
|
|
|
|
- $(".toPay").attr("disabled","disabled");
|
|
|
|
- }
|
|
|
|
- }).on("focus",function(){
|
|
|
|
- this.scrollIntoView();
|
|
|
|
- });
|
|
|
|
- //邮箱输入监控
|
|
|
|
- $(".email_input").on("input propertychange",function() {
|
|
|
|
- var email_input = $(this).val().replace(/\s*/g,"");
|
|
|
|
- if(email_input.indexOf("@")>0){
|
|
|
|
- if (email_input != email_lastInput) {
|
|
|
|
- $(this).parents('div.form-control').siblings().slideDown();
|
|
|
|
- if(email_lastVerity>0){
|
|
|
|
- $("#sendCode").attr("disabled", true);
|
|
|
|
- //返回后验证码可输入
|
|
|
|
- if((localStorage.getItem("new_email_"+userId)!=null)&&(localStorage.getItem("new_email_"+userId)==email_input)){
|
|
|
|
- $(".verity_input").attr("readonly", false);
|
|
|
|
- }else{
|
|
|
|
- if(email_lastVerity>0){
|
|
|
|
- $(".verity_input").removeAttr("readonly");
|
|
|
|
- }else if(lstimes>0){
|
|
|
|
- $(".verity_input").removeAttr("readonly");
|
|
|
|
- }else{
|
|
|
|
- $(".verity_input").attr("readonly", true);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }else{
|
|
|
|
- //新用户输入后 从新进来
|
|
|
|
- $(".verity_input").prop("readonly", false);
|
|
|
|
- $("#sendCode").prop("disabled", true);
|
|
|
|
- }
|
|
|
|
- finishEmailVerity=false;
|
|
|
|
- $(".toPay").attr("disabled","disabled");
|
|
|
|
- if(/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/.test(email_input)){
|
|
|
|
- lstimes_ = parseInt(sessionStorage.getItem("send_code_"+userId));
|
|
|
|
- lstimes_ = lstimes_ - Date.parse(new Date())/1000 + 60*5;
|
|
|
|
- if (lstimes_>0) {
|
|
|
|
- $("#sendCode").prop("disabled", true);
|
|
|
|
- }else{
|
|
|
|
- $("#sendCode").prop("disabled", false);
|
|
|
|
- }
|
|
|
|
- $(".email_err_msg").hide();
|
|
|
|
- $(".email_check_ok").hide();
|
|
|
|
- }else{
|
|
|
|
- $("#sendCode").attr("disabled", true);
|
|
|
|
- $(".email_check_ok").hide();
|
|
|
|
- $(".email_err_msg").hide();
|
|
|
|
- }
|
|
|
|
- }else{
|
|
|
|
- finishEmailVerity=true;
|
|
|
|
- if(readClause&&finishPhoneVerity){
|
|
|
|
- $(".toPay").removeAttr("disabled")
|
|
|
|
- }
|
|
|
|
- $("#sendCode").attr("disabled","disabled");
|
|
|
|
- $(".verity_input").attr("readonly",true);
|
|
|
|
- $(".email_err_msg").hide();
|
|
|
|
- $(".email_check_ok").show();
|
|
|
|
- //验证通过后 存 localStorage邮箱 此邮箱为验证通过的邮箱 并清除sessionStorage发送验证码的邮箱
|
|
|
|
- localStorage.setItem("new_email_"+userId,$(".email_input").val().replace(/\s*/g,""));
|
|
|
|
- sessionStorage.removeItem("send_email_"+userId);
|
|
|
|
- $(this).parents('div.form-control').siblings().slideUp();
|
|
|
|
- }
|
|
|
|
- }else{
|
|
|
|
- $(this).parents('div.form-control').siblings().slideUp();
|
|
|
|
- $("#sendCode").attr("disabled","disabled");
|
|
|
|
- $(".verity_input").attr("readonly",true);
|
|
|
|
- $(".email_err_msg").hide();
|
|
|
|
- $(".email_check_ok").hide();
|
|
|
|
- }
|
|
|
|
- }).blur(function(){
|
|
|
|
- var email=$(".email_input").val().replace(/\s*/g,"");
|
|
|
|
- if(!/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/.test(email)&&($(".email_input").val().length!=0)){
|
|
|
|
- $(".email_err_msg").show();
|
|
|
|
- $(".email_check_ok").hide();
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if($(".email_input").val()==email){
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- $("#sendCode").removeAttr("disabled");
|
|
|
|
- $(".email_check_ok").hide();
|
|
|
|
- $(".email_err_msg").hide();
|
|
|
|
- }).on("focus",function(){
|
|
|
|
- this.scrollIntoView();
|
|
|
|
- });
|
|
|
|
- //点击发送验证码-邮箱验证
|
|
|
|
- var canVerify=true;
|
|
|
|
- $(".sendCode").on("click",function(){
|
|
|
|
- var email=$(".email_input").val().replace(/\s*/g,"");
|
|
|
|
- if(!/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/.test(email)) {
|
|
|
|
- $(".email_err_msg").show();
|
|
|
|
- $(".email_check_ok").hide();
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if(!canVerify){
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- canVerify=false;
|
|
|
|
- $.post("/front/dataExport/sendMailVerify",{"email":email},function(data){
|
|
|
|
- canVerify=true;
|
|
|
|
- if(data.success){
|
|
|
|
- if(data.errCode==4){
|
|
|
|
- EasyAlert.show(data.errMsg,"",3000);
|
|
|
|
- finishEmailVerity=true;
|
|
|
|
- $(".email_check_ok").show();
|
|
|
|
- $(".email_input").parents('div.form-control').siblings().slideUp();
|
|
|
|
- if(readClause&&finishPhoneVerity){
|
|
|
|
- $(".toPay").removeAttr("disabled")
|
|
|
|
- }
|
|
|
|
- }else{
|
|
|
|
- $(".toPay").attr("disabled","disabled");
|
|
|
|
- finishEmailVerity=false;
|
|
|
|
- //发送成功
|
|
|
|
- sendemailTimer(60*5);
|
|
|
|
- sessionStorage.email_sign="1";
|
|
|
|
- $(".verity_input").removeAttr("readonly");
|
|
|
|
- $(".sendCode").attr("disabled","disabled");
|
|
|
|
- $(".email_input").attr("readonly",true);
|
|
|
|
- sessionStorage.setItem("send_code_"+userId, Date.parse(new Date())/1000);
|
|
|
|
- //发送验证码后 sessionStorage邮箱
|
|
|
|
- sessionStorage.setItem("send_email_"+userId, $(".email_input").val().replace(/\s*/g,""));
|
|
|
|
- }
|
|
|
|
- }else{
|
|
|
|
- EasyAlert.show(data.errMsg,"",3000)
|
|
|
|
- if(data.errCode==2){
|
|
|
|
- sendemailTimer(data.time);
|
|
|
|
- $(".sendCode").attr("disabled","disabled");
|
|
|
|
- $(".email_input").attr("readonly",true);
|
|
|
|
- //发送验证码后 sessionStorage邮箱
|
|
|
|
- sessionStorage.setItem("send_email_"+userId, $(".email_input").val().replace(/\s*/g,""));
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },"json")
|
|
|
|
- });
|
|
|
|
- //校验验证码
|
|
|
|
- $(".verity_input").bind("input propertychange",function(){
|
|
|
|
- var verity=$(this).val()
|
|
|
|
- var email=$(".email_input").val().replace(/\s*/g,"");
|
|
|
|
- if(verity.length==6){
|
|
|
|
- $.post("/front/dataExport/checkMailVerify",{"emailVerity":verity,"email":email},function(data){
|
|
|
|
- if(data.success){
|
|
|
|
- finishEmailVerity=true;
|
|
|
|
- if(readClause&&finishPhoneVerity){
|
|
|
|
- $(".toPay").removeAttr("disabled")
|
|
|
|
- }
|
|
|
|
- $(".email_check_ok").show();
|
|
|
|
- $(".email_err_msg").hide();
|
|
|
|
- $(".verity_input").attr("readonly",true);
|
|
|
|
- $(".verity_input").val("");
|
|
|
|
- $(".email_input").parents('div.form-control').siblings().slideUp();
|
|
|
|
- sessionStorage.setItem("EmailVerity_"+{{.T._id}},"T");
|
|
|
|
- //验证通过后 存 localStorage邮箱 此邮箱为验证通过的邮箱 并清除sessionStorage发送验证码的邮箱
|
|
|
|
- localStorage.setItem("new_email_"+userId,$(".email_input").val().replace(/\s*/g,""));
|
|
|
|
- sessionStorage.removeItem("send_email_"+userId);
|
|
|
|
- }else{
|
|
|
|
- EasyAlert.show("验证码错误","",3000);
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }else{
|
|
|
|
- //进入其他页面 验证码显示 清除缓存
|
|
|
|
- sessionStorage.removeItem("email_sign");
|
|
|
|
- $(".email_err_msg").hide();
|
|
|
|
- }
|
|
|
|
- //防遮挡
|
|
|
|
- }).on("focus",function(){
|
|
|
|
- var target = this;
|
|
|
|
- setTimeout(function(){
|
|
|
|
- target.scrollIntoViewIfNeeded();
|
|
|
|
- },500)
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
- //点击阅读条款
|
|
|
|
- $(".fixed-bottom-box .weui-check").on("click", function () {
|
|
|
|
- if($(this).is(":checked")){
|
|
|
|
- if(finishEmailVerity&&finishPhoneVerity){
|
|
|
|
- readClause=true;
|
|
|
|
- sessionStorage.readClause="true";
|
|
|
|
- $(".toPay").removeAttr("disabled")
|
|
|
|
- }else{
|
|
|
|
- readClause=true;
|
|
|
|
- sessionStorage.readClause="true";
|
|
|
|
- $(".toPay").attr("disabled","disabled");
|
|
|
|
- }
|
|
|
|
- }else{
|
|
|
|
- readClause=false;
|
|
|
|
- sessionStorage.readClause="false";
|
|
|
|
- $(".toPay").attr("disabled","disabled");
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- //数据浏览
|
|
|
|
- $(".dataPreview").on("click",function(){
|
|
|
|
- if(previewDataTime<50){
|
|
|
|
- previewDataTime++
|
|
|
|
- var dataType = $(".choose").find("div.active").index()+1;
|
|
|
|
- //缓存
|
|
|
|
- if(regInt.test($(".sendCode").text())){
|
|
|
|
- var email_input = $(".email_input").val().replace(/\s*/g, "");
|
|
|
|
|
|
+ } else {
|
|
|
|
+ //进入其他页面 验证码显示 清除缓存
|
|
|
|
+ sessionStorage.removeItem("email_sign");
|
|
|
|
+ $(".email_err_msg").hide();
|
|
|
|
+ }
|
|
|
|
+ //防遮挡
|
|
|
|
+ }).on("focus", function () {
|
|
|
|
+ var target = this;
|
|
|
|
+ setTimeout(function () {
|
|
|
|
+ target.scrollIntoViewIfNeeded();
|
|
|
|
+ }, 500)
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ //点击阅读条款
|
|
|
|
+ $(".fixed-bottom-box .weui-check").on("click", function () {
|
|
|
|
+ if ($(this).is(":checked")) {
|
|
|
|
+ if (finishEmailVerity && finishPhoneVerity) {
|
|
|
|
+ readClause = true;
|
|
|
|
+ sessionStorage.readClause = "true";
|
|
|
|
+ $(".toPay").removeAttr("disabled")
|
|
|
|
+ } else {
|
|
|
|
+ readClause = true;
|
|
|
|
+ sessionStorage.readClause = "true";
|
|
|
|
+ $(".toPay").attr("disabled", "disabled");
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ readClause = false;
|
|
|
|
+ sessionStorage.readClause = "false";
|
|
|
|
+ $(".toPay").attr("disabled", "disabled");
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ //数据浏览
|
|
|
|
+ $(".dataPreview").on("click", function () {
|
|
|
|
+ if (previewDataTime < 50) {
|
|
|
|
+ previewDataTime++
|
|
|
|
+ var dataType = $(".choose").find("div.active").index() + 1;
|
|
|
|
+ //缓存
|
|
|
|
+ if (regInt.test($(".sendCode").text())) {
|
|
|
|
+ var email_input = $(".email_input").val().replace(/\s*/g, "");
|
|
// if (/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/.test(email_input)){
|
|
// if (/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/.test(email_input)){
|
|
// sessionStorage.setItem("send_email_"+{{.T._id}}, $(".email_input").val().replace(/\s*/g,""));
|
|
// sessionStorage.setItem("send_email_"+{{.T._id}}, $(".email_input").val().replace(/\s*/g,""));
|
|
// }
|
|
// }
|
|
- }
|
|
|
|
- if($("#phone_input").val()){
|
|
|
|
- sessionStorage.setItem("order_phone"+{{.T._id}}, $("#phone_input").val().replace(/\s*/g,""));
|
|
|
|
- }
|
|
|
|
- if ($(".fixed-bottom-box .weui-check").is(":checked")) {
|
|
|
|
- if (finishEmailVerity && finishPhoneVerity) {
|
|
|
|
- readClause = true;
|
|
|
|
- sessionStorage.readClause="true";
|
|
|
|
- }else{
|
|
|
|
- readClause = true;
|
|
|
|
- sessionStorage.readClause="true";
|
|
|
|
- $(".toPay").attr("disabled", "disabled");
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- readClause = false;
|
|
|
|
- sessionStorage.readClause="false";
|
|
|
|
- $(".toPay").attr("disabled", "disabled");
|
|
|
|
- }
|
|
|
|
- window.open("/front/wx_dataExport/toPreview/"+{{.T._id}}+"?dataType="+dataType);
|
|
|
|
- }else{
|
|
|
|
- EasyAlert.show("预览数据次数超出今日上限!","",3000);
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- //确认支付
|
|
|
|
- $(".toPay").on("click",function(){
|
|
|
|
- if(!finishEmailVerity||!readClause||!canpay||!finishPhoneVerity){
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- $(".loading_").show();
|
|
|
|
- canpay=false;
|
|
|
|
-
|
|
|
|
- var param={};
|
|
|
|
- param.pay_way="wx_js";
|
|
|
|
- param.data_spec=dataType==2?"senior":"standard";
|
|
|
|
- param.id={{.T._id}}
|
|
|
|
- //先去创建预支付订单
|
|
|
|
- $.post("/jypay/dataExport/weixin/createOrder",param,function(data){
|
|
|
|
- if(data.status=="y"){
|
|
|
|
- sessionStorage.setItem("order_spec"+{{.T._id}}, dataType);
|
|
|
|
- sessionStorage.setItem("order_email"+{{.T._id}}, $(".email_input").val().replace(/\s*/g,""));
|
|
|
|
- sessionStorage.setItem("order_phone"+{{.T._id}}, $(".phone_input").val().replace(/\s*/g,""));
|
|
|
|
- //预支付订单创建成功后 调微信支付
|
|
|
|
- if(data.res){
|
|
|
|
- order_code=data.code;
|
|
|
|
- onBridgeReady(data.res);
|
|
|
|
- }
|
|
|
|
- }else{
|
|
|
|
- canpay=true;
|
|
|
|
- EasyAlert.show("生成订单出错,请稍后尝试!","",3000);
|
|
|
|
- }
|
|
|
|
- $(".loading_").hide();
|
|
|
|
- },"json");
|
|
|
|
-
|
|
|
|
- })
|
|
|
|
- })
|
|
|
|
- //调用微信支付接口
|
|
|
|
- function onBridgeReady(res){
|
|
|
|
- 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"){
|
|
|
|
- //清除我已阅读缓存
|
|
|
|
- sessionStorage.removeItem("readClause");
|
|
|
|
- sessionStorage.removeItem("index");
|
|
|
|
- sessionStorage.removeItem("EmailVerity_"+{{.T._id}});
|
|
|
|
- sessionStorage.removeItem("keyWords");
|
|
|
|
- $(".toPay").attr("disabled","disabled");
|
|
|
|
- var email_pay = sessionStorage.getItem("order_email"+{{.T._id}})
|
|
|
|
- setTimeout(function(){
|
|
|
|
- window.location.replace("/front/wx_dataExport/paySuccessPage?email="+email_pay+"&orderCode="+order_code+"&payTime="+res["timestamp"]);
|
|
|
|
- },500)
|
|
|
|
- }else if(r.err_msg == "get_brand_wcpay_request:cancel"){
|
|
|
|
- //取消支付 可以再次支付
|
|
|
|
- canpay=true;
|
|
|
|
- }else{
|
|
|
|
- EasyAlert.show("系统异常,请稍微再试","",3000);
|
|
|
|
- }
|
|
|
|
- //清除我已阅读缓存
|
|
|
|
- sessionStorage.removeItem("index");
|
|
|
|
- sessionStorage.removeItem("EmailVerity_"+{{.T._id}});
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- //倒计时
|
|
|
|
- function sendemailTimer(t){
|
|
|
|
- $(".sendCode").text(""+t+"s");
|
|
|
|
- $(".sendCode").attr("disabled","disabled");
|
|
|
|
- r=setInterval(function(){
|
|
|
|
- t--;
|
|
|
|
- $(".sendCode").text(""+t+"s")
|
|
|
|
- if(t<=0){
|
|
|
|
- clearInterval(r);
|
|
|
|
- $(".sendCode").text("发送验证码");
|
|
|
|
- if(!finishEmailVerity){
|
|
|
|
- $(".verity_input").attr("readonly",true);
|
|
|
|
- $(".sendCode").removeAttr("disabled");
|
|
|
|
- $(".email_input").removeAttr("readonly");
|
|
|
|
- $(".sendCode").css("color","#2CB7CA");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },1000)
|
|
|
|
- }
|
|
|
|
- //提示框
|
|
|
|
- var EasyAlert = {
|
|
|
|
- timeout: null,
|
|
|
|
- waitTime: 1000,
|
|
|
|
- show: function(text,css,waitTime){
|
|
|
|
- if(this.timeout != null){
|
|
|
|
- clearTimeout(this.timeout);
|
|
|
|
- this.hide();
|
|
|
|
- this.timeout = null;
|
|
|
|
- }
|
|
|
|
- var thisClass = this;
|
|
|
|
- this.timeout = setTimeout(function(){
|
|
|
|
- thisClass.hide();
|
|
|
|
- thisClass.timeout = null;
|
|
|
|
- },waitTime?waitTime:this.waitTime);
|
|
|
|
- $("body").append('<div class="easyalert" id="easyAlert">'+text+'</div>');
|
|
|
|
- $("#easyAlert").css({"left":"50%","margin-top":-($("#easyAlert").outerHeight()/2),"margin-left":-($("#easyAlert").outerWidth()/2)}).show();
|
|
|
|
- },
|
|
|
|
- hide: function(){
|
|
|
|
- $("#easyAlert").remove();
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- function mySysIsIos(){
|
|
|
|
- return !!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
|
|
|
|
- }
|
|
|
|
- </script>
|
|
|
|
- {{include "/common/baiducc.html"}}
|
|
|
|
- </body>
|
|
|
|
|
|
+ }
|
|
|
|
+ if ($("#phone_input").val()) {
|
|
|
|
+ sessionStorage.setItem("order_phone" +{{.T._id}}, $("#phone_input").val().replace(/\s*/g, ""));
|
|
|
|
+ }
|
|
|
|
+ if ($(".fixed-bottom-box .weui-check").is(":checked")) {
|
|
|
|
+ if (finishEmailVerity && finishPhoneVerity) {
|
|
|
|
+ readClause = true;
|
|
|
|
+ sessionStorage.readClause = "true";
|
|
|
|
+ } else {
|
|
|
|
+ readClause = true;
|
|
|
|
+ sessionStorage.readClause = "true";
|
|
|
|
+ $(".toPay").attr("disabled", "disabled");
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ readClause = false;
|
|
|
|
+ sessionStorage.readClause = "false";
|
|
|
|
+ $(".toPay").attr("disabled", "disabled");
|
|
|
|
+ }
|
|
|
|
+ window.open("/front/wx_dataExport/toPreview/"+{{.T._id}}+
|
|
|
|
+ "?dataType=" + dataType
|
|
|
|
+ )
|
|
|
|
+ ;
|
|
|
|
+ } else {
|
|
|
|
+ EasyAlert.show("预览数据次数超出今日上限!", "", 3000);
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ //确认支付
|
|
|
|
+ $(".toPay").on("click", function () {
|
|
|
|
+ if (!finishEmailVerity || !readClause || !canpay || !finishPhoneVerity) {
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ $(".loading_").show();
|
|
|
|
+ canpay = false;
|
|
|
|
+
|
|
|
|
+ var param = {};
|
|
|
|
+ param.pay_way = "wx_js";
|
|
|
|
+ param.data_spec = dataType == 2 ? "senior" : "standard";
|
|
|
|
+ param.id ={{.T._id}}
|
|
|
|
+ //先去创建预支付订单
|
|
|
|
+ $.post("/jypay/dataExport/weixin/createOrder", param, function (data) {
|
|
|
|
+ if (data.status == "y") {
|
|
|
|
+ sessionStorage.setItem("order_spec" +{{.T._id}}, dataType);
|
|
|
|
+ sessionStorage.setItem("order_email" +{{.T._id}}, $(".email_input").val().replace(/\s*/g, ""));
|
|
|
|
+ sessionStorage.setItem("order_phone" +{{.T._id}}, $(".phone_input").val().replace(/\s*/g, ""));
|
|
|
|
+ //预支付订单创建成功后 调微信支付
|
|
|
|
+ if (data.res) {
|
|
|
|
+ order_code = data.code;
|
|
|
|
+ onBridgeReady(data.res);
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ canpay = true;
|
|
|
|
+ EasyAlert.show("生成订单出错,请稍后尝试!", "", 3000);
|
|
|
|
+ }
|
|
|
|
+ $(".loading_").hide();
|
|
|
|
+ }, "json");
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ //调用微信支付接口
|
|
|
|
+ function onBridgeReady(res) {
|
|
|
|
+ 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") {
|
|
|
|
+ //清除我已阅读缓存
|
|
|
|
+ sessionStorage.removeItem("readClause");
|
|
|
|
+ sessionStorage.removeItem("index");
|
|
|
|
+ sessionStorage.removeItem("EmailVerity_" +{{.T._id}});
|
|
|
|
+ sessionStorage.removeItem("keyWords");
|
|
|
|
+ $(".toPay").attr("disabled", "disabled");
|
|
|
|
+ var email_pay = sessionStorage.getItem("order_email" +{{.T._id}})
|
|
|
|
+ setTimeout(function () {
|
|
|
|
+ window.location.replace("/front/wx_dataExport/paySuccessPage?email=" + email_pay + "&orderCode=" + order_code + "&payTime=" + res["timestamp"]);
|
|
|
|
+ }, 500)
|
|
|
|
+ } else if (r.err_msg == "get_brand_wcpay_request:cancel") {
|
|
|
|
+ //取消支付 可以再次支付
|
|
|
|
+ canpay = true;
|
|
|
|
+ } else {
|
|
|
|
+ EasyAlert.show("系统异常,请稍微再试", "", 3000);
|
|
|
|
+ }
|
|
|
|
+ //清除我已阅读缓存
|
|
|
|
+ sessionStorage.removeItem("index");
|
|
|
|
+ sessionStorage.removeItem("EmailVerity_" +{{.T._id}});
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //倒计时
|
|
|
|
+ function sendemailTimer(t) {
|
|
|
|
+ $(".sendCode").text("" + t + "s");
|
|
|
|
+ $(".sendCode").attr("disabled", "disabled");
|
|
|
|
+ r = setInterval(function () {
|
|
|
|
+ t--;
|
|
|
|
+ $(".sendCode").text("" + t + "s")
|
|
|
|
+ if (t <= 0) {
|
|
|
|
+ clearInterval(r);
|
|
|
|
+ $(".sendCode").text("发送验证码");
|
|
|
|
+ if (!finishEmailVerity) {
|
|
|
|
+ $(".verity_input").attr("readonly", true);
|
|
|
|
+ $(".sendCode").removeAttr("disabled");
|
|
|
|
+ $(".email_input").removeAttr("readonly");
|
|
|
|
+ $(".sendCode").css("color", "#2CB7CA");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }, 1000)
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //提示框
|
|
|
|
+ var EasyAlert = {
|
|
|
|
+ timeout: null,
|
|
|
|
+ waitTime: 1000,
|
|
|
|
+ show: function (text, css, waitTime) {
|
|
|
|
+ if (this.timeout != null) {
|
|
|
|
+ clearTimeout(this.timeout);
|
|
|
|
+ this.hide();
|
|
|
|
+ this.timeout = null;
|
|
|
|
+ }
|
|
|
|
+ var thisClass = this;
|
|
|
|
+ this.timeout = setTimeout(function () {
|
|
|
|
+ thisClass.hide();
|
|
|
|
+ thisClass.timeout = null;
|
|
|
|
+ }, waitTime ? waitTime : this.waitTime);
|
|
|
|
+ $("body").append('<div class="easyalert" id="easyAlert">' + text + '</div>');
|
|
|
|
+ $("#easyAlert").css({
|
|
|
|
+ "left": "50%",
|
|
|
|
+ "margin-top": -($("#easyAlert").outerHeight() / 2),
|
|
|
|
+ "margin-left": -($("#easyAlert").outerWidth() / 2)
|
|
|
|
+ }).show();
|
|
|
|
+ },
|
|
|
|
+ hide: function () {
|
|
|
|
+ $("#easyAlert").remove();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ function mySysIsIos() {
|
|
|
|
+ return !!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //
|
|
|
|
+ function accMul(arg1, arg2) {
|
|
|
|
+ var m = 0, s1 = arg1.toString(), s2 = arg2.toString();
|
|
|
|
+ try {
|
|
|
|
+ m += s1.split(".")[1].length
|
|
|
|
+ } catch (e) {
|
|
|
|
+ }
|
|
|
|
+ try {
|
|
|
|
+ m += s2.split(".")[1].length
|
|
|
|
+ } catch (e) {
|
|
|
|
+ }
|
|
|
|
+ return parseInt(Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m).toString() * 100) / Math.pow(10, 2);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //
|
|
|
|
+ function FormatNum(n) {
|
|
|
|
+ if (n >= 1000) {
|
|
|
|
+ return Math.floor(n / 1000) + "," + ("0000" + n % 1000).slice(-3)
|
|
|
|
+ }
|
|
|
|
+ return n
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //
|
|
|
|
+ function ChangePayMoney() {
|
|
|
|
+ var shouldPay = 0;
|
|
|
|
+ var beforePay = 0;
|
|
|
|
+ if (dataType == 1) {
|
|
|
|
+ beforePay = accMul(unitPrice_normal, msgCount)
|
|
|
|
+ shouldPay = accMul(beforePay, discount)
|
|
|
|
+ } else if (dataType == 2) {
|
|
|
|
+ beforePay = accMul(unitPrice_senior, msgCount)
|
|
|
|
+ shouldPay = accMul(beforePay, discount)
|
|
|
|
+ }
|
|
|
|
+ shouldPay = shouldPay > orderMinPrice ? shouldPay : orderMinPrice;
|
|
|
|
+ beforePay = beforePay > orderMinPrice ? beforePay : orderMinPrice;
|
|
|
|
+ $(".pay_discount").text("¥" + shouldPay);
|
|
|
|
+ $(".pay_before").text("¥" + beforePay)
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //
|
|
|
|
+ function toRead() {
|
|
|
|
+ event.preventDefault();
|
|
|
|
+ if (regInt.test($(".sendCode").text())) {
|
|
|
|
+ var email_input = $(".email_input").val().replace(/\s*/g, "");
|
|
|
|
+// if (/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/.test(email_input)){
|
|
|
|
+// sessionStorage.setItem("send_email_"+{{.T._id}}, $(".email_input").val().replace(/\s*/g,""));
|
|
|
|
+// }
|
|
|
|
+ }
|
|
|
|
+ if ($("#phone_input").val()) {
|
|
|
|
+ sessionStorage.setItem("order_phone" +{{.T._id}}, $("#phone_input").val().replace(/\s*/g, ""));
|
|
|
|
+ }
|
|
|
|
+ window.location.href = "/front/staticPage/wx-serviceterms.html";
|
|
|
|
+ }
|
|
|
|
+</script>
|
|
|
|
+{{include "/common/baiducc.html"}}
|
|
|
|
+</body>
|
|
</html>
|
|
</html>
|