|
@@ -5,190 +5,212 @@
|
|
|
<meta charset="utf-8">
|
|
|
<title>VIP订阅-完善个人信息</title>
|
|
|
<meta name="viewport"
|
|
|
- content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
|
|
|
+ content="width=device-width,initial-scale=1,minimum-scale=1,maximum-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="/vipsubscribe/js/rem.js?v={{Msg "seo" "version"}}"></script>
|
|
|
- <link rel="stylesheet" type="text/css" href="/vipsubscribe/css/base.css?v={{Msg "seo" "version"}}" />
|
|
|
- <link rel="stylesheet" type="text/css" href="/vipsubscribe/iconfont/iconfont.css?v={{Msg "seo" "version"}}" />
|
|
|
+ <link rel="stylesheet" type="text/css" href="/vipsubscribe/css/base.css?v={{Msg "seo" "version"}}"/>
|
|
|
+ <link rel="stylesheet" type="text/css" href="/vipsubscribe/iconfont/iconfont.css?v={{Msg "seo" "version"}}"/>
|
|
|
<link rel="stylesheet" href="/vipsubscribe/css/weui.min.css?v={{Msg "seo" "version"}}">
|
|
|
- <link rel="stylesheet" href="/vipsubscribe/css/trial_info.css?v=111">
|
|
|
+ <link rel="stylesheet" href="/vipsubscribe/css/trial_info.css?v={{Msg "seo" "version"}}">
|
|
|
</head>
|
|
|
|
|
|
-<body>
|
|
|
- <div class="trial_info" style="height: 100vh">
|
|
|
- <form class="form" id="formInfo">
|
|
|
- <div class="trial_body">
|
|
|
- <div class="banner">
|
|
|
- <div class="shadow"></div>
|
|
|
- </div>
|
|
|
- <!-- 未完善个人信息展示的内容 -->
|
|
|
- {{if not .T.trialSign }}
|
|
|
- <div class="form_title">- 完善个人信息 -</div>
|
|
|
- {{else}}
|
|
|
- <!-- 已完善展示的内容-->
|
|
|
+<body style="height: 100vh">
|
|
|
+<div class="trial_info">
|
|
|
+ <form class="form" id="formInfo">
|
|
|
+ <div class="trial_body">
|
|
|
+ <div class="banner">
|
|
|
+ <div class="shadow"></div>
|
|
|
+ </div>
|
|
|
+ <!-- 未完善个人信息展示的内容 -->
|
|
|
+ {{if not .T.trialSign }}
|
|
|
+ <div class="form_title">- 完善个人信息 -</div>
|
|
|
+ {{else}}
|
|
|
+ <!-- 已完善展示的内容-->
|
|
|
<div class="perfect">您已完善过个人信息<br/>可直接领取试用</div>
|
|
|
- {{end}}
|
|
|
- <!-- 未完善个人信息展示form_info 已完善不展示-->
|
|
|
- {{if not .T.trialSign }}
|
|
|
+ {{end}}
|
|
|
+ <!-- 未完善个人信息展示form_info 已完善不展示-->
|
|
|
+ {{if not .T.trialSign }}
|
|
|
<div class="form_info">
|
|
|
<div class="form_top">
|
|
|
<div class="form_item form_item_line">
|
|
|
- <input type="text" placeholder="输入姓名" value="" class="name" onchange="check_name($(this),true)">
|
|
|
+ <input type="text" placeholder="输入姓名" value="" class="name input"
|
|
|
+ onchange="check_name($(this),true)">
|
|
|
</div>
|
|
|
<div class="form_item form_item_line">
|
|
|
- <input type="number" placeholder="输入手机号" value="" class="phone" maxlength="11" onchange="check_tel($(this),$('.code_btn'),true)">
|
|
|
+ <input type="number" placeholder="输入手机号" value="" class="phone input" maxlength="11"
|
|
|
+ onchange="check_tel($(this),$('.code_btn'),true)">
|
|
|
</div>
|
|
|
<div class="form_item form_item_line">
|
|
|
- <input type="number" placeholder="图形验证码" value="" class="code imgcode" maxlength="4" onchange="check_imgcode($(this),$('.code_btn'),true)">
|
|
|
+ <input type="number" placeholder="图形验证码" value="" class="code imgcode input" maxlength="4"
|
|
|
+ onchange="check_imgcode($(this),$('.code_btn'),true)">
|
|
|
<img src="/subscribepay/trial/captcha" class="checkCode">
|
|
|
</div>
|
|
|
<div class="form_item">
|
|
|
- <input type="number" placeholder="手机验证码" value="" class="code phonecode" maxlength="6" onchange="check_phonecode($(this),true)">
|
|
|
+ <input type="number" placeholder="手机验证码" value="" class="code phonecode input" maxlength="6"
|
|
|
+ onchange="check_phonecode($(this),true)">
|
|
|
<button class="code_btn" type="button">获取验证码</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form_bottom">
|
|
|
<div class="form_item form_item_line">
|
|
|
- <input type="text" id="" placeholder="输入公司名称" class="company"
|
|
|
- onchange="check_company($(this))"></input>
|
|
|
+ <input type="text" id="" placeholder="输入公司名称" class="company input"
|
|
|
+ onchange="check_company($(this))"></input>
|
|
|
</div>
|
|
|
<div class="form_item">
|
|
|
- <input type="text" placeholder="职位(非必填)" class="job">
|
|
|
+ <input type="text" placeholder="职位(非必填)" class="job input">
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- {{end}}
|
|
|
- <div class="explain">
|
|
|
- <div class="explain_title">- 活动说明 -</div>
|
|
|
- <p class="explain_item">1、每个用户完善个人信息后,只有一次7天试用权;</p>
|
|
|
- <p class="explain_item">2、每个用户只能选择一项付费套餐进行7天试用;</p>
|
|
|
- <p class="explain_item">3、如用户在试用期间购买付费套餐,则试用权限在购买支付后自动失效。</p>
|
|
|
- </div>
|
|
|
+ {{end}}
|
|
|
+ <div class="explain">
|
|
|
+ <div class="explain_title">- 活动说明 -</div>
|
|
|
+ <p class="explain_item">1、每个用户完善个人信息后,只有一次7天试用权;</p>
|
|
|
+ <p class="explain_item">2、每个用户只能选择一项付费套餐进行7天试用;</p>
|
|
|
+ <p class="explain_item">3、如用户在试用期间购买付费套餐,则试用权限在购买支付后自动失效。</p>
|
|
|
</div>
|
|
|
- <div class="trial_btn">
|
|
|
- <!-- 未完善个人信息展示的按钮 type类型为submit-->
|
|
|
- <button class="btn" type="submit">立即免费试用</button>
|
|
|
- <!-- 已完善过个人信息 展示的按钮 type类型为button -->
|
|
|
- </div>
|
|
|
-
|
|
|
- </form>
|
|
|
- </div>
|
|
|
- {{include "/common/weixin.html"}}
|
|
|
- <script src="/vipsubscribe/js/jquery-2.1.4.js?v={{Msg "seo" "version"}}"></script>
|
|
|
- <script src="/vipsubscribe/js/fastclick.js?v={{Msg "seo" "version"}}"></script>
|
|
|
- <script src="/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
|
|
|
- <script src="/vipsubscribe/js/personal_info.js?v={{Msg "seo" "version"}}"></script>
|
|
|
- <script src="/vipsubscribe/js/common.js?v={{Msg "seo" "version"}}"></script>
|
|
|
- <script src="/vipsubscribe/js/share.js?v={{Msg "seo" "version"}}"></script>
|
|
|
- <script>
|
|
|
-
|
|
|
- //解决android 键盘遮挡输入框
|
|
|
- window.addEventListener("resize", function() {
|
|
|
- if(document.activeElement.tagName=="INPUT" || document.activeElement.tagName=="TEXTAREA") {
|
|
|
- window.setTimeout(function() {
|
|
|
- //document.activeElement.scrollIntoViewIfNeeded();
|
|
|
- document.activeElement.scrollIntoView({block: "center"});
|
|
|
- },200);
|
|
|
- }
|
|
|
- })
|
|
|
- initShare({{.T.signature}});
|
|
|
- {{if not .T.trialSign }}
|
|
|
- $(function () {
|
|
|
- initScroll()
|
|
|
- $(".btn").text("申请免费试用").attr("disabled","disabled");
|
|
|
- //获取用户信息
|
|
|
- $DoPost("/subscribepay/trial/GetUserPhone",{},function(r){
|
|
|
- if(r.success){
|
|
|
+ </div>
|
|
|
+ <div class="trial_btn">
|
|
|
+ <!-- 未完善个人信息展示的按钮 type类型为submit-->
|
|
|
+ <button class="btn" type="submit">立即免费试用</button>
|
|
|
+ <!-- 已完善过个人信息 展示的按钮 type类型为button -->
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </form>
|
|
|
+</div>
|
|
|
+{{include "/common/weixin.html"}}
|
|
|
+<script src="/vipsubscribe/js/jquery-2.1.4.js?v={{Msg "seo" "version"}}"></script>
|
|
|
+<script src="/vipsubscribe/js/fastclick.js?v={{Msg "seo" "version"}}"></script>
|
|
|
+<script src="/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
|
|
|
+<script src="/vipsubscribe/js/personal_info.js?v={{Msg "seo" "version"}}"></script>
|
|
|
+<script src="/vipsubscribe/js/common.js?v={{Msg "seo" "version"}}"></script>
|
|
|
+<script src="/vipsubscribe/js/share.js?v={{Msg "seo" "version"}}"></script>
|
|
|
+<script>
|
|
|
+
|
|
|
+ //解决android 键盘遮挡输入框
|
|
|
+ window.addEventListener("resize", function () {
|
|
|
+ if (document.activeElement.tagName === "INPUT" || document.activeElement.tagName === "TEXTAREA") {
|
|
|
+ window.setTimeout(function () {
|
|
|
+ //document.activeElement.scrollIntoViewIfNeeded();
|
|
|
+ document.activeElement.scrollIntoView({block: "center"});
|
|
|
+ }, 200);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ initShare({{.T.signature}});
|
|
|
+ {{if not .T.trialSign }}
|
|
|
+ $(function () {
|
|
|
+ //initScroll()
|
|
|
+ scrollView("input");
|
|
|
+ $(".btn").text("申请免费试用").attr("disabled", "disabled");
|
|
|
+ //获取用户信息
|
|
|
+ $DoPost("/subscribepay/trial/GetUserPhone", {}, function (r) {
|
|
|
+ if (r.success) {
|
|
|
$(".phone").val(r.phoneNum);
|
|
|
- check_tel($('.phone'),$('.code_btn'),false);
|
|
|
- }
|
|
|
- })
|
|
|
-
|
|
|
- //实时校验
|
|
|
- $('.name').bind("input propertychang",function(event){
|
|
|
- check_name($(this),false);
|
|
|
- })
|
|
|
- $('.phone').bind("input propertychang",function(event){
|
|
|
- check_tel($(this),$('.code_btn'),false);
|
|
|
- })
|
|
|
- $('.imgcode').bind("input propertychang",function(event){
|
|
|
- check_imgcode($(this),$('.code_btn'),false)
|
|
|
- })
|
|
|
- $('.phonecode').bind("input propertychang",function(event){
|
|
|
- check_phonecode($(this),false)
|
|
|
- })
|
|
|
- $('.company').bind("input propertychang",function(event){
|
|
|
- check_company($(this))
|
|
|
- })
|
|
|
-
|
|
|
- //刷新验证码
|
|
|
- $(".checkCode").on("click",function(){
|
|
|
- $(".checkCode").attr("src","/subscribepay/trial/captcha?rnd="+Math.random());
|
|
|
- });
|
|
|
-
|
|
|
- // textarea自适应高度
|
|
|
- /*$(".form-item-textarea textarea")[0].style.height = $(".form-item-textarea textarea")[0].scrollHeight + 'px';
|
|
|
- $(".form-item-textarea textarea").on("input", function () {
|
|
|
- this.style.height = 'auto';
|
|
|
- this.style.height = this.scrollHeight + "px";
|
|
|
- })*/
|
|
|
- // 倒计时
|
|
|
- $('.code_btn').click(function (e) {
|
|
|
- e.stopPropagation();
|
|
|
- let phone = $('.phone').val();
|
|
|
- if(/^1[3456789]\d{9}$/.test(phone)){
|
|
|
- $DoPost("/subscribepay/trial/sendPhoneCaptcha",{"phoneNum":phone,"imgCancode":$.trim($('.code').val())},function(r){
|
|
|
- if(r.success){
|
|
|
- count($('.code_btn'),"获取验证码");
|
|
|
- }else{
|
|
|
- weui.toast(r.errMsg,{
|
|
|
- duration: 2000,
|
|
|
- className: 'custom-toast',
|
|
|
- });
|
|
|
- if(r.errMsg!="手机格式不正确"){
|
|
|
- $(".checkCode").attr("src","/subscribepay/trial/captcha?rnd="+Math.random()); //刷新验证码
|
|
|
- }
|
|
|
+ check_tel($('.phone'), $('.code_btn'), false);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ //实时校验
|
|
|
+ $('.name').bind("input propertychang", function (event) {
|
|
|
+ check_name($(this), false);
|
|
|
+ });
|
|
|
+ $('.phone').bind("input propertychang", function (event) {
|
|
|
+ check_tel($(this), $('.code_btn'), false);
|
|
|
+ });
|
|
|
+ $('.imgcode').bind("input propertychang", function (event) {
|
|
|
+ check_imgcode($(this), $('.code_btn'), false)
|
|
|
+ });
|
|
|
+ $('.phonecode').bind("input propertychang", function (event) {
|
|
|
+ check_phonecode($(this), false)
|
|
|
+ });
|
|
|
+ $('.company').bind("input propertychang", function (event) {
|
|
|
+ check_company($(this))
|
|
|
+ });
|
|
|
+
|
|
|
+ //刷新验证码
|
|
|
+ $(".checkCode").on("click", function () {
|
|
|
+ $(".checkCode").attr("src", "/subscribepay/trial/captcha?rnd=" + Math.random());
|
|
|
+ });
|
|
|
+
|
|
|
+ // textarea自适应高度
|
|
|
+ /*$(".form-item-textarea textarea")[0].style.height = $(".form-item-textarea textarea")[0].scrollHeight + 'px';
|
|
|
+ $(".form-item-textarea textarea").on("input", function () {
|
|
|
+ this.style.height = 'auto';
|
|
|
+ this.style.height = this.scrollHeight + "px";
|
|
|
+ })*/
|
|
|
+ // 倒计时
|
|
|
+ $('.code_btn').click(function (e) {
|
|
|
+ e.stopPropagation();
|
|
|
+ let phone = $('.phone').val();
|
|
|
+ if (/^1[3456789]\d{9}$/.test(phone)) {
|
|
|
+ $DoPost("/subscribepay/trial/sendPhoneCaptcha", {
|
|
|
+ "phoneNum": phone,
|
|
|
+ "imgCancode": $.trim($('.code').val())
|
|
|
+ }, function (r) {
|
|
|
+ if (r.success) {
|
|
|
+ count($('.code_btn'), "获取验证码");
|
|
|
+ } else {
|
|
|
+ weui.toast(r.errMsg, {
|
|
|
+ duration: 2000,
|
|
|
+ className: 'custom-toast',
|
|
|
+ });
|
|
|
+ if (r.errMsg != "手机格式不正确") {
|
|
|
+ $(".checkCode").attr("src", "/subscribepay/trial/captcha?rnd=" + Math.random()); //刷新验证码
|
|
|
+ }
|
|
|
}
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- //提交
|
|
|
- $('#formInfo').submit(function(e) {
|
|
|
- var name = $('.name').val();
|
|
|
- var tel = $('.phone').val();
|
|
|
- var code = $('.phonecode').val();
|
|
|
- var company = $('.company').val();
|
|
|
- var job = $('.job').val();
|
|
|
- var post_data = {
|
|
|
- name: name,
|
|
|
- tel: tel,
|
|
|
- code: code,
|
|
|
- company: company,
|
|
|
- job:job
|
|
|
- }
|
|
|
- // ajax提交成功后跳转至vip购买页
|
|
|
- $DoPost("/subscribepay/trial/submitApply",post_data,function(r){
|
|
|
- if(r.success){
|
|
|
- window.location.replace("/weixin/pay/vipsubscribe_trial");
|
|
|
- }
|
|
|
})
|
|
|
- return false;
|
|
|
- });
|
|
|
+ }
|
|
|
});
|
|
|
- function initScroll() {
|
|
|
- (/iphone|ipod|ipad/i.test(navigator.appVersion)) && document.addEventListener('blur', function(e) {
|
|
|
- // 这里加了个类型判断,因为a等元素也会触发blur事件
|
|
|
- ['input', 'textarea'].includes(e.target.localName) && document.body.scrollIntoView(true)
|
|
|
- }, true)
|
|
|
- }
|
|
|
- {{else}}
|
|
|
- $('#formInfo').submit(function(e) {
|
|
|
- window.location.replace("/weixin/pay/vipsubscribe_trial");
|
|
|
- return false;
|
|
|
+ //提交
|
|
|
+ $('#formInfo').submit(function (e) {
|
|
|
+ var name = $('.name').val();
|
|
|
+ var tel = $('.phone').val();
|
|
|
+ var code = $('.phonecode').val();
|
|
|
+ var company = $('.company').val();
|
|
|
+ var job = $('.job').val();
|
|
|
+ var post_data = {
|
|
|
+ name: name,
|
|
|
+ tel: tel,
|
|
|
+ code: code,
|
|
|
+ company: company,
|
|
|
+ job: job
|
|
|
+ };
|
|
|
+ // ajax提交成功后跳转至vip购买页
|
|
|
+ $DoPost("/subscribepay/trial/submitApply", post_data, function (r) {
|
|
|
+ if (r.success) {
|
|
|
+ window.location.replace("/weixin/pay/vipsubscribe_trial");
|
|
|
+ }
|
|
|
});
|
|
|
- {{end}}
|
|
|
- </script>
|
|
|
+ return false;
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ // 解决移动端软键盘弹起遮挡输入框及ios下软键盘关闭后底部留白问题
|
|
|
+ function scrollView(obj) {
|
|
|
+ var view_height = $(document.body).height();
|
|
|
+
|
|
|
+ function change() {
|
|
|
+ $(document.body).height(view_height)
|
|
|
+ }
|
|
|
+ change();
|
|
|
+ window.addEventListener('resize', change);
|
|
|
+ $('.' + obj).on('blur', function () {
|
|
|
+ setTimeout(() => {
|
|
|
+ if (!document.activeElement.className.includes(obj)) {
|
|
|
+ window.scroll(0, 0)
|
|
|
+ }
|
|
|
+ }, 50)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ {{else}}
|
|
|
+ $('#formInfo').submit(function (e) {
|
|
|
+ window.location.replace("/weixin/pay/vipsubscribe_trial");
|
|
|
+ return false;
|
|
|
+ });
|
|
|
+ {{end}}
|
|
|
+
|
|
|
+
|
|
|
+</script>
|
|
|
</body>
|
|
|
|
|
|
</html>
|