|
@@ -8,10 +8,10 @@
|
|
|
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"></script>
|
|
|
- <link rel="stylesheet" type="text/css" href="/vipsubscribe/css/base.css" />
|
|
|
- <link rel="stylesheet" type="text/css" href="/vipsubscribe/iconfont/iconfont.css" />
|
|
|
- <link rel="stylesheet" href="/vipsubscribe/css/weui.min.css">
|
|
|
+ <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" href="/vipsubscribe/css/weui.min.css?v={{Msg "seo" "version"}}">
|
|
|
<link rel="stylesheet" href="/vipsubscribe/css/trial_info.css?v=111">
|
|
|
</head>
|
|
|
|
|
@@ -31,17 +31,17 @@
|
|
|
<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))">
|
|
|
+ <input type="text" placeholder="输入姓名" value="" class="name" 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'))">
|
|
|
+ <input type="number" placeholder="输入手机号" value="" class="phone" maxlength="11" onchange="check_tel($(this),$('.code_btn'),true)">
|
|
|
</div>
|
|
|
<div class="form_item form_item_line">
|
|
|
- <input type="number" placeholder="图形验证码" value="" class="code" maxlength="6" onchange="check_code($(this))">
|
|
|
- <img src="/subscribepay/public/captcha" class="checkCode">
|
|
|
+ <input type="number" placeholder="图形验证码" value="" class="code imgcode" 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" maxlength="6" onchange="check_code($(this))">
|
|
|
+ <input type="number" placeholder="手机验证码" value="" class="code phonecode" maxlength="6" onchange="check_phonecode($(this),true)">
|
|
|
<button class="code_btn" type="button">获取验证码</button>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -72,17 +72,35 @@
|
|
|
|
|
|
</form>
|
|
|
</div>
|
|
|
- <script src="/vipsubscribe/js/jquery-2.1.4.js"></script>
|
|
|
- <script src="/vipsubscribe/js/fastclick.js"></script>
|
|
|
- <script src="/vipsubscribe/js/weui.min.js"></script>
|
|
|
- <script src="/vipsubscribe/js/personal_info.js"></script>
|
|
|
+ <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>
|
|
|
$(function () {
|
|
|
- //
|
|
|
+ //实时校验
|
|
|
+ $('.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(){
|
|
|
- console.log("-----")
|
|
|
- reLoadCaptcha();
|
|
|
+ $(".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 () {
|
|
@@ -94,9 +112,19 @@
|
|
|
e.stopPropagation();
|
|
|
let phone = $('.phone').val();
|
|
|
if(/^1[3456789]\d{9}$/.test(phone)){
|
|
|
- count($(this),"获取验证码");
|
|
|
+ $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',
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
+ //提交
|
|
|
$('#formInfo').submit(function(e) {
|
|
|
var name = $('.name').val();
|
|
|
var tel = $('.phone').val();
|
|
@@ -111,15 +139,19 @@
|
|
|
job:job
|
|
|
}
|
|
|
// ajax提交成功后跳转至vip购买页
|
|
|
- // $.ajax({
|
|
|
- window.location.href = "vip_purchase.html"
|
|
|
- // });
|
|
|
+ $DoPost("/subscribepay/trial/submitApply",post_data,function(r){
|
|
|
+ if(r.success){
|
|
|
+ alert("ok")
|
|
|
+ }else{
|
|
|
+ weui.toast(r.errMsg,{
|
|
|
+ duration: 2000,
|
|
|
+ className: 'custom-toast',
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
return false;
|
|
|
});
|
|
|
});
|
|
|
- function reLoadCaptcha(){
|
|
|
- $(".checkCode").attr("src","/jyapp/free/captcha?rnd="+Math.random());
|
|
|
- }
|
|
|
</script>
|
|
|
</body>
|
|
|
|