wangliang_wd

Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool into main

* 'main' of http://192.168.1.42/developOne/harmonyPool:
  fix |> 修复搜索页面点击tab没有loading加载效果
... ... @@ -30,6 +30,7 @@ import { MoreComponent } from '../cardview/MoreComponent'
import { Card9Component } from '../cardview/Card9Component'
import { WDRouterRule, WDRouterPage } from 'wdRouter/Index'
import { EmptyComponent, WDViewDefaultType } from '../view/EmptyComponent'
import { LottieView } from '../../components/lottie/LottieView'
const TAG = "SearchResultContentComponent"
... ... @@ -288,8 +289,19 @@ export struct SearchResultContentComponent {
build() {
Column() {
if (this.count == 0) {
// 添加动效refresh
if (this.isLoading){
LottieView({
name: 'refreshing',
path: "lottie/refresh_step2.json",
lottieWidth: 87,
lottieHeight: 87,
autoplay: true,
loop: true
}).margin({top:180})
}else {
if (this.count == 0) {
EmptyComponent({
emptyType: WDViewDefaultType.WDViewDefaultType_NoSearchResult,
emptyButton: false,
... ... @@ -300,14 +312,14 @@ export struct SearchResultContentComponent {
if (this.data_rmh != null && this.data_rmh.length > 0) {
if (this.data_rmh.length === 1) {
ListItem() {
FollowChildComponent({ data: this.bean, type: 1 ,searchText: decodeURI(this.keywords)})
}.padding({ left: 10 + 6 , right: 10 + 6})
FollowChildComponent({ data: this.bean, type: 1, searchText: decodeURI(this.keywords) })
}.padding({ left: 10 + 6, right: 10 + 6 })
} else {
ListItem() {
Column() {
this.SearchListUI()
}
}.padding({left: 6, right: 6})
}.padding({ left: 6, right: 6 })
}
}
LazyForEach(this.data, (item: ContentDTO, index: number) => {
... ... @@ -315,15 +327,18 @@ export struct SearchResultContentComponent {
Column() {
if (this.searchType == "activity") {
ActivityItemComponent({ contentDTO: item })
.padding({left: 6, right: 6})
.padding({ left: 6, right: 6 })
} else if (item.sameContentListSize > 0) {
MoreComponent({ contentDTO: item ,
nextIsAggregateData:(index+1 < this.data.totalCount() && this.data.get(index+1).isAggregateData)})
MoreComponent({
contentDTO: item,
nextIsAggregateData: (index + 1 < this.data.totalCount() &&
this.data.get(index + 1).isAggregateData)
})
} else if (item.appStyle == "9") {
Column(){
if(item.isAggregateData && index != 0){
Column() {
if (item.isAggregateData && index != 0) {
Divider()
.width('100%' )
.width('100%')
.color($r('app.color.color_F5F5F5'))
.strokeWidth(5)
}
... ... @@ -337,18 +352,23 @@ export struct SearchResultContentComponent {
})
Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
}
.padding({left: 6, right: 6})
.padding({ left: 6, right: 6 })
}
} else {
Column(){
if(item.isAggregateData && index != 0){
Column() {
if (item.isAggregateData && index != 0) {
Divider()
.width('100%' )
.width('100%')
.color($r('app.color.color_F5F5F5'))
.strokeWidth(5)
}
CardParser({ compDTO: new CompDTO, contentDTO: item ,isNeedDivider: (index+1 < this.data.totalCount() && this.data.get(index+1).isAggregateData) ? false : true})
.padding({left: 6, right: 6})
CardParser({
compDTO: new CompDTO,
contentDTO: item,
isNeedDivider: (index + 1 < this.data.totalCount() &&
this.data.get(index + 1).isAggregateData) ? false : true
})
.padding({ left: 6, right: 6 })
}
}
... ... @@ -361,7 +381,7 @@ export struct SearchResultContentComponent {
ListItem() {
ListHasNoMoreDataUI()
}
.padding({left: 6, right: 6})
.padding({ left: 6, right: 6 })
}
}
.cachedCount(5)
... ... @@ -376,6 +396,7 @@ export struct SearchResultContentComponent {
})
}
}
}
.backgroundColor($r('app.color.white'))
.height('100%')
.width('100%')
... ...