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
陈剑华
2024-06-20 16:25:53 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
4f682e5e1ff1e521311f11acabf4a1cce21ba3f6
4f682e5e
2 parents
3981b6be
7d859478
Merge remote-tracking branch 'origin/main'
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
43 additions
and
32 deletions
sight_harmony/features/wdComponent/src/main/ets/components/ENewspaperItemComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/ThemeListPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/template/TemplatePageHelp.ets
sight_harmony/features/wdComponent/src/main/ets/components/reusable/CustomPullToRefresh.ets
sight_harmony/features/wdComponent/src/main/ets/components/skeleton/newsSkeleton.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/LiveHorizontalCardComponent.ets
sight_harmony/products/phone/oh-package.json5
sight_harmony/features/wdComponent/src/main/ets/components/ENewspaperItemComponent.ets
View file @
4f682e5
...
...
@@ -49,7 +49,7 @@ export struct ENewspaperItemComponent {
})
.objectFit(ImageFit.Fill)
.zIndex(10)
newsSkeleton()
newsSkeleton(
{showBottom: false}
)
.visibility(this.isShowSkeleton ? Visibility.Visible : Visibility.None)
.width('100%')
.zIndex(1)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/ThemeListPage.ets
View file @
4f682e5
import { Action, CompDTO, ContentDTO } from 'wdBean';
import { CommonConstants, ViewType } from 'wdConstant';
import PageViewModel from '../../viewmodel/PageViewModel';
import PageModel from '../../viewmodel/PageModel';
import { Action } from 'wdBean';
import router from '@ohos.router';
import { CardParser } from '../CardParser';
import { channelSkeleton } from '../skeleton/channelSkeleton';
import { ErrorComponent } from '../view/ErrorComponent';
import { EmptyComponent } from '../view/EmptyComponent';
import { listTouchEvent } from '../../utils/PullDownRefresh';
import PageAdModel from '../../viewmodel/PageAdvModel';
import { RefreshLayoutBean } from '../refresh/RefreshLayoutBean';
import RefreshLayout from '../refresh/RefreshLayout';
import PageNoMoreLayout from './PageNoMoreLayout';
import { NoMoreBean } from './NoMoreBean';
import CommonPageTitle from './CommonPageTitle';
import TemplatePageComponent from './template/TemplatePageComponent';
import { TemplatePageConstant } from './template/TemplatePageConstant';
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/template/TemplatePageHelp.ets
View file @
4f682e5
...
...
@@ -38,10 +38,12 @@ export class TemplatePageHelp extends BasePageHelp {
this.treatDiffBusinessDataSource()
} else if (pageModel.compList.size() > 0) {
// 加载缓存数据了,不用无网络提示
this.closeAnimation(this.pageModel.resolve)
} else {
// 无网情况
this.pageModel.pageCompType = TemplatePageStateType.OTHER
this.pageModel.noNormalState = WDViewDefaultType.WDViewDefaultType_NoNetwork
// 无网情况
this.pageModel.pageCompType = TemplatePageStateType.OTHER
this.pageModel.noNormalState = WDViewDefaultType.WDViewDefaultType_NoNetwork
}
}
...
...
@@ -293,6 +295,12 @@ export class TemplatePageHelp extends BasePageHelp {
}
}
private closeAnimation(resolve?: (value: string | PromiseLike<string>) => void) {
if (resolve) {
resolve('')
}
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/reusable/CustomPullToRefresh.ets
View file @
4f682e5
...
...
@@ -44,16 +44,22 @@ export struct CustomPullToRefresh {
this.onRefresh(resolve)
}).then((text) => {
setTimeout(()=>{
// 延时500,展示第二段动画 TODO 是否去掉?
this.refreshState = 3
this.refreshDestroy()
setTimeout(() => {
// 延时500,展示第二段动画 TODO 是否去掉?
if(text){
this.refreshState = 3
setTimeout(() => {
success(text)
}, 500)
setTimeout(() => {
this.refreshState = 4
// 延时将状态改为空闲,组件closeRefresh做了延时,不能配置,这里配合延时
}, 1200)
}else {
success(text)
}, 500)
setTimeout(() => {
this.refreshState = 4
// 延时将状态改为空闲,组件closeRefresh做了延时,不能配置,这里配合延时
}, 1200)
}
},500)
})
});
...
...
sight_harmony/features/wdComponent/src/main/ets/components/skeleton/newsSkeleton.ets
View file @
4f682e5
...
...
@@ -6,6 +6,7 @@
@Component
export struct newsSkeleton {
@State quantity: Array<number> = [1, 2, 3,]
@State showBottom: boolean = true
build() {
Row() {
...
...
@@ -116,9 +117,10 @@ export struct newsSkeleton {
right: 15,
left: 15
})
Column().backgroundColor('#CBCBCB').height(5).width(339)
Column().backgroundColor('#909090').height(5).width(326)
if (this.showBottom) {
Column().backgroundColor('#CBCBCB').height(5).width(339)
Column().backgroundColor('#909090').height(5).width(326)
}
}
.width('100%')
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/LiveHorizontalCardComponent.ets
View file @
4f682e5
...
...
@@ -66,10 +66,10 @@ export struct LiveHorizontalCardComponent {
liveToMore() {
if (!!this.compDTO.dataSourceType) {
if (this.compDTO.dataSourceType === 'OBJECT_POS') {
ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle)
return;
}
// if (this.compDTO.dataSourceType === 'OBJECT_POS') {
// ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle)
// return;
// }
if (this.compDTO.linkUrl) {
let taskAction: Action = {
type: 'JUMP_H5_BY_WEB_VIEW',
...
...
@@ -236,6 +236,13 @@ export struct LiveHorizontalCardComponent {
} else if (this.compDTO.operDataList.length) {
// 一个
LiveHorizontalCardForOneComponent({ contentDTO: this.compDTO.operDataList[0] })
.onClick(() => {
InfomationCardClick.track(this.compDTO, this.compDTO.operDataList[0], this.pageId, this.pageName)
if (this.compDTO.operDataList[0].objectType != '0') {
console.log(this.compDTO.operDataList[0].objectId)
this.gotoLive(this.compDTO.operDataList[0])
}
})
}
}
// .width(CommonConstants.FULL_WIDTH)
...
...
sight_harmony/products/phone/oh-package.json5
View file @
4f682e5
...
...
@@ -7,7 +7,7 @@
"main"
:
""
,
"version"
:
"1.0.0"
,
"dependencies"
:
{
"@ohos/lottie"
:
"
2.0.10
"
,
"@ohos/lottie"
:
"
v2.0.11-rc.6
"
,
"wdComponent"
:
"file:../../features/wdComponent"
,
"wdConstant"
:
"file:../../commons/wdConstant"
,
"wdKit"
:
"file:../../commons/wdKit"
,
...
...
Please
register
or
login
to post a comment