|
发表于
2022-8-26 21:00:28
|
显示全部楼层
- //自动登录
- function login() {
- console.log("登录ing");
- let object = $(".choosed[style='display: none;']")
- if (object == null) {
- $(".free-login").click();
- }else {
- console.log("已经勾选")
- }
- $(":text").attr("autocomplete","off");
- $(":password").attr("autocomplete","new-password");
- var focus = new Event('focus');
- var input= new Event('input');
- var change= new Event('change');
- var blur= new Event('blur');
- let username = document.getElementsByClassName("username")[0];
- username.value = setting.username;
- username.dispatchEvent(focus);
- username.dispatchEvent(input);
- username.dispatchEvent(change);
- username.dispatchEvent(blur);
- let password =document.getElementsByClassName("password")[0];
- password.value= setting.password;
- password.dispatchEvent(focus);
- password.dispatchEvent(input);
- password.dispatchEvent(change);
- password.dispatchEvent(blur);
- //七天自动登录
- if (setting.isLogin) {
- $(".el-button.login-btn").click();
- setting.isLogin = false
- }
- }
复制代码 |
|