更新预约单数
This commit is contained in:
@@ -15,8 +15,6 @@ class MyEventChannel {
|
||||
static void onGetCallLogResult() {
|
||||
EventChannel channel = EventChannel(getChannelName(kCallLogCallback));
|
||||
channel.receiveBroadcastStream().listen((Object? o) {
|
||||
yjPrint("onGetCallLogResult");
|
||||
yjPrint(o);
|
||||
GetCallLogEvent event = GetCallLogEvent();
|
||||
if (o is String) {
|
||||
event.isSuccess = true;
|
||||
@@ -24,6 +22,9 @@ class MyEventChannel {
|
||||
List<CallLogModel> callLogs = [];
|
||||
for (var item in list) {
|
||||
callLogs.add(CallLogModel.fromJson(item));
|
||||
if (callLogs.length >= 100) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
event.callLogs = callLogs.reversed.toList();
|
||||
} else {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:cashier_reserve/common/push/push.dart';
|
||||
import 'package:cashier_reserve/data_model/login/login_result.dart';
|
||||
import 'package:cashier_reserve/login/login_view.dart';
|
||||
import 'package:cashier_reserve/model/reserve_model.dart';
|
||||
|
||||
import '../base/ui.dart';
|
||||
import '../channel/channel_event.dart';
|
||||
@@ -11,6 +12,8 @@ class AppManager {
|
||||
static BuildContext? globalContext;
|
||||
static bool _isAlertLogin = false;
|
||||
|
||||
static String _smsContent = "";
|
||||
|
||||
static Future<void> initThirdPackage() async {
|
||||
MyEventChannel.startListener();
|
||||
|
||||
@@ -65,4 +68,12 @@ class AppManager {
|
||||
disposeLoginWidget();
|
||||
Navigator.of(globalContext!).pop();
|
||||
}
|
||||
|
||||
static Future<String> loadReserveSms() async {
|
||||
if (_smsContent.isNotEmpty) {
|
||||
return _smsContent;
|
||||
}
|
||||
_smsContent = await ReserveModel.getReserveSms();
|
||||
return _smsContent;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user