mirror of
https://github.com/capricornxl/ad-password-self-service.git
synced 2025-08-11 21:34:34 +08:00
BUG FIX: ops_account返回必须使用渲染
This commit is contained in:
69
static/js/alert.js
Normal file
69
static/js/alert.js
Normal file
@@ -0,0 +1,69 @@
|
||||
(function ($) {
|
||||
if (!$) {
|
||||
throw new Error('jQuery is undefined!');
|
||||
}
|
||||
$('head').append(
|
||||
"<style>.hide-scroll{height:100vh;overflow:hidden}.wrap_overlay_drak{position:fixed;top:0;bottom:0;left:0;right:0;background-color:rgba(99,99,99,.3);z-index:999999;font-size:14px}.wrap_overlay_drak .wrap_overlay{position:fixed;width:400px;margin-left:-220px;padding:10px 20px;transform:translate(0,-180px);left:50%;top:50%;opacity:.3;box-shadow:0 2px 10px rgba(99,99,99,.3);background:#fff;transition:all .15s linear;border-radius:5px}.wrap_overlay_drak .wrap_overlay.wrap_overlay_show{transform:translate(0,-150px);opacity:1}.wrap_overlay_drak .wrap_overlay #confirm_msg{z-index:9998}.wrap_overlay_drak .wrap_overlay .content_overlay{padding:20px;font-size:14px;text-align:left}.wrap_overlay_drak .wrap_overlay #alert_buttons,.wrap_overlay_drak .wrap_overlay #confirm_buttons{padding:10px;text-align:right;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.wrap_overlay_drak .wrap_overlay .alert_btn{padding:5px 15px;margin:0 5px;background:#3187de;cursor:pointer;color:#fff;border:none;border-radius:5px;font-size:14px;outline:0;-webkit-appearance:none}.wrap_overlay_drak .wrap_overlay .alert_btn_cancel{background:0 0;color:#409eff;border:1px solid #ddd}.wrap_overlay_drak .wrap_overlay #alert_buttons .alert_btn:hover,.wrap_overlay_drak .wrap_overlay #confirm_buttons .alert_btn:hover{opacity:.7}</style>"
|
||||
);
|
||||
$.extend({
|
||||
alert: function () {
|
||||
var args = arguments;
|
||||
if (
|
||||
args.length &&
|
||||
typeof args[0] == 'string' &&
|
||||
!$('#alert_msg').length
|
||||
) {
|
||||
var dialog = $(
|
||||
'<div class="wrap_overlay_drak"><div class="wrap_overlay" id="alert_msg"><div class="content_overlay">' +
|
||||
args[0] +
|
||||
'</div><div id="alert_buttons"><button class="alert_btn alert_btn_ok">确定</button></div></div></div>'
|
||||
);
|
||||
dialog
|
||||
.on('click', '.alert_btn_ok', function () {
|
||||
$('.wrap_overlay').removeClass('wrap_overlay_show');
|
||||
setTimeout(function () {
|
||||
dialog.remove();
|
||||
}, 150);
|
||||
if (typeof args[1] == 'function') args[1].call($, !0);
|
||||
})
|
||||
.appendTo('body');
|
||||
setTimeout(function () {
|
||||
$('.wrap_overlay').addClass('wrap_overlay_show');
|
||||
}, 10);
|
||||
}
|
||||
},
|
||||
confirm: function () {
|
||||
var args = arguments;
|
||||
if (
|
||||
args.length &&
|
||||
typeof args[0] == 'string' &&
|
||||
!$('#confirm_msg').length
|
||||
) {
|
||||
var dialog = $(
|
||||
'<div class="wrap_overlay_drak"><div class="wrap_overlay" id="confirm_msg"><div class="content_overlay">' +
|
||||
args[0] +
|
||||
'</div><div id="confirm_buttons"><button class="alert_btn alert_btn_ok">确定</button><button class="alert_btn alert_btn_cancel">取消</button></div></div></div>'
|
||||
);
|
||||
dialog
|
||||
.on('click', '#confirm_buttons .alert_btn_ok', function () {
|
||||
$('.wrap_overlay').removeClass('wrap_overlay_show');
|
||||
setTimeout(function () {
|
||||
dialog.remove();
|
||||
if (typeof args[1] == 'function') args[1].call($, !0);
|
||||
}, 200);
|
||||
})
|
||||
.on('click', '#confirm_buttons .alert_btn_cancel', function () {
|
||||
$('.wrap_overlay').removeClass('wrap_overlay_show');
|
||||
setTimeout(function () {
|
||||
dialog.remove();
|
||||
if (typeof args[1] == 'function') args[1].call($, !1);
|
||||
}, 200);
|
||||
})
|
||||
.appendTo('body');
|
||||
setTimeout(function () {
|
||||
$('.wrap_overlay').addClass('wrap_overlay_show');
|
||||
}, 10);
|
||||
}
|
||||
},
|
||||
});
|
||||
})(jQuery);
|
1
static/js/bubbly-bg.js
Normal file
1
static/js/bubbly-bg.js
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";window.bubbly=function(t){var n=t||{},o=function(){return Math.random()},r=n.canvas||document.createElement("canvas"),e=r.width,a=r.height;null===r.parentNode&&(r.setAttribute("style","position:fixed;z-index:-1;left:0;top:0;min-width:100vw;min-height:100vh;"),e=r.width=window.innerWidth,a=r.height=window.innerHeight,document.body.appendChild(r));var i=r.getContext("2d");i.shadowColor=n.shadowColor||"#fff",i.shadowBlur=n.blur||4;var l=i.createLinearGradient(0,0,e,a);l.addColorStop(0,n.colorStart||"#2AE"),l.addColorStop(1,n.colorStop||"#17B");for(var c=n.bubbles||Math.floor(.02*(e+a)),u=[],d=0;d<c;d++)u.push({f:(n.bubbleFunc||function(){return"hsla(0, 0%, 100%, "+.1*o()+")"}).call(),x:o()*e,y:o()*a,r:(n.radiusFunc||function(){return 4+o()*e/25}).call(),a:(n.angleFunc||function(){return o()*Math.PI*2}).call(),v:(n.velocityFunc||function(){return.1+.5*o()}).call()});!function t(){if(null===r.parentNode)return cancelAnimationFrame(t);!1!==n.animate&&requestAnimationFrame(t),i.globalCompositeOperation="source-over",i.fillStyle=l,i.fillRect(0,0,e,a),i.globalCompositeOperation=n.compose||"lighter",u.forEach(function(t){i.beginPath(),i.arc(t.x,t.y,t.r,0,2*Math.PI),i.fillStyle=t.f,i.fill(),t.x+=Math.cos(t.a)*t.v,t.y+=Math.sin(t.a)*t.v,t.x-t.r>e&&(t.x=-t.r),t.x+t.r<0&&(t.x=e+t.r),t.y-t.r>a&&(t.y=-t.r),t.y+t.r<0&&(t.y=a+t.r)})}()};
|
@@ -1,87 +1,39 @@
|
||||
$(function () {
|
||||
$(".content .con_right .left").click(function (e) {
|
||||
$(this).css({ "color": "#333333", "border-bottom": "2px solid #2e558e" });
|
||||
$(".content .con_right .right").css({ "color": "#999999", "border-bottom": "2px solid #dedede" });
|
||||
$(".content .con_right ul .con_r_left").css("display", "block");
|
||||
$(".content .con_right ul .con_r_right").css("display", "none");
|
||||
});
|
||||
|
||||
$(".content .con_right .right").click(function (e) {
|
||||
$(this).css({ "color": "#333333", "border-bottom": "2px solid #2e558e" });
|
||||
$(".content .con_right .left").css({ "color": "#999999", "border-bottom": "2px solid #dedede" });
|
||||
$(".content .con_right ul .con_r_right").css("display", "block");
|
||||
$(".content .con_right ul .con_r_left").css("display", "none");
|
||||
});
|
||||
|
||||
|
||||
$('#btn_modify').click(function () {
|
||||
|
||||
function BtnClick(btn, type, unsecpwd) {
|
||||
$(btn).click(function () {
|
||||
// ^(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[!@#$\%\^\&\*\(\)])[0-9a-zA-Z!@#$\%\^\&\*\(\)]{8,32}$ 要求密码了里面包含字母、数字、特殊字符。
|
||||
// (?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,30} 密码必须同时包含大写、小写、数字和特殊字符其中三项且至少8位
|
||||
// (?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,30} 密码必须同时包含大写、小写、数字和特殊字符其中三项且至少8位
|
||||
// (?=.*?[a-z])(?=.*?[A-Z])(?=.*?\d)(?=.*?[!#@*&.])[a-zA-Z\d!#@*&.]*{8,30}$
|
||||
// 判断密码满足大写字母,小写字母,数字和特殊字符,其中四种组合都需要包含
|
||||
// (?=.*[0-9])(?=.*[a-zA-Z]).{8,30} 大小写字母+数字
|
||||
regex_mail = new RegExp('^\\w+((-\\w+)|(\\.\\w+))*\\@[A-Za-z0-9]+((\\.|-)[A-Za-z0-9]+)*\\.[A-Za-z0-9]+$')
|
||||
regex_pwd = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,30}');
|
||||
//if ($.trim($('#user_email').val()) === '') {
|
||||
// alert('请输入邮箱账号');
|
||||
// return false;
|
||||
//} else if (!regex_mail.test($.trim($('#user_email').val()))) {
|
||||
// alert('请输入正确的邮箱账号。\n');
|
||||
// return false;
|
||||
//} else
|
||||
if ($.trim($('#old_password').val()) === '') {
|
||||
alert('请输入旧密码');
|
||||
return false;
|
||||
} else if ($.trim($('#new_password').val()) === '') {
|
||||
alert('请输入新密码');
|
||||
return false;
|
||||
} else if ($.trim($('#new_password').val()) === '1qaz@WSX') {
|
||||
alert('密码1qaz@WSX为初始密码,禁止使用,请重新输入新密码。\n密码必须同时包含大写、小写、数字和特殊字符其中三项且至少8位。');
|
||||
return false;
|
||||
} else if (!regex_pwd.test($.trim($('#new_password').val()))) {
|
||||
alert('密码不符合复杂度规则,请重新输入新密码。\n密码必须同时包含大写、小写、数字和特殊字符其中三项且至少8位。');
|
||||
return false;
|
||||
} else if ($.trim($('#ensure_password').val()) === '') {
|
||||
alert('请再次输入新密码');
|
||||
return false;
|
||||
} else if ($.trim($('#new_password').val()) === $.trim($('#old_password').val())) {
|
||||
alert('新旧密码不能一样');
|
||||
return false;
|
||||
} else if ($.trim($('#ensure_password').val()) !== $.trim($('#new_password').val())) {
|
||||
alert('两次输入的新密码不一致');
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
$('#btn_reset').click(function () {
|
||||
let regex_mail = new RegExp('^\\w+((-\\w+)|(\\.\\w+))*\\@[A-Za-z0-9]+((\\.|-)[A-Za-z0-9]+)*\\.[A-Za-z0-9]+$')
|
||||
let regex_pwd = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,30}');
|
||||
//if ($.trim($('#user_email').val()) === '') {
|
||||
//alert('请输入邮箱账号');
|
||||
// return false;
|
||||
//} else if (!regex_mail.test($.trim($('#user_email').val()))) {
|
||||
// alert('请输入正确的邮箱账号。\n');
|
||||
// return false;
|
||||
//} else
|
||||
if ($.trim($('#new_password').val()) === '') {
|
||||
alert('请输入密码');
|
||||
let new_password = $('#new_password').val()
|
||||
let old_password = $('#old_password').val()
|
||||
let ensure_password = $('#ensure_password').val()
|
||||
if ($.trim(old_password) === '' && type === 'modify') {
|
||||
$.alert('请输入旧密码');
|
||||
return false;
|
||||
} else if ($.trim($('#ensure_password').val()) === '') {
|
||||
alert('请再次输入新密码');
|
||||
} else if ($.trim(new_password) === '') {
|
||||
$.alert('请输入新密码');
|
||||
return false;
|
||||
} else if ($.trim($('#new_password').val()) === '1qaz@WSX') {
|
||||
alert('密码1qaz@WSX为初始密码,禁止使用,请重新输入新密码。\n密码必须同时包含大写、小写、数字和特殊字符其中三项且至少8位。');
|
||||
} else if (jQuery.inArray(new_password, unsecpwd) !== -1) {
|
||||
$.alert('弱密码禁止使用,请重新输入新密码。\n密码必须同时包含大写、小写、数字和特殊字符其中三项且至少8位。');
|
||||
return false;
|
||||
} else if (!regex_pwd.test($.trim($('#new_password').val()))) {
|
||||
alert('密码不符合复杂度规则,请重新输入新密码。\n密码必须同时包含大写、小写、数字和特殊字符其中三项且至少8位。\n例如:1qaz@WSX');
|
||||
} else if (!regex_pwd.test($.trim(new_password))) {
|
||||
$.alert('密码不符合复杂度规则,请重新输入新密码。\n密码必须同时包含大写、小写、数字和特殊字符其中三项且至少8位。');
|
||||
return false;
|
||||
} else if ($.trim($('#ensure_password').val()) !== $.trim($('#new_password').val())) {
|
||||
alert('两次输入的新密码不一致');
|
||||
} else if ($.trim(ensure_password) === '') {
|
||||
$.alert('请再次输入新密码');
|
||||
return false;
|
||||
} else if ($.trim(new_password) === $.trim(old_password)) {
|
||||
$.alert('新旧密码不能一样');
|
||||
return false;
|
||||
} else if ($.trim(ensure_password) !== $.trim(new_password)) {
|
||||
$.alert('两次输入的新密码不一致');
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
@@ -1,18 +1,19 @@
|
||||
!function (window, document) {
|
||||
function d(a) {
|
||||
var e, c = document.createElement("iframe"),
|
||||
d = "https://login.dingtalk.com/login/qrcode.htm?goto=" + a.goto ;
|
||||
d = "https://login.dingtalk.com/login/qrcode.htm?goto=" + a.goto;
|
||||
d += a.style ? "&style=" + encodeURIComponent(a.style) : "",
|
||||
d += a.href ? "&href=" + a.href : "",
|
||||
c.src = d,
|
||||
c.frameBorder = "0",
|
||||
c.allowTransparency = "true",
|
||||
c.scrolling = "no",
|
||||
c.width = a.width ? a.width + 'px' : "365px",
|
||||
c.width = a.width ? a.width + 'px' : "365px",
|
||||
c.height = a.height ? a.height + 'px' : "400px",
|
||||
e = document.getElementById(a.id),
|
||||
e.innerHTML = "",
|
||||
e.appendChild(c)
|
||||
}
|
||||
|
||||
window.DDLogin = d
|
||||
}(window, document);
|
||||
}(window, document);
|
14
static/js/dmaku.js
Normal file
14
static/js/dmaku.js
Normal file
@@ -0,0 +1,14 @@
|
||||
var scanCodeButton = document.getElementById('scanCode')
|
||||
var modifyPwdButton = document.getElementById('modifyPwd')
|
||||
var container = document.getElementById('middle-container')
|
||||
|
||||
if (scanCodeButton !== null) {
|
||||
scanCodeButton.addEventListener('click', function () {
|
||||
container.classList.add('right-panel-active')
|
||||
})
|
||||
}
|
||||
if (modifyPwdButton !== null) {
|
||||
modifyPwdButton.addEventListener('click', function () {
|
||||
container.classList.remove('right-panel-active')
|
||||
});
|
||||
}
|
24
static/js/wwLogin-1.0.0.js
Normal file
24
static/js/wwLogin-1.0.0.js
Normal file
@@ -0,0 +1,24 @@
|
||||
!function(a, b, c) {
|
||||
function d(c) {
|
||||
var d = b.createElement("iframe"),
|
||||
e = "https://open.work.weixin.qq.com/wwopen/sso/qrConnect?appid=" + c.appid + "&agentid=" + c.agentid + "&redirect_uri=" + c.redirect_uri + "&state=" + c.state + "&login_type=jssdk";
|
||||
e += c.style ? "&style=" + c.style: "",
|
||||
e += c.href ? "&href=" + c.href: "",
|
||||
d.src = e,
|
||||
d.frameBorder = "0",
|
||||
d.allowTransparency = "true",
|
||||
d.scrolling = "no",
|
||||
d.width = "300px",
|
||||
d.height = "400px";
|
||||
var f = b.getElementById(c.id);
|
||||
f.innerHTML = "",
|
||||
f.appendChild(d),
|
||||
d.onload = function() {
|
||||
d.contentWindow.postMessage && a.addEventListener && (a.addEventListener("message",
|
||||
function(b) {
|
||||
b.data && b.origin.indexOf("work.weixin.qq.com") > -1 && (a.location.href = b.data)
|
||||
}), d.contentWindow.postMessage("ask_usePostMessage", "*"))
|
||||
}
|
||||
}
|
||||
a.WwLogin = d
|
||||
} (window, document);
|
Reference in New Issue
Block a user