diff --git a/build-profile.json5 b/build-profile.json5 index f7f2fe0..d2c0f71 100644 --- a/build-profile.json5 +++ b/build-profile.json5 @@ -17,7 +17,7 @@ ], "buildModeSet": [ { - "name": "debug", + "name": "debug" }, { "name": "release" @@ -43,15 +43,15 @@ }, { "name": "basic", - "srcPath": "./commons/basic", + "srcPath": "./commons/basic" }, { "name": "Home", - "srcPath": "./features/Home", + "srcPath": "./features/Home" }, { "name": "register", - "srcPath": "./features/register", + "srcPath": "./features/register" }, { "name": "polyv", @@ -61,5 +61,6 @@ "name": "scene_single_video", "srcPath": "./scene_single_video" } + ] } \ No newline at end of file diff --git a/commons/basic/src/main/ets/constants/BasicConstant.ets b/commons/basic/src/main/ets/constants/BasicConstant.ets index a310f22..3e14cf4 100644 --- a/commons/basic/src/main/ets/constants/BasicConstant.ets +++ b/commons/basic/src/main/ets/constants/BasicConstant.ets @@ -30,5 +30,9 @@ export class BasicConstant { static readonly videoByTypeNew = BasicConstant.urlExpertApp + 'videoByTypeNew' static readonly videoDetail = BasicConstant.urlExpertAPI + "videoDetail"; static readonly meetingHistoryList = BasicConstant.urlExpertAPI + "meetingHistoryList"; + static readonly videoRoll = BasicConstant.urlExpertAPI + "videoRoll"; + static readonly expertVideoTypeList = BasicConstant.urlExpertAPI + "expertVideoTypeList"; + static readonly videoByKeyWordsNew = BasicConstant.urlExpertApp + "videoByKeyWordsNew"; + static readonly tagList = BasicConstant.urlExpertApp + "tagList"; } \ No newline at end of file diff --git a/commons/basic/src/main/ets/utils/ChangeUtil.ets b/commons/basic/src/main/ets/utils/ChangeUtil.ets index 271c384..f660514 100644 --- a/commons/basic/src/main/ets/utils/ChangeUtil.ets +++ b/commons/basic/src/main/ets/utils/ChangeUtil.ets @@ -6,6 +6,7 @@ import image from '@ohos.multimedia.image'; import fs from '@ohos.file.fs'; import { fileIo } from '@kit.CoreFileKit'; import util from '@ohos.util'; +import { i18n } from '@kit.LocalizationKit'; export class ChangeUtil { /** * 将HashMap转成JsonString @@ -132,4 +133,14 @@ export class ChangeUtil { } } + static isLetter(char: string): boolean { + if (char.length !== 1) return false; + const code = char.charCodeAt(0); + return (code >= 65 && code <= 90) || (code >= 97 && code <= 122); + } + static isFirstDigit(str: string): boolean { + if (str.length === 0) return false; + return i18n.Unicode.isDigit(str.charAt(0)); + } + } \ No newline at end of file diff --git a/commons/basic/src/main/ets/utils/request.ets b/commons/basic/src/main/ets/utils/request.ets index 3a036ac..cca61bf 100644 --- a/commons/basic/src/main/ets/utils/request.ets +++ b/commons/basic/src/main/ets/utils/request.ets @@ -52,6 +52,7 @@ class HdHttp { return httpInstance.request(fullUrl, options).then((res) => { + logger.info('Response param'+JSON.stringify(extraDatas)) logger.info('Response fullUrl:' +fullUrl+ res.result); const result = res.result as HdResponse return result diff --git a/features/Home/Index.ets b/features/Home/Index.ets index 303f2fd..5b49321 100644 --- a/features/Home/Index.ets +++ b/features/Home/Index.ets @@ -9,3 +9,7 @@ export { VideoMore } from './src/main/ets/pages/VideoMore' export { VideoDetailModel } from './src/main/ets/model/VideoDetailModel' export { PastVideo } from './src/main/ets/pages/PastVideo'; + +export { VideoGandan } from './src/main/ets/pages/VideoGandan'; + +export { PLVMockMediaResourceData } from './src/main/ets/polyv/PLVMockMediaResourceData' diff --git a/features/Home/oh-package.json5 b/features/Home/oh-package.json5 index 51d1ebc..f77ac6c 100644 --- a/features/Home/oh-package.json5 +++ b/features/Home/oh-package.json5 @@ -12,4 +12,4 @@ "scene_single_video": "file:../../scene_single_video", "media-player-common": "file:../../polyv" } -} +} \ No newline at end of file diff --git a/features/Home/src/main/ets/components/ItemCompVideo.ets b/features/Home/src/main/ets/components/ItemCompVideo.ets index a0b1f32..50a7479 100644 --- a/features/Home/src/main/ets/components/ItemCompVideo.ets +++ b/features/Home/src/main/ets/components/ItemCompVideo.ets @@ -33,7 +33,7 @@ export struct ItemCompVideo { Row(){ Text(this.item.public_name).fontSize(14) - .fontColor($r('app.color.999999')) + .fontColor($r('app.color.999999')).maxLines(1) .textOverflow({ overflow: TextOverflow.Ellipsis }).layoutWeight(1) Blank() Image($r('app.media.video_look')).width(18).height(11) Text(this.item.readnum+'').fontSize(14) diff --git a/features/Home/src/main/ets/components/ListComp.ets b/features/Home/src/main/ets/components/ListComp.ets index 7799621..c475fd2 100644 --- a/features/Home/src/main/ets/components/ListComp.ets +++ b/features/Home/src/main/ets/components/ListComp.ets @@ -59,9 +59,14 @@ export struct ListComp { { this.controller.loaded() } - if(this.page==1&&json.data.list!=null&&json.data.list.length>0) + if(this.page==1) { - this.list = json.data.list + this.list=[] + if(json.data!=null&&json.data.list!) + { + this.list = json.data.list + } + } else if(this.page>1) { diff --git a/features/Home/src/main/ets/components/ListCompGandan.ets b/features/Home/src/main/ets/components/ListCompGandan.ets new file mode 100644 index 0000000..884b24c --- /dev/null +++ b/features/Home/src/main/ets/components/ListCompGandan.ets @@ -0,0 +1,119 @@ +import { ItemCompVideo } from './ItemCompVideo' +import { VideoMoreModel,VideoMore } from '../model/VideoMoreModel' +import { HdGrid, HdListController,BasicConstant,hdHttp, HdResponse ,logger} from '@itcast/basic/Index' +import { promptAction, router } from '@kit.ArkUI' +import { BusinessError } from '@kit.BasicServicesKit'; +import { HdLoadingDialog,EmptyViewComp } from '@itcast/basic' +import HashMap from '@ohos.util.HashMap'; + + +@Component +export struct ListCompGandan { + @State isEmptyViewVisible: boolean = false; // 控制显隐的状态变量 + @Prop@Watch('onUpdate') sort:string='2' + @Prop@Watch('onUpdate') + type_uuid:string='' + @Prop@Watch('onUpdate') keywords:string='' + @State + list: VideoMore[] = [] + controller = new HdListController() + @State + page: number = 1 + @State + keyword: string = '' + hashMap: HashMap = new HashMap(); + + dialog: CustomDialogController = new CustomDialogController({ + builder: HdLoadingDialog({ message: '加载中...' }), + customStyle: true, + alignment: DialogAlignment.Center + }) + onUpdate() { + this.onRefresh() + } + + + onRefresh() { + this.page = 1 + this.initData(0) + } + + initData(type:number) + { + this.dialog.open() + this.hashMap.clear(); + this.hashMap.set('keywords',this.keywords) + this.hashMap.set('page', this.page+"") + this.hashMap.set("sort", this.sort); + this.hashMap.set('typeUuid', this.type_uuid) + hdHttp.httpReq(BasicConstant.videoByKeyWordsNew,this.hashMap).then(async (res: HdResponse) => { + logger.info('Response videoByTypeNew'+res); + let json:VideoMoreModel = JSON.parse(res+'') as VideoMoreModel; + this.dialog.close() + if(type==0) + { + this.controller.refreshed() + } + else + { + this.controller.loaded() + } + if(this.page==1) + { + this.list=[] + if(json.data!=null&&json.data.list!) + { + this.list = json.data.list + } + + } + else if(this.page>1) + { + this.list.push(...json.data.list) + } + + if (this.page >= json.data.totalPage) { + this.controller.finished() + } else { + this.page++ + } + if (this.list.length>0) { + this.isEmptyViewVisible = false; + } else { + this.isEmptyViewVisible = true; + } + }).catch((err: BusinessError) => { + this.dialog.close() + if (this.list.length>0) { + this.isEmptyViewVisible = false; + } else { + this.isEmptyViewVisible = true; + } + }) + } + + build() { + if (this.isEmptyViewVisible){ + EmptyViewComp({promptText:'暂无数据',isVisibility:this.isEmptyViewVisible}) + .width('100%') + .height('100%') + } else { + HdGrid({ + lw: 1, + controller: this.controller, + onRefresh: () => { + this.onRefresh() + }, + onLoad: () => { + this.initData(1) + } + }) { + ForEach(this.list, (items: VideoMore) => { + GridItem() { + ItemCompVideo({ item:items }) + } + }) + } + } + } +} \ No newline at end of file diff --git a/features/Home/src/main/ets/components/ListCompVideo.ets b/features/Home/src/main/ets/components/ListCompVideo.ets index 6195b58..b6af9a2 100644 --- a/features/Home/src/main/ets/components/ListCompVideo.ets +++ b/features/Home/src/main/ets/components/ListCompVideo.ets @@ -55,9 +55,14 @@ export struct ListCompVideo { { this.controller.loaded() } - if(this.page==1&&json.data.list!=null&&json.data.list.length>0) + if(this.page==1) { - this.list = json.data.list + this.list=[] + if(json.data!=null&&json.data.list!) + { + this.list = json.data.list + } + } else if(this.page>1) { diff --git a/features/Home/src/main/ets/components/SecondaryLink.ets b/features/Home/src/main/ets/components/SecondaryLink.ets new file mode 100644 index 0000000..9b4d6a1 --- /dev/null +++ b/features/Home/src/main/ets/components/SecondaryLink.ets @@ -0,0 +1,369 @@ +/* + * Copyright (c) 2024 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 HashMap from '@ohos.util.HashMap'; +import { hdHttp, HdResponse ,logger,BasicConstant,ChangeUtil} from '@itcast/basic/Index' +import { BusinessError } from '@kit.BasicServicesKit'; +import { VideoTypeModel,TypeList,VideoType } from '../model/VideoTypeModel' +import { ArrayList } from '@kit.ArkTS'; +import { ListCompGandan } from '../components/ListCompGandan' +import { TagListModel,TagList } from '../model/TagListModel' +import { promptAction } from '@kit.ArkUI' +@Component +export struct SecondaryLink { + @State currentTagIndex: number = 0; // 一级列表焦点索引值 + @State currentTagIndex2: number = -1; // 2级列表焦点索引值 + @State private tagLists:VideoType[] = []; // 一级列表数据 + @State contentData:TypeList[]=[]; // 二级列表数据 + @State videoImg:ResourceStr=$r('app.media.video_all') + @State videoImgt:ResourceStr=$r('app.media.all_video') + @State videoText:ResourceStr=$r('app.color.848284') + @State videoTitle:string='全部视频' + @State videoSort:string='最新' + @State videoImgs:ResourceStr=$r('app.media.cb_new') + @State videoImgSe:ResourceStr=$r('app.media.cb_screen_no') + @State videoSelect:ResourceStr=$r('app.color.848284') + @State sort:string='2' + @State type_uuid:string='' + arrayList: ArrayList = new ArrayList(); + @State isOpenSelect:boolean=false + @State isOpenSelect1:boolean=false//筛选 + @State private tags:TagList[] = []; + @State tagPosition: TagList[] = []; + @State tagPositiontmp: TagList[] = []; + @State keywords:string='' + /** + * 生命周期函数 + */ + aboutToAppear(): void { + // 构造数据 + this.initList() + + } + + build() { + Column() { + Row() + { + Row() { + Image(this.videoImg).width(15).height(15).margin({ left:15 }) + Text(this.videoTitle).maxLines(1).fontSize(14).fontColor(this.videoText).textAlign(TextAlign.Start) + .textOverflow({ overflow: TextOverflow.Ellipsis }).margin({ left:5 }) + Image(this.videoImgt).width(15).height(15).margin({ left:5 }) + + }.layoutWeight(1).height(36) + .onClick(()=>{ + this.isOpenSelect1=false + this.isOpenSelect=!this.isOpenSelect + }) + Text().width(60).height(10) + Row() + { + Text(this.videoSort).fontSize(14).fontColor($r('app.color.top_title')).textAlign(TextAlign.Start) + .margin({ left:5 }) + Image(this.videoImgs).width(15).height(15).margin({ left:5 }) + } + + .onClick(()=>{ + if(this.videoSort=='最新') + { + this.sort='1' + this.videoSort='最热' + this.videoImgs=$r('app.media.cb_hot') + } + else + { + this.sort='2' + this.videoSort='最新' + this.videoImgs=$r('app.media.cb_new') + } + }) + Text('').backgroundColor($r('app.color.848284')).width(0.5).height(10) + .margin({ left:5 }) + Row() + { + Text('筛选').fontSize(14).fontColor(this.videoSelect).textAlign(TextAlign.Start) + .margin({ left:5 }) + Image(this.videoImgSe).width(15).height(15).margin({ left:5,right:10 }) + } + + .onClick(()=>{ + + this.tagPosition = [...this.tagPositiontmp]; + this.isOpenSelect=false + this.isOpenSelect1=!this.isOpenSelect1 + + }) + } + .backgroundColor(Color.White) + .width('100%') + Row().height(10).width('100%') .backgroundColor('#efefef') + Stack({alignContent:Alignment.Top}) + { + ListCompGandan({ sort:this.sort,type_uuid:this.type_uuid,keywords:this.keywords}) + if(this.isOpenSelect1) + { + Column() + { + Grid() { + ForEach(this.tags, (item: TagList, index: number) => { + GridItem() { + Text(item.NAME) + .height(25) + .width('100%') + .padding({left:5,right:5}) + .fontWeight(FontWeight.Regular) + .fontSize(13) + .fontColor(this.tagPosition.indexOf(item)!=-1 ? $r('app.color.top_title'): $r('app.color.848284')) + .textAlign(TextAlign.Center) + .border({ width: 1, color:this.tagPosition.indexOf(item)!=-1 ? $r('app.color.top_title'): '#999999' }) + .borderRadius(30) + + .onClick(() => { + + + if(this.tagPosition.indexOf(item)!=-1) + { + const newSelected = [...this.tagPosition]; + newSelected.splice(this.tagPosition.indexOf(item), 1); + this.tagPosition = newSelected; + + } + else + { + if (this.tagPosition.length >= 3) { + promptAction.showToast({ message: '最多选择三个标签!', duration: 1000 }); + return; + } + this.tagPosition.push(item) + } + + }) + } + }) + } + .padding(10) + .columnsTemplate('1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .backgroundColor(Color.White) + .height('calc(100% - 175vp)') + .width('100%') + .layoutWeight(1) + Row() + { + Text('重置').height(40) + .textAlign(TextAlign.Center) + .fontColor($r('app.color.top_title') ) + .border({ width: 1, color: $r('app.color.top_title') }) + .borderRadius(5) + .layoutWeight(1) + .margin({left:15}) + .onClick(()=>{ + this.tagPosition= []; + }) + Text('确定') + .height(40) + .fontColor(Color.White).textAlign(TextAlign.Center) + .border({ width: 1, color: $r('app.color.top_title') }) + .borderRadius(5) + .layoutWeight(1) + .backgroundColor($r('app.color.top_title')) + .margin({left:10,right:15}) + .onClick(()=>{ + this.tagPositiontmp = [...this.tagPosition]; + if(this.tagPosition.length>0) + { + this.videoImgSe=$r('app.media.cb_screen_yes') + this.videoSelect=$r('app.color.top_title') + this.tagPosition.forEach(element => { + this.keywords+=element.NAME+ "," + }); + + } + else + { + this.keywords='' + this.videoSelect=$r('app.color.848284') + this.videoImgSe=$r('app.media.cb_screen_no') + } + + this.isOpenSelect1=false + }) + }.width('100%') + .height(60) + .backgroundColor(Color.White) + + } + .height('calc(100% - 175vp)') + + } + if(this.isOpenSelect) + { + Row() { + // TODO:知识点: 2.一级列表绑定Scroller对象 + List() { + // 性能知识点:此处为横向列表,列表项确定且数量较少,使用了ForEach,在列表项多的情况下,推荐使用LazyForeEach + ForEach(this.tagLists, (item: VideoType, index: number) => { + ListItem() { + Text(item.name) + .width('100%') + .padding(10) + .fontWeight(FontWeight.Regular) + .fontSize(15) + .fontColor(this.currentTagIndex === index ? $r('app.color.top_title'): $r('app.color.848284')) + .textAlign(TextAlign.Center) + .backgroundColor(this.currentTagIndex === index ? $r('sys.color.ohos_id_color_background') : '') + + .onClick(() => { + this.currentTagIndex = index; + this.contentData=this.arrayList[index]; + + }) + } + }) + } + .backgroundColor('#efefef') + .width('27%') + .height('calc(100% - 175vp)') + // 二级列表 + List() { + if(this.currentTagIndex==0) + { + ListItem() { + Row() { + Text('全部视频') + .fontSize(15) + .padding(10) + .fontColor(this.currentTagIndex2 === -2 ? $r('app.color.top_title'): $r('app.color.848284')) + } + }.onClick(()=>{ + this.videoTitle='全部视频' + this.currentTagIndex2=-2 + this.changeSelectRescourse() + this.type_uuid='' + }) + } + ForEach(this.contentData, (item: TypeList,index: number) => { + ListItem() { + Row() { + Text(item.name) + .fontSize(15) + .padding(10) + .fontColor(this.currentTagIndex2 === index ? $r('app.color.top_title'): $r('app.color.848284')) + } + }.onClick(()=>{ + this.currentTagIndex2=index + this.videoTitle=item.name + this.type_uuid=item.uuid + this.changeSelectRescourse() + }) + }) + } + .backgroundColor(Color.White) + .layoutWeight(1) + .divider({ + strokeWidth: 1, + color: $r('app.color.common_gray_border'), + startMargin:10, + endMargin:10 + }) + .height('calc(100% - 175vp)') + }.width('100%').alignItems(VerticalAlign.Top) + } + + } + .layoutWeight(1) + } + } + + changeSelectRescourse() + { + this.videoImg=$r('app.media.video_select') + this.videoImgt=$r('app.media.select_video') + this.videoText=$r('app.color.top_title') + this.isOpenSelect=false + } + + initList() + { + let hashMap: HashMap = new HashMap(); + hdHttp.httpReq(BasicConstant.expertVideoTypeList,hashMap).then(async (res: HdResponse) => { + + let json:VideoTypeModel = JSON.parse(res+'') as VideoTypeModel; + this.tagLists=json.data + for (let i = 0;i=4){ + substring = title.substring(0, 4);//取出来前4位 + }else if(title.length>=3){ + substring = title.substring(0, 3);//取出来前3位 + }else if (title.length>=2){ + substring = title.substring(0, 2);//取出来前2位 + } + if (substring.includes("-")){//含有- + let split: string[] = substring.split("-"); + if (split.length>1){ + s = split[split.length - 1] + title.substring(4, title.length); + }else { + s = title.substring(4, title.length); + } + datatagname[j].name=s; + } + } + } + const indexesToRemove = new Set(k); // 使用 Set 提高查找效率 + const newArr = datatagname.filter((_, index) => !indexesToRemove.has(index)); + this.arrayList.add(newArr) + k=[] + } + this.contentData=this.arrayList[0]; + + }).catch((err: BusinessError) => { + + + }) + let hashMap1: HashMap = new HashMap(); + hashMap1.set("type", "2") + hdHttp.post(BasicConstant.tagList,{ + type:'2' + } as TagModel).then(async (res: HdResponse) => { + let json:TagListModel = JSON.parse(res+'') as TagListModel; + this.tags=json.data + + + }).catch((err: BusinessError) => { + + + }) + } +} + +interface TagModel +{ + type:string +} diff --git a/features/Home/src/main/ets/components/SwiperComp.ets b/features/Home/src/main/ets/components/SwiperComp.ets new file mode 100644 index 0000000..7fa2118 --- /dev/null +++ b/features/Home/src/main/ets/components/SwiperComp.ets @@ -0,0 +1,91 @@ +import { VideoRollModel,VideoRoll } from '../model/VideoRollModel' +import { BasicConstant,hdHttp, HdResponse ,logger} from '@itcast/basic/Index' +import { promptAction, router } from '@kit.ArkUI' +import { BusinessError } from '@kit.BasicServicesKit'; +import { HdLoadingDialog } from '@itcast/basic' +import HashMap from '@ohos.util.HashMap'; + + +@Component +export struct SwiperComp { + @State + list: VideoRoll[] = [] + + + + + hashMap: HashMap = new HashMap(); + + dialog: CustomDialogController = new CustomDialogController({ + builder: HdLoadingDialog({ message: '加载中...' }), + customStyle: true, + alignment: DialogAlignment.Center + }) + + aboutToAppear(): void { + this.initData() + } + + initData() + { + this.dialog.open() + this.hashMap.clear(); + hdHttp.httpReq(BasicConstant.videoRoll,this.hashMap).then(async (res: HdResponse) => { + logger.info('Response meetingListV2'+res); + let json:VideoRollModel = JSON.parse(res+'') as VideoRollModel; + this.dialog.close(); + this.list = json.data + + }).catch((err: BusinessError) => { + this.dialog.close(); + }) + } + + build() { + Column() { // 使用堆叠布局实现按钮覆盖 + Swiper() { + ForEach(this.list, (item: VideoRoll) => { + Stack({alignContent:Alignment.Bottom}) { + Image(BasicConstant.urlHtml + item.imgpath) + .objectFit(ImageFit.Fill)// 图片填充模式 + .width('100%') + .height(150) + Text(item.name) + .maxLines(1) + .height(30) + .fontColor('#F6F6F6') + .textAlign(TextAlign.Start) + .textOverflow({ overflow: TextOverflow.Ellipsis }) + .backgroundColor('#88000000') + .width('100%') + .padding({right:100,left:5}) + .margin({ bottom: 0 }) + }.onClick(()=>{ + + }) + }, (item: VideoRoll) => JSON.stringify(item)) + + } + .indicator( + Indicator.dot() + .right(0) + .itemWidth(4) + .itemHeight(4) + .selectedItemWidth(4) + .selectedItemHeight(4) + .color($r('app.color.common_gray_02')) + .selectedColor('#3cc9c0') + ) + .loop(true) + .autoPlay(true) + .interval(3000) + .onChange((index: number) => { + + }) + + + } + .width('100%') + + } +} \ No newline at end of file diff --git a/features/Home/src/main/ets/model/TagListModel.ets b/features/Home/src/main/ets/model/TagListModel.ets new file mode 100644 index 0000000..2f777f6 --- /dev/null +++ b/features/Home/src/main/ets/model/TagListModel.ets @@ -0,0 +1,15 @@ +export interface TagListModel { + code:string; + data:TagList[]; + message:string; +} + +export interface TagList{ + + DES:string; + ID:string; + sort:string; + create_date:string; + TYPE:string; + NAME:string; +} \ No newline at end of file diff --git a/features/Home/src/main/ets/model/VideoRollModel.ets b/features/Home/src/main/ets/model/VideoRollModel.ets new file mode 100644 index 0000000..4c61a3e --- /dev/null +++ b/features/Home/src/main/ets/model/VideoRollModel.ets @@ -0,0 +1,14 @@ +export interface VideoRollModel { + code:string; + data:VideoRoll[]; + message:string; +} + +export interface VideoRoll{ + + imgpath:string; + uuid:string; + name:string; + path:string; + tags:string; +} \ No newline at end of file diff --git a/features/Home/src/main/ets/model/VideoTypeModel.ets b/features/Home/src/main/ets/model/VideoTypeModel.ets new file mode 100644 index 0000000..54acf3d --- /dev/null +++ b/features/Home/src/main/ets/model/VideoTypeModel.ets @@ -0,0 +1,16 @@ +export interface VideoTypeModel { + code:string; + data:VideoType[]; + message:string; +} + +export interface VideoType{ + + name:string; + list:TypeList[]; +} +export interface TypeList{ + uuid:string; + name:string; + create_date:string; +} \ No newline at end of file diff --git a/features/Home/src/main/ets/pages/VideoGandan.ets b/features/Home/src/main/ets/pages/VideoGandan.ets new file mode 100644 index 0000000..c100947 --- /dev/null +++ b/features/Home/src/main/ets/pages/VideoGandan.ets @@ -0,0 +1,20 @@ +import { SecondaryLink } from '../components/SecondaryLink'; +import router from '@ohos.router'; +import { HdNav } from '@itcast/basic' +import { SwiperComp } from '../components/SwiperComp' + + +@Component +export struct VideoGandan { + build() { + + Column() { + HdNav({ title: '肝胆视频', showRightIcon: false, showLeftIcon: false }) + SwiperComp() + SecondaryLink() + + + }.width('100%') + .height('100%').backgroundColor($r('app.color.top_bg')) + } +} diff --git a/features/Home/src/main/ets/pages/VideoPage.ets b/features/Home/src/main/ets/pages/VideoPage.ets index 81e6ccb..7a12d50 100644 --- a/features/Home/src/main/ets/pages/VideoPage.ets +++ b/features/Home/src/main/ets/pages/VideoPage.ets @@ -31,7 +31,7 @@ export struct VideoPage { { Column() { - HdNav({ title: '肝胆会议', showRightIcon: false, showLeftIcon: true,showRightText:true,rightText:'扫一扫' }) + HdNav({ title: '肝胆会议', showRightIcon: false, showLeftIcon: false,showRightText:false,rightText:'扫一扫' }) Row() { Blank() .onClick(()=>{ @@ -82,7 +82,7 @@ export struct VideoPage { }.width('100%').height(45) Text().Line() Stack({ }) { - ListComp().padding({bottom:20}).backgroundColor($r('app.color.e4e4e4')) + ListComp().backgroundColor($r('app.color.e4e4e4')) if(this.tlistStatus) { List() { @@ -129,16 +129,17 @@ export struct VideoPage { } .width('100%') .height('100%') - .padding({bottom:50}) + Image($r('app.media.past_metting')).width(76).height(40) .alignRules({ right: { anchor: "__container__", align: HorizontalAlign.End }, bottom:{ anchor: "__container__", align:VerticalAlign.Bottom} }) - .margin({bottom:120}) + .margin({bottom:40}) .onClick(() => { router.pushUrl({url:'pages/VideoPage/PastVideoPage'}) + // router.pushUrl({url:'pages/VideoPage/VideoGandanPage'}) }) } diff --git a/features/Home/src/main/resources/base/element/color.json b/features/Home/src/main/resources/base/element/color.json index 3defca9..3a4390d 100644 --- a/features/Home/src/main/resources/base/element/color.json +++ b/features/Home/src/main/resources/base/element/color.json @@ -67,6 +67,10 @@ { "name": "22000000", "value": "#22000000" + }, + { + "name": "848284", + "value": "#848284" } ] } \ No newline at end of file diff --git a/features/Home/src/main/resources/base/media/all_video.png b/features/Home/src/main/resources/base/media/all_video.png new file mode 100644 index 0000000..0e27072 Binary files /dev/null and b/features/Home/src/main/resources/base/media/all_video.png differ diff --git a/features/Home/src/main/resources/base/media/cb_hot.png b/features/Home/src/main/resources/base/media/cb_hot.png new file mode 100644 index 0000000..ed71ff2 Binary files /dev/null and b/features/Home/src/main/resources/base/media/cb_hot.png differ diff --git a/features/Home/src/main/resources/base/media/cb_new.png b/features/Home/src/main/resources/base/media/cb_new.png new file mode 100644 index 0000000..35a3a5c Binary files /dev/null and b/features/Home/src/main/resources/base/media/cb_new.png differ diff --git a/features/Home/src/main/resources/base/media/cb_screen_no.png b/features/Home/src/main/resources/base/media/cb_screen_no.png new file mode 100644 index 0000000..9f3c5fd Binary files /dev/null and b/features/Home/src/main/resources/base/media/cb_screen_no.png differ diff --git a/features/Home/src/main/resources/base/media/cb_screen_yes.png b/features/Home/src/main/resources/base/media/cb_screen_yes.png new file mode 100644 index 0000000..b3090ef Binary files /dev/null and b/features/Home/src/main/resources/base/media/cb_screen_yes.png differ diff --git a/features/Home/src/main/resources/base/media/select_video.png b/features/Home/src/main/resources/base/media/select_video.png new file mode 100644 index 0000000..80c925f Binary files /dev/null and b/features/Home/src/main/resources/base/media/select_video.png differ diff --git a/features/Home/src/main/resources/base/media/video_all.png b/features/Home/src/main/resources/base/media/video_all.png new file mode 100644 index 0000000..d6cb6c0 Binary files /dev/null and b/features/Home/src/main/resources/base/media/video_all.png differ diff --git a/features/Home/src/main/resources/base/media/video_select.png b/features/Home/src/main/resources/base/media/video_select.png new file mode 100644 index 0000000..6718850 Binary files /dev/null and b/features/Home/src/main/resources/base/media/video_select.png differ diff --git a/products/expert/src/main/ets/contants/TabBarItems.ets b/products/expert/src/main/ets/contants/TabBarItems.ets index 541f0ef..d013770 100644 --- a/products/expert/src/main/ets/contants/TabBarItems.ets +++ b/products/expert/src/main/ets/contants/TabBarItems.ets @@ -2,6 +2,11 @@ import { TabBarCompModel } from '../models/TabBarCompModel' export const TabBarItems: TabBarCompModel[] = [ + { + defaultIcon: $r('app.media.home_my_meeting_nor'), + activeIcon: $r('app.media.home_my_meeting_sel'), + label: '会议·直播' + }, { defaultIcon: $r('app.media.video_tabbar_icon'), activeIcon: $r('app.media.video_tabbar_selected_icon'), diff --git a/products/expert/src/main/ets/pages/Tabbar/TabBarComp.ets b/products/expert/src/main/ets/pages/Tabbar/TabBarComp.ets index 9111c74..e894cfe 100644 --- a/products/expert/src/main/ets/pages/Tabbar/TabBarComp.ets +++ b/products/expert/src/main/ets/pages/Tabbar/TabBarComp.ets @@ -1,4 +1,4 @@ -import { VideoPage } from 'home' +import { VideoPage,VideoGandan } from 'home' import { MyHomePage } from 'mypage' import { TabBarCompModel } from '../../models/TabBarCompModel' import { TabBarItems } from '../../contants/TabBarItems' @@ -39,10 +39,10 @@ export struct TabBarComp { }) { ForEach(TabBarItems, (item: TabBarCompModel, index: number) => { TabContent() { - if (index === 0) VideoPage() - // else if (index === 1) ProjectComp() - // else if (index === 2) InterviewComp() - else MyHomePage() + if (index === 0) VideoPage().padding({bottom:70}) + else if (index === 1) VideoGandan().padding({bottom:70}) + else if (index === 2) MyHomePage() + // else MyHomePage() } .tabBar(this.TabBarBuilder(item, index)) .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) diff --git a/products/expert/src/main/ets/pages/VideoPage/VideoGandanPage.ets b/products/expert/src/main/ets/pages/VideoPage/VideoGandanPage.ets new file mode 100644 index 0000000..96f19cb --- /dev/null +++ b/products/expert/src/main/ets/pages/VideoPage/VideoGandanPage.ets @@ -0,0 +1,14 @@ +import { VideoGandan } from 'home' +@Entry +@Component +struct VideoGandanPage { + + + build() { + RelativeContainer() { + VideoGandan() + } + .height('100%') + .width('100%') + } +} \ No newline at end of file diff --git a/products/expert/src/main/resources/base/media/home_my_meeting_nor.png b/products/expert/src/main/resources/base/media/home_my_meeting_nor.png new file mode 100644 index 0000000..5e4aeba Binary files /dev/null and b/products/expert/src/main/resources/base/media/home_my_meeting_nor.png differ diff --git a/products/expert/src/main/resources/base/media/home_my_meeting_sel.png b/products/expert/src/main/resources/base/media/home_my_meeting_sel.png new file mode 100644 index 0000000..c943540 Binary files /dev/null and b/products/expert/src/main/resources/base/media/home_my_meeting_sel.png differ diff --git a/products/expert/src/main/resources/base/profile/main_pages.json b/products/expert/src/main/resources/base/profile/main_pages.json index 61560dc..8e57da9 100644 --- a/products/expert/src/main/resources/base/profile/main_pages.json +++ b/products/expert/src/main/resources/base/profile/main_pages.json @@ -23,6 +23,7 @@ "pages/VideoPage/VideoMorePage", "pages/VideoPage/PLVMediaPlayerSingleVideoPage", "pages/WebView/LivebroadcastPages", - "pages/VideoPage/PastVideoPage" + "pages/VideoPage/PastVideoPage", + "pages/VideoPage/VideoGandanPage" ] } \ No newline at end of file