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-09-19 16:43:57 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
df33c994d88da5c2b84871c939337a27493827d7
df33c994
2 parents
e9243f15
80f17463
Merge branch 'main' of
http://192.168.1.42/developOne/harmonyPool
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
59 additions
and
31 deletions
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardSourceInfo.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/behindDivider.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhGridLayout03.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/InteractMessagePage.ets
sight_harmony/features/wdComponent/src/main/ets/components/peopleShipHomePage/PeopleShipHomeArticleListComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerEndView.ets
sight_harmony/features/wdDetailPlayLive/src/main/resources/base/media/live_detail_end_bg.png
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextPageComponent.ets
View file @
df33c99
...
...
@@ -65,7 +65,6 @@ export struct ImageAndTextPageComponent {
@State reachEndIncreament: number = 0
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State isScrollTop: boolean = true
@State offsetY: number = 0
@State executedStartTime: number = new Date().getTime()
private screenHeight: number = 0
...
...
@@ -208,8 +207,9 @@ export struct ImageAndTextPageComponent {
.onAreaChange((oldValue: Area, newValue: Area) => {
this.info = newValue
// console.log(TAG, "总页面滑动偏移量", this.scroller.currentOffset().yOffset)
// console.log(TAG, "总页面滑动偏移量111", newValue.globalPosition.y as number)
// console.log(TAG, ">>>>>当前页面滚动位置:", this.scroller.currentOffset().yOffset)
// console.log(TAG, ">>>>>当前评论区位置:", newValue.globalPosition.y as number)
// console.log(TAG, ">>>>>当前屏幕宽度和底部高度:", this.screenHeight,this.bottomHeight)
this.checkToScrollCommentArea()
})
// .onMeasureSize()
...
...
@@ -467,7 +467,7 @@ export struct ImageAndTextPageComponent {
* 查询点赞、收藏数量
*/
queryContentInteractCount() {
console.error(TAG, 'contentDetailData2222', JSON.stringify(this.contentDetailData))
//
console.error(TAG, 'contentDetailData2222', JSON.stringify(this.contentDetailData))
const params: contentInteractParams = {
contentId: this.contentDetailData?.newsId + '',
...
...
@@ -504,16 +504,16 @@ export struct ImageAndTextPageComponent {
private pageScrollToCommonent() {
const info = componentUtils.getRectangleById('comment');
console.log(TAG, "点击滑动页面", JSON.stringify(info))
//评论区当前位置
let currentCommonentOffSetY = this.info?.globalPosition.y as number
let currentCommonentOffSetY = this.info?.globalPosition.y as number - 70
// 当前页面滚动位置
let currentScrollOffSetY = this.scroller.currentOffset().yOffset
let offSetY = 0
if (currentCommonentOffSetY >= (this.screenHeight-this.bottomHeight) ) {
offSetY = current
CommonentOffSetY-2
00
offSetY = current
ScrollOffSetY + (currentCommonentOffSetY - this.screenHeight+this.bottomHeight) + 4
00
}
// 定位到评论区域
if (
this.isScrollTop
) {
if (
!this.showMainText
) {
this.scroller.scrollTo({
xOffset: 0,
yOffset: offSetY,
...
...
@@ -522,11 +522,10 @@ export struct ImageAndTextPageComponent {
} else {
this.scroller.scrollEdge(Edge.Top)
}
this.isScrollTop = !this.isScrollTop
}
aboutToAppear() {
Logger.debug(TAG, '文章详情页 aboutToAppear,开始请求接口数据');
//
Logger.debug(TAG, '文章详情页 aboutToAppear,开始请求接口数据');
this.getDetail()
this.screenHeight = DisplayUtils.getDeviceHeight()
this.initAnimationConfig();
...
...
@@ -576,8 +575,7 @@ export struct ImageAndTextPageComponent {
// 需要评论区位置,调用前 请确保它有值
return
}
let offSetY = this.info?.globalPosition.y as number -60
Logger.debug(TAG, "即将滚动至yOffset: " + offSetY)
let offSetY = this.info?.globalPosition.y as number -70
if (offSetY >= (this.screenHeight-this.bottomHeight) ) {
this.showMainText = false
}else {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardSourceInfo.ets
View file @
df33c99
...
...
@@ -139,6 +139,38 @@ export struct CardSourceInfo {
return parseInt(date) < twoDaysAgo.getTime()
}
showDot() {
// return (this.showTime() && (this.contentDTO.rmhPlatform === 1 || this.contentDTO.source)) || ((this.contentDTO.rmhPlatform === 1 && this.contentDTO.rmhInfo?.rmhName &&
// this.contentDTO.rmhInfo?.rmhName != '') || (this.contentDTO.source && this.contentDTO.source != '')) &&
// (this.getContentDtoBean()?.interactData?.commentNum
// // || DateTimeUtils.getCommentTime(Number.parseFloat(this.contentDTO.publishTime)) != ''
// || (this.contentDTO.isSearch || this.contentDTO.isCollection ||
// !this.contentDTO.isSearch && DateTimeUtils.getCommentTime
// (Number
// .parseFloat(this
// .contentDTO.publishTime))
// .indexOf
// ('-') === -1)
// )
let flag = false;
if (this.contentDTO.rmhPlatform === 1 || this.contentDTO.source) {
if (this.showTime() && !this.isEllipsisActive) {
flag = true
} else if (!this.isEllipsisActive) {
if (this.contentDTO.objectType !=='2' && !this.isCompInnerSource && Number(this.getContentDtoBean()?.interactData?.commentNum) > 0 &&
this.showCommentNum()) {
flag = true;
} else if (this.contentDTO.objectType !=='2' && this.isCompInnerSource && this.contentDTO.interactData && this.contentDTO.interactData?.commentNum > 0) {
flag = true;
}
} else if (this.contentDTO?.author&&this.contentDTO?.author.length > 0) {
flag = true;
}
}
return flag;
}
build() {
Column(){
Flex({ justifyContent: FlexAlign.Start, direction: FlexDirection.Row }) {
...
...
@@ -161,18 +193,7 @@ export struct CardSourceInfo {
}
// 点
if ((this.showTime() && (this.contentDTO.rmhPlatform === 1 || this.contentDTO.source)) || ((this.contentDTO.rmhPlatform === 1 && this.contentDTO.rmhInfo?.rmhName &&
this.contentDTO.rmhInfo?.rmhName != '') || (this.contentDTO.source && this.contentDTO.source != '')) &&
(this.getContentDtoBean()?.interactData?.commentNum
// || DateTimeUtils.getCommentTime(Number.parseFloat(this.contentDTO.publishTime)) != ''
|| (this.contentDTO.isSearch || this.contentDTO.isCollection ||
!this.contentDTO.isSearch && DateTimeUtils.getCommentTime
(Number
.parseFloat(this
.contentDTO.publishTime))
.indexOf
('-') === -1)
)) {
if (this.showDot()) {
Image($r("app.media.point"))
.width(11)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/behindDivider.ets
View file @
df33c99
...
...
@@ -54,7 +54,7 @@ export struct behindDivider {
Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 })
}
} else {
// Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16
})
Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10
})
}
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhGridLayout03.ets
View file @
df33c99
...
...
@@ -30,8 +30,7 @@ export struct ZhGridLayout03 {
build() {
GridRow({
columns: { sm: listSize, md: 8 },
breakpoints: { value: ['320vp', '520vp', '840vp'] }
columns: listSize,
}) {
ForEach(this.compDTO.operDataList, (item: ContentDTO, index: number) => {
GridCol() {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/InteractMessagePage.ets
View file @
df33c99
...
...
@@ -103,7 +103,7 @@ struct InteractMessagePage {
Row(){
Text('共获')
.fontSize(18).height(40).align(Alignment.Bottom)
Text(this.likeNum.toString())
Text(this.likeNum
?
.toString())
.fontSize(40)
.fontColor(Color.Red)
.fontFamily('BebasNeue')
...
...
sight_harmony/features/wdComponent/src/main/ets/components/peopleShipHomePage/PeopleShipHomeArticleListComponent.ets
View file @
df33c99
import { Logger} from 'wdKit'
import { Logger
, ToastUtils
} from 'wdKit'
import { PeopleShipHomePageDataModel } from '../../viewmodel/PeopleShipHomePageDataModel'
import {
ContentDTO,
...
...
@@ -49,7 +49,10 @@ export struct PeopleShipHomeArticleListComponent {
// LoadingComponent()
this.LoadingLayout()
} else if (this.viewType == 2) {
ErrorComponent()
Column(){
EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NoCreation}).height('40%')
}.width('100%')
.height('100%')
}else if(this.viewType == 4){
Column(){
EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NoCreation}).height('40%')
...
...
@@ -201,6 +204,7 @@ export struct PeopleShipHomeArticleListComponent {
this.isLoading = false
if (this.arr.length == 0) {
this.viewType = 2
ToastUtils.showToast('网络出小差了,请检查网络后重试', 1000)
}
}
}
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerEndView.ets
View file @
df33c99
...
...
@@ -82,6 +82,8 @@ export struct PlayerEndView {
}
build() {
Stack() {
Image(($r('app.media.live_detail_end_bg')))
Column() {
Text('直播已结束').fontWeight(500)
.fontSize(20)
...
...
@@ -181,6 +183,10 @@ export struct PlayerEndView {
}
.height('100%')
.width('100%')
}
.height('100%')
.width('100%')
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdDetailPlayLive/src/main/resources/base/media/live_detail_end_bg.png
0 → 100644
View file @
df33c99
180 KB
Please
register
or
login
to post a comment