blessing-skin-server/resources/assets/src/js/auth/captcha.js
2017-12-24 11:40:15 +08:00

16 lines
344 B
JavaScript

'use strict';
function refreshCaptcha() {
let timestamp = new Date().getTime();
// Refresh Captcha Image
$('.captcha').attr('src', url(`auth/captcha?${timestamp}`));
// Clear input
$('#captcha').val('');
}
$('.captcha').click(refreshCaptcha);
if (process.env.NODE_ENV === 'test') {
module.exports = refreshCaptcha;
}