解决注册页面倒计时点击完之后无法再次倒计时问题
This commit is contained in:
@@ -40,6 +40,6 @@
|
||||
<script src="../../common/js/layer.js"></script>
|
||||
<script src="../../common/js/crypto-js.js"></script>
|
||||
<script src="./js/des.js"></script>
|
||||
<script src="./js/index.js"></script>
|
||||
<script src="./js/index.js?v=1"></script>
|
||||
|
||||
</html>
|
@@ -23,7 +23,7 @@ const toastMsg = (content = '操作完成', time = 2) => {
|
||||
var browser = checkVersion();
|
||||
const urlPrefix = getUrlPrefix();
|
||||
var getUrl = getQueryString();
|
||||
var time = 59;
|
||||
var time = 5;
|
||||
var isClick = true;
|
||||
if (EnvCheck() == 'test') {//degBug
|
||||
new VConsole();
|
||||
@@ -69,6 +69,7 @@ function getCode (num, phone, code) {
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.code == 200) {
|
||||
time = 59
|
||||
timerFun()
|
||||
hideLoading(layerIndex)
|
||||
toastMsg(res.message)
|
||||
@@ -124,6 +125,7 @@ $('.box .code .num').click(function () {
|
||||
var num = Number($('.box .phone .num').text().match(/\d+/)[0]);
|
||||
var phone = Number($('.box .phone input').val());
|
||||
var code = Number($('.box .code input').val());
|
||||
//
|
||||
if (isClick) {
|
||||
if (phone == '') {
|
||||
toastMsg('請輸入手機號');
|
||||
@@ -152,7 +154,6 @@ function timerFun () {
|
||||
clearInterval(timer);
|
||||
$('.box .code .num').text('獲取驗證碼');
|
||||
isClick = true;
|
||||
time = 59
|
||||
} else {
|
||||
$('.box .code .num').text(`${time}秒後重新獲取`);
|
||||
time--;
|
||||
|
Reference in New Issue
Block a user