Commit 270333a5cda09e38dd76993b0645c92e78e98681

Authored by daojian
1 parent 8be7a8f5

添加优惠券消息

CNLiveNewIMAManagerKit.podspec
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 8
9 Pod::Spec.new do |s| 9 Pod::Spec.new do |s|
10 s.name = 'CNLiveNewIMAManagerKit' 10 s.name = 'CNLiveNewIMAManagerKit'
11 - s.version = '0.4.9' 11 + s.version = '0.5.0'
12 s.summary = 'A short description of CNLiveNewIMAManagerKit.' 12 s.summary = 'A short description of CNLiveNewIMAManagerKit.'
13 13
14 #s.description = <<-DESC 14 #s.description = <<-DESC
CNLiveNewIMAManagerKit/Classes/Playform/IMAConversationManager.m
@@ -1095,7 +1095,7 @@ @@ -1095,7 +1095,7 @@
1095 } 1095 }
1096 else if ([dic[@"type"] integerValue] == CustomMsgTypeScanPaySuccess) 1096 else if ([dic[@"type"] integerValue] == CustomMsgTypeScanPaySuccess)
1097 { 1097 {
1098 - //扫码支付成功 1098 + //扫码支付成功/普通支付成功
1099 [[NSNotificationCenter defaultCenter] postNotificationName:kIMAMSG_ScanPaySuccessNotification object:nil userInfo:dic]; 1099 [[NSNotificationCenter defaultCenter] postNotificationName:kIMAMSG_ScanPaySuccessNotification object:nil userInfo:dic];
1100 isBreak = YES; 1100 isBreak = YES;
1101 } 1101 }
CNLiveNewIMAManagerKit/Classes/PublicHeader/IMANotification.h
@@ -169,7 +169,7 @@ static NSString *const kIMAMSG_OnNewMessageNotification = @&quot;kIMAMSG_OnNewMessage @@ -169,7 +169,7 @@ static NSString *const kIMAMSG_OnNewMessageNotification = @&quot;kIMAMSG_OnNewMessage
169 169
170 #pragma mark 社区支付成功 170 #pragma mark 社区支付成功
171 static NSString *const kIMAMSG_CommunityPaySuccessNotification = @"kIMAMSG_CommunityPaySuccessNotification"; 171 static NSString *const kIMAMSG_CommunityPaySuccessNotification = @"kIMAMSG_CommunityPaySuccessNotification";
172 -#pragma mark 扫码支付成功 172 +#pragma mark 扫码支付成功/普通支付成功
173 static NSString *const kIMAMSG_ScanPaySuccessNotification = @"kIMAMSG_ScanPaySuccessNotification"; 173 static NSString *const kIMAMSG_ScanPaySuccessNotification = @"kIMAMSG_ScanPaySuccessNotification";
174 174
175 #pragma mark 收到家园群消息 175 #pragma mark 收到家园群消息
CNLiveNewIMAManagerKit/Classes/TIMCategory/TIMElem+ShowAPIs.m
@@ -572,6 +572,10 @@ @@ -572,6 +572,10 @@
572 { 572 {
573 return [NSClassFromString(@"CNFamilyGiftMessageCell") class]; 573 return [NSClassFromString(@"CNFamilyGiftMessageCell") class];
574 } 574 }
  575 + else if (msg.type == EIMAMSG_ShareCoupon)
  576 + {
  577 + return [NSClassFromString(@"CNMessageBaseCell") class];
  578 + }
