public/static/common/js/mobile_reg.js
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
$(function () {
$("input[name=mobile]").keyup(function(event){
var mobile = $(this).val();
if (11 == mobile.length && 32 <= event.keyCode) {
$('#vertify_div').css('display','block');
}
});
$("input[name=mobile_vertify]").keyup(function(event){
var mobile_vertify = $(this).val();
if (4 <= mobile_vertify.length && 32 <= event.keyCode) {
send_mobile_code();
}
});
})
function send_mobile_code() {
var mobile = $("input[name=mobile]").val();
// 手机号是否为空
if (!mobile) {
$("input[name=mobile]").focus();
layer.msg('请输入手机号码!', {time: 1500});
return false;
}
// 手机格式不正确
var reg = /^1[0-9]{10}$/i;
if (!reg.test(mobile)) {
$("input[name=mobile]").focus();
layer.msg('请输入正确的请输入手机号码!', {time: 1500});
return false;
}
$('#vertify_div').css('display','block');
var mobile_vertify = $("input[name=mobile_vertify]").val();
if (!mobile_vertify) {
return false;
}
// 设置为不可点击
$("#mobile_code_button").val('获取中…').attr('disabled', 'disabled');
var __mobile_1_token__ = $('input[name=__mobile_1_token__]').val();
$.ajax({
url: __root_dir__+'/index.php?m=api&c=Ajax&a=SendMobileCode&_ajax=1',
// source:2 登录 source:0 注册
data: {type:'users_mobile_reg', mobile:mobile, is_mobile:true, title:'账号注册', source:0,IsVertify:1, vertify:mobile_vertify, __mobile_1_token__:__mobile_1_token__},
type:'post',
dataType:'json',
success:function(res){
if (res.code == 1) {
code_countdown();
layer.msg(res.msg, {time: 1500});
} else {
$("#mobile_code_button").val('获取验证码').removeAttr("disabled");
layer.alert(res.msg, {icon: 2, title: false, closeBtn: 0});
}
},
error : function() {
$("#mobile_code_button").val('获取验证码').removeAttr("disabled");
layer.alert('发送失败,请尝试重新发送!', {icon: 5, title: false, closeBtn: 0});
后面还有 114 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
