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-18 16:55:43 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
55cf726a86ac959ddf80111d283aa8c7c6454dca
55cf726a
2 parents
71dab2e0
0e95b324
Merge branch 'main' of
http://192.168.1.42/developOne/harmonyPool
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
61 additions
and
41 deletions
sight_harmony/commons/wdRouter/src/main/ets/utils/ProcessUtils.ets
sight_harmony/features/wdBean/src/main/ets/bean/content/ContentDTO.ets
sight_harmony/features/wdBean/src/main/ets/bean/content/Params.ts
sight_harmony/features/wdComponent/src/main/ets/components/CarderInteraction.ets
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/MorningEveningPaperComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePageUserSimpleInfoUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/HomePageBottomCommentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/HomePageBottomFollowComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/peopleShipHomePage/PeopleShipHomePageHeadComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/peopleShipHomePage/PeopleShipHomePageTopComponent.ets
sight_harmony/features/wdComponent/src/main/ets/pages/MineHomePage.ets
sight_harmony/features/wdShare/src/main/ets/WDShare.ets
sight_harmony/commons/wdRouter/src/main/ets/utils/ProcessUtils.ets
View file @
55cf726
...
...
@@ -189,7 +189,7 @@ export class ProcessUtils {
if (typeof type == "number") {
type = `${type}`
}
//
console.log(TAG, 'objectType', `
${JSON.stringify(content)}`);
//
Logger.debug(TAG, `objectType,
${JSON.stringify(content)}`);
switch (type) {
case ContentConstants.TYPE_NONE:
// Logger.debug(TAG, "processPage, do nothing");
...
...
@@ -432,7 +432,8 @@ export class ProcessUtils {
commentId: content?.commentInfo?.commentId,
title: content?.newsTitle
} as ExtraDTO,
targetLayout: content.customParamTargetLayout
targetLayout: content.customParamTargetLayout,
clickComment: content.clickComment
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
...
...
@@ -454,7 +455,8 @@ export class ProcessUtils {
sourcePage: '5',
commentId: content?.commentInfo?.commentId
} as ExtraDTO,
targetLayout: content.customParamTargetLayout
targetLayout: content.customParamTargetLayout,
clickComment: content.clickComment
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
...
...
sight_harmony/features/wdBean/src/main/ets/bean/content/ContentDTO.ets
View file @
55cf726
...
...
@@ -144,6 +144,7 @@ export class ContentDTO implements BaseDTO {
isMourning?: boolean = false;
author: string = ""; ///撰稿人
clickComment:boolean = false;
static clone(old: ContentDTO): ContentDTO {
let content = new ContentDTO();
...
...
sight_harmony/features/wdBean/src/main/ets/bean/content/Params.ts
View file @
55cf726
...
...
@@ -24,6 +24,6 @@ export interface Params {
videoCoverUrl
?:
string
;
pageId
?:
string
;
backVisibility
?:
boolean
;
//展示顶部返回栏
clickComment
?:
boolean
;
//点击评论按钮进入稿件详情页定位到评论区
targetLayout
?:
string
;
// "comment" 表示进入对应页面后,跳转至评论区
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/CarderInteraction.ets
View file @
55cf726
...
...
@@ -101,6 +101,7 @@ export struct CarderInteraction {
}
.justifyContent(FlexAlign.Center)
.onClick(() => {
this.contentDTO.clickComment = true
ProcessUtils.processPage(this.contentDTO);
})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextPageComponent.ets
View file @
55cf726
...
...
@@ -52,7 +52,7 @@ export struct ImageAndTextPageComponent {
@State recommendList: ContentDTO[] = []
@State newsStatusOfUser: batchLikeAndCollectResult | undefined = undefined // 点赞、收藏状态
@State interactData: InteractDataDTO = {} as InteractDataDTO
@State isPageEnd: boolean = false
//
@State isPageEnd: boolean = false
@State publishTime: string = ''
@State publishCommentModel: publishCommentModel = new publishCommentModel()
// @State operationButtonList: string[] = ['comment', 'collect', 'share']
...
...
@@ -77,6 +77,7 @@ export struct ImageAndTextPageComponent {
lastTimeoutId?: number
@State needAnimation: boolean = false;
@State @Watch("webPageIsPageEnd") isPageEnd: boolean = false
@Consume @Watch('pageShowForUpdateData') pageShow :number
@Consume @Watch('pageHideForUpdateData') pageHide :number
...
...
@@ -92,6 +93,15 @@ export struct ImageAndTextPageComponent {
TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Customer_Personal,TrackConstants.PageName.Customer_Personal,duration)
}
webPageIsPageEnd() {
if (this.action.params?.clickComment) {
setTimeout(()=>{
this.pageScrollToCommonent()
},
900)
}
}
build() {
Stack({ alignContent: Alignment.Top }) {
Stack({ alignContent: Alignment.Bottom }) {
...
...
@@ -198,8 +208,8 @@ 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, "总页面滑动偏移量111", newValue.globalPosition.y as number)
this.checkToScrollCommentArea()
})
// .onMeasureSize()
...
...
@@ -245,30 +255,7 @@ export struct ImageAndTextPageComponent {
showMainText:this.showMainText,
styleType: 1,
onCommentIconClick: () => {
const info = componentUtils.getRectangleById('comment');
console.log(TAG, "点击滑动页面", JSON.stringify(info))
//评论区当前位置
let currentCommonentOffSetY = this.info?.globalPosition.y as number
let offSetY = 0
if (currentCommonentOffSetY >= (this.screenHeight-this.bottomHeight) ) {
offSetY = currentCommonentOffSetY-200
}
// if (!this.offsetY) {
// this.offsetY = componentUtils.getRectangleById('comment').windowOffset.y
// }
// 定位到评论区域
if (this.isScrollTop) {
this.scroller.scrollTo({
xOffset: 0,
yOffset: offSetY,
animation: { duration: 1000, curve: Curve.Ease }
})
} else {
this.scroller.scrollEdge(Edge.Top)
}
this.isScrollTop = !this.isScrollTop
this.pageScrollToCommonent()
}
})
}
...
...
@@ -288,6 +275,7 @@ export struct ImageAndTextPageComponent {
Text(this.publishTime)
.fontColor($r('app.color.color_B0B0B0'))
.fontSize(13)
.height(20)
}
}
.width(CommonConstants.FULL_WIDTH)
...
...
@@ -514,6 +502,29 @@ 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 offSetY = 0
if (currentCommonentOffSetY >= (this.screenHeight-this.bottomHeight) ) {
offSetY = currentCommonentOffSetY-200
}
// 定位到评论区域
if (this.isScrollTop) {
this.scroller.scrollTo({
xOffset: 0,
yOffset: offSetY,
animation: { duration: 1000, curve: Curve.Ease }
})
} else {
this.scroller.scrollEdge(Edge.Top)
}
this.isScrollTop = !this.isScrollTop
}
aboutToAppear() {
Logger.debug(TAG, '文章详情页 aboutToAppear,开始请求接口数据');
this.getDetail()
...
...
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/MorningEveningPaperComponent.ets
View file @
55cf726
...
...
@@ -327,7 +327,7 @@ export struct MorningEveningPaperComponent {
compListItem: this.compListItem,
})
.margin({
top: this.isHasTopView || this.audioPlayUrl.length > 0 ?
1
0 : 44+this.topSafeHeight
top: this.isHasTopView || this.audioPlayUrl.length > 0 ? 0 : 44+this.topSafeHeight
})
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePageUserSimpleInfoUI.ets
View file @
55cf726
...
...
@@ -55,8 +55,8 @@ export default struct MinePageUserSimpleInfoUI {
if(StringUtils.isNotEmpty(this.levelHead)){
Image(this.levelHead)
.width(72.86)
.height(72.86)
.width(75.86)
.height(75.86)
.objectFit(ImageFit.Cover)
.borderRadius(50)
}
...
...
@@ -101,7 +101,7 @@ export default struct MinePageUserSimpleInfoUI {
.fontFamily('PingFang SC-Semibold')
.fontSize(10)
.fontWeight(600)
.margin({ left:
6
})
.margin({ left:
0,top:8
})
.backgroundImage($r("app.media.mine_grade_bg"))
.backgroundImageSize(ImageSize.FILL)
.padding({left: 6,right: 6})
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/HomePageBottomCommentComponent.ets
View file @
55cf726
...
...
@@ -37,7 +37,7 @@ export struct HomePageBottomCommentComponent {
if (this.isGetRequest == true) {
Text().backgroundColor($r('app.color.color_EDEDED'))
.width('100%')
.height(
2
)
.height(
1
)
}
if (this.count === 0) {
if (this.isGetRequest == true) {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/HomePageBottomFollowComponent.ets
View file @
55cf726
...
...
@@ -69,9 +69,9 @@ export struct HomePageBottomFollowComponent {
Column() {
if (this.isGetRequest == true) {
Text().backgroundColor(
$r('app.color.color_EDEDED')
)
Text().backgroundColor(
Color.Red
)
.width('100%')
.height(
2
)
.height(
1
)
}
if (this.count === 0) {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/peopleShipHomePage/PeopleShipHomePageHeadComponent.ets
View file @
55cf726
...
...
@@ -31,6 +31,10 @@ export struct PeopleShipHomePageHeadComponent {
.height(this.iconDiameter)
.borderRadius(this.iconDiameter/2)
.objectFit(ImageFit.Cover)
.margin({
right: '0vp',
bottom:'0vp'
})
}
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/peopleShipHomePage/PeopleShipHomePageTopComponent.ets
View file @
55cf726
...
...
@@ -54,7 +54,6 @@ export struct PeopleShipHomePageTopComponent {
WDRouterRule.jumpWithPage(WDRouterPage.showHomePageHeaderPage, params)
})
// 文字
Text(this.detailModel.userName)
.height('50vp')
...
...
sight_harmony/features/wdComponent/src/main/ets/pages/MineHomePage.ets
View file @
55cf726
...
...
@@ -122,11 +122,12 @@ struct MineHomePage {
Row() {
Text(`${this.userName}`)
.fontColor($r('app.color.white'))
.maxLines(
1
)
.maxLines(
2
)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.fontSize(20)
.lineHeight(26)
.fontWeight(500)
.constraintSize({maxWidth:180})
.onClick(()=>{
let params: editModelParams = {
editContent: this.userName
...
...
@@ -206,7 +207,7 @@ struct MineHomePage {
.backgroundColor($r('app.color.color_transparent'))
.height(86)
.width('100%')
.padding({ left: 1
6
})
.padding({ left: 1
0
})
Column(){
...
...
sight_harmony/features/wdShare/src/main/ets/WDShare.ets
View file @
55cf726
...
...
@@ -39,6 +39,7 @@ export class WDShare {
desc: program.shareInfo.shareSummary,
link: program.shareInfo.shareUrl,
deeplink:AppInnerLinkGenerator.generateDeepLinkWithProgram(program),
posterImg:$r("app.media.test_share_poster")
}
})
}
...
...
Please
register
or
login
to post a comment