575 else 579 else
576 { 580 {
577 return [NSClassFromString(@"CNUnknownMsgCell") class]; 581 return [NSClassFromString(@"CNUnknownMsgCell") class];
@@ -873,6 +877,11 @@ @@ -873,6 +877,11 @@
873 { 877 {
874 return CGSizeMake(width, (36 +10)*RATIO); 878 return CGSizeMake(width, (36 +10)*RATIO);
875 } 879 }
  880 + break;
  881 + case EIMAMSG_ShareCoupon:
  882 + {
  883 + return CGSizeMake(width, 160);
  884 + }
876 default: 885 default:
877 break; 886 break;
878 } 887 }
CNLiveNewIMAManagerKit/Classes/TIMModel/MSG/IMAMsg.h
@@ -111,6 +111,10 @@ typedef NS_ENUM(NSInteger, IMAMSGType) { @@ -111,6 +111,10 @@ typedef NS_ENUM(NSInteger, IMAMSGType) {
111 ///家园礼物未领取 111 ///家园礼物未领取
112 EIMAMSG_FamilyGift , 112 EIMAMSG_FamilyGift ,
113 113
  114 +#pragma mark 领取商家优惠券
  115 + ///领取商家优惠券
  116 + EIMAMSG_ShareCoupon ,
  117 +
114 #pragma mark 电商原生商品详情,电商原生订单详情 118 #pragma mark 电商原生商品详情,电商原生订单详情
115 EIMAMSG_ShopGoodsInfo , //电商原生商品详情 119 EIMAMSG_ShopGoodsInfo , //电商原生商品详情
116 EIMAMSG_ShopOrderDetail , //电商原生订单详情 120 EIMAMSG_ShopOrderDetail , //电商原生订单详情
@@ -123,6 +127,7 @@ typedef NS_ENUM(NSInteger, IMAMSGType) { @@ -123,6 +127,7 @@ typedef NS_ENUM(NSInteger, IMAMSGType) {
123 EIMAMSG_OrederReminder , //推单 127 EIMAMSG_OrederReminder , //推单
124 EIMAMSG_NewOrderRemind , //新订单提醒 128 EIMAMSG_NewOrderRemind , //新订单提醒
125 129
  130 +
126 }; 131 };
127 132
128 133
@@ -201,17 +206,23 @@ typedef NS_ENUM(NSUInteger, CustomMsgType) { @@ -201,17 +206,23 @@ typedef NS_ENUM(NSUInteger, CustomMsgType) {
201 CustomMsgTypeUGCLivePlayShare = 4005, //UGC直播分享 206 CustomMsgTypeUGCLivePlayShare = 4005, //UGC直播分享
202 CustomMsgTypeUGCLivePlayEnd = 4006, //UGC直播结束 207 CustomMsgTypeUGCLivePlayEnd = 4006, //UGC直播结束
203 CustomMsgTypeUGCLiveGoodsListUpate = 4007, //UGC直播间商品列表发生更新 208 CustomMsgTypeUGCLiveGoodsListUpate = 4007, //UGC直播间商品列表发生更新
204 - CustomMsgTypeScanCodePay = 5001, //扫码支付消息 209 +
205 CustomMsgTypeShareLink = 6001, //分享链接 210 CustomMsgTypeShareLink = 6001, //分享链接
206 211
207 CustomMsgTypeCustomFace = 7000, //自定义表情 212 CustomMsgTypeCustomFace = 7000, //自定义表情
208 213
209 CustomMsgTypeBlackTip = 6002, //被拉黑后,发送消息进行提示 214 CustomMsgTypeBlackTip = 6002, //被拉黑后,发送消息进行提示
210 215
211 - CustomMsgTypeBlackStatusChange = 5003, //添加或者移除黑名单,系统通知  
212 216
213 - ///扫码支付成功 217 + ///扫码支付消息
  218 + CustomMsgTypeScanCodePay = 5001,
  219 +
  220 + ///扫码支付成功/普通支付成功
214 CustomMsgTypeScanPaySuccess = 5002, 221 CustomMsgTypeScanPaySuccess = 5002,
  222 +
  223 + ///添加或者移除黑名单,系统通知
  224 + CustomMsgTypeBlackStatusChange = 5003,
  225 +
215 ///社区支付成功 226 ///社区支付成功
216 CustomMsgTypeCommunityPaySuccess = 5004, 227 CustomMsgTypeCommunityPaySuccess = 5004,
217 228
@@ -219,17 +230,13 @@ typedef NS_ENUM(NSUInteger, CustomMsgType) { @@ -219,17 +230,13 @@ typedef NS_ENUM(NSUInteger, CustomMsgType) {
219 CustomMsgTypePhotoAlbumDynamic = 5005, 230 CustomMsgTypePhotoAlbumDynamic = 5005,
220 ///家园礼物未领取 231 ///家园礼物未领取
221 CustomMsgTypeFamilyGift = 5006, 232 CustomMsgTypeFamilyGift = 5006,
222 -  
223 ///家园信息变更消息 233 ///家园信息变更消息
224 CustomMsgTypeFamilyInfoChange = 5007, 234 CustomMsgTypeFamilyInfoChange = 5007,
  235 + ///领取商家优惠券消息
  236 + CustomMsgTypeShareCoupon = 5008,
225 237
226 - CustomMsgTypeSendCurrentLocation = 8000, // 发送当前位置  
227 -  
228 -// CustomMsgTypeInitiatingSharedLocation = 8001, //发起位置共享  
229 -// CustomMsgTypeCurrentSharedLocation = 8002, //共享位置:发送当前位置  
230 -// CustomMsgTypeSharedLocationEndTip = 8003,//共享位置结束后发送消息进行提示  
231 -  
232 - 238 + /// 发送当前位置
  239 + CustomMsgTypeSendCurrentLocation = 8000,
233 240
234 #pragma mark - 音视频 241 #pragma mark - 音视频
235 CustomMsgTypeSenderInvitationReceiver = 9001, //发送方向接收方发起音视频邀请 242 CustomMsgTypeSenderInvitationReceiver = 9001, //发送方向接收方发起音视频邀请
CNLiveNewIMAManagerKit/Classes/TIMModel/MSG/IMAMsg.m
@@ -647,6 +647,10 @@ @@ -647,6 +647,10 @@
647 { 647 {
648 type = EIMAMSG_FamilyGift; 648 type = EIMAMSG_FamilyGift;
649 } 649 }
  650 + else if ([dic[@"type"] integerValue] == CustomMsgTypeShareCoupon)
  651 + {
  652 + type = EIMAMSG_ShareCoupon;
  653 + }
650 else { 654 else {
651 type = EIMAMSG_Unknown; 655 type = EIMAMSG_Unknown;
652 } 656 }