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-22 19:39:50 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
cb85bedc11532f5ac0110b65d4b4a0b6e6f98695
cb85bedc
2 parents
3dd9d069
6c13639a
Merge branch 'main' of
http://192.168.1.42/developOne/harmonyPool
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
197 additions
and
25 deletions
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardMediaInfo.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhCarouselLayout01.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/message/MessageListUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/EditUserInfoPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/MyCollectionListPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/TopNavigationComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/search/FirstTabTopSearchComponent.ets
sight_harmony/features/wdComponent/src/main/ets/pages/MineHomePage.ets
sight_harmony/features/wdComponent/src/main/ets/pages/MineMessagePage.ets
sight_harmony/features/wdComponent/src/main/ets/utils/InsightIntentShare.ets
sight_harmony/features/wdComponent/src/main/ets/utils/TrackingPageBrowseUtils.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayLiveCommon.ets
sight_harmony/features/wdTracking/src/main/ets/common/TrackParamConvert.ets
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchAdvertisingPage.ets
sight_harmony/products/phone/src/main/ets/pages/view/VideoChannelPage.ets
sight_harmony/products/phone/src/main/ets/pages/viewModel/LaunchDataModel.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardMediaInfo.ets
View file @
cb85bed
...
...
@@ -130,8 +130,10 @@ export struct CardMediaInfo {
Image($r('app.media.card_image'))
.mediaLogo()
Text(`${this.contentDTO.photoNum}`)
.mediaText()
.mediaText
Imgtype
()
}
.margin({ left: 80,top: 55})
} else if (this.contentDTO.objectType === '13') {
// 显示音频信息
Row() {
...
...
@@ -161,8 +163,17 @@ export struct CardMediaInfo {
.height(14)
.margin({ right: 3 })
}
@Styles
mediaLogo2() {
.width(14)
.height(14)
.margin({ top:5,right:5 })
}
}
@Extend(Text)
function mediaText() {
.fontColor($r('app.color.color_fff'))
...
...
@@ -173,4 +184,15 @@ function mediaText() {
color: 'rgba(0,0,0,0.3)',
offsetY: 2
})
}
\ No newline at end of file
}
@Extend(Text)
function mediaTextImgtype() {
.fontColor($r('app.color.color_fff'))
.fontSize($r('app.float.font_size_13'))
.lineHeight(18)
.textShadow({
radius: 2,
color: 'rgba(0,0,0,0.3)',
offsetY: 2
})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhCarouselLayout01.ets
View file @
cb85bed
...
...
@@ -202,7 +202,7 @@ struct CarouselLayout01CardView {
Blank()
// 文本信息
Stack() {
if (this.item.objectType == '5') {
if (this.item.objectType == '5'
|| this.item.objectType == '6'
) {
Notes({ objectType: this.item.objectType })
}
Text(`${this.item.corner}${this.item.newsTitle}`)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/message/MessageListUI.ets
View file @
cb85bed
...
...
@@ -6,6 +6,8 @@ import { MessageItem } from '../../../viewmodel/MessageItem'
import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh'
import { CustomTitleUI } from '../../reusable/CustomTitleUI'
import { MessageListItemUI } from './MessageListItemUI'
import {TrackingButton,TrackConstants}from 'wdTracking/Index'
import TrackingPageBrowseUtils from '../../../utils/TrackingPageBrowseUtils'
const TAG = "MessageListUI"
...
...
@@ -185,6 +187,7 @@ export struct MessageListUI {
}
.padding({ left: "31lpx", right: "31lpx" })
.onClick(() => {
this.messageCenterCommonButtonTracking(index)
switch (index) {
case 0: //互动消息
if(item.unReadCount > 0){
...
...
@@ -210,6 +213,25 @@ export struct MessageListUI {
}
}
messageCenterCommonButtonTracking(index:number){
let buttonName:string = ''
switch (index) {
case 0: //互动消息
buttonName = 'myNotificationPageInteractiveMessage'
break;
case 1: //预约消息
buttonName = 'myNotificationPageAppointmentMessage'
break;
case 2: //历史推送
buttonName = 'myNotificationPageHistoricalPush'
break;
case 3: //系统消息
buttonName = 'myNotificationPageSystemMessage'
break;
}
TrackingButton.click(buttonName,TrackConstants.PageName.My_Notification,TrackConstants.PageName.My_Notification)
}
sendEnterEvent(type:number){
MinePageDatasModel.sendEnterMessageData(type).then((value) => {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/EditUserInfoPage.ets
View file @
cb85bed
...
...
@@ -6,6 +6,8 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter';
import {AreaPickerDialog} from '../view/areaPickerDialog/AreaPickerDialog'
import { AreaListModel } from '../../model/AreaListModel';
import router from '@ohos.router';
import TrackingPageBrowseUtils from '../../utils/TrackingPageBrowseUtils'
import { TrackConstants } from 'wdTracking/Index';
@Entry
@Component
...
...
@@ -37,6 +39,11 @@ struct EditUserInfoPage {
onPageShow(){
this.updateUserNameAndIntroduction()
TrackingPageBrowseUtils.TrackingPageBrowseExposureStart()
}
onPageHide(): void {
TrackingPageBrowseUtils.TrackingPageBrowseExposureEnd(TrackConstants.PageName.Edit_Information,TrackConstants.PageName.Edit_Information)
}
build() {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/MyCollectionListPage.ets
View file @
cb85bed
...
...
@@ -13,6 +13,8 @@ import { contentListItemParams } from '../../model/MyCollectionModel';
import { CustomPullToRefresh } from '../reusable/CustomPullToRefresh';
import { MyCustomDialog } from '../reusable/MyCustomDialog'
import { NetworkUtil } from 'wdKit/Index';
import TrackingPageBrowseUtils from '../../utils/TrackingPageBrowseUtils'
import { TrackConstants } from 'wdTracking/Index';
@Entry
@Component
...
...
@@ -45,6 +47,15 @@ struct MyCollectionListPage {
aboutToAppear(){
this.getData()
}
onPageShow(){
TrackingPageBrowseUtils.TrackingPageBrowseExposureStart()
}
onPageHide(): void {
TrackingPageBrowseUtils.TrackingPageBrowseExposureEnd(TrackConstants.PageName.My_Collect,TrackConstants.PageName.My_Collect)
}
build() {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/TopNavigationComponent.ets
View file @
cb85bed
...
...
@@ -8,6 +8,7 @@ import { FirstTabTopSearchComponent } from '../search/FirstTabTopSearchComponent
import { AssignChannelParam } from 'wdRouter/src/main/ets/utils/HomeChannelUtils';
import { PeopleShipMainComponent } from '../peopleShip/PeopleShipMainComponent';
import { channelSkeleton } from '../skeleton/channelSkeleton';
import { TrackingButton, TrackConstants } from 'wdTracking/Index';
const TAG = 'TopNavigationComponent';
...
...
@@ -367,6 +368,7 @@ export struct TopNavigationComponent {
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.Center)
.onClick(() => {
TrackingButton.click("", TrackConstants.PageName.Search, "PEOPLE")
WDRouterRule.jumpWithPage(WDRouterPage.searchPage)
})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/search/FirstTabTopSearchComponent.ets
View file @
cb85bed
...
...
@@ -6,6 +6,7 @@
*/
import { SPHelper } from 'wdKit/Index'
import { WDRouterPage, WDRouterRule } from 'wdRouter'
import { TrackingButton, TrackConstants } from 'wdTracking/Index'
import DailyPaperTopicModel from '../../model/DailyPaperTopicModel'
import SearcherAboutDataModel from '../../model/SearcherAboutDataModel'
...
...
@@ -77,6 +78,7 @@ export struct FirstTabTopSearchComponent {
.backgroundImage($r('app.media.background_search'))
.backgroundImageSize(ImageSize.Cover)
.onClick(() => {
TrackingButton.click("", TrackConstants.PageName.Search, "NEWS")
WDRouterRule.jumpWithPage(WDRouterPage.searchPage)
})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/pages/MineHomePage.ets
View file @
cb85bed
...
...
@@ -7,7 +7,7 @@ import { HomePageBottomFollowComponent } from '../components/mine/home/HomePageB
import MinePageDatasModel from '../model/MinePageDatasModel';
import { EmptyComponent } from '../components/view/EmptyComponent';
import { CustomTitleUI } from '../components/reusable/CustomTitleUI';
import { TrackingPageBrowse, TrackConstants } from 'wdTracking/Index';
import { TrackingPageBrowse, TrackConstants
, TrackingButton
} from 'wdTracking/Index';
const TAG = "MineHomePage"
...
...
@@ -454,6 +454,9 @@ struct MineHomePage {
}, 1000);
//route 跳转写这里 TODO
WDRouterRule.jumpWithPage(WDRouterPage.editUserInfoPage)
//编辑资料只有个人主页
TrackingButton.click('mainPersonalHomePageEditorialMaterial',TrackConstants.PageName.Main_Personal,TrackConstants.PageName.Main_Personal)
}
}
getUserInfo(){
...
...
sight_harmony/features/wdComponent/src/main/ets/pages/MineMessagePage.ets
View file @
cb85bed
import { MessageListUI } from '../components/mine/message/MessageListUI';
import {TrackConstants}from 'wdTracking/Index'
import TrackingPageBrowseUtils from '../utils/TrackingPageBrowseUtils'
@Entry
@Component
struct MineMessagePage {
onPageShow(): void {
TrackingPageBrowseUtils.TrackingPageBrowseExposureStart()
}
onPageHide(): void {
TrackingPageBrowseUtils.TrackingPageBrowseExposureEnd(TrackConstants.PageName.My_Notification,TrackConstants.PageName.My_Notification)
}
build() {
Column(){
MessageListUI()
...
...
sight_harmony/features/wdComponent/src/main/ets/utils/InsightIntentShare.ets
View file @
cb85bed
...
...
@@ -34,8 +34,7 @@ export function viewBlogInsightIntentShare(context: common.UIAbilityContext, ent
intentVersion: '1.0.1',
identifier,
intentActionInfo: {
actionMode,
currentPercentage: 50,
actionMode
//目前不考虑发生时段
// executedTimeSlots: {
// executedEndTime: new Date().getTime(),
...
...
@@ -91,8 +90,7 @@ export function viewBlogItemInsightIntentShare(context: common.UIAbilityContext,
intentVersion: '1.0.1',
identifier,
intentActionInfo: {
actionMode: ActionMode.EXECUTED,
currentPercentage: 50,
actionMode: ActionMode.EXECUTED
},
intentEntityInfo: {
entityName: 'Blog',
...
...
@@ -138,8 +136,7 @@ export function viewColumInsightIntentShare(context: common.UIAbilityContext, en
intentVersion: '1.0.1',
identifier: generateUUID(),
intentActionInfo: {
actionMode: ActionMode.EXECUTED,
currentPercentage: 50,
actionMode: ActionMode.EXECUTED
},
intentEntityInfo: {
entityName: 'Column',
...
...
sight_harmony/features/wdComponent/src/main/ets/utils/TrackingPageBrowseUtils.ets
0 → 100644
View file @
cb85bed
import { DateTimeUtils } from 'wdKit/Index';
import { ParamType, TrackingPageBrowse } from 'wdTracking/Index';
class TrackingPageBrowseUtils {
private static instance: TrackingPageBrowseUtils
pageShowTime:number = 0;
pageHideTime:number = 0;
/**
* 单例模式
* @returns
*/
public static getInstance(): TrackingPageBrowseUtils {
if (!TrackingPageBrowseUtils.instance) {
TrackingPageBrowseUtils.instance = new TrackingPageBrowseUtils();
}
return TrackingPageBrowseUtils.instance;
}
TrackingPageBrowseExposureStart(){
this.pageShowTime = DateTimeUtils.getTimeStamp()
}
TrackingPageBrowseExposureEnd(pageId: string, pageName: string,extParams?: ParamType){
this.pageHideTime = DateTimeUtils.getTimeStamp()
let duration = 0
duration = Math.floor((this.pageHideTime - this.pageShowTime)/1000)
TrackingPageBrowse.trackCommonPageExposureEnd(pageId,pageName,duration,extParams)
}
}
const pageBrowseUtils = TrackingPageBrowseUtils.getInstance();
export default pageBrowseUtils as TrackingPageBrowseUtils
\ No newline at end of file
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayLiveCommon.ets
View file @
cb85bed
...
...
@@ -33,8 +33,8 @@ export struct DetailPlayLiveCommon {
this.relId = params?.extra?.relId || '';
this.relType = params?.extra?.relType || '';
this.contentId = params?.contentID || '';
await this.getContentDetail()
this.getLiveDetails()
this.getContentDetail()
}
build() {
...
...
@@ -55,8 +55,8 @@ export struct DetailPlayLiveCommon {
/**
* 查询视频详情用于评论展示
*/
async getContentDetail() {
await this.liveViewModel.getContentDetail(this.contentId, this.relId, this.relType)
getContentDetail() {
this.liveViewModel.getContentDetail(this.contentId, this.relId, this.relType)
.then((data: Array<ContentDetailDTO>) => {
console.log(TAG, '查询视频详情用于评论展示 getContentDetail:', JSON.stringify(data))
if (data) {
...
...
@@ -72,6 +72,8 @@ export struct DetailPlayLiveCommon {
this.publishCommentModel.targetType = String(this.contentDetailData?.newsType || '')
this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment || '')
this.publishCommentModel.commentContent = ''
this.getLiveDetails()
// }
}
})
...
...
sight_harmony/features/wdTracking/src/main/ets/common/TrackParamConvert.ets
View file @
cb85bed
import { CompInfoBean, ContentDetailDTO, ContentDTO, PageInfoDTO } from 'wdBean/Index';
import { CompInfoBean, ContentDetailDTO, ContentDTO, PageInfo
Bean, PageInfo
DTO } from 'wdBean/Index';
import { ParamType } from './PublicParams';
import { TrackConstants } from './TrackConstants';
import { TrackingUtils } from './TrackingUtils';
export class TrackParamConvert {
...
...
@@ -70,7 +71,7 @@ export class TrackParamConvert {
return param
}
private static appendRecommend(detail:
ContentDetailDTO
, to: ParamType) {
private static appendRecommend(detail:
object
, to: ParamType) {
//TODO: ContentDetailDTO 增加推荐字段
...
...
@@ -85,4 +86,42 @@ export class TrackParamConvert {
/// 这里填写默认值,后续在action=browse时,再重写
to["duration"] = 0
}
///早晚报 专题
static pageInfoBean_ParamType(pageInfo: PageInfoBean) : ParamType {
let topTypeString: string = '';
switch (pageInfo.topicInfo.topicType){
case 21:
topTypeString = TrackConstants.SummaryType.Article
break;
case 22:
topTypeString = TrackConstants.SummaryType.Audio
break;
case 23:
topTypeString = TrackConstants.SummaryType.Live
break;
case 24:
topTypeString = TrackConstants.SummaryType.Talk
break;
case 25:
topTypeString = TrackConstants.SummaryType.MorningAndEveningNews
break;
case 26:
topTypeString = TrackConstants.SummaryType.TimeAxis
break;
}
let param: ParamType = {
"summaryId": pageInfo.topicInfo.topicId,
"summaryType": topTypeString,
"specialLink": pageInfo.topicInfo.shareUrl,
"channelSourceId": pageInfo.name,
"pageId": 'summaryDetailPage',
}
TrackParamConvert.appendRecommend(pageInfo, param)
return param
}
}
\ No newline at end of file
...
...
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchAdvertisingPage.ets
View file @
cb85bed
...
...
@@ -4,12 +4,8 @@ import { WDRouterPage } from 'wdRouter';
import { Logger, SPHelper } from 'wdKit/Index';
import { SpConstants } from 'wdConstant/Index';
import LaunchDataModel from '../viewModel/LaunchDataModel'
import { LaunchModel } from '../viewModel/LaunchModel';
import { ifaa } from '@kit.OnlineAuthenticationKit';
import common from '@ohos.app.ability.common';
import Want from '@ohos.app.ability.Want';
import { BusinessError } from '@ohos.base';
import { ParamType, TrackConstants, TrackingButton, TrackingContent } from 'wdTracking/Index';
@Entry
...
...
@@ -18,6 +14,7 @@ struct LaunchAdvertisingPage {
@State time: number = 4
timer :number = -1
@State model : LaunchDataModel = {} as LaunchDataModel
pageParam: ParamType = {}
enter() {
...
...
@@ -29,7 +26,6 @@ struct LaunchAdvertisingPage {
}
aboutToAppear(): void {
let dataModelStr : string = SPHelper.default.getSync(SpConstants.APP_LAUNCH_PAGE_DATA_MODEL,'') as string
let dataModel : LaunchDataModel = JSON.parse(dataModelStr)
this.model = dataModel
...
...
@@ -38,7 +34,9 @@ struct LaunchAdvertisingPage {
//设置倒计时时间
this.time = this.model.launchAdInfo[0].displayDuration
}
this.contentTrackingDict()
this.trackingLaunchShow()
}
...
...
@@ -96,6 +94,7 @@ struct LaunchAdvertisingPage {
.backgroundColor('#80000000')
.onClick(() => {
this.enter()
this.trackingLaunchJumpOver()
})
}
.width('100%')
...
...
@@ -176,13 +175,15 @@ struct LaunchAdvertisingPage {
action(){
//跳转 url linkUrl https://news.bjd.com.cn/2024/03/19/10724331.shtml
// openType 端外 端内 打开
///埋点
this.trackingLaunchClick()
if(this.model.launchAdInfo.length){
if (this.model.launchAdInfo[0].matInfo.openType == '2') {
//端外打开
ProcessUtils.jumpExternalWebPage(this.model.launchAdInfo[0].matInfo.linkUrl)
//clearInterval(this.timer)
}else {
//端内打开
ProcessUtils.gotoDefaultWebPage(this.model.launchAdInfo[0].matInfo.linkUrl)
...
...
@@ -192,6 +193,25 @@ struct LaunchAdvertisingPage {
}
}
contentTrackingDict(){
this.pageParam = {
'adType':'0',
'adId':this.model.launchAdInfo[0].matInfo.id.toString(),
'adName':this.model.launchAdInfo[0].matInfo.advTitle,
'regionName':'0'
}
}
trackingLaunchJumpOver(){
TrackingButton.click('skip_click',TrackConstants.PageName.Open_Screen,TrackConstants.PageName.Open_Screen)
}
trackingLaunchShow(){
TrackingContent.common(TrackConstants.EventType.Show,TrackConstants.PageName.Open_Screen,TrackConstants.PageName.Open_Screen,this.pageParam)
}
trackingLaunchClick(){
TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.PageName.Open_Screen,TrackConstants.PageName.Open_Screen,this.pageParam)
}
}
\ No newline at end of file
...
...
sight_harmony/products/phone/src/main/ets/pages/view/VideoChannelPage.ets
View file @
cb85bed
...
...
@@ -7,6 +7,7 @@ import { VideoChannelDetail } from 'wdDetailPlayShortVideo/Index';
import { WDRouterPage, WDRouterRule } from 'wdRouter';
import { DisplayDirection } from 'wdConstant/Index';
import { PageComponent } from 'wdComponent/Index';
import { TrackingButton, TrackConstants } from 'wdTracking/Index';
const TAG = 'VideoChannelPage'
...
...
@@ -124,6 +125,7 @@ export struct VideoChannelPage {
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.Center)
.onClick(() => {
TrackingButton.click("", TrackConstants.PageName.Search, "VIDEOS")
WDRouterRule.jumpWithPage(WDRouterPage.searchPage)
})
.backgroundColor(Color.Transparent)
...
...
sight_harmony/products/phone/src/main/ets/pages/viewModel/LaunchDataModel.ets
View file @
cb85bed
...
...
@@ -26,6 +26,7 @@ export interface NetLayerLauncherADMaterialModel{
matType : string //1 video 其他 image
startStyle : number // 1 WDDisplayStyle_Full 全屏样式 其他 WDDisplayStyle_Logo 底部logo样式
advTitle : string
id:number
matImageUrl : string[] //取firstObject
matVideoUrl : string
...
...
Please
register
or
login
to post a comment