Browse Source

1、app版本更新逻辑

tags/0.0.2
PH2 4 years ago
parent
commit
abb75903a5
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      lib/util/update/app_update_util.dart

+ 1
- 2
lib/util/update/app_update_util.dart View File

@@ -121,12 +121,11 @@ class AppUpdateUtil {
// },
// "msg": "ok"
// };
PackageInfo packageInfo = await PackageInfo.fromPlatform();
var result = await NetUtil.post('/api/v1/appcheck', method: NetMethod.GET);
AppUpdateModel model = AppUpdateModel.fromJson(result[GlobalConfig.HTTP_RESPONSE_KEY_DATA]);
if (!EmptyUtil.isEmpty(model)) {
return UpdateEntity(
hasUpdate: model?.dialog == '1' || model?.isForce == '1',
hasUpdate: model?.dialog == '1',
isIgnorable: model?.isIgnore == '1' && model?.isForce != '1',
isForce: model?.isForce == '1',
versionCode: int.parse(model?.appVersion ?? '1'),


Loading…
Cancel
Save