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-17 19:44:41 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
edd05b6efe09c0fbf83a598c27e53798546e88c3
edd05b6e
2 parents
2b52b895
5e8cf547
Merge branch 'main' of
http://192.168.1.42/developOne/harmonyPool
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
229 additions
and
149 deletions
sight_harmony/commons/wdWebComponent/src/main/ets/pages/WdWebLocalComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/SpacialTopicPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhCarouselLayout01.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhGridLayout02NewsContent.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow02.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow03.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/ChildCommentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/HomePageBottomCommentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/OtherHomePageBottomCommentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/ChannelSubscriptionLayout.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/TopNavigationComponentNew.ets
sight_harmony/features/wdComponent/src/main/ets/components/peopleShipHomePage/PeopleShipHomeNavComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/HorizontalStrokeCardThreeTwoRadioForMoreComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/LiveHorizontalCardComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerTitleComponent.ets
sight_harmony/features/wdLogin/src/main/ets/pages/login/LoginProtocolWebview.ets
sight_harmony/features/wdLogin/src/main/ets/pages/login/OneKeyLoginPage.ets
sight_harmony/features/wdTracking/src/main/ets/common/PublicParams.ets
sight_harmony/products/phone/src/main/ets/pages/view/MultiPictureDetailPageComponent.ets
sight_harmony/commons/wdWebComponent/src/main/ets/pages/WdWebLocalComponent.ets
View file @
edd05b6
...
...
@@ -60,12 +60,14 @@ export struct WdWebLocalComponent {
.imageAccess(true)
.mixedMode(MixedMode.All)
.onlineImageAccess(true)
.enableNativeEmbedMode(true)
.layoutMode(WebLayoutMode.FIT_CONTENT)
// .enableNativeEmbedMode(true)
// .layoutMode(WebLayoutMode.FIT_CONTENT)
.nestedScroll({
scrollForward: NestedScrollMode.SELF_FIRST,
scrollBackward: NestedScrollMode.PARENT_FIRST
})// .height(this.webHeight)
})
.width('100%')
.height(this.webHeight)
.onPageBegin((event) => {
this.onPageBegin(event?.url);
})
...
...
sight_harmony/features/wdComponent/src/main/ets/components/SpacialTopicPageComponent.ets
View file @
edd05b6
...
...
@@ -14,6 +14,7 @@ import { viewBlogItemInsightIntentShare } from '../utils/InsightIntentShare'
import { common } from '@kit.AbilityKit';
import { PageRepository } from '../repository/PageRepository';
import { CommentDialogView } from './CommentDialogView';
import { faceDetector } from '@kit.CoreVisionKit';
const TAG: string = 'SpacialTopicPageComponent'
...
...
@@ -40,7 +41,7 @@ export struct SpacialTopicPageComponent {
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
@State isNetConnected: boolean = true
@Provide topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State showComment: boolean = false
private trySendData2H5() {
if (!this.webPrepared || !this.dataPrepared) {
return
...
...
@@ -211,7 +212,7 @@ export struct SpacialTopicPageComponent {
showCommentList: $showCommentList,
publishCommentModel: $publishCommentModel,
interactData: $interactData,
})
})
.visibility(this.showComment?Visibility.Visible:Visibility.Hidden)
}
}.width(CommonConstants.FULL_WIDTH).height(CommonConstants.FULL_HEIGHT)
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhCarouselLayout01.ets
View file @
edd05b6
...
...
@@ -8,6 +8,7 @@ import { CardMediaInfo } from '../cardCommon/CardMediaInfo';
import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
import { Notes } from '../cardview/notes';
import { InfomationCardClick } from '../../utils/infomationCardClick'
import font from '@ohos.font';
const TAG = 'Zh_Carousel_Layout-01';
...
...
@@ -67,6 +68,11 @@ export struct ZhCarouselLayout01 {
list.push(i);
}
this.data = new MyDataSource(list)
font.registerFont({
familyName: 'BebasNeue',
familySrc: $rawfile('font/BebasNeue.ttf')
})
}
isAutoPlay() {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhGridLayout02NewsContent.ets
View file @
edd05b6
...
...
@@ -45,7 +45,7 @@ export struct ZhGridLayout02NewsContent {
buildItemCard(item: ContentDTO, index: number) {
Column() {
Stack({ alignContent: Alignment.BottomEnd }) {
Image(this.loadImg ? item == undefined ? '' : item.fullColumnImgUrls
[0]
.url : '')
Image(this.loadImg ? item == undefined ? '' : item.fullColumnImgUrls
?.[0]?
.url : '')
.backgroundColor(0xf5f5f5)
.width('100%')
// .height(95)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow02.ets
View file @
edd05b6
...
...
@@ -19,8 +19,8 @@ export struct ZhSingleRow02 {
@State pageId: string = '';
@State pageName: string = '';
@State compDTO: CompDTO = {} as CompDTO
@State initMoreWidth: number = 16;
@State moreWidth:number = 16
@State initMoreWidth: number = 22;
@State moreWidth:number = 22
@State moreTips: string = ''
scroller: Scroller = new Scroller()
...
...
@@ -53,7 +53,7 @@ export struct ZhSingleRow02 {
resetEdgeAnimation() {
if (this.moreWidth > this.initMoreWidth) {
this.moreWidth =
16
this.moreWidth =
22
}
this.resetMoreTips()
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow03.ets
View file @
edd05b6
...
...
@@ -43,8 +43,8 @@ export struct ZhSingleRow03 {
// @State reserveStatus: reserveItem[] = []
@State reservedIds: string[] = [];
@State loadImg: boolean = false;
@State initMoreWidth: number = 16;
@State moreWidth:number = 16
@State initMoreWidth: number = 22;
@State moreWidth:number = 22
@State moreTips: string = ''
scroller: Scroller = new Scroller()
...
...
@@ -78,7 +78,7 @@ export struct ZhSingleRow03 {
resetEdgeAnimation() {
if (this.moreWidth > this.initMoreWidth) {
this.moreWidth =
16
this.moreWidth =
22
}
this.resetMoreTips()
}
...
...
@@ -260,7 +260,7 @@ export struct ZhSingleRow03 {
.fontSize(12)
.textAlign(TextAlign.Start)
.fontFamily('PingFang SC-Semibold')
.fontWeight(
6
00)
.fontWeight(
5
00)
Image($r('app.media.timeline_rect'))
.width(4)
.height(3)
...
...
@@ -270,7 +270,7 @@ export struct ZhSingleRow03 {
.fontColor(0x000000)
.fontSize(12)
.fontFamily('PingFang SC-Semibold')
.fontWeight(
6
00)
.fontWeight(
5
00)
Text('开始直播')
.fontColor(0xC8C8C8)
.fontSize(12)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/ChildCommentComponent.ets
View file @
edd05b6
...
...
@@ -4,6 +4,8 @@ import MinePageDatasModel from '../../../model/MinePageDatasModel'
import { CommentLikeOperationRequestItem } from '../../../viewmodel/CommentLikeOperationRequestItem'
import { CommentListItem } from '../../../viewmodel/CommentListItem'
import measure from '@ohos.measure'
import { TrackConstants, TrackingContent, TrackParamConvert } from 'wdTracking/Index'
import { ProcessUtils } from 'wdRouter/Index'
@Component
export struct ChildCommentComponent {
...
...
@@ -189,6 +191,11 @@ export struct ChildCommentComponent {
.width('100%')
.height('69lpx')
.justifyContent(FlexAlign.SpaceBetween)
.onClick(()=>{
let content = getParams(this.data)
TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.PageName.Customer_Personal,TrackConstants.PageName.Customer_Personal,TrackParamConvert.program(content))
ProcessUtils.processPage(content)
})
}.height('69lpx')
.justifyContent(FlexAlign.Center)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/HomePageBottomCommentComponent.ets
View file @
edd05b6
...
...
@@ -90,12 +90,12 @@ export struct HomePageBottomCommentComponent {
isLastItem: index === this.data_comment.totalCount() - 1
})
}
.onClick(()=>{
let content = getParams(item)
TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.PageName.Main_Personal,TrackConstants.PageName.Main_Personal,TrackParamConvert.program(content))
content.customParamTargetLayout = "comment"
ProcessUtils.processPage(content)
})
// .onClick(()=>{
// let content = getParams(item)
// TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.PageName.Main_Personal,TrackConstants.PageName.Main_Personal,TrackParamConvert.program(content))
// content.customParamTargetLayout = "comment"
// ProcessUtils.processPage(content)
// })
.onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => {
if (isVisible) {
let contentDTO = getParams(item)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/OtherHomePageBottomCommentComponent.ets
View file @
edd05b6
...
...
@@ -91,11 +91,7 @@ export struct OtherHomePageBottomCommentComponent {
isLastItem: index === this.data_comment.totalCount() - 1,
})
}
.onClick(()=>{
let content = getParams(item)
TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.PageName.Customer_Personal,TrackConstants.PageName.Customer_Personal,TrackParamConvert.program(content))
ProcessUtils.processPage(content)
}).onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => {
.onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => {
if (isVisible) {
let contentDTO = getParams(item)
//埋点crash 后面看看
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/ChannelSubscriptionLayout.ets
View file @
edd05b6
...
...
@@ -19,10 +19,15 @@ struct ChannelSubscriptionLayout {
//当前选中的频道
@Link currentTopNavSelectedIndex: number;
@Prop homeChannelList: TopNavDTO []
// 我的频道栏目的频道信息数组
@Link myChannelList: TopNavDTO []
// 更多频道栏目频道信息数组
@Link moreChannelList: TopNavDTO []
// 地方频道栏目频道信息数组
@Link localChannelList: TopNavDTO []
// 收集到的我的频道栏目中的频道id
@State channelIds: number [] = []
@State isShow: boolean = false
@State dragItem: number = -1
private dragRefOffsetX: number = 0
...
...
@@ -33,12 +38,12 @@ struct ChannelSubscriptionLayout {
private FIX_VP_Y: number = 48
@State indexSettingChannelId: number = AppStorage.get<number>('indexSettingChannelId') || 2002
@State isEditIng: boolean = false
@State currentTopNavSelectedItem: TopNavDTO = {} as TopNavDTO
//
@State currentTopNavSelectedItem: TopNavDTO = {} as TopNavDTO
changeTab: (index: number) => void = () => {
}
aboutToAppear() {
this.currentTopNavSelectedItem = this.myChannelList[this.currentTopNavSelectedIndex]
//
this.currentTopNavSelectedItem = this.myChannelList[this.currentTopNavSelectedIndex]
this.myChannelList.forEach(item => {
if(item != undefined && item.channelId != undefined){
this.channelIds.push(item.channelId)
...
...
@@ -57,15 +62,66 @@ struct ChannelSubscriptionLayout {
//删除频道
delChannelItem(index: number) {
let item = this.myChannelList.splice(index, 1)[0]
this.channelIds.splice(index, 1)
AppStorage.setOrCreate('channelIds', JSON.stringify(this.channelIds))
/*
删除的频道信息回到原栏目中去
*/
if (item.moreChannel === '1') {
this.moreChannelList.unshift(item)
}
if (item.localChannel === '1') {
this.localChannelList.unshift(item)
}
// 删除频道的索引值大于 我的栏目中频道最大索引值
if(this.currentTopNavSelectedIndex > this.channelIds.length-1){
//使用默认频道
//缓存首页频道
let index = this.myChannelList.findIndex(_item => _item?.channelId === this.indexSettingChannelId)
console.debug('TopNavigationComponent','index='+index)
if (index > -1) {
this.currentTopNavSelectedIndex = index
}
}else {
//检测删除频道后的当前频道是否是特殊频道
let item = this.myChannelList[this.currentTopNavSelectedIndex]
if(this.isBroadcast(item) || this.isLayout(item)){
this.changeTab(this.currentTopNavSelectedIndex)
this.isShow = false
let index = this.myChannelList.findIndex(_item => _item?.channelId === this.indexSettingChannelId)
console.debug('TopNavigationComponent','index='+index)
if (index > -1) {
this.currentTopNavSelectedIndex = index
this.changeTab(this.currentTopNavSelectedIndex)
}
}
}
}
/**
* 频道是播报
* @param item
* @returns
*/
private isBroadcast(item?: TopNavDTO): boolean {
return item?.channelId === 2066
}
/**
* 频道是电子报
* @param item
* @returns
*/
private isLayout(item?: TopNavDTO): boolean {
return item?.channelId === 2006
}
// 添加频道
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/TopNavigationComponentNew.ets
View file @
edd05b6
...
...
@@ -12,8 +12,6 @@ import { ParamType, TrackConstants, Tracking, TrackingButton } from 'wdTracking/
import DailyPaperTopicModel from '../../model/DailyPaperTopicModel';
import { CompUtils } from '../../utils/CompUtils';
import ChannelViewModel from '../../viewmodel/ChannelViewModel';
import { JSON } from '@kit.ArkTS';
import text from '@ohos.graphics.text';
const TAG = 'TopNavigationComponent';
...
...
@@ -95,7 +93,6 @@ export struct TopNavigationComponentNew {
})
} else {
channelSkeleton()
//Text('特殊频道').fontColor(Color.Red).fontSize(20).width('100%').height('100%')
}
}
})
...
...
@@ -117,17 +114,8 @@ export struct TopNavigationComponentNew {
return
}
if (this.isBroadcastByIndex(index)) {
// 跳转到播报页面
ProcessUtils.gotoBroadcastPage(this.myChannelList[index].pageId)
this.channelJumpToPage(index)
} else if (this.isLayoutByIndex(index)) {
// 跳转到电子报页面
ProcessUtils.gotoENewsPaper()
} else {
this.changePage(index)
}
})
.onAnimationEnd((index: number) => {
Logger.info(TAG, `onAnimationEnd ${index}`);
...
...
@@ -153,6 +141,7 @@ export struct TopNavigationComponentNew {
// 极左极右有特殊频道,用旧值
this.changePage(this.currentTopNavSelectedIndex)
}
} else {
}
})
...
...
@@ -227,7 +216,7 @@ export struct TopNavigationComponentNew {
moreChannelList: $moreChannelList,
localChannelList: $localChannelList,
changeTab: (index) => {
this.chan
ge
Page(index)
this.chan
nelJumpTo
Page(index)
}
})
.id('channelManageBtn')
...
...
@@ -352,23 +341,35 @@ export struct TopNavigationComponentNew {
// 当前tab,单击事件
this.doAutoRefresh()
} else {
if (this.isBroadcastByIndex(index)) {
// 跳转到播报页面
ProcessUtils.gotoBroadcastPage(this.myChannelList[index].pageId)
} else if (this.isLayoutByIndex(index)) {
ProcessUtils.gotoENewsPaper()
} else {
this.changePage(index)
}
this.channelJumpToPage(index)
}
})
}
/**
* 频道信息跳转页面方法
* @param index
*/
private channelJumpToPage(index :number){
if (this.isBroadcastByIndex(index)) {
// 跳转到播报页面
ProcessUtils.gotoBroadcastPage(this.myChannelList[index].pageId)
} else if (this.isLayoutByIndex(index)) {
// 跳转到电子报页面
ProcessUtils.gotoENewsPaper()
} else {
this.changePage(index)
}
}
/**
* 改变频道页
* @param index 频道所在的序列号
*/
private changePage(index: number) {
Logger.info(TAG, `修改页面 changePage index : ${index}`);
this.currentTopNavSelectedIndex = index
this.swiperController.changeIndex(index)
this.listScroller.scrollToIndex(index, true, ScrollAlign.CENTER)
...
...
@@ -521,7 +522,6 @@ export struct TopNavigationComponentNew {
this.topNavListHandle()
this.changePage(this.currentTopNavSelectedIndex)
console.log('XY', '----TopNavigation-------aboutToAppear' + this.navItem.name)
this.getTopNavList(this.navItem.id)
}
...
...
@@ -534,11 +534,9 @@ export struct TopNavigationComponentNew {
*
*/
updateCurrentTopNavSelectedIndex() {
console.debug(TAG, 'updateCurrentTopNavSelectedIndex=>' + this.currentTopNavSelectedIndex)
if (CompUtils.isNews(this.navItem)) {
const tab = this.myChannelList[this.currentTopNavSelectedIndex]
//Logger.info(TAG, `新闻tab埋点: ${JSON.stringify(tab)}`);
// 埋点
const params: ParamType = {
"pageName": tab.name,
...
...
@@ -548,8 +546,6 @@ export struct TopNavigationComponentNew {
Tracking.event("home_page_tab_click", params)
} else if (CompUtils.isRMH(this.navItem)) {
const tab = this.topNavList[this.currentTopNavSelectedIndex]
Logger.info(TAG, `人民号tab埋点: ${JSON.stringify(tab)}`);
// 埋点
const params: ParamType = {
"pageName": tab.name,
...
...
@@ -663,21 +659,6 @@ export struct TopNavigationComponentNew {
return null
}
//
// private startAnimateTo(duration: number, leftMargin: number, width: number) {
// animateTo({
// duration: duration, // 动画时长
// curve: Curve.Linear, // 动画曲线
// iterations: 1, // 播放次数
// playMode: PlayMode.Normal, // 动画模式
// onFinish: () => {
// console.info('play end')
// }
// }, () => {
// this.indicatorLeftMargin = leftMargin
// this.indicatorWidth = width
// })
// }
/**
* 进入早晚报专题
...
...
@@ -701,15 +682,23 @@ export struct TopNavigationComponentNew {
} else {
ToastUtils.showToast('暂无早晚报信息', 1000)
}
this.isClickMorningEveningPaper = false
let timer = setInterval(() => {
this.isClickMorningEveningPaper = false
clearInterval(timer);
}, 1000);
}).catch((err: string) => {
ToastUtils.showToast('暂无早晚报信息', 1000)
this.isClickMorningEveningPaper = false
let timer = setInterval(() => {
this.isClickMorningEveningPaper = false
clearInterval(timer);
}, 1000);
})
} else {
ToastUtils.showToast('网络出小差了,请检查网络后重试', 1000)
this.isClickMorningEveningPaper = false
let timer = setInterval(() => {
this.isClickMorningEveningPaper = false
clearInterval(timer);
}, 1000);
}
}
...
...
@@ -717,9 +706,9 @@ export struct TopNavigationComponentNew {
async getTopNavList(id: number) {
let bottomNavDetail = await ChannelViewModel.getBottomNavDetailData(id)
let topNavList = bottomNavDetail?.topNavChannelList || []
for (let topNav of topNavList) {
console.debug(TAG, 'getTopNavList=>' + JSON.stringify(topNav))
}
// for (let topNav of topNavList) {
// console.debug(TAG, 'getTopNavList=>' + JSON.stringify(topNav))
//
// }
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/peopleShipHomePage/PeopleShipHomeNavComponent.ets
View file @
edd05b6
...
...
@@ -120,15 +120,15 @@ export struct PeopleShipHomePageNavComponent {
}
.height('100%')
Blank()
// 分享
Image((this.topOpacity > 0.5 ? $r('app.media.icon_forward') : $r('app.media.icon_share')))
.width('24vp')
.height('24vp')
.objectFit(ImageFit.Auto)
.margin({ right: '10vp' })
.onClick(() => {
ToastUtils.showToast('分享为公共方法,待开发', 1000);
})
// 分享 分享暂不展示
// Image((this.topOpacity > 0.5 ? $r('app.media.icon_forward') : $r('app.media.icon_share')))
// .width('24vp')
// .height('24vp')
// .objectFit(ImageFit.Auto)
// .margin({ right: '10vp' })
// .onClick(() => {
// ToastUtils.showToast('分享为公共方法,待开发', 1000);
// })
}
.width('100%')
.height('100%')
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/HorizontalStrokeCardThreeTwoRadioForMoreComponent.ets
View file @
edd05b6
...
...
@@ -9,8 +9,8 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
@State compDTO: CompDTO = {} as CompDTO
@State pageId: string = '';
@State pageName: string = '';
@State initMoreWidth: number = 16;
@State moreWidth:number = 16
@State initMoreWidth: number = 22;
@State moreWidth:number = 22
@State moreTips: string = ''
scroller: Scroller = new Scroller()
...
...
@@ -44,7 +44,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
resetEdgeAnimation() {
if (this.moreWidth > this.initMoreWidth) {
this.moreWidth =
16
this.moreWidth =
22
}
this.resetMoreTips()
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/LiveHorizontalCardComponent.ets
View file @
edd05b6
...
...
@@ -18,8 +18,8 @@ export struct LiveHorizontalCardComponent {
@State pageName: string = '';
@State compDTO: CompDTO = {} as CompDTO
@State loadImg: boolean = false;
@State initMoreWidth: number = 16;
@State moreWidth:number = 16
@State initMoreWidth: number = 22;
@State moreWidth:number = 22
@State moreTips: string = ''
scroller: Scroller = new Scroller()
...
...
@@ -53,7 +53,7 @@ export struct LiveHorizontalCardComponent {
resetEdgeAnimation() {
if (this.moreWidth > this.initMoreWidth) {
this.moreWidth =
16
this.moreWidth =
22
}
this.resetMoreTips()
}
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerTitleComponent.ets
View file @
edd05b6
...
...
@@ -44,12 +44,12 @@ export struct PlayerTitleComponent {
Image($r('app.media.icon_arrow_left_white'))
.width(24)
.aspectRatio(1)
.visibility(
this.isLarge
? Visibility.Visible : Visibility.None)
.visibility(
(this.isLarge && this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL)
? Visibility.Visible : Visibility.None)
.margin({
right: 10
})
.onClick(() => {
WindowModel.shared.setPreferredOrientation(
this.isLarge
?
WindowModel.shared.setPreferredOrientation(
(this.isLarge && this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL)
?
window.Orientation.PORTRAIT :
window.Orientation.LANDSCAPE_INVERTED)
WindowModel.shared.setSpecificSystemBarEnabled(true)
...
...
@@ -74,7 +74,7 @@ export struct PlayerTitleComponent {
Image($r('app.media.icon_share'))
.width(24)
.aspectRatio(1)
.visibility(
this.isLarge
? Visibility.Visible : Visibility.None)
.visibility(
(this.isLarge && this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL)
? Visibility.Visible : Visibility.None)
.margin({right:16})
}.margin({ bottom: 10 })
...
...
sight_harmony/features/wdLogin/src/main/ets/pages/login/LoginProtocolWebview.ets
View file @
edd05b6
...
...
@@ -33,13 +33,11 @@ struct LoginProtocolWebview {
this.contentID = params.contentID
}
if (params.contentID == "1") { //"人民日报客户端网络服务使用协议"
this.webUrl = this.userProtocol
this.webUrl = await SPHelper.default.get(SpConstants.NET_SERVICE_PROTOCOL, this.userProtocol) as string
this.webUrl = SPHelper.default.getSync(SpConstants.NET_SERVICE_PROTOCOL, this.userProtocol) as string
} else if(params.contentID == "2"){ //"人民日报客户端用户隐私协议"
this.webUrl = this.privateProtocol
this.webUrl = await SPHelper.default.get(SpConstants.PRIVATE_PROTOCOL, this.privateProtocol) as string
this.webUrl = SPHelper.default.getSync(SpConstants.PRIVATE_PROTOCOL, this.privateProtocol) as string
}else if(params.contentID == "3"){ //注销协议
this.webUrl =
await SPHelper.default.get
(SpConstants.LOGOUT_PROTOCOL, this.logoutProtocol) as string
this.webUrl =
SPHelper.default.getSync
(SpConstants.LOGOUT_PROTOCOL, this.logoutProtocol) as string
} else if(params.contentID == "4"){ //华为用户认证协议
this.webUrl = this.huaweiAuthProtocol
} else if(params.contentID == "5"){ //收集个人信息明示清单
...
...
sight_harmony/features/wdLogin/src/main/ets/pages/login/OneKeyLoginPage.ets
View file @
edd05b6
...
...
@@ -128,58 +128,81 @@ struct OneKeyLoginPage {
.padding({top: `${this.topSafeHeight}px`})
}
// @Builder loginButton() {
// Column() {
// LoginWithHuaweiIDButton({
// params: {
// // LoginWithHuaweiIDButton支持的样式。
// style: loginComponentManager.Style.BUTTON_CUSTOM,
// // LoginWithHuaweiIDButton的边框圆角半径。
// borderRadius: 4,
// // LoginWithHuaweiIDButton支持的登录类型。
// loginType: loginComponentManager.LoginType.QUICK_LOGIN,
// // LoginWithHuaweiIDButton支持按钮的样式跟随系统深浅色模式切换。
// supportDarkMode: true,
// customButtonParams: {
// fontColor: loginComponentManager.FontColor.WHITE,
// // backgroundColor:!this.agreeProtocol ? "#60ED2800" : "#ED2800"
// backgroundColor:"#ED2800"
// }
// },
// controller: this.controller
// })
// }
// .backgroundColor("#ED2800")
// .height(48)
// .margin({ top: 20 ,left: 25, right: 25 })
// }
@Builder loginButton() {
Column() {
LoginWithHuaweiIDButton({
params: {
// LoginWithHuaweiIDButton支持的样式。
style: loginComponentManager.Style.BUTTON_CUSTOM,
// LoginWithHuaweiIDButton的边框圆角半径。
borderRadius: 4,
// LoginWithHuaweiIDButton支持的登录类型。
loginType: loginComponentManager.LoginType.QUICK_LOGIN,
// LoginWithHuaweiIDButton支持按钮的样式跟随系统深浅色模式切换。
supportDarkMode: true,
customButtonParams: {
fontColor: loginComponentManager.FontColor.WHITE,
// backgroundColor:!this.agreeProtocol ? "#60ED2800" : "#ED2800"
backgroundColor:"#ED2800"
Row() {
Stack(){
Button() {
Row() {
Image($r("app.media.huawei_one_key_login_icon"))
.width(24).height(24)
Text("华为账号一键登录")
.fontColor(Color.White)
.margin({left:5})
}
},
controller: this.controller
})
}
.width('100%')
.height(48)
.borderRadius(4)
.type(ButtonType.Normal)
.backgroundColor("#ED2800")
Stack(){
//目前不支持文字和图标同时展示,后面优化
LoginWithHuaweiIDButton({
params: {
// LoginWithHuaweiIDButton支持的样式。
style: loginComponentManager.Style.BUTTON_CUSTOM,
// LoginWithHuaweiIDButton的边框圆角半径。
// borderRadius: 4,
// LoginWithHuaweiIDButton支持的登录类型。
loginType: loginComponentManager.LoginType.QUICK_LOGIN,
// LoginWithHuaweiIDButton支持按钮的样式跟随系统深浅色模式切换。
// supportDarkMode: true,
customButtonParams: {
fontColor: loginComponentManager.FontColor.WHITE,
// backgroundColor:!this.agreeProtocol ? "#60ED2800" : "#ED2800"
backgroundColor:"#ED2800"
}
},
controller: this.controller
}).opacity(0)
}
.width('100%')
.height('100%')
}
}
.height(48)
.margin({ top: 20 ,left: 25, right: 25 })
.width("100%")
.padding({ left: 25, right: 25 })
.margin({top: 20})
}
// @Builder loginButton() {
// Row() {
// Button() {
// Row() {
// Image($r("app.media.huawei_one_key_login_icon"))
// .width(24).height(24)
// Text("华为账号一键登录")
// .fontColor(Color.White)
// }
// }
// .type(ButtonType.Normal)
// .height(48)
// .backgroundColor(!this.agreeProtocol ? "#60ED2800" : "#ED2800")
// .width("100%")
// .onClick((event) => {
// if (!this.agreeProtocol) {
// return
// }
//
// TrackingButton.click("oneClickLoginPageLoginButton", this.pageName, this.pageName)
// this.requestLogin()
// })
// }
// .padding({ left: 25, right: 25 })
// .margin({top: 20})
// }
@Builder ProtocolRow() {
Row({space: 4}) {
Image(this.agreeProtocol ? $r('app.media.login_checkbox_select') : $r('app.media.login_checkbox_unselected'))
...
...
sight_harmony/features/wdTracking/src/main/ets/common/PublicParams.ets
View file @
edd05b6
...
...
@@ -21,7 +21,7 @@ export class PublicParams {
"isSign": AccountManagerUtils.isLoginSync() ? "1" : "0",
"environment": PublicParams.getEnv(),
"os": AppUtils.getOSName(),
"actionTime":
new Date().getTime() * 0.001
,
"actionTime":
Math.floor(new Date().getTime() / 1000)
,
"channel": AppUtils.getAppChannel(),
"version": AppUtils.getAppVersionName(),
"deviceId": DeviceUtil.clientId(),
...
...
sight_harmony/products/phone/src/main/ets/pages/view/MultiPictureDetailPageComponent.ets
View file @
edd05b6
...
...
@@ -394,6 +394,7 @@ export struct MultiPictureDetailPageComponent {
bottom: 4,
right: 18
})
.width('92%')
}
if (this.contentDetailData.photoList?.[this.swiperIndex].picDesc) {
Text(`${this.contentDetailData.photoList?.[this.swiperIndex].picDesc}`)
...
...
@@ -405,11 +406,12 @@ export struct MultiPictureDetailPageComponent {
.textOverflow({ overflow: TextOverflow.Ellipsis })
.margin({
top: 4,
left:
0
,
left:
18
,
bottom: 4,
right: 18
})
.maxLines(32)
.width('92%')
}
}
}
...
...
Please
register
or
login
to post a comment