wangyujian_wd
Committed by yangchenggong1_wd

feat:1)添加直播详情页基本组件(直播间和大家聊页面)

... ... @@ -60,3 +60,5 @@ export { BroadcastPageComponent } from "./src/main/ets/components/broadcast/Broa
export { FirstTabTopSearchComponent } from "./src/main/ets/components/search/FirstTabTopSearchComponent"
export { ListHasNoMoreDataUI } from "./src/main/ets/components/reusable/ListHasNoMoreDataUI"
... ...
... ... @@ -155,7 +155,8 @@ export struct TopNavigationComponent {
.width(72)
.height(29)
.onClick((event: ClickEvent) => {
this.jumpToENewPaper()
this.jumpToLiveDetailsPaper()
// this.jumpToENewPaper()
})
Stack({ alignContent: Alignment.Center }) {
... ...
... ... @@ -6,5 +6,7 @@
"description": "Please describe the basic information.",
"main": "Index.ets",
"version": "1.0.0",
"dependencies": {}
"dependencies": {
"wdComponent": "file:../../features/wdComponent"
}
}
... ...
... ... @@ -6,8 +6,8 @@ export struct BottomComponent {
build() {
Row() {
}.backgroundColor(Color.Red)
.height('50vp')
}.backgroundColor(Color.Gray)
.height(56)
.width('100%')
}
... ...
import { ListHasNoMoreDataUI } from 'wdComponent/Index'
import { TabChatItemComponent } from './TabChatItemComponent'
@Component
export struct TabChatComponent {
arr: string[] = []
aboutToAppear(): void {
for (let index = 0; index < 80; index++) {
for (let index = 0; index < 12; index++) {
this.arr.push(index + '')
}
}
build() {
List() {
ForEach(this.arr, (item: string) => {
ListItem() {
Column() {
Text(item)
Divider().height(10).width('100%')
Stack() {
if (this.arr.length == 0) {
ListHasNoMoreDataUI({ style: 2 })
} else {
List() {
ForEach(this.arr, (item: string) => {
ListItem() {
TabChatItemComponent()
}
})
ListItem() {
ListHasNoMoreDataUI()
}
.backgroundColor(Color.Gray)
}
})
}
}
.align(Alignment.Top)
.backgroundColor('#F5F5F5')
.height('100%')
.width('100%')
}
aboutToDisappear(): void {
... ...
@Component
export struct TabChatItemComponent {
aboutToAppear(): void {
}
build() {
Row() {
Image('https://img0.baidu.com/it/u=4105778329,1297102594&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500')
.borderRadius(90)
.width(24)
.height(24)
Text() {
Span('10999@qq.com: ')
.fontColor('#666666')
Span('少年强则国强:山中有精灵也不过如此了')
.fontColor('#222222')
}
.margin({ left: 8 })
.lineHeight(20)
.layoutWeight(1)
.fontSize('14fp')
.fontWeight(400)
}
.alignItems(VerticalAlign.Top)
.padding({
left: 15,
top: 15,
right: 15
})
}
aboutToDisappear(): void {
}
}
\ No newline at end of file
... ...
import { LiveCountdownComponent } from './LiveCountdownComponent'
@Entry
@Component
export struct TabInfoComponent {
aboutToAppear(): void {
... ... @@ -11,7 +10,7 @@ export struct TabInfoComponent {
this.showLiveTitle()
this.showLiveDetails()
LiveCountdownComponent()
}.padding({
}.margin({
top: 13,
left: 16,
right: 16
... ...
import { ListHasNoMoreDataUI } from 'wdComponent/Index'
import { TabLiveItemComponent } from './TabLiveItemComponent'
@Component
export struct TabLiveComponent {
arr: string[] = []
aboutToAppear(): void {
for (let index = 0; index < 2; index++) {
this.arr.push(index + '')
}
}
build() {
Stack() {
if (this.arr.length == 0) {
ListHasNoMoreDataUI({ style: 2 })
} else {
List() {
ForEach(this.arr, (item: string) => {
ListItem() {
TabLiveItemComponent({ item: item })
}
})
ListItem() {
ListHasNoMoreDataUI()
}
}
}
}
.alignContent(Alignment.Top)
.backgroundColor('#F5F5F5')
.height('100%')
.width('100%')
}
aboutToDisappear(): void {
... ...
@Component
export struct TabLiveItemComponent {
item: string = ''
aboutToAppear(): void {
}
build() {
Column() {
Row() {
Image('https://img0.baidu.com/it/u=4105778329,1297102594&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500')
.borderRadius(90)
.width(24)
.height(24)
Text('人民日报直播频道')
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.fontSize('14fp')
.fontWeight(400)
.fontColor('#222222')
.margin({ left: 8 })
Text('嘉宾')
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.fontSize('11fp')
.fontWeight(400)
.fontColor('#968562')
.backgroundColor('#F1EFEB')
.padding({
left: 4,
top: 1,
right: 4,
bottom: 1
})
.borderRadius(2)
.margin({ left: 8 })
Text('1小时前')
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.fontSize('12fp')
.fontWeight(400)
.fontColor('#999999')
.margin({ left: 8 })
Blank()
Text('置顶')
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.fontSize('11fp')
.fontWeight(400)
.fontColor('#ED2800')
.backgroundColor('#F1EFEB')
.padding({
left: 4,
top: 1,
right: 4,
bottom: 1
})
.borderRadius(2)
.margin({ left: 8 })
}
.width('100%')
Text('国务院新闻办公室将于7月25日上午10时举行国务院政策例行吹风会,请应急管理部副部长、水利部副部长王道席和自然资源部、水利部、应急管理部、中国气象局、国家消防救援局有关负责人介绍防汛抗旱工作情况,并答记者问。')
.fontSize('14fp')
.fontWeight(400)
.fontColor('#222222')
.margin({
left: 32,
top: 6
})
Image('https://t7.baidu.com/it/u=3690528415,706188365&fm=193&f=GIF')
.height(174)
.width(310)
.aspectRatio(310 / 174)
.objectFit(ImageFit.Auto)
.borderRadius(4)
.margin({
left: 32,
top: 8
})
}.margin({
left:15,
top:15,
right:15
})
}
aboutToDisappear(): void {
}
}
\ No newline at end of file
... ...