blili open app login

This commit is contained in:
FongMi 2023-07-08 17:45:09 +08:00
parent b1a92b091a
commit 58b68f5db8
5 changed files with 5 additions and 5 deletions

View File

@ -260,12 +260,13 @@ public class Bili extends Spider {
private void getQRCode() { private void getQRCode() {
String json = OkHttp.string("https://passport.bilibili.com/x/passport-login/web/qrcode/generate?source=main-mini"); String json = OkHttp.string("https://passport.bilibili.com/x/passport-login/web/qrcode/generate?source=main-mini");
Data data = Resp.objectFrom(json).getData(); Data data = Resp.objectFrom(json).getData();
Init.run(() -> showQRCode(data)); Init.run(() -> openApp(data));
} }
private void openApp(Data data) { private void openApp(Data data) {
try { try {
Intent intent = new Intent(Intent.ACTION_VIEW); Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setClassName("tv.danmaku.bili", "tv.danmaku.bili.ui.intent.IntentHandlerActivity");
intent.setData(Uri.parse(data.getUrl())); intent.setData(Uri.parse(data.getUrl()));
Init.getActivity().startActivity(intent); Init.getActivity().startActivity(intent);
} catch (Exception e) { } catch (Exception e) {
@ -287,7 +288,6 @@ public class Bili extends Spider {
dialog = new AlertDialog.Builder(Init.getActivity()).setView(frame).setOnCancelListener(this::cancel).setOnDismissListener(this::dismiss).show(); dialog = new AlertDialog.Builder(Init.getActivity()).setView(frame).setOnCancelListener(this::cancel).setOnDismissListener(this::dismiss).show();
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
Utils.notify("請使用 BiliBili App 掃描二維碼"); Utils.notify("請使用 BiliBili App 掃描二維碼");
Init.execute(() -> startService(data));
} catch (Exception ignored) { } catch (Exception ignored) {
} }
} }

Binary file not shown.

View File

@ -1 +1 @@
b3d3f81f6ec5c3c6e14ccc4c800141d5 b08f51800918ae5534efeb090f79fe28

View File

@ -1,5 +1,5 @@
{ {
"spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;b3d3f81f6ec5c3c6e14ccc4c800141d5", "spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;b08f51800918ae5534efeb090f79fe28",
"wallpaper": "https://gao.chuqiuyu.tk", "wallpaper": "https://gao.chuqiuyu.tk",
"sites": [ "sites": [
{ {

View File

@ -1,5 +1,5 @@
{ {
"spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;b3d3f81f6ec5c3c6e14ccc4c800141d5", "spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;b08f51800918ae5534efeb090f79fe28",
"wallpaper": "http://饭太硬.top/深色壁纸/api.php", "wallpaper": "http://饭太硬.top/深色壁纸/api.php",
"sites": [ "sites": [
{ {