Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
yangchenggong1_wd
2024-05-23 15:01:01 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
cc0f8cff60108c54d4c8ae0cd20af6a9369b316b
cc0f8cff
1 parent
895a5177
fix:bug[17984,18069] 消息中的预约消息预约已开始和预约已结束的状态鸿蒙与安卓状态不一致, 预约列表鸿蒙版缺少下拉刷新
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
97 additions
and
46 deletions
sight_harmony/features/wdComponent/src/main/ets/components/mine/appointment/AppointmentListChildComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/appointment/AppointmentListUI.ets
sight_harmony/features/wdComponent/src/main/resources/base/media/play_status_history_icon.png
sight_harmony/features/wdComponent/src/main/resources/base/media/play_status_icon.png
sight_harmony/features/wdComponent/src/main/resources/base/media/reserve_icon.png
sight_harmony/features/wdComponent/src/main/ets/components/mine/appointment/AppointmentListChildComponent.ets
View file @
cc0f8cf
...
...
@@ -38,25 +38,32 @@ export struct AppointmentListChildComponent {
.interpolation(ImageInterpolation.High)
if (this.item.
relType === 1
) {
if (this.item.
status == "wait"
) {
Row() {
Row() {
Image($r('app.media.reserve_icon'))
.width('42lpx')
.height('35lpx')
.width('27lpx')
.height('27lpx')
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.High)
.margin({right:"6lpx"})
Text("预约")
.fontWeight(400)
.fontSize('21lpx')
.backgroundColor($r('app.color.color_4D000000'))
.fontSize('23lpx')
.textShadow({
radius: 2,
color: `rgba(0,0,0,0.3)`,
offsetY:2,
offsetX:0
})
.fontColor($r('app.color.white'))
.lineHeight('31lpx')
.layoutWeight(1)
.textAlign(TextAlign.
Center
)
.textAlign(TextAlign.
Start
)
}.width('94lpx')
.margin({ bottom: '15lpx', right: '15lpx' })
.alignItems(VerticalAlign.Center)
}.width('100%')
.height('100%')
.alignItems(VerticalAlign.Bottom)
...
...
@@ -78,7 +85,7 @@ export struct AppointmentListChildComponent {
.width('100%')
Row() {
Row() {
if (this.item.
relType === 2
) {
if (this.item.
status == "end"
) {
Image($r('app.media.play_status_history_icon'))
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.High)
...
...
@@ -88,6 +95,16 @@ export struct AppointmentListChildComponent {
Text('已结束').fontColor($r('app.color.color_999999'))
.fontWeight('500lpx')
.fontSize('23lpx')
}else if(this.item.status == "running"){
Image($r('app.media.play_status_icon'))
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.High)
.width('38lpx')
.height('38lpx')
.margin({ right: '12lpx' })
Text('已开始').fontColor($r('app.color.color_999999'))
.fontWeight('500lpx')
.fontSize('23lpx')
} else {
Image($r('app.media.play_status_icon'))
.objectFit(ImageFit.Auto)
...
...
@@ -118,7 +135,7 @@ export struct AppointmentListChildComponent {
Blank()
.layoutWeight(1)
if (this.item.
relType === 1
) {
if (this.item.
status === "wait"
) {
Text(this.item.isAppointment ? "已预约" : "预约")
.fontWeight(400)
.fontSize('23lpx')
...
...
@@ -132,8 +149,19 @@ export struct AppointmentListChildComponent {
.onClick(() => {
this.dialogController.open()
})
}else if(this.item.status == "running"){
Text("去观看" )
.fontWeight(400)
.fontSize('23lpx')
.backgroundColor($r('app.color.color_ED2800'))
.fontColor($r('app.color.white'))
.lineHeight('31lpx')
.textAlign(TextAlign.Center)
.width('100lpx')
.height('46lpx')
.borderRadius('6lpx')
} else {
Text(
this.item.relType === 2 ? "去观看" :
"看回放")
Text("看回放")
.fontWeight(400)
.fontSize('23lpx')
.backgroundColor($r('app.color.color_ED2800'))
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/appointment/AppointmentListUI.ets
View file @
cc0f8cf
...
...
@@ -7,17 +7,20 @@ import MinePageDatasModel from '../../../model/MinePageDatasModel';
import { EmptyComponent } from '../../view/EmptyComponent';
import { Action } from 'wdBean/Index';
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh';
const TAG = "AppointmentListUI"
@Component
export struct AppointmentListUI {
@State data: LazyDataSource<MineAppointmentItem> = new LazyDataSource();
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
@State count: number = 0;
@State isLoading: boolean = false
@State hasMore: boolean = true
curPageNum: number = 1;
@State isGetRequest: boolean = false
private scroller: Scroller = new Scroller();
aboutToAppear() {
this.getNewPageData()
...
...
@@ -35,45 +38,29 @@ export struct AppointmentListUI {
}
} else {
//刷新控件 TODO
//List
List({ space: '6lpx' }) {
LazyForEach(this.data, (item: MineAppointmentItem, index: number) => {
ListItem() {
AppointmentListChildComponent({ item: item })
}
.onClick(() => {
//TODO 跳转
let action = {
type:"2",
params:{
extra:{
relId:item.relId,
relType:item.relType.toString()
},
contentID:item.liveId.toString()
}
} as Action
WDRouterRule.jumpWithPage(WDRouterPage.detailPlayLiveCommon, action)
})
}, (item: MineAppointmentItem, index: number) => index.toString())
//没有更多数据 显示提示
if (!this.hasMore) {
ListItem() {
ListHasNoMoreDataUI()
CustomPullToRefresh({
alldata:this.data,
scroller:this.scroller,
customList:()=>{
this.ListLayout()
},
onRefresh:(resolve)=>{
this.curPageNum = 1;
this.hasMore = true
this.isGetRequest = false
this.data.clear()
if (!this.isLoading){
this.getNewPageData()
if(resolve) resolve('刷新成功')
}
},
onLoadMore:(resolve)=> {
if (!this.isLoading) {
this.isLoading = true
this.getNewPageData()
}
}
}
.cachedCount(4)
.scrollBar(BarState.Off)
.margin({ top: '23lpx', left: '23lpx', right: '23lpx' })
.layoutWeight(1)
.onReachEnd(() => {
console.log(TAG, "触底了");
if (!this.isLoading) {
//加载分页数据
this.getNewPageData()
}
})
}
...
...
@@ -83,6 +70,42 @@ export struct AppointmentListUI {
.width('100%')
}
@Builder ListLayout(){
List({ space:6,scroller: this.scroller }) {
LazyForEach(this.data, (item: MineAppointmentItem, index: number) => {
ListItem() {
AppointmentListChildComponent({ item: item })
}
.onClick(() => {
//TODO 跳转
let action = {
type:"2",
params:{
extra:{
relId:item.relId,
relType:item.relType.toString()
},
contentID:item.liveId.toString()
}
} as Action
WDRouterRule.jumpWithPage(WDRouterPage.detailPlayLiveCommon, action)
})
}, (item: MineAppointmentItem, index: number) => index.toString())
//没有更多数据 显示提示
if (!this.hasMore) {
ListItem() {
ListHasNoMoreDataUI()
}.padding({bottom:px2vp(this.bottomSafeHeight) + 20})
}
}
.cachedCount(4)
.scrollBar(BarState.Off)
.edgeEffect(EdgeEffect.None)
.margin({ top: '23lpx', left: '23lpx', right: '23lpx'})
.layoutWeight(1)
}
getNewPageData() {
this.isLoading = true
if (this.hasMore) {
...
...
sight_harmony/features/wdComponent/src/main/resources/base/media/play_status_history_icon.png
View file @
cc0f8cf
342 Bytes
|
W:
|
H:
488 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
sight_harmony/features/wdComponent/src/main/resources/base/media/play_status_icon.png
View file @
cc0f8cf
342 Bytes
|
W:
|
H:
492 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
sight_harmony/features/wdComponent/src/main/resources/base/media/reserve_icon.png
View file @
cc0f8cf
605 Bytes
|
W:
|
H:
1.14 KB
|
W:
|
H:
2-up
Swipe
Onion skin
Please
register
or
login
to post a comment