更新注册等相关逻辑
This commit is contained in:
@@ -3,12 +3,13 @@ import { MeetingItemModel,MeetingModel,MeetingModels,ItemModel } from '../model/
|
||||
import { HdList, HdListController,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 { EmptyViewComp,HdLoadingDialog } from '@itcast/basic'
|
||||
import HashMap from '@ohos.util.HashMap';
|
||||
|
||||
|
||||
@Component
|
||||
export struct ListComp {
|
||||
@State isEmptyViewVisible: boolean = false; // 控制显隐的状态变量
|
||||
@State
|
||||
list: ItemModel[] = []
|
||||
controller = new HdListController()
|
||||
@@ -16,12 +17,17 @@ export struct ListComp {
|
||||
page: number = 1
|
||||
@State
|
||||
keyword: string = ''
|
||||
|
||||
hashMap: HashMap<string, string> = new HashMap();
|
||||
@Prop
|
||||
@Watch('onUpdate')
|
||||
sort: number = 30
|
||||
timer: number = -1
|
||||
hashMap: HashMap<string, string> = new HashMap();
|
||||
location: string=''
|
||||
@Prop
|
||||
@Watch('onUpdate')
|
||||
month:string=''
|
||||
|
||||
@State
|
||||
url:string=BasicConstant.meetingListV2
|
||||
dialog: CustomDialogController = new CustomDialogController({
|
||||
builder: HdLoadingDialog({ message: '加载中...' }),
|
||||
customStyle: true,
|
||||
@@ -29,11 +35,8 @@ export struct ListComp {
|
||||
})
|
||||
|
||||
onUpdate() {
|
||||
if (this.timer) clearTimeout(this.timer)
|
||||
this.timer = setTimeout(() => {
|
||||
this.controller.reload()
|
||||
this.onRefresh()
|
||||
}, 500)
|
||||
this.url=BasicConstant.meetingListBySearch
|
||||
this.onRefresh()
|
||||
}
|
||||
|
||||
onRefresh() {
|
||||
@@ -47,7 +50,13 @@ export struct ListComp {
|
||||
this.dialog.open()
|
||||
this.hashMap.clear();
|
||||
this.hashMap.set('page', this.page+"")
|
||||
hdHttp.httpReq<string>(BasicConstant.meetingListV2,this.hashMap).then(async (res: HdResponse<string>) => {
|
||||
if(BasicConstant.meetingListBySearch==this.url)
|
||||
{
|
||||
this.hashMap.set('location', this.location+"")
|
||||
this.hashMap.set('status', "")
|
||||
this.hashMap.set('month', this.month+"")
|
||||
}
|
||||
hdHttp.httpReq<string>(this.url,this.hashMap).then(async (res: HdResponse<string>) => {
|
||||
logger.info('Response meetingListV2'+res);
|
||||
let json:MeetingModels = JSON.parse(res+'') as MeetingModels;
|
||||
this.dialog.close();
|
||||
@@ -78,9 +87,18 @@ export struct ListComp {
|
||||
} 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;
|
||||
}
|
||||
})
|
||||
}
|
||||
getPosition() {
|
||||
@@ -100,23 +118,31 @@ export struct ListComp {
|
||||
|
||||
}
|
||||
build() {
|
||||
HdList({
|
||||
lw: 1,
|
||||
controller: this.controller,
|
||||
onRefresh: () => {
|
||||
this.onRefresh()
|
||||
},
|
||||
onLoad: () => {
|
||||
this.initData(1)
|
||||
if (this.isEmptyViewVisible){
|
||||
EmptyViewComp({promptText:'暂无会议',isVisibility:this.isEmptyViewVisible})
|
||||
.width('100%')
|
||||
.height('100%')
|
||||
} else
|
||||
{
|
||||
HdList({
|
||||
lw: 1,
|
||||
controller: this.controller,
|
||||
onRefresh: () => {
|
||||
this.onRefresh()
|
||||
},
|
||||
onLoad: () => {
|
||||
this.initData(1)
|
||||
|
||||
}
|
||||
}) {
|
||||
ForEach(this.list, (item: MeetingItemModel) => {
|
||||
ListItem() {
|
||||
ItemComp({ item })
|
||||
}
|
||||
})
|
||||
}) {
|
||||
ForEach(this.list, (item: MeetingItemModel) => {
|
||||
ListItem() {
|
||||
ItemComp({ item })
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -19,8 +19,7 @@ export struct ListCompGandan {
|
||||
controller = new HdListController()
|
||||
@State
|
||||
page: number = 1
|
||||
@State
|
||||
keyword: string = ''
|
||||
|
||||
hashMap: HashMap<string, string> = new HashMap();
|
||||
|
||||
dialog: CustomDialogController = new CustomDialogController({
|
||||
|
||||
@@ -3,12 +3,13 @@ import { MeetingItemModel,MeetingModel,MeetingModels,ItemModel } from '../model/
|
||||
import { HdList, HdListController,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 { EmptyViewComp,HdLoadingDialog } from '@itcast/basic'
|
||||
import HashMap from '@ohos.util.HashMap';
|
||||
|
||||
|
||||
@Component
|
||||
export struct ListCompPast {
|
||||
@State isEmptyViewVisible: boolean = false; // 控制显隐的状态变量
|
||||
@Prop
|
||||
@Watch('onUpdate')
|
||||
year:string=''
|
||||
@@ -103,10 +104,18 @@ export struct ListCompPast {
|
||||
} 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;
|
||||
}
|
||||
})
|
||||
}
|
||||
getPosition() {
|
||||
@@ -126,23 +135,31 @@ export struct ListCompPast {
|
||||
|
||||
}
|
||||
build() {
|
||||
HdList({
|
||||
lw: 1,
|
||||
controller: this.controller,
|
||||
onRefresh: () => {
|
||||
this.onRefresh()
|
||||
},
|
||||
onLoad: () => {
|
||||
this.initData(1)
|
||||
if (this.isEmptyViewVisible){
|
||||
EmptyViewComp({promptText:'暂无数据',isVisibility:this.isEmptyViewVisible})
|
||||
.width('100%')
|
||||
.height('100%')
|
||||
} else
|
||||
{
|
||||
HdList({
|
||||
lw: 1,
|
||||
controller: this.controller,
|
||||
onRefresh: () => {
|
||||
this.onRefresh()
|
||||
},
|
||||
onLoad: () => {
|
||||
this.initData(1)
|
||||
|
||||
}
|
||||
}) {
|
||||
ForEach(this.list, (item: MeetingItemModel) => {
|
||||
ListItem() {
|
||||
ItemCompPast({ item })
|
||||
}
|
||||
})
|
||||
}) {
|
||||
ForEach(this.list, (item: MeetingItemModel) => {
|
||||
ListItem() {
|
||||
ItemCompPast({ item })
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -184,6 +184,7 @@ export struct SecondaryLink {
|
||||
.margin({left:10,right:15})
|
||||
.onClick(()=>{
|
||||
this.tagPositiontmp = [...this.tagPosition];
|
||||
this.keywords=''
|
||||
if(this.tagPosition.length>0)
|
||||
{
|
||||
this.videoImgSe=$r('app.media.cb_screen_yes')
|
||||
@@ -195,7 +196,7 @@ export struct SecondaryLink {
|
||||
}
|
||||
else
|
||||
{
|
||||
this.keywords=''
|
||||
|
||||
this.videoSelect=$r('app.color.848284')
|
||||
this.videoImgSe=$r('app.media.cb_screen_no')
|
||||
}
|
||||
|
||||
@@ -33,10 +33,6 @@ export struct PastVideo {
|
||||
{
|
||||
HdNav({ title: '过往会议', showRightIcon: false, showLeftIcon: true})
|
||||
Row() {
|
||||
Blank()
|
||||
.onClick(()=>{
|
||||
this.tlistStatus=!this.tlistStatus
|
||||
})
|
||||
Row() {
|
||||
if(this.timePosition!=-1)
|
||||
{
|
||||
@@ -49,19 +45,14 @@ export struct PastVideo {
|
||||
}
|
||||
|
||||
}
|
||||
.layoutWeight(1)
|
||||
.justifyContent(FlexAlign.Center)
|
||||
.onClick(()=>{
|
||||
this.tlistStatus=!this.tlistStatus
|
||||
})
|
||||
Blank()
|
||||
.onClick(()=>{
|
||||
this.tlistStatus=!this.tlistStatus
|
||||
})
|
||||
Text('|').customStyle()
|
||||
Blank()
|
||||
.onClick(()=>{
|
||||
this.getSelectMonth()
|
||||
|
||||
})
|
||||
Text('|').customStyle()
|
||||
|
||||
Row() {
|
||||
if(this.typePosition!=-1)
|
||||
{
|
||||
@@ -73,13 +64,12 @@ export struct PastVideo {
|
||||
Image(this.notselectImg).width(13).margin({left:5})
|
||||
}
|
||||
}
|
||||
.layoutWeight(1)
|
||||
.justifyContent(FlexAlign.Center)
|
||||
.onClick(()=>{
|
||||
this.getSelectMonth()
|
||||
})
|
||||
Blank()
|
||||
.onClick(()=>{
|
||||
this.getSelectMonth()
|
||||
})
|
||||
|
||||
}.width('100%').height(45)
|
||||
Text().Line()
|
||||
Stack({ }) {
|
||||
@@ -117,6 +107,9 @@ export struct PastVideo {
|
||||
this.timePosition=index
|
||||
this.tlistStatus=false
|
||||
this.timeText=item
|
||||
this.monthText='会议月份';
|
||||
this.type=''
|
||||
this.typePosition=-1;
|
||||
})
|
||||
}
|
||||
}, (item: string) => JSON.stringify(item))
|
||||
|
||||
@@ -33,10 +33,7 @@ export struct PlayBack {
|
||||
{
|
||||
HdNav({ title: '肝胆回放', showRightIcon: false, showLeftIcon: true})
|
||||
Row() {
|
||||
Blank()
|
||||
.onClick(()=>{
|
||||
this.tlistStatus=!this.tlistStatus
|
||||
})
|
||||
|
||||
Row() {
|
||||
if(this.timePosition!=-1)
|
||||
{
|
||||
@@ -48,19 +45,15 @@ export struct PlayBack {
|
||||
Image(this.notselectImg).width(13).margin({left:5})
|
||||
}
|
||||
|
||||
}
|
||||
}.layoutWeight(1)
|
||||
.justifyContent(FlexAlign.Center)
|
||||
.onClick(()=>{
|
||||
this.typelistStatus=false
|
||||
this.tlistStatus=!this.tlistStatus
|
||||
})
|
||||
Blank()
|
||||
.onClick(()=>{
|
||||
this.tlistStatus=!this.tlistStatus
|
||||
})
|
||||
|
||||
Text('|').customStyle()
|
||||
Blank()
|
||||
.onClick(()=>{
|
||||
this.typelistStatus=!this.typelistStatus
|
||||
})
|
||||
|
||||
Row() {
|
||||
if(this.typePosition!=-1)
|
||||
{
|
||||
@@ -72,13 +65,13 @@ export struct PlayBack {
|
||||
Image(this.notselectImg).width(13).margin({left:5})
|
||||
}
|
||||
}
|
||||
.layoutWeight(1)
|
||||
.justifyContent(FlexAlign.Center)
|
||||
.onClick(()=>{
|
||||
this.tlistStatus=false
|
||||
this.typelistStatus=!this.typelistStatus
|
||||
})
|
||||
Blank()
|
||||
.onClick(()=>{
|
||||
this.typelistStatus=!this.typelistStatus
|
||||
})
|
||||
|
||||
}.width('100%').height(45)
|
||||
Text().Line()
|
||||
Stack({ }) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HdNav } from '@itcast/basic'
|
||||
import { HdNav,BasicConstant } from '@itcast/basic'
|
||||
|
||||
import { ListComp } from '../components/ListComp'
|
||||
import { router } from '@kit.ArkUI'
|
||||
@@ -10,9 +10,13 @@ export struct VideoPage {
|
||||
@State selectImg: ResourceStr = $r('app.media.triangle_green_theme');
|
||||
@State monthWords:Array<string> =[]
|
||||
@State timePosition:number=-1;
|
||||
@State proivcePosition:number=-1;
|
||||
@State tlistStatus:boolean=false;
|
||||
@State timeText:string='会议时间';
|
||||
|
||||
@State plistStatus:boolean=false;
|
||||
@State PriText:string='会议地点';
|
||||
@State location: string=''
|
||||
@State month:string=''
|
||||
|
||||
onPageShow(): void {
|
||||
console.log('VideoPage onPageShow!');
|
||||
@@ -33,10 +37,7 @@ export struct VideoPage {
|
||||
{
|
||||
HdNav({ title: '肝胆会议', showRightIcon: false, showLeftIcon: false,showRightText:false,rightText:'扫一扫' })
|
||||
Row() {
|
||||
Blank()
|
||||
.onClick(()=>{
|
||||
this.tlistStatus=!this.tlistStatus
|
||||
})
|
||||
|
||||
Row() {
|
||||
if(this.timePosition!=-1)
|
||||
{
|
||||
@@ -48,48 +49,54 @@ export struct VideoPage {
|
||||
Image(this.notselectImg).width(13).margin({left:5})
|
||||
}
|
||||
|
||||
}
|
||||
}.layoutWeight(1)
|
||||
.onClick(()=>{
|
||||
this.plistStatus=false
|
||||
this.tlistStatus=!this.tlistStatus
|
||||
})
|
||||
Blank()
|
||||
.onClick(()=>{
|
||||
this.tlistStatus=!this.tlistStatus
|
||||
})
|
||||
.justifyContent(FlexAlign.Center)
|
||||
|
||||
Text('|').customStyle()
|
||||
Blank()
|
||||
|
||||
Row() {
|
||||
Text('会议地点').customStyle()
|
||||
Image(this.notselectImg).width(13).margin({left:5})
|
||||
if(this.proivcePosition!=-1)
|
||||
{
|
||||
Text(this.PriText).customStyle().fontColor($r('app.color.top_title'))
|
||||
Image(this.selectImg).width(13).margin({left:5})
|
||||
}
|
||||
else {
|
||||
Text(this.PriText).customStyle()
|
||||
Image(this.notselectImg).width(13).margin({left:5})
|
||||
}
|
||||
}
|
||||
Blank()
|
||||
.layoutWeight(1)
|
||||
.justifyContent(FlexAlign.Center)
|
||||
.onClick(()=>{
|
||||
this.tlistStatus=false
|
||||
this.plistStatus=!this.plistStatus
|
||||
})
|
||||
Text('|').customStyle()
|
||||
Blank()
|
||||
.onClick(() => {
|
||||
router.pushUrl({url:'pages/VideoPage/PlayBackPage'})
|
||||
})
|
||||
|
||||
Row() {
|
||||
Text('会议回放').customStyle()
|
||||
|
||||
}
|
||||
.layoutWeight(1)
|
||||
.justifyContent(FlexAlign.Center)
|
||||
.onClick(() => {
|
||||
router.pushUrl({url:'pages/VideoPage/PlayBackPage'})
|
||||
})
|
||||
Blank()
|
||||
.onClick(() => {
|
||||
router.pushUrl({url:'pages/VideoPage/PlayBackPage'})
|
||||
})
|
||||
|
||||
}.width('100%').height(45)
|
||||
Text().Line()
|
||||
Stack({ }) {
|
||||
ListComp().backgroundColor($r('app.color.e4e4e4'))
|
||||
ListComp({location:this.location,month:this.month}).backgroundColor($r('app.color.e4e4e4'))
|
||||
if(this.tlistStatus)
|
||||
{
|
||||
List() {
|
||||
ForEach(this.monthWords, (item: string,index:number) => {
|
||||
ListItem() {
|
||||
Column() {
|
||||
|
||||
if(this.timePosition==index)
|
||||
{
|
||||
Row()
|
||||
@@ -116,14 +123,66 @@ export struct VideoPage {
|
||||
this.timePosition=index
|
||||
this.tlistStatus=false
|
||||
this.timeText=item
|
||||
|
||||
if(this.timePosition==0)
|
||||
{
|
||||
this.month=''
|
||||
}
|
||||
else
|
||||
{
|
||||
this.month=index-1+''
|
||||
}
|
||||
})
|
||||
}
|
||||
}, (item: string) => JSON.stringify(item))
|
||||
} .width('100%')
|
||||
.height('100%').backgroundColor(Color.White)
|
||||
}
|
||||
if(this.plistStatus)
|
||||
{
|
||||
Column()
|
||||
{
|
||||
Grid() {
|
||||
ForEach(BasicConstant.province, (item: string, index: number) => {
|
||||
GridItem() {
|
||||
Text(item.length>3?item.substring(0,3)+"...":item)
|
||||
.height(40)
|
||||
.width('100%')
|
||||
.maxLines(1)
|
||||
.padding({left:5,right:5})
|
||||
.fontWeight(FontWeight.Regular)
|
||||
.fontSize(13)
|
||||
.fontColor($r('app.color.848284'))
|
||||
.textAlign(TextAlign.Center)
|
||||
.border({ width: 1, color:'#999999' })
|
||||
.borderRadius(5)
|
||||
.onClick(() => {
|
||||
this.PriText=item.length>3?item.substring(0,3)+"...":item
|
||||
this.proivcePosition=index
|
||||
this.plistStatus=false
|
||||
if(this.proivcePosition==0)
|
||||
{
|
||||
this.location=''
|
||||
}
|
||||
else
|
||||
{
|
||||
this.location=item.substring(0,2)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
.padding(10)
|
||||
.columnsTemplate('1fr 1fr 1fr 1fr')
|
||||
.columnsGap(10)
|
||||
.rowsGap(10)
|
||||
.backgroundColor(Color.White)
|
||||
.height('calc(100% - 175vp)')
|
||||
.width('100%')
|
||||
.layoutWeight(1)
|
||||
}
|
||||
.height('100%')
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -144,10 +203,8 @@ export struct VideoPage {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
getNowMonth()
|
||||
{
|
||||
|
||||
this.monthWords.push("所有");
|
||||
let month:number= new Date().getMonth()+1;
|
||||
for(let i =month;i<13;i++){
|
||||
@@ -155,12 +212,8 @@ export struct VideoPage {
|
||||
}
|
||||
for(let i =1;i<month;i++){
|
||||
this.monthWords.push(i+"月");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@Extend(Text)
|
||||
function customStyle() {
|
||||
|
||||
Reference in New Issue
Block a user