第三方登陆

This commit is contained in:
hubingliang
2018-03-30 14:34:28 +08:00
parent ca24f2047b
commit 34a1e76c0e
3 changed files with 41 additions and 20 deletions
+19 -16
View File
@@ -61,20 +61,23 @@ $("#login_btn").on("click", function () {
var phoneNum = $("#input_phoneNumber").val();
var code = $("#input_codeSms").val();
var protocal = $(".check").find(".checkImg").css("display");
if(phoneNum == ""){
$.toast("请输入手机号码");
return false;
}
if(code == ""){
$.toast("请输入验证码");
return false;
}
if(protocal != "block"){
$.toast("请同意服务协议");
return false;
}
axios.post("/rest/user/sendMobileCode", {mobile: mobile})
.then(function (response) {
})
if(checkPhoneNum(phoneNum)){
if(code == ""){
$.toast("请输入验证码");
return false;
}
if(protocal != "block"){
$.toast("请同意服务协议");
return false;
}
axios.post("/rest/user/smsLogin", {mobile: phoneNum,smsCode:code})
.then(function (response) {
var data = response.data
if(data.status){
var token = data.data;
}else{
$.toast("data.message");
}
})
}
});