bug修复
This commit is contained in:
@@ -17,6 +17,8 @@ export struct HomeIconComp {
|
||||
@State patientName: string = '我的患者';
|
||||
@State videoIcon: string = '';
|
||||
@State videoName: string = '肝胆视频';
|
||||
@State zixunIcon: string = '';
|
||||
@State consultation: string = '公益咨询';
|
||||
|
||||
aboutToAppear(): void {
|
||||
for (const icons of this.iconList) {
|
||||
@@ -24,6 +26,8 @@ export struct HomeIconComp {
|
||||
this.patientIcon = icons.img;
|
||||
} else if (icons.name === '肝胆视频') {
|
||||
this.videoIcon = icons.img;
|
||||
} else if (icons.name == '公益咨询') {
|
||||
this.zixunIcon = icons.img
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +42,7 @@ export struct HomeIconComp {
|
||||
build() {
|
||||
Row() {
|
||||
Grid() {
|
||||
ForEach(this.iconList, (item: iconsModel) => {//[{ 'img': this.patientIcon, 'name': this.patientName },{ 'img': this.videoIcon, 'name': this.videoName}]
|
||||
ForEach([{ 'img': this.patientIcon, 'name': this.patientName },{ 'img': this.videoIcon, 'name': this.videoName},{'img':this.zixunIcon,'name':this.consultation}], (item: iconsModel) => {//this.iconList
|
||||
GridItem(){
|
||||
Stack() {
|
||||
Column() {
|
||||
@@ -56,24 +60,15 @@ export struct HomeIconComp {
|
||||
}.width('25%').alignContent(Alignment.TopEnd)
|
||||
}.margin({top:20,bottom:20})
|
||||
.onClick(async ()=>{
|
||||
const patients = await patientDbManager.getAllPatients();
|
||||
console.info(`添加了 ${patients.length} 个患者`);
|
||||
promptAction.showToast({message:`添加了 ${patients.length} 个患者`})
|
||||
if(item.name=='公益咨询') {
|
||||
router.pushUrl({ url: 'pages/Netease/PublicConsultationPage' })
|
||||
}
|
||||
else if(item.name=='我的患者') {
|
||||
} else if(item.name=='我的患者') {
|
||||
router.pushUrl({url:'pages/Netease/imTabPage'})
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
const pushToken = pushService.getToken();
|
||||
console.info("PushService", `Get push token successfully: ${pushToken}`)
|
||||
} catch (err) {
|
||||
// fail
|
||||
let e: BusinessError = err as BusinessError;
|
||||
console.error("PushService", 'Get push token catch error: ' + e.code + ' ' + e.message);
|
||||
} else if (item.name == '肝胆视频') {
|
||||
router.pushUrl({
|
||||
url:'pages/VideoPage/VideoGandanPage',
|
||||
params:{"page":"首页"}
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
@@ -28,6 +28,7 @@ export struct HomeReplayVideoComp {
|
||||
.onClick(()=>{
|
||||
router.pushUrl({
|
||||
url:'pages/VideoPage/VideoGandanPage',
|
||||
params:{"page":"首页"}
|
||||
})
|
||||
})
|
||||
}.height(50)
|
||||
|
||||
@@ -7,10 +7,20 @@ import { getDisplayWindowWidth } from 'media-player-common'
|
||||
|
||||
@Component
|
||||
export struct VideoGandan {
|
||||
@State params:Record<string, string> = router.getParams() as Record<string, string>
|
||||
@State isShowNaviLeft:boolean = false
|
||||
|
||||
aboutToAppear(): void {
|
||||
if (this.params) {
|
||||
if (this.params["page"] == '首页') {
|
||||
this.isShowNaviLeft = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
build() {
|
||||
Column() {
|
||||
HdNav({ title: '肝胆视频', showRightIcon: true, showLeftIcon: false,showRightText:false,rightIcon:$r('app.media.selected_hospital_ws'),rightItemAction:()=>{
|
||||
HdNav({ title: '肝胆视频', showRightIcon: true, showLeftIcon: this.isShowNaviLeft,showRightText:false,rightIcon:$r('app.media.selected_hospital_ws'),rightItemAction:()=>{
|
||||
router.pushUrl({
|
||||
url:'pages/SearchPage/VideoSearchPage',
|
||||
params:{'pageName':'视频'}
|
||||
|
||||
Reference in New Issue
Block a user