feat(emergency): 专家端应急求助入口对齐员工端
- 首页新增员工应急求助入口,接口改用 myParticipatedOrders,1条直接进群聊,多条弹窗选择 - ChatViewController 加急救员流程:isFromFirstAid、群成员面板、工单弹窗 - 急救员入口隐藏语音通话/档案/结束咨询,标题写死"应急求助" - XJDNetAPI 加 getMyParticipatedOrders/getActualGroupMemberList/getSearchEmployee/getSearchExpert/postAddGroupUser - 拷贝 XJSelectContactViewController、XJParticipatedOrderModel、checkbox/order 等图标资源 - IM断线静默重登,异地登录弹提示跳登录页 - 首页数量标签默认隐藏,非零才显示 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
2cf2ddcb19
commit
2bcac71a19
@@ -0,0 +1,80 @@
|
||||
//
|
||||
// MapMessageCustomCellData.m
|
||||
// EscortProject
|
||||
//
|
||||
// Created by 仁康信息 on 2023/7/7.
|
||||
//
|
||||
|
||||
#import "MapMessageCustomCellData.h"
|
||||
#import "MapMessageCustomCell.h"
|
||||
#import<CommonCrypto/CommonDigest.h>
|
||||
|
||||
@implementation MapMessageCustomCellData
|
||||
|
||||
+ (TUIMessageCellData *)getCellData:(V2TIMMessage *)message{
|
||||
// NSDictionary *param = [NSJSONSerialization JSONObjectWithData:message.locationElem.desc options:NSJSONReadingAllowFragments error:nil];
|
||||
MapMessageCustomCellData *cellData = [[MapMessageCustomCellData alloc] initWithDirection:message.isSelf ? MsgDirectionOutgoing : MsgDirectionIncoming];
|
||||
cellData.innerMessage = message;
|
||||
cellData.msgID = message.msgID;
|
||||
cellData.text = message.locationElem.desc;
|
||||
cellData.MapPictureImg = [self mapLocationImage:message.locationElem.longitude Withlation:message.locationElem.latitude];
|
||||
cellData.reuseId = @"MapMessageCustomCell";
|
||||
cellData.showAvatar = true;
|
||||
// cellData.avatarUrl = [NSURL URLWithString:message.faceURL];
|
||||
return cellData;
|
||||
}
|
||||
|
||||
|
||||
+ (NSString *)mapLocationImage:(CGFloat)longLation Withlation:(CGFloat)lation {
|
||||
// 0: self.longLation,self.lation
|
||||
NSString * staciUrl = @"https://restapi.amap.com/v3/staticmap?key=9e4aac9a04b8296e9039adce3b472f28";
|
||||
NSString * mapKey = @"9e4aac9a04b8296e9039adce3b472f28";
|
||||
NSString * loctaionUrl = @"https://a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png";
|
||||
|
||||
NSString * needMdString = [NSString stringWithFormat:@"key=%@&location=%f,%f&markers=-1,%@,0:%f,%f&size=700*500&zoom=154985aa1abb49ce2daa20d032a374eb58",mapKey,longLation,lation,loctaionUrl,longLation,lation];
|
||||
|
||||
|
||||
NSString * mapUrl = [NSString stringWithFormat:@"%@&location=%f,%f&markers=-1,%@,0:%f,%f&size=700*500&zoom=15&sig=%@",staciUrl,longLation,lation,loctaionUrl,longLation,lation,[self md5:needMdString]];
|
||||
|
||||
return mapUrl;
|
||||
|
||||
|
||||
|
||||
}
|
||||
//md加密
|
||||
+ (NSString *)md5:(NSString *)str
|
||||
{
|
||||
const char *cStr = [str UTF8String];
|
||||
unsigned char result[16];
|
||||
CC_MD5(cStr, strlen(cStr), result); // This is the md5 call
|
||||
return [NSString stringWithFormat:
|
||||
@"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
|
||||
result[0], result[1], result[2], result[3],
|
||||
result[4], result[5], result[6], result[7],
|
||||
result[8], result[9], result[10], result[11],
|
||||
result[12], result[13], result[14], result[15]
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (CGSize)contentSize
|
||||
{
|
||||
// CGRect rect = [self.text boundingRectWithSize:CGSizeMake(300, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:@{ NSFontAttributeName : [UIFont systemFontOfSize:15] } context:nil];
|
||||
// CGSize size = CGSizeMake(ceilf(rect.size.width)+1, ceilf(rect.size.height));
|
||||
// // 加上气泡边距
|
||||
// size.height += 60;
|
||||
// size.width += 20;
|
||||
// return size;
|
||||
|
||||
|
||||
CGFloat textMaxWidth = 245.f;
|
||||
|
||||
CGSize size = CGSizeMake(textMaxWidth, 170);
|
||||
return size;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user