保利威视介入前的代码提交
This commit is contained in:
@@ -7,6 +7,7 @@ export struct ItemComp {
|
||||
item: MeetingItemModel = new MeetingItemModel({} as ItemModel)
|
||||
@State timeColor:ResourceStr=$r('app.color.ee432f')
|
||||
@State status:string=''
|
||||
@State heightss:Length=247
|
||||
aboutToAppear(): void {
|
||||
this.getMeetingStatus()
|
||||
}
|
||||
@@ -25,45 +26,38 @@ export struct ItemComp {
|
||||
{
|
||||
Text().width(23).backgroundColor(this.timeColor).borderRadius(5).height('100%')
|
||||
RelativeContainer(){
|
||||
|
||||
|
||||
Column()
|
||||
{
|
||||
Text(this.item.title) .maxLines(2).fontSize(15).fontColor(Color.Black).textAlign(TextAlign.Start)
|
||||
.textOverflow({ overflow: TextOverflow.Ellipsis }).id('title').width('100%')
|
||||
RelativeContainer()
|
||||
if(this.status!='')
|
||||
{
|
||||
|
||||
Stack()
|
||||
RelativeContainer()
|
||||
{
|
||||
|
||||
Image(BasicConstant.urlHtml+this.item.liveimg).width('100%').height(162)
|
||||
.objectFit(ImageFit.Fill)
|
||||
if(this.status!=''&&this.status!='已结束'&&this.status!='回访中')
|
||||
Stack()
|
||||
{
|
||||
Image($r('app.media.bofang')).width(40).height(40)
|
||||
Image(BasicConstant.urlHtml+this.item.liveimg).width('100%').height(162)
|
||||
.objectFit(ImageFit.Fill)
|
||||
if(this.status!=''&&(this.status!='已结束'&&this.status!='回访中'))
|
||||
{
|
||||
Image($r('app.media.bofang')).width(40).height(40)
|
||||
}
|
||||
|
||||
}
|
||||
if(this.status!='')
|
||||
{
|
||||
Text(this.status) .fontSize(13).margin({top:5,right:5})
|
||||
.fontColor(Color.White).padding({left:10,right:10,top:1,bottom:1})
|
||||
.alignRules({
|
||||
right: { anchor: "__container__", align: HorizontalAlign.End }
|
||||
})
|
||||
.border({ width:1, color:Color.White })
|
||||
.borderRadius(30)
|
||||
}
|
||||
|
||||
}
|
||||
if(this.status!='')
|
||||
{
|
||||
Text(this.status) .fontSize(13).margin({top:5,right:5})
|
||||
.fontColor(Color.White).padding({left:10,right:10,top:1,bottom:1})
|
||||
.alignRules({
|
||||
right: { anchor: "__container__", align: HorizontalAlign.End }
|
||||
})
|
||||
.border({ width:1, color:Color.White })
|
||||
.borderRadius(30)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.height(162).backgroundColor(Color.Orange)
|
||||
.margin({top:10,right:5}).clip(true).id('rr')
|
||||
}
|
||||
|
||||
.height(162).backgroundColor(Color.Orange)
|
||||
.margin({top:10,right:5}).clip(true).id('rr')
|
||||
|
||||
Row(){
|
||||
Image($r('app.media.meetingtime')).width(13).height(13)
|
||||
Text(this.getTime(this.item.begin_date,this.item.end_date)).fontSize(14)
|
||||
@@ -75,15 +69,12 @@ export struct ItemComp {
|
||||
}
|
||||
.width('100%')
|
||||
.margin({top:6})
|
||||
}.height(247).justifyContent(FlexAlign.Center).margin({left:20,right:5})
|
||||
|
||||
|
||||
}.height(this.heightss).justifyContent(FlexAlign.Center).margin({left:20,right:5})
|
||||
}
|
||||
.height('100%').clip(true)
|
||||
.margin({left:20,right:5}).backgroundColor(Color.White)
|
||||
Text(this.item.begin_date.substring(8,10)).width(20).height(20) .alignRules({
|
||||
|
||||
bottom: { anchor: "__container__", align:VerticalAlign.Center}
|
||||
center: { anchor: "__container__", align:VerticalAlign.Center}
|
||||
})
|
||||
.margin({left:10})
|
||||
.fontSize(14)
|
||||
@@ -92,17 +83,16 @@ export struct ItemComp {
|
||||
.backgroundColor(Color.White)
|
||||
.borderRadius(20)
|
||||
|
||||
}.width('100%').height(247).clip(true).
|
||||
}.width('100%').height(this.heightss).clip(true).
|
||||
backgroundColor(Color.White).borderRadius(5)
|
||||
|
||||
|
||||
|
||||
}.backgroundColor($r('app.color.e4e4e4'))
|
||||
.width('100%').padding({left:10,right:10,bottom:20}).clip(true)
|
||||
.width('100%').padding({left:10,right:10}).clip(true)
|
||||
|
||||
}
|
||||
|
||||
getTime(str1:string, str2:string) {
|
||||
|
||||
if (str1.substring(0, 10)==(str2.substring(0, 10))) {
|
||||
return str1.replaceAll("-", ".").substring(0, 10).toString();
|
||||
}
|
||||
@@ -146,6 +136,7 @@ return str1.replaceAll("-", ".").substring(0, 10)+"-"+str2.replaceAll("-", ".").
|
||||
}
|
||||
else
|
||||
{
|
||||
this.heightss=75
|
||||
this.status=''
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user