mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
Update login.js
This commit is contained in:
parent
853ba04ff1
commit
5e0407f184
@ -33,14 +33,14 @@ $(function () {
|
|||||||
|
|
||||||
/*! 登录图形验证码刷新 */
|
/*! 登录图形验证码刷新 */
|
||||||
$body.on('click', '[data-captcha]', function () {
|
$body.on('click', '[data-captcha]', function () {
|
||||||
var type, token, $that, verify, uniqid, url;
|
var type, token, verify, uniqid, action, $that = $(this);
|
||||||
$that = $(this), url = this.getAttribute('data-captcha') || '';
|
action = this.getAttribute('data-captcha') || location.href;
|
||||||
if (url.length < 5) return $.msg.tips('请设置验证码请求地址');
|
if (action.length < 5) return $.msg.tips('请设置验证码请求地址');
|
||||||
type = this.getAttribute('data-captcha-type') || 'captcha-type';
|
type = this.getAttribute('data-captcha-type') || 'captcha-type';
|
||||||
token = this.getAttribute('data-captcha-token') || 'captcha-token';
|
token = this.getAttribute('data-captcha-token') || 'captcha-token';
|
||||||
uniqid = this.getAttribute('data-field-uniqid') || 'uniqid';
|
uniqid = this.getAttribute('data-field-uniqid') || 'uniqid';
|
||||||
verify = this.getAttribute('data-field-verify') || 'verify';
|
verify = this.getAttribute('data-field-verify') || 'verify';
|
||||||
$.form.load(url, {type: type, token: token}, 'post', function (ret) {
|
$.form.load(action, {type: type, token: token}, 'post', function (ret) {
|
||||||
if (ret.code) {
|
if (ret.code) {
|
||||||
$that.html('');
|
$that.html('');
|
||||||
$that.append($('<img alt="img" src="">').attr('src', ret.data.image));
|
$that.append($('<img alt="img" src="">').attr('src', ret.data.image));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user