通话记录展示
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
import 'package:cashier_reserve/common/base/ui_model.dart';
|
||||
import 'package:cashier_reserve/common/channel/call_log_model.dart';
|
||||
import 'package:cashier_reserve/common/channel/channel_manager.dart';
|
||||
import 'package:cashier_reserve/common/manager/event_manager.dart';
|
||||
import 'package:cashier_reserve/common/print/print.dart';
|
||||
|
||||
class ReserveViewModel extends BaseUIModel {
|
||||
Map<int, String> weekdayMap = {
|
||||
@@ -17,10 +20,22 @@ class ReserveViewModel extends BaseUIModel {
|
||||
1: "明",
|
||||
2: "后",
|
||||
};
|
||||
|
||||
List<CallLogModel?>? callLogs = [];
|
||||
|
||||
// ReserveViewModel() {
|
||||
// loadData();
|
||||
// }
|
||||
ReserveViewModel() {
|
||||
EventManager.addListener<GetCallLogEvent>(this, (event) {
|
||||
if (event.isSuccess) {
|
||||
if (!event.isSuccess) {
|
||||
return;
|
||||
}
|
||||
callLogs = event.callLogs;
|
||||
notifyListeners();
|
||||
}
|
||||
});
|
||||
|
||||
loadCallLog();
|
||||
}
|
||||
|
||||
void loadCallLog() {
|
||||
ChannelManager.getCallLog("getCallLog");
|
||||
|
||||
Reference in New Issue
Block a user