fix: 新增更多判空位置

This commit is contained in:
orz12
2024-02-26 10:14:13 +08:00
parent 11988a4f8e
commit 390046116b
10 changed files with 27 additions and 19 deletions

View File

@@ -215,6 +215,10 @@ class AboutController extends GetxController {
// 获取远程版本
Future getRemoteApp() async {
var result = await Request().get(Api.latestApp, extra: {'ua': 'pc'});
if (result.data.isEmpty) {
SmartDialog.showToast('检查更新失败github接口未返回数据请检查网络');
return false;
}
data = LatestDataModel.fromJson(result.data[0]);
remoteAppInfo = data;
remoteVersion.value = data.tagName!;