角标,小红点,群发消息
This commit is contained in:
parent
9355959b36
commit
76b7785d84
@ -28,7 +28,7 @@ import { ChatRepo } from './repo/ChatRepo';
|
|||||||
import { saveLocalRevokeMessageFormOther } from './utils/MessageUtils';
|
import { saveLocalRevokeMessageFormOther } from './utils/MessageUtils';
|
||||||
import { LengthMetrics, router } from '@kit.ArkUI';
|
import { LengthMetrics, router } from '@kit.ArkUI';
|
||||||
import { HMRouterMgr } from '@hadss/hmrouter';
|
import { HMRouterMgr } from '@hadss/hmrouter';
|
||||||
import { ChangeUtil, NotificationUtil } from '@itcast/basic';
|
import { ChangeUtil, NotificationManagementUtil, NotificationUtil } from '@itcast/basic';
|
||||||
import { BusinessError } from '@kit.BasicServicesKit';
|
import { BusinessError } from '@kit.BasicServicesKit';
|
||||||
import { NotificationBasicOptions } from '@itcast/basic/src/main/ets/pushnotification/NotificationOptions';
|
import { NotificationBasicOptions } from '@itcast/basic/src/main/ets/pushnotification/NotificationOptions';
|
||||||
export const currentConversationChanged: string = 'CurrentConversationChanged'
|
export const currentConversationChanged: string = 'CurrentConversationChanged'
|
||||||
@ -209,7 +209,8 @@ export class ChatKitClient {
|
|||||||
// 消息撤回监听,消息撤回后,会收到通知
|
// 消息撤回监听,消息撤回后,会收到通知
|
||||||
ChatRepo.onRevokeMessage(ChatKitClient.onRevokeFun)
|
ChatRepo.onRevokeMessage(ChatKitClient.onRevokeFun)
|
||||||
ChatKitClient.hasInitListener = true
|
ChatKitClient.hasInitListener = true
|
||||||
|
let unreadCount=ChatKitClient.nim.localConversationService?ChatKitClient.nim.localConversationService.getTotalUnreadCount():-1
|
||||||
|
NotificationManagementUtil.setBadgeNumber(unreadCount)
|
||||||
// ChatKitClient.nim.messageService?.on("onReceiveMessages", (messages: V2NIMMessage[]) => {
|
// ChatKitClient.nim.messageService?.on("onReceiveMessages", (messages: V2NIMMessage[]) => {
|
||||||
// for (const message of messages) {
|
// for (const message of messages) {
|
||||||
// let basicOptions: NotificationBasicOptions = {
|
// let basicOptions: NotificationBasicOptions = {
|
||||||
|
|||||||
@ -23,6 +23,7 @@ import {
|
|||||||
NECommonUtils,
|
NECommonUtils,
|
||||||
NetworkBrokenBuilder,
|
NetworkBrokenBuilder,
|
||||||
PermissionsUtils,
|
PermissionsUtils,
|
||||||
|
StringIsEmpty,
|
||||||
UserUtils,
|
UserUtils,
|
||||||
VideoViewerDialog
|
VideoViewerDialog
|
||||||
} from '@nimkit/common';
|
} from '@nimkit/common';
|
||||||
@ -450,7 +451,13 @@ export struct ChatP2PPage {
|
|||||||
let json = JSON.parse(res+'') as Record<string, object>;
|
let json = JSON.parse(res+'') as Record<string, object>;
|
||||||
let datas=json.data as Record<string, string>;
|
let datas=json.data as Record<string, string>;
|
||||||
this.patientUuid=datas.uuid
|
this.patientUuid=datas.uuid
|
||||||
|
let tmpname= this.showName
|
||||||
this.showName=await UserUtils.getAvatarName(this.patientUuid,String(this.chatUserInfo.conversationName))
|
this.showName=await UserUtils.getAvatarName(this.patientUuid,String(this.chatUserInfo.conversationName))
|
||||||
|
if(StringIsEmpty(this.showName))
|
||||||
|
{
|
||||||
|
this.showName=tmpname
|
||||||
|
}
|
||||||
|
|
||||||
}).catch((err: BusinessError) => {
|
}).catch((err: BusinessError) => {
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|||||||
@ -102,3 +102,5 @@ export { HdTwoNav } from './src/main/ets/components/HdTwoNav'
|
|||||||
export { NotificationUtil } from './src/main/ets/utils/NotificationUtil'
|
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'
|
||||||
@ -13,7 +13,7 @@ export class BasicConstant {
|
|||||||
static readonly urlExpert = "https://dev-app.igandan.com/app/expert/"
|
static readonly urlExpert = "https://dev-app.igandan.com/app/expert/"
|
||||||
static readonly wxUrl = "https://dev-wx.igandan.com/";
|
static readonly wxUrl = "https://dev-wx.igandan.com/";
|
||||||
static readonly polvId = "11";//保利威视学员id
|
static readonly polvId = "11";//保利威视学员id
|
||||||
|
static readonly urlApp="https://dev-app.igandan.com/app/"
|
||||||
//正式环境
|
//正式环境
|
||||||
// static readonly urlExpertAPI = "https://app.igandan.com/app/expertAPI/";
|
// static readonly urlExpertAPI = "https://app.igandan.com/app/expertAPI/";
|
||||||
// static readonly urlExpertApp = "http://app.igandan.com/app/expertApp/"
|
// static readonly urlExpertApp = "http://app.igandan.com/app/expertApp/"
|
||||||
@ -22,8 +22,9 @@ export class BasicConstant {
|
|||||||
// static readonly urlExpert = "http://app.igandan.com/app/expert/"
|
// static readonly urlExpert = "http://app.igandan.com/app/expert/"
|
||||||
// static readonly wxUrl = "https://wx.igandan.com/";// 微信服务器地址
|
// static readonly wxUrl = "https://wx.igandan.com/";// 微信服务器地址
|
||||||
// static readonly polvId = "21";//保利威视学员id
|
// static readonly polvId = "21";//保利威视学员id
|
||||||
|
// static readonly urlApp="http://app.igandan.com/app/"
|
||||||
|
|
||||||
static readonly getSystemTimeStamp = BasicConstant.urlImage+'manager/getSystemTimeStamp'
|
static readonly getSystemTimeStamp = BasicConstant.urlApp+'manager/getSystemTimeStamp'
|
||||||
static readonly addBonusPoints = BasicConstant.urlExpertApp+'addBonusPoints'
|
static readonly addBonusPoints = BasicConstant.urlExpertApp+'addBonusPoints'
|
||||||
static readonly indexV2 = BasicConstant.urlExpertAPI+'indexV2';//首页轮播
|
static readonly indexV2 = BasicConstant.urlExpertAPI+'indexV2';//首页轮播
|
||||||
static readonly applyList = BasicConstant.urlExpert+'applyList'
|
static readonly applyList = BasicConstant.urlExpert+'applyList'
|
||||||
|
|||||||
@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Huawei Device Co., Ltd.
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { notificationManager } from '@kit.NotificationKit';
|
||||||
|
export class NotificationManagementUtil {
|
||||||
|
|
||||||
|
static async setBadgeNumber(num: number) {
|
||||||
|
if(num<0)
|
||||||
|
{
|
||||||
|
return
|
||||||
|
}
|
||||||
|
await notificationManager.setBadgeNumber(num).then(() => {
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@ -11,6 +11,7 @@ import { bundleManager} from '@kit.AbilityKit';
|
|||||||
import { deviceInfo } from '@kit.BasicServicesKit';
|
import { deviceInfo } from '@kit.BasicServicesKit';
|
||||||
import { cryptoFramework } from '@kit.CryptoArchitectureKit';
|
import { cryptoFramework } from '@kit.CryptoArchitectureKit';
|
||||||
import { rcp } from '@kit.RemoteCommunicationKit';
|
import { rcp } from '@kit.RemoteCommunicationKit';
|
||||||
|
import { BasicConstant } from '../../../../Index';
|
||||||
|
|
||||||
interface HdRequestOptions {
|
interface HdRequestOptions {
|
||||||
baseURL?: string
|
baseURL?: string
|
||||||
@ -188,7 +189,7 @@ class HdHttp {
|
|||||||
httpReq<T>(url: string, datas: HashMap<string, string>): Promise<HdResponse<T>> {
|
httpReq<T>(url: string, datas: HashMap<string, string>): Promise<HdResponse<T>> {
|
||||||
// 创建httpRequest对象。
|
// 创建httpRequest对象。
|
||||||
let httpRequest = http.createHttp();
|
let httpRequest = http.createHttp();
|
||||||
let url1 = "https://dev-app.igandan.com/app/manager/getSystemTimeStamp";
|
let url1 = BasicConstant.getSystemTimeStamp;
|
||||||
let promise = httpRequest.request(
|
let promise = httpRequest.request(
|
||||||
// 请求url地址
|
// 请求url地址
|
||||||
url1,
|
url1,
|
||||||
@ -230,7 +231,7 @@ class HdHttp {
|
|||||||
httpReqObject<T>(url: string, datas: HashMap<string, Object>): Promise<HdResponse<T>> {
|
httpReqObject<T>(url: string, datas: HashMap<string, Object>): Promise<HdResponse<T>> {
|
||||||
// 创建httpRequest对象。
|
// 创建httpRequest对象。
|
||||||
let httpRequest = http.createHttp();
|
let httpRequest = http.createHttp();
|
||||||
let url1 = "https://dev-app.igandan.com/app/manager/getSystemTimeStamp";
|
let url1 = BasicConstant.getSystemTimeStamp;
|
||||||
let promise = httpRequest.request(
|
let promise = httpRequest.request(
|
||||||
// 请求url地址
|
// 请求url地址
|
||||||
url1,
|
url1,
|
||||||
|
|||||||
@ -208,7 +208,8 @@ 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:
|
||||||
|
return $r('app.string.tipMessageType')
|
||||||
}
|
}
|
||||||
return item.lastMessage?.text ?? $r('app.string.chatMessageNonsupportType')
|
return item.lastMessage?.text ?? $r('app.string.chatMessageNonsupportType')
|
||||||
|
|
||||||
|
|||||||
@ -10,6 +10,7 @@
|
|||||||
"@polyvharmony/media-player-sdk": "2.5.0",
|
"@polyvharmony/media-player-sdk": "2.5.0",
|
||||||
"@polyvharmony/media-player-sdk-addon-cache-down": "2.5.0",
|
"@polyvharmony/media-player-sdk-addon-cache-down": "2.5.0",
|
||||||
"scene_single_video": "file:../../scene_single_video",
|
"scene_single_video": "file:../../scene_single_video",
|
||||||
"media-player-common": "file:../../polyv"
|
"media-player-common": "file:../../polyv",
|
||||||
|
"@nimkit/chatkit": "file:../../chatkit"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,6 +1,6 @@
|
|||||||
import { iconsModel } from '../model/HomeModel'
|
import { HomeModel, iconsModel } from '../model/HomeModel'
|
||||||
import { patientDbManager, PatientEntity } from '@itcast/basic';
|
import { BasicConstant, hdHttp, HdResponse, patientDbManager, PatientEntity } from '@itcast/basic';
|
||||||
import { promptAction, router } from '@kit.ArkUI';
|
import { promptAction, router, UIObserver, uiObserver } from '@kit.ArkUI';
|
||||||
import { BusinessError } from '@kit.BasicServicesKit';
|
import { BusinessError } from '@kit.BasicServicesKit';
|
||||||
import { pushService } from '@kit.PushKit';
|
import { pushService } from '@kit.PushKit';
|
||||||
|
|
||||||
@ -9,18 +9,34 @@ import { pushService } from '@kit.PushKit';
|
|||||||
// name:string;
|
// name:string;
|
||||||
// isRed:boolean;
|
// isRed:boolean;
|
||||||
// }
|
// }
|
||||||
|
import { ChatKitClient, LocalConversationRepo } from '@nimkit/chatkit';
|
||||||
|
import { HashMap } from '@kit.ArkTS';
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
export struct HomeIconComp {
|
export struct HomeIconComp {
|
||||||
@Prop iconList: iconsModel[];
|
@Prop iconList: iconsModel[];
|
||||||
@State patientIcon: string = '';
|
@State patientIcon: string = '';
|
||||||
@State patientName: string = '我的患者';
|
@State patientName: string = '我的患者';
|
||||||
|
@State patientRed: boolean = false;
|
||||||
@State videoIcon: string = '';
|
@State videoIcon: string = '';
|
||||||
@State videoName: string = '肝胆视频';
|
@State videoName: string = '肝胆视频';
|
||||||
@State zixunIcon: string = '';
|
@State zixunIcon: string = '';
|
||||||
@State consultation: string = '公益咨询';
|
@State consultation: string = '公益咨询';
|
||||||
|
@State consultationRed: boolean = false;
|
||||||
|
@State iconListtmp:iconsModel[]=[];
|
||||||
|
listener: (info: uiObserver.RouterPageInfo) => void = (info: uiObserver.RouterPageInfo) => {
|
||||||
|
let routerInfo: uiObserver.RouterPageInfo | undefined = this.queryRouterPageInfo();
|
||||||
|
if (info.pageId == routerInfo?.pageId) {
|
||||||
|
if (info.state == uiObserver.RouterPageState.ON_PAGE_SHOW) {
|
||||||
|
this.getRedCount()
|
||||||
|
} else if (info.state == uiObserver.RouterPageState.ON_PAGE_HIDE) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
aboutToAppear(): void {
|
aboutToAppear(): void {
|
||||||
|
let uiObserver: UIObserver = this.getUIContext().getUIObserver();
|
||||||
|
uiObserver.on('routerPageUpdate', this.listener);
|
||||||
for (const icons of this.iconList) {
|
for (const icons of this.iconList) {
|
||||||
if (icons.name === '我的患者') {
|
if (icons.name === '我的患者') {
|
||||||
this.patientIcon = icons.img;
|
this.patientIcon = icons.img;
|
||||||
@ -30,19 +46,91 @@ export struct HomeIconComp {
|
|||||||
this.zixunIcon = icons.img
|
this.zixunIcon = icons.img
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.initList()
|
||||||
|
// for (let index = 0; index < this.iconList!.length; index++) {
|
||||||
|
// const iconModel = this.iconList![index] as iconsModel ;
|
||||||
|
// if (index == 0) {
|
||||||
|
// iconModel.isRed = true;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
this.getRedCount()
|
||||||
|
}
|
||||||
|
|
||||||
|
aboutToDisappear(): void {
|
||||||
|
let uiObserver: UIObserver = this.getUIContext().getUIObserver();
|
||||||
|
uiObserver.off('routerPageUpdate', this.listener);
|
||||||
|
}
|
||||||
|
|
||||||
|
async getRedCount()
|
||||||
|
{
|
||||||
|
let unreadCount = LocalConversationRepo.getTotalUnreadCount() ?? 0
|
||||||
|
let consultcount=0
|
||||||
|
const result = await LocalConversationRepo.getConversationList(0,100)
|
||||||
|
if(result!=null&&result.conversationList!=null)
|
||||||
|
{
|
||||||
|
for (const conversation of result.conversationList) {
|
||||||
|
const uuid = ChatKitClient.nim.conversationIdUtil.parseConversationTargetId(conversation.conversationId);
|
||||||
|
// 假设 selectUserStyleWithModel 返回 "1" 表示 type=1
|
||||||
|
const style = await patientDbManager.getPatientTypeByUuid(uuid);
|
||||||
|
if (style != 1) {
|
||||||
|
if(conversation.unreadCount>0)
|
||||||
|
{
|
||||||
|
consultcount++
|
||||||
|
}
|
||||||
|
|
||||||
for (let index = 0; index < this.iconList!.length; index++) {
|
|
||||||
const iconModel = this.iconList![index] as iconsModel ;
|
|
||||||
if (index == 0) {
|
|
||||||
iconModel.isRed = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
unreadCount=unreadCount-consultcount
|
||||||
|
if(unreadCount>0)
|
||||||
|
{
|
||||||
|
this.patientRed=true
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.patientRed=false
|
||||||
|
}
|
||||||
|
if(consultcount>0)
|
||||||
|
{
|
||||||
|
this.consultationRed=true
|
||||||
|
}
|
||||||
|
|
||||||
|
this.initList()
|
||||||
|
const hashMap: HashMap<string, string> = new HashMap();
|
||||||
|
hdHttp.httpReq<string>(BasicConstant.indexV2,hashMap).then(async (res: HdResponse<string>) => {
|
||||||
|
let json:HomeModel = JSON.parse(res+'') as HomeModel;
|
||||||
|
if(json.data!=null&&json.data.consult_list!=null&&json.data.consult_list.list!=null)
|
||||||
|
{
|
||||||
|
consultcount=consultcount>0?consultcount:json.data.consult_list.list.length
|
||||||
|
if(consultcount>0)
|
||||||
|
{
|
||||||
|
this.consultationRed=true
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.consultationRed=false
|
||||||
|
}
|
||||||
|
this.initList()
|
||||||
|
}
|
||||||
|
}).catch((err: BusinessError) => {
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
initList()
|
||||||
|
{
|
||||||
|
this.iconListtmp=[...[{ 'img': this.patientIcon, 'name': this.patientName,'isRed':this.patientRed } as iconsModel,
|
||||||
|
{ 'img': this.videoIcon, 'name': this.videoName} as iconsModel,
|
||||||
|
{'img':this.zixunIcon,'name':this.consultation,'isRed':this.consultationRed} as iconsModel]]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
Row() {
|
Row() {
|
||||||
Grid() {
|
Grid() {
|
||||||
ForEach([{ 'img': this.patientIcon, 'name': this.patientName },{ 'img': this.videoIcon, 'name': this.videoName},{'img':this.zixunIcon,'name':this.consultation}], (item: iconsModel) => {//this.iconList
|
ForEach(this.iconListtmp, (item: iconsModel) => {//this.iconList
|
||||||
GridItem(){
|
GridItem(){
|
||||||
Stack() {
|
Stack() {
|
||||||
Column() {
|
Column() {
|
||||||
@ -76,4 +164,5 @@ export struct HomeIconComp {
|
|||||||
}.width('100%').backgroundColor(Color.White)
|
}.width('100%').backgroundColor(Color.White)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -170,4 +170,5 @@ export struct HomePage {
|
|||||||
.width('100%')
|
.width('100%')
|
||||||
.height('100%')
|
.height('100%')
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,11 +1,13 @@
|
|||||||
import { TabBarCompModel } from '../model/TabBarCompModel'
|
import { TabBarCompModel } from '../model/TabBarCompModel'
|
||||||
import { TabBarItems } from '../components/TabBarItems'
|
import { TabBarItems } from '../components/TabBarItems'
|
||||||
import { authStore, BasicConstant, hdHttp, HdLoadingDialog, HdResponse } from '@itcast/basic'
|
import { authStore, BasicConstant, hdHttp, HdLoadingDialog, HdResponse,
|
||||||
|
NotificationManagementUtil } from '@itcast/basic'
|
||||||
import { MessageComp } from '../view/MessageComp'
|
import { MessageComp } from '../view/MessageComp'
|
||||||
import { PatientListComp, updateExtraData } from './PatientListComp'
|
import { PatientListComp, updateExtraData } from './PatientListComp'
|
||||||
import { applyListCallBacl, FollowPlanListComp } from 'patient'
|
import { applyListCallBacl, FollowPlanListComp } from 'patient'
|
||||||
import { HMLifecycleState, HMRouterMgr } from '@hadss/hmrouter'
|
import { HMLifecycleState, HMRouterMgr } from '@hadss/hmrouter'
|
||||||
import { BusinessError } from '@kit.BasicServicesKit'
|
import { BusinessError } from '@kit.BasicServicesKit'
|
||||||
|
import { LocalConversationRepo } from '@nimkit/chatkit'
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
export struct TabBarComp {
|
export struct TabBarComp {
|
||||||
@ -17,6 +19,8 @@ export struct TabBarComp {
|
|||||||
private lifecycleOwner = HMRouterMgr.getCurrentLifecycleOwner()
|
private lifecycleOwner = HMRouterMgr.getCurrentLifecycleOwner()
|
||||||
private handleCallback = () => {
|
private handleCallback = () => {
|
||||||
this.getApplyList()
|
this.getApplyList()
|
||||||
|
let unreadCount=LocalConversationRepo.getTotalUnreadCount() ?? -1
|
||||||
|
NotificationManagementUtil.setBadgeNumber(unreadCount)
|
||||||
}
|
}
|
||||||
aboutToAppear() {
|
aboutToAppear() {
|
||||||
this.getApplyList()
|
this.getApplyList()
|
||||||
|
|||||||
@ -67,7 +67,8 @@ export struct SendGroupMessageComp {
|
|||||||
if (this.isPossessList) {
|
if (this.isPossessList) {
|
||||||
this.submintMessage("5")
|
this.submintMessage("5")
|
||||||
} else {
|
} else {
|
||||||
HMRouterMgr.push({})
|
|
||||||
|
HMRouterMgr.push({pageUrl:'OutpatientComp',param:"send"})
|
||||||
}
|
}
|
||||||
this.outpatient.close();
|
this.outpatient.close();
|
||||||
}
|
}
|
||||||
@ -168,16 +169,25 @@ export struct SendGroupMessageComp {
|
|||||||
logger.info('Response stopOutPatientList'+res);
|
logger.info('Response stopOutPatientList'+res);
|
||||||
let json:Record<string,string> = JSON.parse(res+'') as Record<string,string>;
|
let json:Record<string,string> = JSON.parse(res+'') as Record<string,string>;
|
||||||
if(json.code == '200') {
|
if(json.code == '200') {
|
||||||
if (Array.isArray(json.data)) {
|
let json = JSON.parse(res+'') as Record<string, object>;
|
||||||
const data:Array<Record<string,string>> = json.data
|
let datas:[]=json.data as []
|
||||||
if (data.length>0) {
|
if(datas!=null&&datas.length>0)
|
||||||
this.isPossessList = true
|
{
|
||||||
} else {
|
this.isPossessList=true
|
||||||
this.getListOutPatient()
|
}
|
||||||
}
|
else {
|
||||||
} else {
|
|
||||||
this.getListOutPatient()
|
this.getListOutPatient()
|
||||||
}
|
}
|
||||||
|
// if (Array.isArray(json.data)) {
|
||||||
|
// const data:Array<Record<string,string>> = json.data
|
||||||
|
// if (data.length>0) {
|
||||||
|
// this.isPossessList = true
|
||||||
|
// } else {
|
||||||
|
// this.getListOutPatient()
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// this.getListOutPatient()
|
||||||
|
// }
|
||||||
} else {
|
} else {
|
||||||
console.error('停/出诊公告列表失败:'+json.message)
|
console.error('停/出诊公告列表失败:'+json.message)
|
||||||
promptAction.showToast({ message: json.message, duration: 1000 })
|
promptAction.showToast({ message: json.message, duration: 1000 })
|
||||||
@ -197,12 +207,19 @@ export struct SendGroupMessageComp {
|
|||||||
logger.info('Response listOutPatient'+res);
|
logger.info('Response listOutPatient'+res);
|
||||||
let json:Record<string,string> = JSON.parse(res+'') as Record<string,string>;
|
let json:Record<string,string> = JSON.parse(res+'') as Record<string,string>;
|
||||||
if(json.code == '200') {
|
if(json.code == '200') {
|
||||||
if (Array.isArray(json.data)) {
|
let json = JSON.parse(res+'') as Record<string, object>;
|
||||||
const data:Array<Record<string,string>> = json.data
|
let json1=json.data as Record<string, object>
|
||||||
if (data.length>0) {
|
let datas:[]=json1.list as []
|
||||||
this.isPossessList = true
|
if(datas!=null&&datas.length>0)
|
||||||
}
|
{
|
||||||
|
this.isPossessList=true
|
||||||
}
|
}
|
||||||
|
// if (Array.isArray(json.data)) {
|
||||||
|
// const data:Array<Record<string,string>> = json.data
|
||||||
|
// if (data.length>0) {
|
||||||
|
// this.isPossessList = true
|
||||||
|
// }
|
||||||
|
// }
|
||||||
} else {
|
} else {
|
||||||
console.error('门诊列表失败:'+json.message)
|
console.error('门诊列表失败:'+json.message)
|
||||||
promptAction.showToast({ message: json.message, duration: 1000 })
|
promptAction.showToast({ message: json.message, duration: 1000 })
|
||||||
|
|||||||
@ -27,9 +27,13 @@ export struct LocalConversationPage {
|
|||||||
this.viewModel.onUreadMessageChange = this.onUreadMessageChange
|
this.viewModel.onUreadMessageChange = this.onUreadMessageChange
|
||||||
//初始化@ 服务
|
//初始化@ 服务
|
||||||
// AitServer.instance.init()
|
// AitServer.instance.init()
|
||||||
|
if(ChatKitClient.hasLogin())
|
||||||
|
{
|
||||||
this.viewModel.initConversation()
|
this.viewModel.initConversation()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
// NavDestination() {
|
// NavDestination() {
|
||||||
if (this.viewModel.conversationList) {
|
if (this.viewModel.conversationList) {
|
||||||
|
|||||||
@ -29,7 +29,7 @@ struct LoginPage {
|
|||||||
onLogins()
|
onLogins()
|
||||||
{
|
{
|
||||||
|
|
||||||
this.login(AppConfig.userId, AppConfig.userToken)
|
this.login(this.YX_accid,this.YX_token)
|
||||||
}
|
}
|
||||||
|
|
||||||
private dialog!:CustomDialogController;
|
private dialog!:CustomDialogController;
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
import { authStore, BasicConstant, ChangeUtil, HdNav , preferenceStore} from '@itcast/basic';
|
import { authStore, BasicConstant, ChangeUtil, HdNav ,
|
||||||
|
NotificationManagementUtil,
|
||||||
|
preferenceStore} from '@itcast/basic';
|
||||||
import { bundleManager, common, ConfigurationConstant, Want } from '@kit.AbilityKit';
|
import { bundleManager, common, ConfigurationConstant, Want } from '@kit.AbilityKit';
|
||||||
import { fileIo, storageStatistics } from '@kit.CoreFileKit';
|
import { fileIo, storageStatistics } from '@kit.CoreFileKit';
|
||||||
import { promptAction, router } from '@kit.ArkUI';
|
import { promptAction, router } from '@kit.ArkUI';
|
||||||
@ -60,6 +62,7 @@ struct SettingPage {
|
|||||||
if (appExist) {
|
if (appExist) {
|
||||||
fileIo.rmdirSync(appCacheDir)
|
fileIo.rmdirSync(appCacheDir)
|
||||||
}
|
}
|
||||||
|
NotificationManagementUtil.setBadgeNumber(0)
|
||||||
promptAction.showToast({ message: '清理完毕' })
|
promptAction.showToast({ message: '清理完毕' })
|
||||||
this.calcCache()
|
this.calcCache()
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user