|
|
@ -15,6 +15,7 @@ layui.use([ 'carousel', 'form' ], function() { |
|
|
|
var url = basePath + "/captcha/captchaImage?type=" + type + "×tamp=" + timestamp; |
|
|
|
console.log("点击验证码啦啦啦啦啦") |
|
|
|
$(".imgcode").attr("src", url); |
|
|
|
$(".imgcode").data("ts", timestamp); // 👈 存一下
|
|
|
|
} |
|
|
|
|
|
|
|
// 页面加载时刷新验证码
|
|
|
@ -28,6 +29,7 @@ layui.use([ 'carousel', 'form' ], function() { |
|
|
|
var type = system_config?.captchaType || "math"; |
|
|
|
var url = basePath + "/captcha/captchaImage?type=" + type + "×tamp=" + timestamp; |
|
|
|
$(this).attr("src", url); |
|
|
|
$(".imgcode").data("ts", timestamp); // 👈 存一下
|
|
|
|
}); |
|
|
|
// 监听提交
|
|
|
|
form.on('submit(login_)', function(data) { |
|
|
@ -57,7 +59,7 @@ layui.use([ 'carousel', 'form' ], function() { |
|
|
|
"telephone":telephone, |
|
|
|
"password":MD5(password), |
|
|
|
"captcha":captcha, |
|
|
|
"timestamp":timestamp |
|
|
|
"timestamp":$(".imgcode").data("ts") |
|
|
|
}, |
|
|
|
type : 'post', |
|
|
|
dataType : 'json', |
|
|
|