Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在鸿蒙系统中,截屏为"允许" #3

Closed
0x7A7A6572 opened this issue Jun 4, 2022 · 6 comments
Closed

在鸿蒙系统中,截屏为"允许" #3

0x7A7A6572 opened this issue Jun 4, 2022 · 6 comments

Comments

@0x7A7A6572
Copy link
Owner

大部分问题是因为我使用4.1.1导致的,例如无法解锁,我更改为下面的代码就可以使用了,原因是因为password为一个对象(不知道是不是叫这个),password.length无法获取长度。
let passwordArr = password.toString().split("");
for (let i = 0; i < passwordArr.length; i++) {
console.log("click数字:",passwordArr[i],"。");
click(numberPosition[passwordArr[i]][0], numberPosition[passwordArr[i]][1]);
另在鸿蒙系统中,截屏为"允许"
if (beginBtn = classNameContains("Button").textContains("允许").findOne(2000)) {
beginBtn.click();

Originally posted by @MangoBear-CN in #2 (comment)

@MangoBear-CN
Copy link

今天程序阻塞, 将TABLE_PAGE_ACTIVITY​: ​"com.alibaba.lightapp.runtime.activity.CommonWebViewActivity"​,改为com.alibaba.lightapp.runtime.activity.CommonWebViewActivitySwipe后正常。
并在主服务加入了超时处理。SystemUtil.unlock(config.lock_password , {
success: function() {
threads.start(function() {
serviceMain();
});
sleep(2 * 60 * 1000);
threads.shutDownAll();
console.warn("超时");
fail();
exit();
},配合tasker可以实现打卡失败后设定闹钟来打卡😂

@0x7A7A6572
Copy link
Owner Author

我的钉钉版本是6.5.20,在他的[智能填表]页面,activity确实是com.alibaba.lightapp.runtime.activity.CommonWebViewActivity,可能导致阻塞的问题不是这个?你可以用MT管理器或其他工具的展示Activity功能看一下智能填表页面是否为"com.alibaba.lightapp.runtime.activity.CommonWebViewActivity"。

另外在主服务这样加入超时是一个解决办法,但不是很好,应该在每个耗时操作,和可能失败的操作加入定时,以判断返回任务是否执行成功,其实在v2.2.4版本加入行程卡截图上传之后我做了这个工作(但是只应用到了行程卡那个任务).AutojsUtil.untilTask.do({}).ifnot()...,应用到所有流程是个不小的改动,所以现在还没做😂现在有其他的任务,欢迎pr.

@0x7A7A6572
Copy link
Owner Author

有新的问题都可以新建一个issue.不然我可能会看不见,依旧谢谢你的使用和反馈🥰

@MangoBear-CN
Copy link

之前确实是com.alibaba.lightapp.runtime.activity.CommonWebViewActivity,就是今天突然阻塞了,也不知道为啥,我用MT看了下变成com.alibaba.lightapp.runtime.activity.CommonWebViewActivitySwipe了。钉钉也是最新版本6.5.20

@0x7A7A6572
Copy link
Owner Author

神奇,我刚刚又去测了一次,他真变成Swipe了,我回复之前测是没有。不知道这个会不会经常变动,按理说不应该变动的,看来自定义配置项又要加一个了

@MangoBear-CN
Copy link

先用着吧,等再不行了再换成"智能填表"之类的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants