mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 03:06:59 +08:00
@@ -121,11 +121,11 @@ abstract final class RequestUtils {
|
||||
}
|
||||
} else {
|
||||
if (followStatus?['tag'] == null) {
|
||||
Map<String, dynamic> result = await UserHttp.hasFollow(mid);
|
||||
if (result['status']) {
|
||||
followStatus = result['data'];
|
||||
final res = await UserHttp.hasFollow(mid);
|
||||
if (res case Success(:final response)) {
|
||||
followStatus = response;
|
||||
} else {
|
||||
SmartDialog.showToast(result['msg']);
|
||||
res.toast();
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -494,12 +494,12 @@ abstract final class RequestUtils {
|
||||
}
|
||||
|
||||
final res = await ValidateHttp.gaiaVgateRegister(vVoucher);
|
||||
if (!res['status']) {
|
||||
SmartDialog.showToast("${res['msg']}");
|
||||
if (!res.isSuccess) {
|
||||
res.toast();
|
||||
return;
|
||||
}
|
||||
|
||||
final resData = res['data'];
|
||||
final resData = res.data;
|
||||
if (resData == null) {
|
||||
SmartDialog.showToast("null data");
|
||||
return;
|
||||
@@ -507,10 +507,10 @@ abstract final class RequestUtils {
|
||||
|
||||
CaptchaDataModel captchaData = CaptchaDataModel();
|
||||
|
||||
final geetest = resData?['geetest'];
|
||||
final geetest = resData['geetest'];
|
||||
String? gt = geetest?['gt'];
|
||||
String? challenge = geetest?['challenge'];
|
||||
captchaData.token = resData?['token'];
|
||||
captchaData.token = resData['token'];
|
||||
|
||||
bool isGeeArgumentValid() {
|
||||
return gt?.isNotEmpty == true &&
|
||||
@@ -530,9 +530,9 @@ abstract final class RequestUtils {
|
||||
token: captchaData.token,
|
||||
validate: captchaData.validate,
|
||||
);
|
||||
if (res['status']) {
|
||||
if (res['data']?['is_valid'] == 1) {
|
||||
final griskId = res['data']?['grisk_id'];
|
||||
if (res case Success(:final response)) {
|
||||
if (response?['is_valid'] == 1) {
|
||||
final griskId = response?['grisk_id'];
|
||||
if (griskId != null) {
|
||||
onSuccess(griskId);
|
||||
}
|
||||
@@ -540,7 +540,7 @@ abstract final class RequestUtils {
|
||||
SmartDialog.showToast('invalid');
|
||||
}
|
||||
} else {
|
||||
SmartDialog.showToast(res['msg']);
|
||||
res.toast();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user