提交 abaa9895 authored 作者: 张国庆's avatar 张国庆

fix:修改返回方法返回类型

上级 74cec6fc
...@@ -24,10 +24,10 @@ class ClxFlutterMessage { ...@@ -24,10 +24,10 @@ class ClxFlutterMessage {
MessageConfig messageConfig = MessageConfig(); MessageConfig messageConfig = MessageConfig();
abstract class BaseMessageConfig with NotificationManager, NoticeManager,MessageNet{ abstract class BaseMessageConfig
with NotificationManager, NoticeManager, MessageNet {
//处理消息页面跳转 //处理消息页面跳转
void onJumpToMessagePage(String page, dynamic arguments); Future? onJumpToMessagePage(String page, dynamic arguments);
//连接websocket 获取及时消息 //连接websocket 获取及时消息
Future<void> connectWebSocket(BuildContext context) async { Future<void> connectWebSocket(BuildContext context) async {
...@@ -82,35 +82,35 @@ abstract class BaseMessageConfig with NotificationManager, NoticeManager,Message ...@@ -82,35 +82,35 @@ abstract class BaseMessageConfig with NotificationManager, NoticeManager,Message
} }
// 处理消息跳转对应页面 // 处理消息跳转对应页面
void gotoDealMessage(MessageData? message) { Future? gotoDealMessage(MessageData? message) {
if (message?.canHand != true) { if (message?.canHand != true) {
return; return null;
} }
if (message == null) { if (message == null) {
ToastUtils.showCenter("消息为空"); ToastUtils.showCenter("消息为空");
return; return null;
} }
if (message.companyNo != messageConfig.companyNo) { if (message.companyNo != messageConfig.companyNo) {
ToastUtils.showCenter("当前公司和消息不匹配"); ToastUtils.showCenter("当前公司和消息不匹配");
return; return null;
} }
if (messageConfig.inAppAccessKey != message.accessKey) { if (messageConfig.inAppAccessKey != message.accessKey) {
ToastUtils.showCenter("当前角色和消息不匹配"); ToastUtils.showCenter("当前角色和消息不匹配");
return; return null;
} }
var data = message.textVo?.data; var data = message.textVo?.data;
if (data == null) { if (data == null) {
ToastUtils.showCenter("消息数据为空"); ToastUtils.showCenter("消息数据为空");
return; return null;
} }
var page = data['jumpPageAppUrl']; var page = data['jumpPageAppUrl'];
if (page == null) { if (page == null) {
ToastUtils.showCenter("消息跳转地址为空"); ToastUtils.showCenter("消息跳转地址为空");
return; return null;
} }
var arguments = data["jumpPageAppParam"]; var arguments = data["jumpPageAppParam"];
onJumpToMessagePage(page, arguments); return onJumpToMessagePage(page, arguments);
} }
// 构造方法 // 构造方法
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论