From 7c2db724a5430330e03483e590467987d53b3fde Mon Sep 17 00:00:00 2001 From: XiuYun CHEN Date: Fri, 25 Jul 2025 14:03:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=87=BA=E8=AF=8A=E8=AE=A1=E5=88=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/ets/view/StopNoticeComp.ets | 2 +- .../src/main/ets/view/TabBarOutComp.ets | 21 ++++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/features/netease/src/main/ets/view/StopNoticeComp.ets b/features/netease/src/main/ets/view/StopNoticeComp.ets index d8f2577..fe65cb0 100644 --- a/features/netease/src/main/ets/view/StopNoticeComp.ets +++ b/features/netease/src/main/ets/view/StopNoticeComp.ets @@ -20,7 +20,7 @@ export struct StopNoticeComp { @State data:StopOutPatientList[]=[]; @State isEmptyViewVisible: boolean = false; // 控制显隐的状态变量 @State empty:string='暂无数据' - @Link stopnum:number + @State stopnum:number=0 aboutToAppear() { this.getList(); diff --git a/features/netease/src/main/ets/view/TabBarOutComp.ets b/features/netease/src/main/ets/view/TabBarOutComp.ets index 51375dd..96b5ab9 100644 --- a/features/netease/src/main/ets/view/TabBarOutComp.ets +++ b/features/netease/src/main/ets/view/TabBarOutComp.ets @@ -9,6 +9,7 @@ import { BusinessError } from '@kit.BasicServicesKit' import { PatientNoticeModel } from '../model/PatientNoticeModel' import { promptAction } from '@kit.ArkUI' import { ArrangementsComp } from './ArrangementsComp' +import { StopOutPatientListModel } from '../model/StopOutPatientListModel' @Component export struct TabBarOutComp { @@ -22,6 +23,7 @@ export struct TabBarOutComp { @State stopnum: number = 0 aboutToAppear() { this.mailanNoticeGet() + this.stopOutPatientList() } @@ -56,7 +58,7 @@ export struct TabBarOutComp { if (index==0) { - StopNoticeComp({stopnum:this.stopnum}) + StopNoticeComp() } else if(index==1) @@ -161,6 +163,23 @@ export struct TabBarOutComp { } + stopOutPatientList() { + + const hashMap: HashMap = new HashMap(); + hdHttp.httpReq(BasicConstant.stopOutPatientList,hashMap).then(async (res: HdResponse) => { + let json:StopOutPatientListModel = JSON.parse(res+'') as StopOutPatientListModel; + if(json.code == '200') { + if(json.data!=null) + { + this.stopnum=json.data.length + } + + } + }).catch((err: BusinessError) => { + + console.info(`Response fails: ${err}`); + }) + } } export const TabBarItems: TabBarCompModel[] = [