merge
This commit is contained in:
parent
7c5d51157a
commit
01be7fdd12
@ -123,7 +123,7 @@ class PushService {
|
|||||||
/// 统一处理跳转逻辑
|
/// 统一处理跳转逻辑
|
||||||
static void _handleNotificationClick(String ext, {String? userID, String? groupID}) async {
|
static void _handleNotificationClick(String ext, {String? userID, String? groupID}) async {
|
||||||
try {
|
try {
|
||||||
// ext={id:对应业务ID,type:'newFoucs',userID:发送人的id,groupID:群ID}
|
// ext={id:对应业务ID,type:'newFocus',userID:发送人的id,groupID:群ID}
|
||||||
// final ext = jsonEncode({
|
// final ext = jsonEncode({
|
||||||
// "userID": "123456",
|
// "userID": "123456",
|
||||||
// "groupID": "654321",
|
// "groupID": "654321",
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
enum ConversationType {
|
enum ConversationType {
|
||||||
noFriend, // 陌生人消息
|
noFriend, // 陌生人消息
|
||||||
system, //系统消息
|
system, //系统消息
|
||||||
newFoucs, //新的关注
|
newFocus, //新的关注
|
||||||
interaction, //互动
|
interaction, //互动
|
||||||
order, //订单类通知消息
|
order, //订单类通知消息
|
||||||
groupNotify, //群通知
|
groupNotify, //群通知
|
||||||
@ -12,7 +12,7 @@ enum ConversationType {
|
|||||||
class ConversationTypeStatic {
|
class ConversationTypeStatic {
|
||||||
static const String noFriend = 'noFriend';
|
static const String noFriend = 'noFriend';
|
||||||
static const String system = 'system';
|
static const String system = 'system';
|
||||||
static const String newFoucs = 'newFoucs';
|
static const String newFocus = 'newFocus';
|
||||||
static const String interaction = 'interaction';
|
static const String interaction = 'interaction';
|
||||||
static const String order = 'order';
|
static const String order = 'order';
|
||||||
static const String groupNotify = 'groupNotify';
|
static const String groupNotify = 'groupNotify';
|
||||||
@ -25,8 +25,8 @@ extension ConversationTypeExtension on ConversationType {
|
|||||||
return 'noFriend';
|
return 'noFriend';
|
||||||
case ConversationType.system:
|
case ConversationType.system:
|
||||||
return 'system';
|
return 'system';
|
||||||
case ConversationType.newFoucs:
|
case ConversationType.newFocus:
|
||||||
return 'newFoucs';
|
return 'newFocus';
|
||||||
case ConversationType.interaction:
|
case ConversationType.interaction:
|
||||||
return 'interaction';
|
return 'interaction';
|
||||||
case ConversationType.order:
|
case ConversationType.order:
|
||||||
@ -44,8 +44,8 @@ conversationTypeFromString(String? type) {
|
|||||||
return ConversationType.noFriend.name;
|
return ConversationType.noFriend.name;
|
||||||
} else if (type.contains('system')) {
|
} else if (type.contains('system')) {
|
||||||
return ConversationType.system.name;
|
return ConversationType.system.name;
|
||||||
} else if (type.contains('newFoucs')) {
|
} else if (type.contains('newFocus')) {
|
||||||
return ConversationType.newFoucs.name;
|
return ConversationType.newFocus.name;
|
||||||
} else if (type.contains('interaction')) {
|
} else if (type.contains('interaction')) {
|
||||||
return ConversationType.interaction.name;
|
return ConversationType.interaction.name;
|
||||||
} else if (type.contains('order')) {
|
} else if (type.contains('order')) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/// 枚举定义:所有通知的二级类型
|
/// 枚举定义:所有通知的二级类型
|
||||||
enum NotifyMessageType {
|
enum NotifyMessageType {
|
||||||
newFoucs, //新的关注
|
newFocus, //新的关注
|
||||||
systemNotify, // 系统->通知
|
systemNotify, // 系统->通知
|
||||||
systemReport, // 系统->举报下架(视频,视频评论)
|
systemReport, // 系统->举报下架(视频,视频评论)
|
||||||
systemCheck, // 系统->审核结果(复审,驳回 ,通过)
|
systemCheck, // 系统->审核结果(复审,驳回 ,通过)
|
||||||
@ -20,7 +20,7 @@ enum NotifyMessageType {
|
|||||||
|
|
||||||
/// 常量映射
|
/// 常量映射
|
||||||
class NotifyMessageTypeConstants {
|
class NotifyMessageTypeConstants {
|
||||||
static const String newFoucs = 'newFoucs';
|
static const String newFocus = 'newFocus';
|
||||||
static const String systemNotify = 'systemNotify';
|
static const String systemNotify = 'systemNotify';
|
||||||
static const String systemReport = 'systemReport';
|
static const String systemReport = 'systemReport';
|
||||||
static const String systemCheck = 'systemCheck';
|
static const String systemCheck = 'systemCheck';
|
||||||
@ -41,8 +41,8 @@ class NotifyMessageTypeConstants {
|
|||||||
extension NotifyMessageTypeExtension on NotifyMessageType {
|
extension NotifyMessageTypeExtension on NotifyMessageType {
|
||||||
String get name {
|
String get name {
|
||||||
switch (this) {
|
switch (this) {
|
||||||
case NotifyMessageType.newFoucs:
|
case NotifyMessageType.newFocus:
|
||||||
return 'newFoucs';
|
return 'newFocus';
|
||||||
case NotifyMessageType.systemNotify:
|
case NotifyMessageType.systemNotify:
|
||||||
return 'systemNotify';
|
return 'systemNotify';
|
||||||
case NotifyMessageType.systemReport:
|
case NotifyMessageType.systemReport:
|
||||||
@ -79,8 +79,8 @@ extension NotifyMessageTypeExtension on NotifyMessageType {
|
|||||||
|
|
||||||
notifyMessageTypeFromString(String? type) {
|
notifyMessageTypeFromString(String? type) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'newFoucs':
|
case 'newFocus':
|
||||||
return NotifyMessageType.newFoucs.name;
|
return NotifyMessageType.newFocus.name;
|
||||||
case 'systemNotify':
|
case 'systemNotify':
|
||||||
return NotifyMessageType.systemNotify.name;
|
return NotifyMessageType.systemNotify.name;
|
||||||
case 'systemReport':
|
case 'systemReport':
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:loopin/IM/im_service.dart';
|
||||||
import 'package:loopin/models/notify_message.type.dart';
|
import 'package:loopin/models/notify_message.type.dart';
|
||||||
import 'package:loopin/models/summary_type.dart';
|
import 'package:loopin/models/summary_type.dart';
|
||||||
import 'package:tencent_cloud_chat_sdk/enum/message_elem_type.dart';
|
import 'package:tencent_cloud_chat_sdk/enum/message_elem_type.dart';
|
||||||
@ -32,7 +33,7 @@ String parseMessageSummary(V2TimMessage msg) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// newFoucs, //新的关注
|
// newFocus, //新的关注
|
||||||
// systemNotify, // 系统->通知
|
// systemNotify, // 系统->通知
|
||||||
// systemReport, // 系统->举报下架(视频,视频评论)
|
// systemReport, // 系统->举报下架(视频,视频评论)
|
||||||
// systemCheck, // 系统->审核结果(复审,驳回 ,通过)
|
// systemCheck, // 系统->审核结果(复审,驳回 ,通过)
|
||||||
@ -52,7 +53,7 @@ String _parseCustomMessage(V2TimMessage? msg) {
|
|||||||
if (msg == null) return '[null]';
|
if (msg == null) return '[null]';
|
||||||
final sum = msg.cloudCustomData;
|
final sum = msg.cloudCustomData;
|
||||||
final elment = msg.customElem; // 所有服务端发送的通知消息都走【自定义消息类型】
|
final elment = msg.customElem; // 所有服务端发送的通知消息都走【自定义消息类型】
|
||||||
// logger.w('解析自定义消息:${msg.toJson()}');
|
logger.w('解析自定义消息:$sum,自定义属性:${msg.cloudCustomData}');
|
||||||
// logger.w('解析element:${elment?.desc ?? 'summary_error'}');
|
// logger.w('解析element:${elment?.desc ?? 'summary_error'}');
|
||||||
try {
|
try {
|
||||||
switch (sum) {
|
switch (sum) {
|
||||||
@ -67,7 +68,7 @@ String _parseCustomMessage(V2TimMessage? msg) {
|
|||||||
/// [des]显示的文本内容
|
/// [des]显示的文本内容
|
||||||
/// [data] json数据
|
/// [data] json数据
|
||||||
/// 名称firstFrameImg:先取cover,如果没有在取firstFrameImg
|
/// 名称firstFrameImg:先取cover,如果没有在取firstFrameImg
|
||||||
case NotifyMessageTypeConstants.newFoucs:
|
case NotifyMessageTypeConstants.newFocus:
|
||||||
// 关注
|
// 关注
|
||||||
|
|
||||||
///发起关注人的[userID],
|
///发起关注人的[userID],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user