BUG FIX: ops_account返回必须使用渲染

This commit is contained in:
向乐🌌
2021-06-26 14:53:18 +08:00
parent 72fe535f3c
commit a9751d47b4
78 changed files with 10784 additions and 434 deletions

320
static/css/dmaku.css Normal file
View File

@@ -0,0 +1,320 @@
* {
box-sizing: border-box;
}
body {
font-family: 'Montserrat', sans-serif;
background: #f6f5f7;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100vh;
margin: -20px 0 50px;
}
h1 {
font-weight: bold;
margin: 0;
}
p {
font-size: 4px;
line-height: 20px;
letter-spacing: .5px;
margin: 20px 0 30px;
}
span {
font-size: 12px;
}
a {
color: #333;
font-size: 14px;
text-decoration: none;
margin: 15px 0;
}
.head-container {
background: url(/static/img/logo.png) left center no-repeat;
overflow: hidden;
width: 768px;
max-width: 100%;
height: 100px;
max-height: 100px;
color: #1b83d8;
vertical-align: middle;
display: inline-block;
}
.head-container p {
float: right;
margin-top: 28px;
padding: 10px 30px;
font-size: 28px;
vertical-align: middle;
text-shadow: 0 14px 28px rgba(0, 0, 0, .25), 0 5px 5px rgba(0, 0, 0, .22);
}
.middle-container {
background: #fff;
border-radius: 10px;
box-shadow: 0 14px 28px rgba(0, 0, 0, .25), 0 10px 10px rgba(0, 0, 0, .22);
position: relative;
overflow: hidden;
width: 768px;
max-width: 100%;
min-height: 480px;
}
.form-container form {
background: #fff;
display: flex;
flex-direction: column;
padding: 0 50px;
height: 100%;
justify-content: center;
align-items: center;
text-align: center;
}
.social-container {
margin: 20px 0;
}
.social-container a {
border: 1px solid #ddd;
border-radius: 50%;
display: inline-flex;
justify-content: center;
align-items: center;
margin: 0 5px;
height: 40px;
width: 40px;
}
.social-container a:hover {
background-color: #eee;
}
.form-container input {
background: #eee;
border: none;
padding: 12px 15px;
margin: 8px 0;
width: 100%;
outline: none;
}
button {
border-radius: 20px;
border: 1px solid #1b83d8;
background: #1b83d8;
color: #fff;
font-size: 12px;
font-weight: bold;
padding: 12px 45px;
letter-spacing: 1px;
text-transform: uppercase;
transition: transform 80ms ease-in;
cursor: pointer;
}
button:active {
transform: scale(.95);
}
button:focus {
outline: none;
}
button.ghost {
background: transparent;
border-color: #fff;
}
.form-container {
position: absolute;
top: 0;
height: 100%;
transition: all .6s ease-in-out;
}
.left-content-container {
left: 0;
width: 50%;
z-index: 2;
}
.right-content-container {
left: 0;
width: 50%;
z-index: 1;
opacity: 0;
}
.overlay-container {
position: absolute;
top: 0;
left: 50%;
width: 50%;
height: 100%;
overflow: hidden;
transition: transform .6s ease-in-out;
z-index: 100;
}
.overlay {
background: #41aaff;
background: linear-gradient(to right, #1b83d8, #6ebbfa) no-repeat 0 0 / cover;
color: #fff;
position: relative;
left: -100%;
height: 100%;
width: 200%;
transform: translateY(0);
transition: transform .6s ease-in-out;
}
.overlay-panel {
position: absolute;
top: 0;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 0 40px;
height: 100%;
width: 50%;
text-align: center;
transform: translateY(0);
transition: transform .6s ease-in-out;
}
.overlay-right {
right: 0;
transform: translateY(0);
}
.overlay-left {
transform: translateY(-20%);
}
/* Move signin to right */
.middle-container.right-panel-active .left-content-container {
transform: translateY(100%);
}
/* Move overlay to left */
.middle-container.right-panel-active .overlay-container {
transform: translateX(-100%);
}
/* Bring signup over signin */
.middle-container.right-panel-active .right-content-container {
transform: translateX(100%);
opacity: 1;
z-index: 5;
}
/* Move overlay back to right */
.middle-container.right-panel-active .overlay {
transform: translateX(50%);
}
/* Bring back the text to center */
.middle-container.right-panel-active .overlay-left {
transform: translateY(0);
}
/* Same effect for right */
.middle-container.right-panel-active .overlay-right {
transform: translateY(20%);
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

69
static/js/alert.js Normal file
View 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
View 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)})}()};

View File

@@ -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;
}
});
})
}

View File

@@ -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
View 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')
});
}

View 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);