更新特殊处理测试账号

This commit is contained in:
wyf
2025-10-16 10:10:15 +08:00
parent aae9e551d3
commit 6862b97e17
10 changed files with 553 additions and 360 deletions

View File

@@ -225,6 +225,11 @@ class UserInfoController extends GetControllerEx<UserInfoModel> {
MyUtils.formatResponse(apiResponse, "保存成功".tr, "保存失败".tr);
if (res.code == HttpStatusCodes.ok) {
UserInfoController userInfoController = Get.find();
if (res.data['test'] != null && res.data['test'] == true) {
AppConstants.is_test_account = true;
} else {
AppConstants.is_test_account = false;
}
userInfoController.model.user = UserModel.fromJson(res.data);
final box = GetStorage();
box.write('user', userInfoController.model.user!.toJson()); // 存储用户信息