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

@@ -88,8 +88,12 @@ class HistoryController extends GetxController {
// 观看历史暂停状态
Future historyStatus() async {
var res = await UserHttp.historyStatus();
pauseStatus.value = res.data['data'];
localCache.put(LocalCacheKey.historyPause, res.data['data']);
if (res['status']) {
pauseStatus.value = res['data'];
localCache.put(LocalCacheKey.historyPause, res['data']);
} else {
SmartDialog.showToast(res['msg']);
}
}
// 清空观看历史