Skip to content

Commit

Permalink
小更新
Browse files Browse the repository at this point in the history
  • Loading branch information
Orange-shirt committed May 24, 2020
1 parent a2cd2ca commit 9d47a7d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion OrangeJs_自动叠蛋糕_京东脚本.js
Original file line number Diff line number Diff line change
Expand Up @@ -1344,13 +1344,17 @@ function DoTask() {
sleep(2000);
}
}
var OVER = 0;
while (true) {
if (WaitForDelete.length == 0) {
toastLog("已删除全部已加购的商品");
break;
} else if (text("购物车是空的").findOnce() != null) {
toastLog("购物车是空的");
break;
} else if (OVER > 20) {
toastLog("滑动失败已超20次,结束");
break;
} else if (className("android.widget.TextView").text("没有更多了~").findOnce() != null) {
toastLog("没有更多了~但还有" + WaitForDelete.length + "个商品没有被删除,它们分别是:\n" + WaitForDelete);
break;
Expand Down Expand Up @@ -1378,7 +1382,10 @@ function DoTask() {
}
}
}
className("android.support.v7.widget.RecyclerView").findOnce().scrollForward();
let s = className("android.support.v7.widget.RecyclerView").findOnce().scrollForward();
if (s == false) {
OVER++;
}
toastLog("已尝试上滑购物车商品列表查找加购的商品");
sleep(2000);
} else {
Expand Down

0 comments on commit 9d47a7d

Please sign in to comment.