群发消息显示
This commit is contained in:
parent
c016bc889f
commit
8cb36953d9
@ -76,9 +76,9 @@ import { TextMessageDetailDialog } from '../view/TextMessageDetailDialog';
|
|||||||
import { TeachDialog } from '../view/TeachDialog';
|
import { TeachDialog } from '../view/TeachDialog';
|
||||||
import { NewWaDialog } from '../view/NewWaDialog';
|
import { NewWaDialog } from '../view/NewWaDialog';
|
||||||
import { PerfactInputSheet } from '@itcast/basic/src/main/ets/Views/PerfactInputSheet'
|
import { PerfactInputSheet } from '@itcast/basic/src/main/ets/Views/PerfactInputSheet'
|
||||||
import { hdHttp, HdResponse,BasicConstant, authStore, preferenceStore, ChatParam} from '@itcast/basic'
|
import { hdHttp, HdResponse,BasicConstant, authStore, preferenceStore, ChatParam,
|
||||||
|
customAttachment} from '@itcast/basic'
|
||||||
import { HashMap } from '@kit.ArkTS';
|
import { HashMap } from '@kit.ArkTS';
|
||||||
import { customAttachment } from '../view/MessageComponentBuilder'
|
|
||||||
import { HMRouter, HMRouterMgr, HMRouterPathCallback, HMRouterPathInfo } from '@hadss/hmrouter';
|
import { HMRouter, HMRouterMgr, HMRouterPathCallback, HMRouterPathInfo } from '@hadss/hmrouter';
|
||||||
@HMRouter({
|
@HMRouter({
|
||||||
pageUrl: 'ChatP2PPage'
|
pageUrl: 'ChatP2PPage'
|
||||||
|
|||||||
@ -34,7 +34,7 @@ import { ChatAitNode } from '../model/ChatAitNode'
|
|||||||
import { MergedMessageAttachment } from '@nimkit/chatkit'
|
import { MergedMessageAttachment } from '@nimkit/chatkit'
|
||||||
import { ChatInfo } from '../model/ChatInfo'
|
import { ChatInfo } from '../model/ChatInfo'
|
||||||
import { Markdown } from '@nimkit/markdown'
|
import { Markdown } from '@nimkit/markdown'
|
||||||
import { BasicConstant,DataWebModel } from '@itcast/basic'
|
import { BasicConstant, customAttachment,DataWebModel } from '@itcast/basic'
|
||||||
import { router } from '@kit.ArkUI'
|
import { router } from '@kit.ArkUI'
|
||||||
import { videoTools } from 'home'
|
import { videoTools } from 'home'
|
||||||
import { HMRouterMgr } from '@hadss/hmrouter'
|
import { HMRouterMgr } from '@hadss/hmrouter'
|
||||||
@ -969,14 +969,3 @@ function ToWeb(u:string,t:string)
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface customAttachment
|
|
||||||
{
|
|
||||||
|
|
||||||
gdxz_title:string;//标题
|
|
||||||
gdxz_url:string;//内容url
|
|
||||||
gdxz_content:string;//内容
|
|
||||||
gdxz_id:string;//id
|
|
||||||
gdxz_img:string;//照片
|
|
||||||
gdxz_type:string;//类型
|
|
||||||
gdxz_ext_data:string;//备用字段,json字符串
|
|
||||||
}
|
|
||||||
@ -103,4 +103,6 @@ export { NotificationUtil } from './src/main/ets/utils/NotificationUtil'
|
|||||||
|
|
||||||
export { ScanUtil } from './src/main/ets/utils/ScanUtil'
|
export { ScanUtil } from './src/main/ets/utils/ScanUtil'
|
||||||
|
|
||||||
export { NotificationManagementUtil } from './src/main/ets/utils/NotificationManagementUtil'
|
export { NotificationManagementUtil } from './src/main/ets/utils/NotificationManagementUtil'
|
||||||
|
|
||||||
|
export { customAttachment } from './src/main/ets/models/customAttachment'
|
||||||
11
commons/basic/src/main/ets/models/customAttachment.ets
Normal file
11
commons/basic/src/main/ets/models/customAttachment.ets
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
export interface customAttachment
|
||||||
|
{
|
||||||
|
|
||||||
|
gdxz_title:string;//标题
|
||||||
|
gdxz_url:string;//内容url
|
||||||
|
gdxz_content:string;//内容
|
||||||
|
gdxz_id:string;//id
|
||||||
|
gdxz_img:string;//照片
|
||||||
|
gdxz_type:string;//类型
|
||||||
|
gdxz_ext_data:string;//备用字段,json字符串
|
||||||
|
}
|
||||||
@ -1,9 +1,8 @@
|
|||||||
import { HMRouterMgr } from '@hadss/hmrouter';
|
import { HMRouterMgr } from '@hadss/hmrouter';
|
||||||
import { BasicConstant, TimestampUtil } from '@itcast/basic';
|
import { BasicConstant, customAttachment, TimestampUtil } from '@itcast/basic';
|
||||||
import { PerfactInputSheet } from '@itcast/basic/src/main/ets/Views/PerfactInputSheet';
|
import { PerfactInputSheet } from '@itcast/basic/src/main/ets/Views/PerfactInputSheet';
|
||||||
import { LengthMetrics, router } from '@kit.ArkUI'
|
import { LengthMetrics, router } from '@kit.ArkUI'
|
||||||
import { ChatKitClient } from '@nimkit/chatkit';
|
import { ChatKitClient } from '@nimkit/chatkit';
|
||||||
import { customAttachment } from '@nimkit/chatkit_ui/src/main/ets/view/MessageComponentBuilder';
|
|
||||||
import { StringIsEmpty } from '@nimkit/common';
|
import { StringIsEmpty } from '@nimkit/common';
|
||||||
import { PatientTBean } from '../model/TeachModel';
|
import { PatientTBean } from '../model/TeachModel';
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,8 @@
|
|||||||
import { HMRouterMgr } from '@hadss/hmrouter';
|
import { HMRouterMgr } from '@hadss/hmrouter';
|
||||||
import { BasicConstant, TimestampUtil } from '@itcast/basic';
|
import { BasicConstant, customAttachment, TimestampUtil } from '@itcast/basic';
|
||||||
import { PerfactInputSheet } from '@itcast/basic/src/main/ets/Views/PerfactInputSheet';
|
import { PerfactInputSheet } from '@itcast/basic/src/main/ets/Views/PerfactInputSheet';
|
||||||
import { LengthMetrics, router } from '@kit.ArkUI'
|
import { LengthMetrics, router } from '@kit.ArkUI'
|
||||||
import { ChatKitClient } from '@nimkit/chatkit';
|
import { ChatKitClient } from '@nimkit/chatkit';
|
||||||
import { customAttachment } from '@nimkit/chatkit_ui/src/main/ets/view/MessageComponentBuilder';
|
|
||||||
import { StringIsEmpty } from '@nimkit/common';
|
import { StringIsEmpty } from '@nimkit/common';
|
||||||
import { PatientVBean } from '../model/TeachVideoModel';
|
import { PatientVBean } from '../model/TeachVideoModel';
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
import { authStore, BaseBean, BasicConstant,
|
import { authStore, BaseBean, BasicConstant,
|
||||||
ChatParam,
|
ChatParam,
|
||||||
|
customAttachment,
|
||||||
hdHttp, HdLoadingDialog, HdNav, HdResponse,
|
hdHttp, HdLoadingDialog, HdNav, HdResponse,
|
||||||
PhotoGrids,
|
PhotoGrids,
|
||||||
preferenceStore,
|
preferenceStore,
|
||||||
@ -11,7 +12,6 @@ import { BusinessError } from '@kit.BasicServicesKit';
|
|||||||
import { promptAction, router } from '@kit.ArkUI';
|
import { promptAction, router } from '@kit.ArkUI';
|
||||||
import { PerfactInputSheet } from '@itcast/basic/src/main/ets/Views/PerfactInputSheet';
|
import { PerfactInputSheet } from '@itcast/basic/src/main/ets/Views/PerfactInputSheet';
|
||||||
import { ChatKitClient } from '@nimkit/chatkit';
|
import { ChatKitClient } from '@nimkit/chatkit';
|
||||||
import { customAttachment } from '@nimkit/chatkit_ui/src/main/ets/view/MessageComponentBuilder';
|
|
||||||
import { HMRouter, HMRouterMgr } from '@hadss/hmrouter';
|
import { HMRouter, HMRouterMgr } from '@hadss/hmrouter';
|
||||||
|
|
||||||
@HMRouter({
|
@HMRouter({
|
||||||
|
|||||||
@ -57,8 +57,6 @@ export struct PatientListComp {
|
|||||||
name:this.delectname,
|
name:this.delectname,
|
||||||
CallBack:()=>{
|
CallBack:()=>{
|
||||||
|
|
||||||
// regionDataGroupsList
|
|
||||||
// this.applyArray.splice(this.positionDelete,1)
|
|
||||||
this.deletePatientAction(this.delectuuid)
|
this.deletePatientAction(this.delectuuid)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -146,6 +144,7 @@ export struct PatientListComp {
|
|||||||
|
|
||||||
|
|
||||||
} catch (parseError) {
|
} catch (parseError) {
|
||||||
|
this.dialog.close()
|
||||||
console.error('解析服务器响应失败:', parseError);
|
console.error('解析服务器响应失败:', parseError);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -318,7 +317,7 @@ export struct PatientListComp {
|
|||||||
.borderRadius(8)
|
.borderRadius(8)
|
||||||
Column()
|
Column()
|
||||||
{
|
{
|
||||||
Text(regionData.nickname)
|
Text(regionData.nickname+'')
|
||||||
.fontSize(16)
|
.fontSize(16)
|
||||||
.fontColor($r('app.color.common_gray_01'))
|
.fontColor($r('app.color.common_gray_01'))
|
||||||
.width('100%')
|
.width('100%')
|
||||||
@ -492,7 +491,15 @@ export struct PatientListComp {
|
|||||||
this.indexList = [];
|
this.indexList = [];
|
||||||
this.regionDataGroupsList = [];
|
this.regionDataGroupsList = [];
|
||||||
this.regionInfo.forEach((value: PatientsData) => {
|
this.regionInfo.forEach((value: PatientsData) => {
|
||||||
let index = this.indexUtil.getIndex(value.nickname);
|
let index =''
|
||||||
|
if(StringIsEmpty(value.nickname))
|
||||||
|
{
|
||||||
|
index='1'//nickname为空是虚假的账号,随便设置一个index
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
index = this.indexUtil.getIndex(value.nickname);
|
||||||
|
}
|
||||||
if(!ChangeUtil.isLetter(index))
|
if(!ChangeUtil.isLetter(index))
|
||||||
{
|
{
|
||||||
index='#'
|
index='#'
|
||||||
|
|||||||
@ -5,11 +5,13 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { patientDbManager, PatientEntity } from '@itcast/basic';
|
import { BasicConstant, customAttachment, patientDbManager, PatientEntity } from '@itcast/basic';
|
||||||
import { ChatKitClient } from '@nimkit/chatkit';
|
import { ChatKitClient } from '@nimkit/chatkit';
|
||||||
import { AvatarColorUntil, AvatarItem, CommonAvatar, UserUtils } from '@nimkit/common';
|
import { AvatarColorUntil, AvatarItem, CommonAvatar, UserUtils } from '@nimkit/common';
|
||||||
import { DateUtil } from '@nimkit/common/src/main/ets/utils/DateUtil';
|
import { DateUtil } from '@nimkit/common/src/main/ets/utils/DateUtil';
|
||||||
import { V2NIMLocalConversation, V2NIMMessageCallAttachment, V2NIMMessageType } from '@nimsdk/base';
|
import { V2NIMLocalConversation,
|
||||||
|
V2NIMMessageAttachment,
|
||||||
|
V2NIMMessageCallAttachment, V2NIMMessageType } from '@nimsdk/base';
|
||||||
import { LocalConversationOperationDialog } from './LocalConversationOperationDialog';
|
import { LocalConversationOperationDialog } from './LocalConversationOperationDialog';
|
||||||
|
|
||||||
@ComponentV2
|
@ComponentV2
|
||||||
@ -236,7 +238,10 @@ export struct ConversationViewItem {
|
|||||||
return $r('app.string.msg_type_rtc_video')
|
return $r('app.string.msg_type_rtc_video')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
case V2NIMMessageType.V2NIM_MESSAGE_TYPE_CUSTOM:
|
||||||
|
let attachment =item.lastMessage.attachment as V2NIMMessageAttachment ;
|
||||||
|
let custom=JSON.parse(attachment.raw+'') as customAttachment
|
||||||
|
return custom.gdxz_type+''
|
||||||
}
|
}
|
||||||
return item.lastMessage?.text ?? $r('app.string.chatMessageNonsupportType')
|
return item.lastMessage?.text ?? $r('app.string.chatMessageNonsupportType')
|
||||||
|
|
||||||
|
|||||||
@ -51,6 +51,11 @@ export class NimRepository {
|
|||||||
async login(accountId: string, token: string, appKey: string) {
|
async login(accountId: string, token: string, appKey: string) {
|
||||||
try {
|
try {
|
||||||
console.debug(`Performance Test im start loginSuccess`)
|
console.debug(`Performance Test im start loginSuccess`)
|
||||||
|
|
||||||
|
if(accountId== null || accountId == undefined || accountId == ''||token== null || token == undefined || token == '')
|
||||||
|
{
|
||||||
|
return
|
||||||
|
}
|
||||||
await this.nim.loginService.login(accountId, token, {
|
await this.nim.loginService.login(accountId, token, {
|
||||||
forceMode: true
|
forceMode: true
|
||||||
} as V2NIMLoginOption);
|
} as V2NIMLoginOption);
|
||||||
|
|||||||
@ -32,10 +32,9 @@ struct Home {
|
|||||||
this.activeIndex = e.data.activeIndex
|
this.activeIndex = e.data.activeIndex
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if(AppConfig.userId!='')
|
|
||||||
{
|
this.login(AppConfig.userId, AppConfig.userToken)//暂时隐蔽云信登录
|
||||||
this.login(AppConfig.userId, AppConfig.userToken)//暂时隐蔽云信登录
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user