会议提交测试

This commit is contained in:
XiuYun CHEN 2025-05-12 15:04:23 +08:00
parent c8184e2b32
commit da5a1b603c
9 changed files with 12985 additions and 4327 deletions

File diff suppressed because it is too large Load Diff

View File

@ -86,10 +86,10 @@ export struct HdList {
.width('100%')
.height('100%')
.padding({ left: BasicConstant.SPACE_LG, right: BasicConstant.SPACE_LG })
.divider({
strokeWidth: $r('app.float.common_border_width'),
color: $r('app.color.common_gray_border')
})
// .divider({
// strokeWidth: $r('app.float.common_border_width'),
// color: $r('app.color.common_gray_border')
// })
.onReachEnd(() => {
if (this.loading || this.refreshing || this.finished) {
return;

View File

@ -15,4 +15,5 @@ export class BasicConstant {
static readonly getStartpage=BasicConstant.urlapp + "startpage";
static readonly meetingListV2=BasicConstant.urlmyLan + "meetingListV2";
}

View File

@ -30,7 +30,7 @@
},
{
"name": "hd_list_finished",
"value": "没有更多了~"
"value": ""
},
{
"name": "hd_clock_in",

View File

@ -1,13 +1,26 @@
import { MeetingItemModel,ItemModel } from '../model/ItemModel'
@Preview
@Component
export struct ItemComp {
item: MeetingItemModel = new MeetingItemModel({} as ItemModel)
build() {
Column({ space: 12 }) {
Column() {
if(this.item.count==0)
{
Text(this.item.begin_date.substring(0, 4)
+ "年"
+ this.item.begin_date.substring(5, 7)
+ "月").fontSize(14).fontColor('app.color.333333').height(35)
}
else
{
Text(this.item.count+'')
}
}
}.backgroundColor($r('app.color.e4e4e4')).width('100%')
}
}

View File

@ -1,14 +1,16 @@
import { ItemComp } from './ItemComp'
import { MeetingItemModel } from '../model/ItemModel'
import { HdList, HdListController,BasicConstant } from '@itcast/basic/Index'
import promptAction from '@ohos.promptAction'
import { MeetingItemModel,MeetingModel,MeetingModels,ItemModel } from '../model/ItemModel'
import { HdList, HdListController,BasicConstant,hdHttp, HdResponse ,logger} from '@itcast/basic/Index'
import { promptAction, router } from '@kit.ArkUI'
import { BusinessError } from '@kit.BasicServicesKit';
import HashMap from '@ohos.util.HashMap';
import { hdHttp } from '@itcast/basic'
@Component
export struct ListComp {
@State
list: MeetingItemModel[] = []
list: ItemModel[] = []
controller = new HdListController()
@State
page: number = 1
@ -30,29 +32,7 @@ export struct ListComp {
onRefresh() {
this.page = 1
this.hashMap.clear();
// this.hashMap.set('mobile',this.mobile)
//
// this.hashMap.set('current_spec','hongmeng')
// hdHttp.httpReq<string>(this.loginUrl,this.hashMap).then(async (res: HdResponse<string>) => {
// this.loading = false
// logger.info('Response login'+res);
// console.info(`Response login succeeded: ${res}`);
// let json:LoginInfo = JSON.parse(res+'') as LoginInfo;
//
// if(json.code=='1')
// {
// this.getSaveUserInfor(1,json)
// }
// else
// {
// promptAction.showToast({ message: json.message, duration: 1000 })
// }
//
// }).catch((err: BusinessError) => {
// this.loading = false
// console.info(`Response login fail: ${err}`);
// })
this.initData(0)
// InterviewService.findInterviewList({
// questionBankType: 9,
// page: this.page,
@ -70,6 +50,58 @@ export struct ListComp {
// })
}
initData(type:number)
{
this.hashMap.clear();
this.hashMap.set('page', this.page+"")
hdHttp.httpReq<string>(BasicConstant.meetingListV2,this.hashMap).then(async (res: HdResponse<string>) => {
logger.info('Response meetingListV2'+res);
let json:MeetingModels = JSON.parse(res+'') as MeetingModels;
if(type==0)
{
this.controller.refreshed()
}
else
{
this.controller.loaded()
}
if(this.page==1&&json.data.list!=null&&json.data.list.length>0)
{
this.list = json.data.list
}
else if(this.page>1)
{
this.list.push(...json.data.list)
}
this.getPosition()
if (this.page >= json.data.pages) {
this.controller.finished()
} else {
this.page++
}
}).catch((err: BusinessError) => {
})
}
getPosition() {
let DatasList:string[] = [];
let count = 0;
for (let i = 0; i <this.list.length; i++) {
if (!DatasList.includes(this.list[i].begin_date
.substring(0, 7))) {
DatasList.push(this.list[i].begin_date.substring(0, 7));
count = 0;
this.list[i].count=count;
} else {
count++;
this.list[i].count=count;
}
}
}
build() {
HdList({
lw: 1,
@ -78,20 +110,8 @@ export struct ListComp {
this.onRefresh()
},
onLoad: () => {
// InterviewService.findInterviewList({
// questionBankType: 9,
// page: this.page,
// sort: this.sort,
// keyword: this.keyword
// }).then(res => {
// this.list.push(...res.data.rows)
// this.controller.loaded()
// if (this.page >= res.data.pageTotal) {
// this.controller.finished()
// } else {
// this.page++
// }
// })
this.initData(1)
}
}) {
ForEach(this.list, (item: MeetingItemModel) => {

View File

@ -0,0 +1,76 @@
import { List } from '@kit.ArkTS';
export interface ItemModel {
count:number;
title:string;
uuid:string;
end_date:string;
begin_date:string;
sort:string;
// status 0 无直播 1 待直播 2 直播中 3 已结束)
status:string;
location:string;
type:string;
path:string;
content:string;
// liveimg (直播图片)
liveimg:string;
// liveurl (直播地址)
liveurl:string;
// spareurl (备用地址)
spareurl:string;
tags:string;
}
export interface MeetingModel {
code:string;
message:string;
totalPage:number;
pageNumber:number;
pageSize:number;
totalRow:number;
pages:number;
list: ItemModel[] ;
}
export interface MeetingModels {
code:string;
message:string;
data:MeetingModel
}
export class MeetingItemModel implements ItemModel
{
count: number=0;
title: string='';
uuid: string='';
end_date: string='';
begin_date: string='';
sort: string='';
status: string='';
location: string='';
type: string='';
path: string='';
content: string='';
liveimg: string='';
liveurl: string='';
spareurl: string='';
tags: string='';
constructor(model:ItemModel) {
this.count = model.count;
this.title = model.title;
this.uuid = model.uuid;
this.end_date = model.end_date;
this.begin_date = model.begin_date;
this.sort = model.sort;
this.status = model.status;
this.location = model.location;
this.type = model.type;
this.path = model.path;
this.content = model.content;
this.liveimg = model.liveimg;
this.liveurl = model.liveurl;
this.spareurl = model.spareurl;
this.tags = model.tags;
}
}

View File

@ -1,15 +1,5 @@
import { HdNav } from '@itcast/basic'
class RdbData{
key:string = ''
value:string = ''
constructor(key:string,value:string) {
this.key = key
this.value = value
}
}
import { ListComp } from '../components/ListComp'
@Entry
@Component
@ -21,7 +11,7 @@ export struct VideoPage {
@State timePosition:number=-1;
@State tlistStatus:boolean=false;
@State timeText:string='会议时间';
@State rdbDataArray:RdbData[] = []
onPageShow(): void {
console.log('VideoPage onPageShow!');
}
@ -72,43 +62,48 @@ export struct VideoPage {
Blank()
}.width('100%').height(45)
Text().Line()
if(this.tlistStatus)
{
List() {
ForEach(this.monthWords, (item: string,index:number) => {
ListItem() {
Column() {
Stack({ }) {
ListComp()
if(this.tlistStatus)
{
List() {
ForEach(this.monthWords, (item: string,index:number) => {
ListItem() {
Column() {
if(this.timePosition==index)
{
Row()
if(this.timePosition==index)
{
Text(item).customStyle().height(40).fontColor($r('app.color.top_title'))
Blank()
Image($r('app.media.chose_card')).width(22).margin({right:25})
Row()
{
Text(item).customStyle().height(40).fontColor($r('app.color.top_title'))
Blank()
Image($r('app.media.chose_card')).width(22).margin({right:25})
}
.width('100%')
.alignSelf(ItemAlign.Start)
Text().Line().backgroundColor($r('app.color.top_title'))
}
else
{
Text(item).customStyle().height(40).alignSelf(ItemAlign.Start)
Text().Line()
}
.width('100%')
.alignSelf(ItemAlign.Start)
Text().Line().backgroundColor($r('app.color.top_title'))
}
else
{
Text(item).customStyle().height(40).alignSelf(ItemAlign.Start)
Text().Line()
}
}.padding({left:22})
.width('100%')
.justifyContent(FlexAlign.Start)
.onClick(()=>{
this.timePosition=index
this.tlistStatus=false
this.timeText=item
})
}
}, (item: string) => JSON.stringify(item))
}.padding({left:22})
.width('100%')
.justifyContent(FlexAlign.Start)
.onClick(()=>{
this.timePosition=index
this.tlistStatus=false
this.timeText=item
})
}
}, (item: string) => JSON.stringify(item))
} .width('100%')
.height('100%').backgroundColor(Color.White)
}
}
}

View File

@ -27,6 +27,14 @@
{
"name": "top_bg",
"value": "#FFEFEFEF"
},
{
"name": "e4e4e4",
"value": "#e4e4e4"
},
{
"name": "333333",
"value": "#333333"
}
]
}