mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-08 20:14:51 +08:00
Compare commits
5 Commits
50070997de
...
2.0.8.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3b9403a329 | ||
|
|
c44e92dcc8 | ||
|
|
14d1c37df5 | ||
|
|
78b3df4019 | ||
|
|
9acb32aaeb |
@@ -236,6 +236,20 @@ class LoginPageController extends GetxController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static String validateCookie(String cookie) {
|
||||||
|
return cookie
|
||||||
|
.split(';')
|
||||||
|
.where((e) {
|
||||||
|
try {
|
||||||
|
Cookie.fromSetCookieValue(e.trim());
|
||||||
|
} catch (_) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
})
|
||||||
|
.join(';');
|
||||||
|
}
|
||||||
|
|
||||||
// cookie登录
|
// cookie登录
|
||||||
Future<void> loginByCookie() async {
|
Future<void> loginByCookie() async {
|
||||||
if (cookieTextController.text.isEmpty) {
|
if (cookieTextController.text.isEmpty) {
|
||||||
@@ -247,7 +261,7 @@ class LoginPageController extends GetxController
|
|||||||
"/x/member/web/account",
|
"/x/member/web/account",
|
||||||
options: Options(
|
options: Options(
|
||||||
headers: {
|
headers: {
|
||||||
"cookie": cookieTextController.text,
|
"cookie": validateCookie(cookieTextController.text),
|
||||||
},
|
},
|
||||||
extra: {'account': AnonymousAccount()},
|
extra: {'account': AnonymousAccount()},
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import 'package:PiliPlus/services/account_service.dart';
|
|||||||
import 'package:PiliPlus/utils/accounts.dart';
|
import 'package:PiliPlus/utils/accounts.dart';
|
||||||
import 'package:PiliPlus/utils/accounts/account.dart';
|
import 'package:PiliPlus/utils/accounts/account.dart';
|
||||||
import 'package:PiliPlus/utils/extension/scroll_controller_ext.dart';
|
import 'package:PiliPlus/utils/extension/scroll_controller_ext.dart';
|
||||||
import 'package:PiliPlus/utils/login_utils.dart';
|
|
||||||
import 'package:PiliPlus/utils/storage.dart';
|
import 'package:PiliPlus/utils/storage.dart';
|
||||||
import 'package:PiliPlus/utils/storage_key.dart';
|
import 'package:PiliPlus/utils/storage_key.dart';
|
||||||
import 'package:PiliPlus/utils/storage_pref.dart';
|
import 'package:PiliPlus/utils/storage_pref.dart';
|
||||||
@@ -112,20 +111,22 @@ class MineController extends CommonDataController<FavFolderData, FavFolderData>
|
|||||||
..face.value = response.face!
|
..face.value = response.face!
|
||||||
..isLogin.value = true;
|
..isLogin.value = true;
|
||||||
} else {
|
} else {
|
||||||
LoginUtils.onLogoutMain();
|
_onLogoutMain();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
final errMsg = res.toString();
|
final errMsg = res.toString();
|
||||||
SmartDialog.showToast(errMsg);
|
SmartDialog.showToast(errMsg);
|
||||||
if (errMsg == '账号未登录') {
|
if (errMsg == '账号未登录') {
|
||||||
LoginUtils.onLogoutMain();
|
_onLogoutMain();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
queryUserStatOwner();
|
queryUserStatOwner();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _onLogoutMain() => Accounts.deleteAll({Accounts.main});
|
||||||
|
|
||||||
Future<void> queryUserStatOwner() async {
|
Future<void> queryUserStatOwner() async {
|
||||||
final res = await UserHttp.userStatOwner();
|
final res = await UserHttp.userStatOwner();
|
||||||
if (res case Success(:final response)) {
|
if (res case Success(:final response)) {
|
||||||
|
|||||||
@@ -106,12 +106,7 @@ foreach ($patch in $patches) {
|
|||||||
|
|
||||||
# TODO: remove
|
# TODO: remove
|
||||||
if ($platform.ToLower() -eq "android") {
|
if ($platform.ToLower() -eq "android") {
|
||||||
git stash
|
"df67bb3b55323961184ae7117cc91c054f36a42c" | Set-Content -Path .\bin\internal\engine.version
|
||||||
git cherry-pick 625275cfae17b27c9049b0740a9ef67d626b3b1c -X ours
|
|
||||||
git reset --soft HEAD~1
|
|
||||||
git stash pop
|
|
||||||
git restore DEPS
|
|
||||||
"f84bd039a0692e5cab5383a8de29bc41151a4dfd" | Set-Content -Path .\bin\internal\engine.version
|
|
||||||
Remove-Item -Path ".\bin\cache" -Recurse -Force
|
Remove-Item -Path ".\bin\cache" -Recurse -Force
|
||||||
flutter --version
|
flutter --version
|
||||||
}
|
}
|
||||||
@@ -234,7 +234,7 @@ packages:
|
|||||||
description:
|
description:
|
||||||
path: "."
|
path: "."
|
||||||
ref: main
|
ref: main
|
||||||
resolved-ref: b442c6c8309a17d8b9d395d08eadc401b42f4f8f
|
resolved-ref: "697d4516df2fc3ba7417c7ce9aba079d34ba13e5"
|
||||||
url: "https://github.com/bggRGjQaUbCoE/canvas_danmaku.git"
|
url: "https://github.com/bggRGjQaUbCoE/canvas_danmaku.git"
|
||||||
source: git
|
source: git
|
||||||
version: "0.2.6"
|
version: "0.2.6"
|
||||||
@@ -2001,4 +2001,4 @@ packages:
|
|||||||
version: "3.1.3"
|
version: "3.1.3"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=3.12.0 <4.0.0"
|
dart: ">=3.12.0 <4.0.0"
|
||||||
flutter: "3.44.0"
|
flutter: "3.44.1"
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ version: 2.0.8+1
|
|||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=3.12.0"
|
sdk: ">=3.12.0"
|
||||||
flutter: 3.44.0
|
flutter: 3.44.1
|
||||||
|
|
||||||
# Dependencies specify other packages that your package needs in order to work.
|
# Dependencies specify other packages that your package needs in order to work.
|
||||||
# To automatically upgrade your package dependencies to the latest versions
|
# To automatically upgrade your package dependencies to the latest versions
|
||||||
|
|||||||
Reference in New Issue
Block a user