Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-01-15 12:24:39 +08:00
parent cb58822009
commit bdc524e486
29 changed files with 223 additions and 248 deletions

View File

@@ -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();
}
}