mod: 历史记录删除逻辑
This commit is contained in:
@ -108,7 +108,8 @@ class Request {
|
|||||||
dio.interceptors.add(LogInterceptor(
|
dio.interceptors.add(LogInterceptor(
|
||||||
request: false,
|
request: false,
|
||||||
requestHeader: false,
|
requestHeader: false,
|
||||||
responseHeader: false,
|
responseHeader: true,
|
||||||
|
requestBody: true,
|
||||||
));
|
));
|
||||||
|
|
||||||
dio.transformer = BackgroundTransformer();
|
dio.transformer = BackgroundTransformer();
|
||||||
|
|||||||
@ -180,12 +180,17 @@ class HistoryController extends GetxController {
|
|||||||
List<HisListItem> result =
|
List<HisListItem> result =
|
||||||
historyList.where((e) => e.checked!).toList();
|
historyList.where((e) => e.checked!).toList();
|
||||||
for (HisListItem i in result) {
|
for (HisListItem i in result) {
|
||||||
String resKid = 'archive_${i.kid}';
|
String str = 'archive';
|
||||||
|
try {
|
||||||
|
str = i.history!.business!;
|
||||||
|
} catch (_) {}
|
||||||
|
String resKid = '${str}_${i.kid}';
|
||||||
await UserHttp.delHistory(resKid);
|
await UserHttp.delHistory(resKid);
|
||||||
historyList.removeWhere((e) => e.kid == i.kid);
|
historyList.removeWhere((e) => e.kid == i.kid);
|
||||||
}
|
}
|
||||||
checkedCount.value = 0;
|
checkedCount.value = 0;
|
||||||
SmartDialog.dismiss();
|
SmartDialog.dismiss();
|
||||||
|
enableMultiple.value = false;
|
||||||
},
|
},
|
||||||
child: const Text('确认'),
|
child: const Text('确认'),
|
||||||
)
|
)
|
||||||
|
|||||||
@ -37,6 +37,9 @@ class _HistoryPageState extends State<HistoryPage> {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
_historyController.enableMultiple.listen((p0) {
|
||||||
|
setState(() {});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 选中
|
// 选中
|
||||||
|
|||||||
Reference in New Issue
Block a user