Skip to content

Commit

Permalink
fix: LIP签到
Browse files Browse the repository at this point in the history
  • Loading branch information
Zebartin committed Nov 1, 2024
1 parent 8770347 commit 7cbede6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions NIKKE/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
修复以下问题:

- LIP签到

新功能:

- 在必要时自动登录,需要配置游戏账号密码

具体使用方式详见[README](https://github.com/Zebartin/autoxjs-scripts/blob/master/NIKKE/README.md)
12 changes: 9 additions & 3 deletions NIKKE/NIKKEutils.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ function checkInLIP() {
return false;
}
const entrance = res.find(e =>
e.text.match(/[领取超值好礼签到领珠宝]{3,}/) != null &&
e.text.match(/[领取超值好礼签到领珠宝送]{3,}/) != null &&
e.bounds != null &&
e.bounds.top > announcementBtn.bounds.bottom
);
Expand Down Expand Up @@ -259,10 +259,15 @@ function checkInLIP() {
function tryLogin() {
const NIKKEstorage = storages.create("NIKKEconfig");
const { email, password } = NIKKEstorage.get('account', {});
const launchMethod = NIKKEstorage.get('launchMethod', null);
if (!email || !password) {
console.error('未配置游戏账号密码,无法登录游戏');
return false;
}
if (launchMethod != 'NIKKE') {
console.error('不是通过游戏本体启动,无法输入账号密码');
return false;
}
const 忘记密码 = {
text: "忘记密码",
regex: /[忘记]/
Expand Down Expand Up @@ -345,9 +350,9 @@ function tryLogin() {
const dis = 输入确定.bounds.width() / 2;
const mayBeEdit = {
bounds: android.graphics.Rect(
ocrInfo.img.width() - dis,
ocrInfo.img.width - dis,
输入确定.bounds.top,
ocrInfo.img.width() + dis,
ocrInfo.img.width + dis,
输入确定.bounds.bottom,
)
};
Expand Down Expand Up @@ -474,6 +479,7 @@ function 等待NIKKE加载() {

function 退出NIKKE() {
home();
const NIKKEstorage = storages.create("NIKKEconfig");
const launchMethod = NIKKEstorage.get('launchMethod', 'NIKKE');
if (launchMethod == 'NIKKE') {
killApp('NIKKE');
Expand Down
1 change: 1 addition & 0 deletions NIKKE/NIKKE设置.js
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,7 @@ if (NIKKEstorage.get('checkUpdateAuto', false)) {
const dialogView = ui.inflate(
<vertical padding="16">
<text textSize="12sp" text="明文存储,可能有安全风险" />
<text textSize="12sp" text="仅在通过游戏本体启动时可以自动输入账号密码" />
<text textSize="12sp" text="如果使用密码管理软件,可能需要对NIKKE禁用自动填充" />
<input id="email" hint="邮箱账号" inputType="textEmailAddress" />
<input id="password" hint="密码" inputType="textPassword" />
Expand Down

0 comments on commit 7cbede6

Please sign in to comment.