This commit is contained in:
FongMi 2022-11-02 18:34:04 +08:00
parent 8c869e2e62
commit ac2f3d39f7
3 changed files with 5 additions and 5 deletions

View File

@ -287,9 +287,9 @@ public class Ali {
private void getQRCode() { private void getQRCode() {
Data data = Data.objectFrom(OkHttpUtil.string("https://easy-token.cooluc.com/qr")); Data data = Data.objectFrom(OkHttpUtil.string("https://easy-token.cooluc.com/qr"));
Init.run(() -> showCode(data.getData().getCodeContent())); if (data != null) Init.run(() -> showCode(data));
service = Executors.newScheduledThreadPool(1); service = Executors.newScheduledThreadPool(1);
service.scheduleAtFixedRate(() -> { if (data != null) service.scheduleAtFixedRate(() -> {
JsonObject params = new JsonObject(); JsonObject params = new JsonObject();
params.addProperty("t", data.getData().getT()); params.addProperty("t", data.getData().getT());
params.addProperty("ck", data.getData().getCk()); params.addProperty("ck", data.getData().getCk());
@ -304,10 +304,10 @@ public class Ali {
checkService(); checkService();
} }
private void showCode(String text) { private void showCode(Data data) {
FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.WRAP_CONTENT, FrameLayout.LayoutParams.WRAP_CONTENT); FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.WRAP_CONTENT, FrameLayout.LayoutParams.WRAP_CONTENT);
params.gravity = Gravity.CENTER; params.gravity = Gravity.CENTER;
Misc.addView(view = create(text), params); Misc.addView(view = create(data.getData().getCodeContent()), params);
Init.show("請使用阿里雲盤 App 掃描二維碼"); Init.show("請使用阿里雲盤 App 掃描二維碼");
} }

Binary file not shown.

View File

@ -1 +1 @@
012fedf8372acec517e0d3f2cfdc4d6b ddd9f5118f6f8882efea6591ef712cd8