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-05-31 14:57:55 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
ba47549a7bfa35fd5701296a7511219be6e8c76f
ba47549a
2 parents
f8c68585
c450969a
Merge remote-tracking branch 'origin/main'
Show whitespace changes
Inline
Side-by-side
Showing
52 changed files
with
342 additions
and
174 deletions
sight_harmony/commons/wdConstant/src/main/module.json5
sight_harmony/commons/wdKit/src/main/module.json5
sight_harmony/commons/wdNetwork/src/main/module.json5
sight_harmony/commons/wdRouter/src/main/module.json5
sight_harmony/commons/wdShareBase/src/main/module.json5
sight_harmony/commons/wdWebComponent/src/main/module.json5
sight_harmony/features/wdBean/src/main/module.json5
sight_harmony/features/wdComponent/src/main/ets/components/CompParser.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentCustomDialog.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentTabComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/QualityCommentsComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/viewmodel/CommentViewModel.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhGridLayout03.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow03.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/follow/FollowListDetailUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/HomePageBottomFollowComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/OtherHomePageBottomFollowComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/QualityCommentsPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/SettingAboutPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/reusable/CustomTitleUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchHistoryComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchHotsComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchRelatedComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchResultComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/setting/AboutPageUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/LiveOperRowListView.ets
sight_harmony/features/wdComponent/src/main/module.json5
sight_harmony/features/wdDetailPlayApi/src/main/module.json5
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayLiveCommon.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayLivePage.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerCommentComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/module.json5
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailPlayShortVideoPage.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailVideoListPage.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/VideoChannelDetail.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/module.json5
sight_harmony/features/wdDetailPlayVod/src/main/module.json5
sight_harmony/features/wdHwAbility/src/main/module.json5
sight_harmony/features/wdLayout/src/main/module.json5
sight_harmony/features/wdLogin/src/main/module.json5
sight_harmony/features/wdPlayer/src/main/module.json5
sight_harmony/features/wdShare/src/main/module.json5
sight_harmony/features/wdTracking/src/main/module.json5
sight_harmony/products/phone/src/main/ets/pages/ImageAndTextDetailPage.ets
sight_harmony/products/phone/src/main/ets/pages/SpacialTopicPage.ets
sight_harmony/products/phone/src/main/ets/pages/detail/AudioDetail.ets
sight_harmony/products/phone/src/main/ets/pages/detail/DynamicDetailPage.ets
sight_harmony/products/phone/src/main/ets/pages/detail/MultiPictureDetailPage.ets
sight_harmony/products/phone/src/main/ets/pages/view/VideoChannelPage.ets
sight_harmony/products/phone/src/main/module.json5
sight_harmony/commons/wdConstant/src/main/module.json5
View file @
ba47549
...
...
@@ -8,6 +8,7 @@
"tablet"
,
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
}
}
\ No newline at end of file
...
...
sight_harmony/commons/wdKit/src/main/module.json5
View file @
ba47549
...
...
@@ -8,6 +8,7 @@
"tablet"
,
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
,
"requestPermissions"
:
[
{
...
...
sight_harmony/commons/wdNetwork/src/main/module.json5
View file @
ba47549
...
...
@@ -8,6 +8,7 @@
"tablet"
,
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
,
"requestPermissions"
:
[
{
...
...
sight_harmony/commons/wdRouter/src/main/module.json5
View file @
ba47549
...
...
@@ -8,6 +8,7 @@
"tablet"
,
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
}
}
\ No newline at end of file
...
...
sight_harmony/commons/wdShareBase/src/main/module.json5
View file @
ba47549
...
...
@@ -8,6 +8,7 @@
"tablet"
,
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
,
"pages"
:
"$profile:main_pages"
}
...
...
sight_harmony/commons/wdWebComponent/src/main/module.json5
View file @
ba47549
...
...
@@ -8,6 +8,7 @@
"tablet"
,
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdBean/src/main/module.json5
View file @
ba47549
...
...
@@ -8,6 +8,7 @@
"tablet"
,
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/CompParser.ets
View file @
ba47549
...
...
@@ -46,6 +46,7 @@ export struct CompParser {
console.log('CompParser-compDTO', JSON.stringify(this.compDTO))
this.pageName = this.pageModel.pageInfo.name
// 轮播图屏蔽音频类型稿件
if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) {
this.audioItems = this.compDTO.operDataList.filter(item => {
...
...
@@ -88,7 +89,7 @@ export struct CompParser {
} else if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) {
if (this.compDTO.operDataList.length > this.audioItems.length) {
ZhCarouselLayout01({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
Divider().strokeWidth(
5).color('#f5f5f5').padding({ left: 0, right: 0
})
Divider().strokeWidth(
1).color('#f5f5f5').padding({ left: 16, right: 16
})
}
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 &&
this.compDTO.imageScale === 2) { // && compDTO.name ==="横划卡"
...
...
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentComponent.ets
View file @
ba47549
...
...
@@ -11,6 +11,7 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
import NoMoreLayout from '../../page/NoMoreLayout';
import { EmptyComponent } from '../../view/EmptyComponent';
import { ContentDetailDTO, Params } from 'wdBean/Index';
import { TrackingContent, TrackParamConvert } from 'wdTracking/Index';
const TAG = 'CommentComponent';
...
...
@@ -31,6 +32,8 @@ export struct CommentComponent {
/*必传*/
@ObjectLink publishCommentModel: publishCommentModel
@Consume contentDetailData: ContentDetailDTO
@Consume pageId: string
@Consume pageName: string
listScroller: ListScroller = new ListScroller(); // scroller控制器
historyOffset: number = 0; // 上次浏览到列表距离顶端的偏移量offset
@State allDatas: LazyDataSource<commentItemModel> = new LazyDataSource();
...
...
@@ -66,6 +69,9 @@ export struct CommentComponent {
this.dialogController = new CustomDialogController({
builder: CommentCustomDialog({
onPublishBtnClickTrack: () => {
TrackingContent.commentClick(this.pageId, this.pageName, TrackParamConvert.contentDetail(this.contentDetailData))
},
confirm: (value: Record<string, string>) => {
this.addCommentLocal()
},
...
...
@@ -222,6 +228,7 @@ export struct CommentComponent {
}
}
}
.scrollBar(BarState.Off)
.margin({ bottom: 10 })
.onReachEnd(() => {
if (!this.fixedHeightMode) {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentCustomDialog.ets
View file @
ba47549
...
...
@@ -22,6 +22,7 @@ export struct CommentCustomDialog {
// confirm 表示内部处理调用 内容评论接口 发布了评论并成功,上层只需要 通过 publishCommentModel.lastCommentModel 即可获取最新已提交的评论
confirm?: (value: Record<string, string>) => void
onPublishBtnClickTrack?: () => void // 和confirm配套使用。当设置了onPublishBtnClick 则无效
@State private emojiSwitch: boolean = false
textInputController: TextAreaController = new TextAreaController()
...
...
@@ -39,6 +40,11 @@ export struct CommentCustomDialog {
}
}
// 点击时 即可埋点
if (this.onPublishBtnClickTrack) {
this.onPublishBtnClickTrack()
}
let bean: Record<string, string> = {};
// this.publishCommentModel.commentContent = this.commentText
//TODO 判断类型
...
...
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentTabComponent.ets
View file @
ba47549
...
...
@@ -5,6 +5,7 @@ import measure from '@ohos.measure'
import { ContentDetailDTO } from 'wdBean/Index'
import { HttpUtils } from 'wdNetwork/Index'
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'
import { TrackingContent, TrackParamConvert } from 'wdTracking/Index'
@Preview
@Component
...
...
@@ -20,6 +21,8 @@ export struct CommentTabComponent {
@State type: number = 1
@State placeHolder: string = '说两句...'
@State dialogController: CustomDialogController | null = null;
@Consume pageId: string
@Consume pageName: string
styleType: number = 1 //1: 白色背景(图文底部栏) 2: 黑色背景(图集底部栏)
/*回调方法*/
dialogControllerConfirm: () => void = () => {
...
...
@@ -29,6 +32,9 @@ export struct CommentTabComponent {
this.dialogController = new CustomDialogController({
builder: CommentCustomDialog({
onPublishBtnClickTrack: () => {
TrackingContent.commentClick(this.pageId, this.pageName, TrackParamConvert.contentDetail(this.contentDetail))
},
confirm: (value: Record<string, string>) => {
this.dialogControllerConfirm();
EmitterUtils.sendEvent(EmitterEventId.COMMENT_PUBLISH, this.publishCommentModel.targetId)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/QualityCommentsComponent.ets
View file @
ba47549
...
...
@@ -11,6 +11,7 @@ import { CommentCustomDialog } from './CommentCustomDialog'
import { publishCommentModel } from '../model/PublishCommentModel'
import { ProcessUtils, WDRouterPage, WDRouterRule } from 'wdRouter/Index'
import { ContentDTO, MasterDetailRes } from 'wdBean/Index'
import { TrackConstants, TrackingContent } from 'wdTracking/Index'
const TAG = 'QualityCommentsComponent';
...
...
@@ -34,6 +35,8 @@ export struct QualityCommentsComponent {
/*必传*/
@State publishCommentModel: publishCommentModel = new publishCommentModel()
// @Consume pageName: string
aboutToDisappear(): void {
// windowClass.setWindowSystemBarProperties({ statusBarColor: '#000' })
this.dialogController = null // 将dialogController置空
...
...
@@ -57,6 +60,9 @@ export struct QualityCommentsComponent {
showAlert() {
this.dialogController = new CustomDialogController({
builder: CommentCustomDialog({
onPublishBtnClickTrack: () => {
//TrackingContent.commentClick(this.pageName, this.pageName,{})
},
confirm: (value: Record<string, string>) => {
},
...
...
sight_harmony/features/wdComponent/src/main/ets/components/comment/viewmodel/CommentViewModel.ets
View file @
ba47549
...
...
@@ -189,11 +189,6 @@ class CommentViewModel {
}
HttpRequest.post<ResponseDTO<commentItemModel>>(url, bean).then((data: ResponseDTO<commentItemModel>) => {
// fixme 埋点 评论发布点击
TrackingContent.commentClick(pageId,pageName
,{
'duration':0,
})
if (data.code != 0) {
ToastUtils.showToast(data.message, 1000);
fail()
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhGridLayout03.ets
View file @
ba47549
...
...
@@ -46,7 +46,7 @@ export struct ZhGridLayout03 {
left: $r('app.float.card_comp_pagePadding_lf'),
right: $r('app.float.card_comp_pagePadding_lf'),
top: $r('app.float.card_comp_pagePadding_tb'),
bottom:
$r('app.float.card_comp_pagePadding_tb')
bottom:
'0vp'
})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow03.ets
View file @
ba47549
import { CompDTO, ContentDTO, Params, Action, ReserveItemBean} from 'wdBean';
import { CompDTO, ContentDTO, Params, Action, ReserveItemBean
, PageTrackBean
} from 'wdBean';
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
import { postInteractAccentionOperateParams } from 'wdBean';
import { PageRepository } from '../../repository/PageRepository';
...
...
@@ -268,7 +268,29 @@ export struct ZhSingleRow03 {
.textAlign(TextAlign.Center)
.borderRadius(3)
.onClick(() => {
this.bookAndCancel(item.relId, item.objectId, !this.isReserved(Number(item.objectId)))
const isSubscribe = !this.isReserved(Number(item.objectId))
// 直播预约埋点
const params: ParamType = {
'contentName': item.newsTitle,
'contentType': item.objectType,
"liveStreamType": item?.liveInfo.vrType === 0 ? 1 : 2,
"vliveId": item.objectId,
"vliveName": item.newsTitle,
"contentId": item.objectId,
"compId": item.relId,
"contentStyle": item.appStyle,
"liveType": getLiveState(item),
'contentShowChannelId': item.channelId,
'linkUrl': item.linkUrl,
"pageId": this.pageId,
"pageName": this.pageName,
}
Logger.info(TAG, `直播预约埋点: ${JSON.stringify(params)}`);
Tracking.event(isSubscribe? "live_subscribe_click": "cancel_live_subscribe_click", params)
this.bookAndCancel(item.relId, item.objectId, isSubscribe)
})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/follow/FollowListDetailUI.ets
View file @
ba47549
...
...
@@ -231,13 +231,10 @@ export struct FollowListDetailUI {
value.forEach((item) => {
if (data.creatorId == item.creatorId) {
data.headPhotoUrl = item.headPhotoUrl
if (item.fansNum > 10000) {
let temp = (item.fansNum / 10000) + ""
let index = temp.indexOf('.')
if (index != -1) {
temp = temp.substring(0, index + 2)
} else {
temp = temp
if (item.fansNum >= 10000) {
let temp = (item.fansNum / 10000) .toFixed(1)
if (Number(temp.substring(temp.length-1)) == 0) {
temp = temp.substring(0, temp.length-2)
}
data.cnFansNum = temp + "万"
} else {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/HomePageBottomFollowComponent.ets
View file @
ba47549
...
...
@@ -207,13 +207,10 @@ export struct HomePageBottomFollowComponent {
value.list.forEach((value) => {
let fansNum: number = value.fansNum
let fansNumString = ""
if (fansNum > 10000) {
let temp = (fansNum / 10000) + ""
let index = temp.indexOf('.')
if (index != -1) {
temp = temp.substring(0, index + 2)
} else {
temp = temp
if (fansNum >= 10000) {
let temp = (fansNum / 10000) .toFixed(1)
if (Number(temp.substring(temp.length-1)) == 0) {
temp = temp.substring(0, temp.length-2)
}
fansNumString = temp + "万"
} else {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/OtherHomePageBottomFollowComponent.ets
View file @
ba47549
...
...
@@ -168,7 +168,18 @@ export struct OtherHomePageBottomFollowComponent{
this.hasMore = false
}else{
value.list.forEach((value)=>{
this.data_follow.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum+"",value.introduction,value.attentionCreatorId,"1",value.attentionUserId,value.cnUserType,value.cnUserId,value.mainControl,value.banControl,value.authIcon))
let fansNum: number = value.fansNum
let fansNumString = ""
if (fansNum >= 10000) {
let temp = (fansNum / 10000) .toFixed(1)
if (Number(temp.substring(temp.length-1)) == 0) {
temp = temp.substring(0, temp.length-2)
}
fansNumString = temp + "万"
} else {
fansNumString = fansNum + ""
}
this.data_follow.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,fansNumString,value.introduction,value.attentionCreatorId,"1",value.attentionUserId,value.cnUserType,value.cnUserId,value.mainControl,value.banControl,value.authIcon))
})
this.data_follow.notifyDataReload()
this.count = this.data_follow.totalCount()
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/QualityCommentsPage.ets
View file @
ba47549
import { WindowModel } from 'wdKit/Index';
import { TrackConstants } from 'wdTracking/Index';
import { QualityCommentsComponent } from '../comment/view/QualityCommentsComponent';
@Entry
@Component
struct QualityCommentsPage {
@Provide pageName: string = TrackConstants.PageName.Best_Comment
@Provide pageId: string = TrackConstants.PageName.Best_Comment
onPageShow(): void {
// WindowModel.shared.setWindowLayoutFullScreen(true)
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/SettingAboutPage.ets
View file @
ba47549
...
...
@@ -23,6 +23,6 @@ struct SettingAboutPage {
build() {
Column(){
AboutPageUI()
}
}
.backgroundColor($r('app.color.white'))
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/reusable/CustomTitleUI.ets
View file @
ba47549
...
...
@@ -4,14 +4,15 @@ import router from '@ohos.router'
export struct CustomTitleUI {
imgBack:boolean = true
titleName:ResourceStr = "默认标题"
@Prop percent:number = 1
build() {
RelativeContainer() {
//标题栏目
if(this.imgBack){
Image($r('app.media.back_icon'))
.width('46lpx')
.height('46lpx')
.width(`${this.calcHeight(46)}lpx`)
.height(`${this.calcHeight(46)}lpx`)
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.High)
.id("back_icon")
...
...
@@ -19,7 +20,7 @@ export struct CustomTitleUI {
center: {anchor: "__container__", align: VerticalAlign.Center},
left: {anchor: "__container__", align: HorizontalAlign.Start}
})
.margin({left:
'31lpx'
})
.margin({left:
`${this.calcHeight(31)}lpx`
})
.onClick(()=>{
router.back()
})
...
...
@@ -28,18 +29,22 @@ export struct CustomTitleUI {
Text(this.titleName)
.maxLines(1)
.id("title")
.fontSize(
'30lpx'
)
.fontSize(
`${this.calcHeight(30)}lpx`
)
.fontWeight(400)
.fontColor($r('app.color.color_222222'))
.lineHeight(
'43lpx'
)
.lineHeight(
`${this.calcHeight(43)}lpx`
)
.alignRules({
center: {anchor: "__container__", align: VerticalAlign.Center},
middle: {anchor: "__container__", align: HorizontalAlign.Center}
})
}
.height(
'84lpx'
)
.height(
`${this.calcHeight(84)}lpx`
)
.width('100%')
.backgroundColor($r('app.color.white'))
}
calcHeight(value:number): number{
return value * this.percent
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchComponent.ets
View file @
ba47549
import router from '@ohos.router'
import { NetworkUtil, StringUtils, ToastUtils } from 'wdKit'
import {
BreakpointSystem,
NetworkUtil, StringUtils, ToastUtils } from 'wdKit'
import { ParamType, TrackConstants, Tracking } from 'wdTracking/Index'
import SearcherAboutDataModel from '../../model/SearcherAboutDataModel'
import { SearchHistoryItem } from '../../viewmodel/SearchHistoryItem'
import { SearchRelatedItem } from '../../viewmodel/SearchRelatedItem'
import { EmptyComponent } from '../view/EmptyComponent'
import { SearchHistoryComponent } from './SearchHistoryComponent'
import { SearchHotsComponent } from './SearchHotsComponent'
import { SearchRelatedComponent } from './SearchRelatedComponent'
...
...
@@ -34,7 +33,22 @@ export struct SearchComponent {
@State isGetRequest:boolean = false
@Link fromTabName: string
@StorageProp('currentBreakpoint') @Watch("currentChanged")currentBreakpoint: string = 'sm';
private breakpointSystem = new BreakpointSystem();
@State percent:number = 1
currentChanged(){
if(this.currentBreakpoint == "md" || this.currentBreakpoint == "lg"){
this.percent = 0.7
}else {
this.percent = 1
}
}
aboutToAppear() {
this.breakpointSystem.register();
this.currentChanged()
//获取提示滚动
this.getSearchHint()
//清除缓存
...
...
@@ -49,6 +63,11 @@ export struct SearchComponent {
}, 1000);
}
aboutToDisappear(): void {
this.breakpointSystem.unregister();
}
getRelatedSearchContent() {
if(StringUtils.isNotEmpty(this.searchText)){
SearcherAboutDataModel.getRelatedSearchContentData(encodeURI(this.searchText),getContext(this)).then((value) => {
...
...
@@ -127,26 +146,26 @@ export struct SearchComponent {
Scroll(this.scroller) {
Column() {
if(this.searchHistoryData!=null && this.searchHistoryData.length>0){
SearchHistoryComponent({ searchHistoryData: $searchHistoryData, onDelHistory: (): void => this.getSearchHistoryData(),onGetSearchRes: (item,index): void => this.getSearchHistoryResData(item,index),onCloseInput : (): void => this.stopInput() })
SearchHistoryComponent({ searchHistoryData: $searchHistoryData, onDelHistory: (): void => this.getSearchHistoryData(),onGetSearchRes: (item,index): void => this.getSearchHistoryResData(item,index),onCloseInput : (): void => this.stopInput()
,percent:this.percent
})
}
if(this.searchHistoryData.length>0){
//分隔符
Divider()
.width('100%')
.height(
'1lpx'
)
.height(
`${this.calcHeight(1)}lpx`
)
.color($r('app.color.color_EDEDED'))
.strokeWidth(
'1lpx'
)
.strokeWidth(
`${this.calcHeight(1)}lpx`
)
}
SearchHotsComponent({onGetSearchRes: (item): void => this.getSearchHotResData(item)})
SearchHotsComponent({onGetSearchRes: (item): void => this.getSearchHotResData(item)
,percent:this.percent
})
}
}
.scrollable(ScrollDirection.Vertical)
.scrollBar(BarState.Off)
.width('100%')
.height('100%')
.padding({ left:
'31lpx', right: '31lpx'
})
.padding({ left:
`${this.calcHeight(31)}lpx`, right: `${this.calcHeight(31)}lpx`
})
} else {
if (this.hasChooseSearch) {
//搜索结果
...
...
@@ -156,10 +175,10 @@ export struct SearchComponent {
this.getSearchHistoryData()
this.getSearchInputResData(this.searchText)
}
}})
}
,percent:this.percent
})
} else {
//联想搜索
SearchRelatedComponent({relatedSearchContentData:$relatedSearchContentsData,onGetSearchRes: (item): void => this.getSearchRelatedResData(item),searchText:this.searchText})
SearchRelatedComponent({relatedSearchContentData:$relatedSearchContentsData,onGetSearchRes: (item): void => this.getSearchRelatedResData(item),searchText:this.searchText
,percent:this.percent
})
}
}
}.height('100%')
...
...
@@ -244,14 +263,14 @@ export struct SearchComponent {
Swiper(this.swiperController) {
ForEach(this.searchTextData, (item: string, index: number) => {
Text(item)
.fontWeight('400lpx')
.fontSize('25lpx')
.fontWeight(400)
.fontSize(`${this.calcHeight(25)}lpx`)
.fontColor($r('app.color.color_666666'))
.lineHeight(
'35lpx'
)
.lineHeight(
`${this.calcHeight(35)}lpx`
)
.textAlign(TextAlign.Start)
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Clip })
.margin({ left:
'40lpx'
})
.margin({ left:
`${this.calcHeight(40)}lpx`
})
})
}
.loop(true)
...
...
@@ -268,9 +287,9 @@ export struct SearchComponent {
Row(){
Search({ value: this.searchText, placeholder: '', controller: this.controller})
.layoutWeight(1)
.height(
'69lpx'
)
.height(
`${this.calcHeight(69)}lpx`
)
.backgroundColor($r('app.color.color_transparent'))
.textFont({ size:
"27lpx", weight: "400lpx"
})
.textFont({ size:
`${this.calcHeight(27)}lpx`, weight: 400
})
// .defaultFocus(true)
.id("searchId")
.searchIcon({
...
...
@@ -318,42 +337,44 @@ export struct SearchComponent {
}
}
})
}.padding({right:'70lpx'})
.layoutWeight(1)
Image($r('app.media.search_input_del_icon'))
.width("31lpx")
.height("31lpx")
.width(`${this.calcHeight(31)}lpx`)
.height(`${this.calcHeight(31)}lpx`)
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.Medium)
.margin({left:"495lpx"})
.onClick(()=>{
this.searchText = ""
})
.offset({x:10})
.enabled(true)
.visibility(StringUtils.isEmpty(this.searchText) ? Visibility.Hidden : Visibility.Visible)
}.padding({right:`${this.calcHeight(70)}lpx`})
.layoutWeight(1)
.justifyContent(FlexAlign.SpaceBetween)
}
.backgroundImage($r('app.media.search_page_input_bg'))
.backgroundImageSize(ImageSize.Cover)
.layoutWeight(1)
.height(
'69lpx'
)
.height(
`${this.calcHeight(69)}lpx`
)
//TODO 需要修改输入法 换行
//右
Text("取消")
.textAlign(TextAlign.Center)
.fontWeight('400lpx')
.fontSize('31lpx')
.lineHeight('58lpx')
.fontWeight(400)
.fontSize(`${this.calcHeight(31)}lpx`)
.lineHeight(`${this.calcHeight(58)}lpx`)
.fontColor($r('app.color.color_222222'))
.width('125lpx')
.height('58lpx')
.width(`${this.calcHeight(125)}lpx`)
.height(`${this.calcHeight(58)}lpx`)
.onClick(() => {
router.back()
})
}
.height('85lpx')
.padding({ left: '31lpx' })
.height(`${this.calcHeight(85)}lpx`)
.padding({ left: `${this.calcHeight(31)}lpx` })
.alignItems(VerticalAlign.Center)
}
...
...
@@ -395,6 +416,10 @@ export struct SearchComponent {
this.isClickedInputSearch = false
this.isClickedHintSearch = false
}
calcHeight(value:number): number{
return value * this.percent
}
}
function trackSearchClick(upOneLevelPageName: string,keyword:string){
...
...
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchHistoryComponent.ets
View file @
ba47549
...
...
@@ -27,6 +27,7 @@ export struct SearchHistoryComponent{
alignment: DialogAlignment.Center,
customStyle: true
})
@Prop percent:number = 1
onAccept(){
console.info('Callback when the second button is clicked')
...
...
@@ -48,14 +49,14 @@ export struct SearchHistoryComponent{
Text("搜索历史")
.textAlign(TextAlign.Center)
.fontWeight(FontWeight.Regular)
.fontSize('27lpx')
.lineHeight('38lpx')
.fontSize(`${this.calcHeight(27)}lpx`)
.lineHeight(`${this.calcHeight(38)}lpx`)
.fontColor($r('app.color.color_999999'))
.height(
'38lpx'
)
.height(
`${this.calcHeight(38)}lpx`
)
Image($r('app.media.search_delete_icon'))
.height('31lpx')
.width('31lpx')
.height(`${this.calcHeight(31)}lpx`)
.width(`${this.calcHeight(31)}lpx`)
.interpolation(ImageInterpolation.High)
.objectFit(ImageFit.Auto)
.onClick(()=>{
...
...
@@ -63,7 +64,7 @@ export struct SearchHistoryComponent{
this.dialogController.open()
})
}.justifyContent(FlexAlign.SpaceBetween)
.margin({bottom:
'17lpx'
})
.margin({bottom:
`${this.calcHeight(17)}lpx`
})
.width('100%')
Grid(){
...
...
@@ -72,14 +73,14 @@ export struct SearchHistoryComponent{
Row(){
Text(`${item.searchContent}`)
.fontColor($r('app.color.color_222222'))
.fontSize(
'31lpx'
)
.fontSize(
`${this.calcHeight(31)}lpx`
)
.fontWeight(FontWeight.Regular)
.lineHeight(
'46lpx'
)
.lineHeight(
`${this.calcHeight(46)}lpx`
)
.maxLines(1)
.constraintSize({maxWidth:index%2 === 0?
'270lpx':'230lpx'
})
.constraintSize({maxWidth:index%2 === 0?
`${this.calcHeight(270)}lpx`:`${this.calcHeight(230)}lpx`
})
.textOverflow({ overflow: TextOverflow.Ellipsis })
.textAlign(TextAlign.Start)
.margin({left:index%2 === 0?'0lpx':
'23lpx'
})
.margin({left:index%2 === 0?'0lpx':
`${this.calcHeight(23)}lpx`
})
.onClick(()=>{
if (this.onGetSearchRes !== undefined) {
this.onGetSearchRes(item.searchContent,index)
...
...
@@ -87,9 +88,9 @@ export struct SearchHistoryComponent{
})
Image($r('app.media.search_item_delete_icon'))
.width('23lpx')
.height('23lpx')
.margin({left:'4lpx'})
.width(`${this.calcHeight(23)}lpx`)
.height(`${this.calcHeight(23)}lpx`)
.margin({left:`${this.calcHeight(4)}lpx`})
.interpolation(ImageInterpolation.Medium)
.objectFit(ImageFit.Auto)
.onClick(()=>{
...
...
@@ -103,19 +104,19 @@ export struct SearchHistoryComponent{
if(index%2 === 0 && index != this.searchHistoryData.length-1 ){
Divider()
.width('2lpx')
.height('23lpx')
.width(`${this.calcHeight(2)}lpx`)
.height(`${this.calcHeight(23)}lpx`)
.color($r('app.color.color_CCCCCC'))
.strokeWidth(
'2lpx'
)
.strokeWidth(
`${this.calcHeight(2)}lpx`
)
.vertical(true)
}
}.height('100%')
.alignItems(VerticalAlign.Center)
.width('100%')
.margin({left:index%2 === 1?
'23lpx'
:'0lpx'})
.margin({left:index%2 === 1?
`${this.calcHeight(23)}lpx`
:'0lpx'})
}
.height(
'46lpx'
)
.height(
`${this.calcHeight(46)}lpx`
)
.alignSelf(ItemAlign.Center)
})
...
...
@@ -123,9 +124,9 @@ export struct SearchHistoryComponent{
.height(this.getCategoryViewHeight())
.rowsTemplate(this.getCategoryRowTmpl())
.columnsTemplate('1fr 1fr')
.rowsGap(
'23lpx'
)
.rowsGap(
`${this.calcHeight(23)}lpx`
)
}
.margin({top:
"36lpx",bottom:'46lpx'
})
.margin({top:
`${this.calcHeight(36)}lpx`,bottom:`${this.calcHeight(46)}lpx`
})
}
getCategoryRowCount() {
...
...
@@ -140,6 +141,10 @@ export struct SearchHistoryComponent{
}
getCategoryViewHeight() {
return `${50 * this.getCategoryRowCount()}lpx`;
return `${50 * this.percent * this.getCategoryRowCount()}lpx`;
}
calcHeight(value:number): number{
return value * this.percent
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchHotsComponent.ets
View file @
ba47549
...
...
@@ -10,6 +10,7 @@ const TAG = "SearchHotsComponent"
export struct SearchHotsComponent{
@State searchHotsData:SearchHotContentItem[] = []
onGetSearchRes?: (item:string) => void;
@Prop percent:number = 1
aboutToAppear(){
//获取搜索热词
...
...
@@ -34,22 +35,22 @@ export struct SearchHotsComponent{
if(this.searchHotsData.length>0){
Row() {
Image($r('app.media.search_hot_icon'))
.width('46lpx')
.height('46lpx')
.width(`${this.calcHeight(46)}lpx`)
.height(`${this.calcHeight(46)}lpx`)
.objectFit(ImageFit.Auto)
.margin({right:
'8lpx'
})
.margin({right:
`${this.calcHeight(8)}lpx`
})
.interpolation(ImageInterpolation.Medium)
Text("热门搜索")
.textAlign(TextAlign.Center)
.fontWeight(FontWeight.Bold)
.fontSize('33lpx')
.lineHeight('46lpx')
.fontSize(`${this.calcHeight(33)}lpx`)
.lineHeight(`${this.calcHeight(46)}lpx`)
.fontColor($r('app.color.color_222222'))
.height(
'46lpx'
)
.height(
`${this.calcHeight(46)}lpx`
)
}
.width('100%')
.margin({bottom:
"15lpx"
})
.margin({bottom:
`${this.calcHeight(15)}lpx`
})
}
List(){
...
...
@@ -60,49 +61,49 @@ export struct SearchHotsComponent{
Row(){
if(item.sequence <=3){
Image(item.sequence===1?$r('app.media.search_hot_num1'):item.sequence===2?$r('app.media.search_hot_num2'):$r('app.media.search_hot_num3'))
.width('27lpx')
.height('35lpx')
.width(`${this.calcHeight(27)}lpx`)
.height(`${this.calcHeight(35)}lpx`)
.objectFit(ImageFit.Auto)
.margin({right:
'12lpx'
})
.margin({right:
`${this.calcHeight(12)}lpx`
})
.interpolation(ImageInterpolation.High)
}else {
Text(`${item.sequence}`)
.height(
'31lpx'
)
.height(
`${this.calcHeight(31)}lpx`
)
.fontColor($r('app.color.color_666666'))
.fontSize(
'27lpx'
)
.fontSize(
`${this.calcHeight(27)}lpx`
)
.fontWeight(FontWeight.Regular)
.lineHeight('31lpx')
.margin({right:'12lpx'})
.lineHeight(`${this.calcHeight(31)}lpx`)
.margin({right:`${this.calcHeight(12)}lpx`})
}
Text(`${item.hotEntry}`)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.fontColor($r('app.color.color_222222'))
.fontSize(
'31lpx'
)
.fontSize(
`${this.calcHeight(31)}lpx`
)
.maxLines(1)
.fontWeight(FontWeight.Regular)
.lineHeight(
'42lpx'
)
.lineHeight(
`${this.calcHeight(42)}lpx`
)
}.layoutWeight(1)
if(item.mark===1 || item.mark===2){
Image(item.mark===1?$r('app.media.search_hots_mark1'):$r('app.media.search_hots_mark2'))
.width('42lpx')
.height('31lpx')
.width(`${this.calcHeight(42)}lpx`)
.height(`${this.calcHeight(31)}lpx`)
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.High)
}
}.alignItems(VerticalAlign.Center)
.height(
'84lpx'
)
.height(
`${this.calcHeight(84)}lpx`
)
.width('100%')
.justifyContent(FlexAlign.SpaceBetween)
if(index != this.searchHotsData.length-1 ){
Divider()
.width('100%')
.height(
'1lpx'
)
.height(
`${this.calcHeight(1)}lpx`
)
.color($r('app.color.color_F5F5F5'))
.strokeWidth(
'1lpx'
)
.strokeWidth(
`${this.calcHeight(1)}lpx`
)
}
}.height(
'85lpx'
)
}.height(
`${this.calcHeight(85)}lpx`
)
.width('100%')
.alignItems(HorizontalAlign.Start)
}
...
...
@@ -117,6 +118,10 @@ export struct SearchHotsComponent{
}).layoutWeight(1)
}.width('100%')
.height('100%')
.margin({top:'46lpx'})
.margin({top:`${this.calcHeight(46)}lpx`})
}
calcHeight(value:number): number{
return value * this.percent
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchRelatedComponent.ets
View file @
ba47549
...
...
@@ -10,6 +10,7 @@ export struct SearchRelatedComponent {
@Link relatedSearchContentData: SearchRelatedItem[]
onGetSearchRes?: (item:string) => void;
@Prop searchText: string
@Prop percent:number = 1
build() {
Column() {
...
...
@@ -19,19 +20,19 @@ export struct SearchRelatedComponent {
Column(){
Row() {
Image($r('app.media.search_related_item_icon'))
.width('31lpx')
.height('31lpx')
.width(`${this.calcHeight(31)}lpx`)
.height(`${this.calcHeight(31)}lpx`)
.objectFit(ImageFit.Auto)
.margin({ right:
'10lpx'
})
.margin({ right:
`${this.calcHeight(10)}lpx`
})
.interpolation(ImageInterpolation.High)
Text(){
ForEach(item.data_arr,(item:string)=>{
Span(item)
.fontColor(item===this.searchText?$r('app.color.color_ED2800'):$r('app.color.color_000000'))
.fontSize('31lpx')
.fontWeight('400lpx')
.lineHeight('50lpx')
.fontSize(`${this.calcHeight(31)}lpx`)
.fontWeight(400)
.lineHeight(`${this.calcHeight(50)}lpx`)
})
}
.maxLines(1)
...
...
@@ -40,14 +41,14 @@ export struct SearchRelatedComponent {
}.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.Start)
.height(
'95lpx'
)
.height(
`${this.calcHeight(95)}lpx`
)
if (index != this.relatedSearchContentData.length - 1) {
Divider()
.width('100%')
.height(
'1lpx'
)
.height(
`${this.calcHeight(1)}lpx`
)
.color($r('app.color.color_F5F5F5'))
.strokeWidth(
'1lpx'
)
.strokeWidth(
`${this.calcHeight(1)}lpx`
)
}
}
}.width('100%')
...
...
@@ -59,8 +60,11 @@ export struct SearchRelatedComponent {
})
}.width('100%')
}.width('100%')
.margin({ top: '8lpx' })
.padding({ left: '31lpx', right: '31lpx' })
.margin({ top: `${this.calcHeight(8)}lpx` })
.padding({ left: `${this.calcHeight(31)}lpx`, right: `${this.calcHeight(31)}lpx` })
}
calcHeight(value:number): number{
return value * this.percent
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchResultComponent.ets
View file @
ba47549
...
...
@@ -28,6 +28,7 @@ export struct SearchResultComponent {
scroller: Scroller = new Scroller()
onClickTryAgain?: () => void;
@State isConnectNetwork : boolean = NetworkUtil.isNetConnected()
@Prop percent:number = 1
aboutToAppear(): void {
if (this.count.length === 0 && this.isGetRequest == true) {
...
...
@@ -71,7 +72,7 @@ export struct SearchResultComponent {
//缺省图
if(this.isConnectNetwork){
EmptyComponent({emptyType:4})
.height(
'612lpx'
)
.height(
`${this.calcHeight(612)}lpx`
)
.width('100%')
}else{
EmptyComponent({ emptyType: 1,emptyHeight:"100%" ,retry: () => {
...
...
@@ -90,19 +91,19 @@ export struct SearchResultComponent {
ListItem() {
Row() {
Image($r('app.media.search_suggest_icon'))
.width('6lpx')
.height('31lpx')
.width(`${this.calcHeight(6)}lpx`)
.height(`${this.calcHeight(31)}lpx`)
.objectFit(ImageFit.Cover)
.interpolation(ImageInterpolation.High)
.margin({ right:
'10lpx'
})
.margin({ right:
`${this.calcHeight(10)}lpx`
})
Text("为你推荐")
.textAlign(TextAlign.Start)
.fontWeight(600)
.fontSize('33lpx')
.lineHeight('46lpx')
.fontSize(`${this.calcHeight(33)}lpx`)
.lineHeight(`${this.calcHeight(46)}lpx`)
.fontColor($r('app.color.color_222222'))
}.height('84lpx')
.padding({ left: '31lpx', right: '31lpx' })
}.height(`${this.calcHeight(84)}lpx`)
.padding({ left: `${this.calcHeight(31)}lpx`, right: `${this.calcHeight(31)}lpx` })
.width('100%')
.alignItems(VerticalAlign.Center)
}
...
...
@@ -115,9 +116,9 @@ export struct SearchResultComponent {
if (index != this.data.totalCount() - 1) {
Divider()
.width('100%')
.height(
'1lpx'
)
.height(
`${this.calcHeight(1)}lpx`
)
.color($r('app.color.color_F5F5F5'))
.strokeWidth(
'1lpx'
)
.strokeWidth(
`${this.calcHeight(1)}lpx`
)
}
}
}
...
...
@@ -144,7 +145,7 @@ export struct SearchResultComponent {
.vertical(false)
.barMode(BarMode.Fixed)
.barWidth('100%')
.barHeight(
'84lpx'
)
.barHeight(
`${this.calcHeight(84)}lpx`
)
.animationDuration(0)
.width('100%')
.scrollable(false)
...
...
@@ -152,26 +153,26 @@ export struct SearchResultComponent {
}
}.width('100%')
.layoutWeight(1)
.margin({ top:
'12lpx'
})
.margin({ top:
`${this.calcHeight(12)}lpx`
})
}
@Builder
TabBuilder(index: number, item: string) {
Stack() {
Text(item)
.height('38lpx')
.fontSize('33lpx')
.height(`${this.calcHeight(38)}lpx`)
.fontSize(`${this.calcHeight(33)}lpx`)
.fontWeight(this.currentIndex === index ? 600 : 400)
.fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
.lineHeight(
'38lpx'
)
.lineHeight(
`${this.calcHeight(38)}lpx`
)
if (this.currentIndex === index) {
Divider()
.width('31lpx')
.height('4lpx')
.width(`${this.calcHeight(31)}lpx`)
.height(`${this.calcHeight(4)}lpx`)
.color('#ED2800')
.strokeWidth('4lpx')
.margin({ top: '50lpx' })
.strokeWidth(`${this.calcHeight(4)}lpx`)
.margin({ top: `${this.calcHeight(50)}lpx` })
.id("divTag")
}
}.onClick(() => {
...
...
@@ -179,7 +180,11 @@ export struct SearchResultComponent {
this.controller.changeIndex(this.currentIndex)
})
.height('100%')
.margin({ right: '9lpx' })
.padding({ left: '31lpx', right: index === this.count.length - 1 ? "31lpx" : "0lpx" })
.margin({ right: `${this.calcHeight(9)}lpx` })
.padding({ left: `${this.calcHeight(31)}lpx`, right: index === this.count.length - 1 ? `${this.calcHeight(31)}lpx` : "0lpx" })
}
calcHeight(value:number): number{
return value * this.percent
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/setting/AboutPageUI.ets
View file @
ba47549
import { Params } from 'wdBean';
import { AppUtils, StringUtils } from 'wdKit/Index';
import { AppUtils,
BreakpointSystem,
StringUtils } from 'wdKit/Index';
import { WDRouterPage, WDRouterRule } from 'wdRouter';
import { TrackingButton, TrackConstants } from 'wdTracking/Index';
import { CustomTitleUI } from '../reusable/CustomTitleUI';
...
...
@@ -24,11 +24,25 @@ export struct AboutPageUI {
alignment: DialogAlignment.Center
})
@StorageProp('currentBreakpoint') @Watch("currentChanged")currentBreakpoint: string = 'sm';
private breakpointSystem = new BreakpointSystem();
@State percent:number = 1
currentChanged(){
if(this.currentBreakpoint == "md" || this.currentBreakpoint == "lg"){
this.percent = 0.7
}else {
this.percent = 1
}
}
build() {
this.aboutUi()
}
aboutToAppear() {
this.breakpointSystem.register();
this.currentChanged()
let context = getContext();
context.getApplicationContext();
let appVerion = AppUtils.getAppVersionName()
...
...
@@ -37,15 +51,19 @@ export struct AboutPageUI {
}
}
aboutToDisappear(): void {
this.breakpointSystem.unregister();
}
@Builder
aboutUi() {
Column() {
CustomTitleUI({titleName:'关于'})
CustomTitleUI({titleName:'关于'
,percent:this.percent
})
Image($r('app.media.setting_about_logo'))
.width('278lpx')
.height('154lpx')
.margin({ top: '173lpx', bottom: '154lpx' })
.width(`${this.calcHeight(278)}lpx`)
.height(`${this.calcHeight(154)}lpx`)
.margin({ top: `${this.calcHeight2(173)}lpx`, bottom: `${this.calcHeight2(154)}lpx` })
.gesture(
TapGesture({ count: 2 })
.onAction((event: GestureEvent) => {
...
...
@@ -77,28 +95,28 @@ export struct AboutPageUI {
})
}.divider({
strokeWidth: 1,
startMargin: '29lpx',
endMargin: '29lpx',
startMargin: `${this.calcHeight(29)}lpx`,
endMargin: `${this.calcHeight(29)}lpx`,
color: '#EDEDED'
})
Blank()
Image($r('app.media.about_us_code'))
.width('192lpx')
.height('192lpx')
.width(`${this.calcHeight(192)}lpx`)
.height(`${this.calcHeight(192)}lpx`)
Text(this.version)
.fontSize(
'25lpx'
)
.fontSize(
`${this.calcHeight(25)}lpx`
)
.textAlign(TextAlign.Center)
.fontColor($r("app.color.color_666666"))
.margin({ bottom:
'31lpx'
})
.margin({ bottom:
`${this.calcHeight(31)}lpx`
})
Text(this.message)
.fontSize(
'19lpx'
)
.fontSize(
`${this.calcHeight(19)}lpx`
)
.textAlign(TextAlign.Center)
.fontColor($r("app.color.color_999999"))
.margin({ bottom:
'35lpx'
})
.margin({ bottom:
`${this.calcHeight(35)}lpx`
})
}
.width('100%')
.height('100%')
...
...
@@ -112,18 +130,30 @@ export struct AboutPageUI {
// 左侧标题
Text(`${item}`)
.fontColor('#666666')
.fontSize(
'31lpx'
)
.fontSize(
`${this.calcHeight(31)}lpx`
)
Image($r('app.media.mine_user_arrow'))
.width('27lpx')
.height('27lpx')
.width(`${this.calcHeight(27)}lpx`)
.height(`${this.calcHeight(27)}lpx`)
.objectFit(ImageFit.Auto)
}
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.SpaceBetween)
.height(
'97lpx'
)
.height(
`${this.calcHeight(97)}lpx`
)
.width('100%')
.padding({ left: '29lpx', right: '29lpx' })
.padding({ left:`${this.calcHeight(29)}lpx`, right: `${this.calcHeight(29)}lpx` })
}
calcHeight(value:number): number{
return value * this.percent
}
calcHeight2(value:number): number{
if(this.percent < 1){
return value * 0.3
}else{
return value * 1
}
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/LiveOperRowListView.ets
View file @
ba47549
...
...
@@ -11,7 +11,6 @@ import {
import router from '@ohos.router';
import { MultiPictureDetailViewModel } from '../../viewmodel/MultiPictureDetailViewModel';
import { LiveLikeComponent } from './LiveLikeComponent';
import { CommentTabComponent, CommentIconComponent, } from '../comment/view/CommentTabComponent';
import { publishCommentModel } from '../comment/model/PublishCommentModel'
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
import { PageRepository } from '../../repository/PageRepository';
...
...
sight_harmony/features/wdComponent/src/main/module.json5
View file @
ba47549
...
...
@@ -8,6 +8,7 @@
"tablet"
,
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
,
"requestPermissions"
:
[
{
...
...
sight_harmony/features/wdDetailPlayApi/src/main/module.json5
View file @
ba47549
...
...
@@ -8,6 +8,7 @@
"tablet"
,
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
,
"requestPermissions"
:
[
{
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayLiveCommon.ets
View file @
ba47549
...
...
@@ -36,6 +36,8 @@ export struct DetailPlayLiveCommon {
@Provide pageBackPress: number = -1
@Provide contentDetailData: ContentDetailDTO = {} as ContentDetailDTO
@Provide publishCommentModel: publishCommentModel = new publishCommentModel()
@Provide pageId: string = TrackConstants.PageName.Live_Detail
@Provide pageName: string = TrackConstants.PageName.Live_Detail
// 横屏或竖屏 general-竖屏,news-横屏
@State liveLandscape: string = ''
@State isLoading: boolean = false
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayLivePage.ets
View file @
ba47549
...
...
@@ -9,7 +9,7 @@ import { router, window } from '@kit.ArkUI';
import { WDAliPlayerController } from 'wdPlayer/Index';
import { LiveOperRowListView } from 'wdComponent';
import { publishCommentModel } from 'wdComponent/src/main/ets/components/comment/model/PublishCommentModel';
import { TrackConstants, TrackingContent } from 'wdTracking/Index';
import { TrackConstants, TrackingContent
, TrackParamConvert
} from 'wdTracking/Index';
let TAG: string = 'DetailPlayLivePage';
...
...
@@ -98,12 +98,9 @@ export struct DetailPlayLivePage {
this.lastInputedChatComment = result
}
// 发布评论埋点
TrackingContent.commentClick(TrackConstants.PageName.DynamicDetail, TrackConstants.PageName.DynamicDetail,
{
'contentType': `${this.contentDetailData.newsType}`,
'contentId': `${this.contentDetailData.newsId}`,
'contentName': `${this.contentDetailData.newsTitle || ''}`,
});
TrackingContent.commentClick(TrackConstants.PageName.Live_Detail,
TrackConstants.PageName.Live_Detail,
TrackParamConvert.contentDetail(this.contentDetailData));
})
}
}
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerCommentComponent.ets
View file @
ba47549
...
...
@@ -11,7 +11,7 @@ import { ChartItemCompereComponent } from './ChartItemCompereComponent'
import { ChatItemComponent } from './ChartItemComponent'
import { router } from '@kit.ArkUI'
import { EmitterEventId, EmitterUtils, Logger, SPHelper, WindowModel } from 'wdKit/Index'
import { TrackConstants, TrackingContent } from 'wdTracking/Index'
import { TrackConstants, TrackingContent
, TrackParamConvert
} from 'wdTracking/Index'
const TAG = "PlayerCommentComponent"
/**
...
...
@@ -120,12 +120,9 @@ export struct PlayerCommentComponent {
})
// 发布评论埋点
TrackingContent.commentClick(TrackConstants.PageName.DynamicDetail, TrackConstants.PageName.DynamicDetail,
{
'contentType': `${this.contentDetailData.newsType}`,
'contentId': `${this.contentDetailData.newsId}`,
'contentName': `${this.contentDetailData.newsTitle || ''}`,
});
TrackingContent.commentClick(TrackConstants.PageName.Live_Detail,
TrackConstants.PageName.Live_Detail,
TrackParamConvert.contentDetail(this.contentDetailData));
}
},
onBack: () => {
...
...
sight_harmony/features/wdDetailPlayLive/src/main/module.json5
View file @
ba47549
...
...
@@ -8,6 +8,7 @@
"tablet"
,
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
,
"pages"
:
"$profile:main_pages"
,
"requestPermissions"
:
[
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailPlayShortVideoPage.ets
View file @
ba47549
...
...
@@ -212,13 +212,13 @@ export struct DetailPlayShortVideoPage {
let width = rect.width
let height = rect.height
if (this.displayDirection === DisplayDirection.VERTICAL) {
//
if (this.displayDirection === DisplayDirection.VERTICAL) {
width = rect.width
height = rect.height
} else {
width = rect.height
height = rect.width
}
// } else {
// width = rect.height
// height = rect.width
// }
// 视频宽高比屏幕大,则宽度撑满
if (this.ratio > width / height) {
this.playerWidth = '100%'
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailVideoListPage.ets
View file @
ba47549
...
...
@@ -31,6 +31,8 @@ export struct DetailVideoListPage {
@Provide switchVideoStatus: boolean = true
@Provide displayDirection: DisplayDirection = DisplayDirection.VERTICAL
@Provide showCommentList: boolean = false
@Provide pageName: string = TrackConstants.PageName.VideoDetail
@Provide pageId: string = TrackConstants.PageName.VideoDetail
@State data: ContentDetailDTO[] = []
@State currentIndex: number = 0
@State netStatus: number | undefined = undefined // 存储网络状态用来展示缺省图
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/VideoChannelDetail.ets
View file @
ba47549
...
...
@@ -30,7 +30,8 @@ const storage = LocalStorage.getShared();
@Component
export struct VideoChannelDetail {
private groupId: string = '' // 楼层id
private pageId: string = '' //页面id
@Provide private pageId: string = '' //页面id
@Provide private pageName: string = ''
private pageNum: number = 1
private pageSize: number = 5
private loadStrategy: string = 'first_load' // 首次加载: first_load, 上推刷新: push_up, 下拉刷新: pull_down
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/module.json5
View file @
ba47549
...
...
@@ -8,6 +8,7 @@
"tablet"
,
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
,
"pages"
:
"$profile:main_pages"
}
...
...
sight_harmony/features/wdDetailPlayVod/src/main/module.json5
View file @
ba47549
...
...
@@ -8,6 +8,7 @@
"tablet"
,
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
,
"pages"
:
"$profile:main_pages"
}
...
...
sight_harmony/features/wdHwAbility/src/main/module.json5
View file @
ba47549
...
...
@@ -8,6 +8,7 @@
"tablet"
,
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
,
"pages"
:
"$profile:main_pages"
,
"requestPermissions"
:
[
...
...
sight_harmony/features/wdLayout/src/main/module.json5
View file @
ba47549
...
...
@@ -8,6 +8,7 @@
"tablet"
,
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdLogin/src/main/module.json5
View file @
ba47549
...
...
@@ -8,6 +8,7 @@
"tablet"
,
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
,
"pages"
:
"$profile:main_pages"
}
...
...
sight_harmony/features/wdPlayer/src/main/module.json5
View file @
ba47549
...
...
@@ -8,6 +8,7 @@
"tablet"
,
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
,
"pages"
:
"$profile:main_pages"
,
...
...
sight_harmony/features/wdShare/src/main/module.json5
View file @
ba47549
...
...
@@ -8,6 +8,7 @@
"tablet"
,
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
,
"pages"
:
"$profile:main_pages"
}
...
...
sight_harmony/features/wdTracking/src/main/module.json5
View file @
ba47549
...
...
@@ -8,6 +8,7 @@
"tablet"
,
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
,
"pages"
:
"$profile:main_pages"
}
...
...
sight_harmony/products/phone/src/main/ets/pages/ImageAndTextDetailPage.ets
View file @
ba47549
...
...
@@ -2,6 +2,7 @@ import { Action } from 'wdBean';
import { ImageAndTextPageComponent } from 'wdComponent'
import { Logger } from 'wdKit'
import router from '@ohos.router';
import { TrackConstants } from 'wdTracking/Index';
const TAG = 'ImageAndTextDetailPage';
...
...
@@ -10,6 +11,9 @@ const TAG = 'ImageAndTextDetailPage';
struct ImageAndTextDetailPage {
action: Action = {} as Action
@Provide pageName: string = TrackConstants.PageName.Article_Detail
@Provide pageId: string = TrackConstants.PageName.Article_Detail
build() {
Column() {
ImageAndTextPageComponent({action: this.action})
...
...
sight_harmony/products/phone/src/main/ets/pages/SpacialTopicPage.ets
View file @
ba47549
...
...
@@ -3,6 +3,7 @@ import { SpacialTopicPageComponent } from 'wdComponent'
import { CommonConstants } from 'wdConstant'
import { Logger } from 'wdKit'
import router from '@ohos.router';
import { TrackConstants } from 'wdTracking/Index';
const TAG = 'SpacialTopicPage';
...
...
@@ -12,6 +13,10 @@ struct SpacialTopicPage {
@State action: Action = {} as Action
@State reload: number = 0
@State count: number = 0
@Provide pageName: string = TrackConstants.PageName.Summary_Detail
@Provide pageId: string = TrackConstants.PageName.Summary_Detail
build() {
Column() {
SpacialTopicPageComponent({ action: this.action ,reload:this.reload })
...
...
sight_harmony/products/phone/src/main/ets/pages/detail/AudioDetail.ets
View file @
ba47549
...
...
@@ -2,6 +2,8 @@ import { Logger } from 'wdKit';
import { AudioDetailComponent } from 'wdComponent';
import router from '@ohos.router';
import { Params, Action } from 'wdBean';
import { TrackConstants } from 'wdTracking/Index';
const TAG = 'AudioDetail';
@Entry
@Component
...
...
@@ -11,6 +13,9 @@ struct AudioDetail {
@State contentId: string = ''
@State relType: string = ''
@Provide pageId: string = TrackConstants.PageName.Audio_Detail
@Provide pageName: string = TrackConstants.PageName.Audio_Detail
build() {
Column() {
AudioDetailComponent({
...
...
sight_harmony/products/phone/src/main/ets/pages/detail/DynamicDetailPage.ets
View file @
ba47549
...
...
@@ -13,6 +13,9 @@ struct DynamicDetailPage {
@State contentId: string = ''
@State relType: string = ''
@Provide pageName: string = TrackConstants.PageName.DynamicDetail
@Provide pageId: string = TrackConstants.PageName.DynamicDetail
build() {
Column() {
DynamicDetailComponent({
...
...
sight_harmony/products/phone/src/main/ets/pages/detail/MultiPictureDetailPage.ets
View file @
ba47549
...
...
@@ -19,6 +19,8 @@ struct MultiPictureDetailPage {
@State relType: string = ''
pageShowTime:number = 0;
pageHideTime:number = 0;
@Provide pageId: string = TrackConstants.PageName.Atlas_Detail
@Provide pageName: string = TrackConstants.PageName.Atlas_Detail
build() {
Row() {
...
...
sight_harmony/products/phone/src/main/ets/pages/view/VideoChannelPage.ets
View file @
ba47549
...
...
@@ -167,6 +167,7 @@ export struct VideoChannelPage {
topNavIndex: $currentTopNavSelectedIndex,
groupId: this.groupId + '',
pageId: item.pageId + '',
pageName: item.name + '',
channelId: item.channelId + '',
autoRefresh: this.autoRefresh,
})
...
...
sight_harmony/products/phone/src/main/module.json5
View file @
ba47549
...
...
@@ -9,6 +9,7 @@
"tablet"
,
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
,
"installationFree"
:
false
,
"pages"
:
"$profile:main_pages"
,
...
...
Please
register
or
login
to post a comment