mirror of
https://gitee.com/coder-xiaomo/flashsale
synced 2025-09-11 06:21:40 +08:00
添加用户注册功能;Encrpt修改为Encrypt;添加填充测试数据
This commit is contained in:
@@ -21,6 +21,12 @@
|
||||
<button class="btn blue" id="getotp" type="submit">
|
||||
获取OTP短信
|
||||
</button>
|
||||
<a href="register.html">用户注册</a>
|
||||
|
||||
<br>
|
||||
<button class="btn blue" id="fillData">
|
||||
快速测试
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -39,9 +45,11 @@
|
||||
data: {
|
||||
"telephone": telephone,
|
||||
},
|
||||
xhrFields: {withCredentials: true},
|
||||
success: function (data) {
|
||||
if (data.status == "success") {
|
||||
alert("OTP已经发送到了您的手机上,请注意查收");
|
||||
window.location.href = "./register.html";
|
||||
} else {
|
||||
alert("OTP发送失败,原因为" + data.data.errMsg);
|
||||
}
|
||||
@@ -51,6 +59,18 @@
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
$("#fillData").on("click", function () {
|
||||
$("#telephone").val("18900000001");
|
||||
$("#telephone").attr("disabled", true);
|
||||
// 屏蔽弹窗
|
||||
alert = function () {};
|
||||
$("#getotp").click();
|
||||
})
|
||||
|
||||
if(location.search=="?quickDebug") {
|
||||
$("#fillData").click();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
Reference in New Issue
Block a user