陈剑华

Merge remote-tracking branch 'origin/main'

Showing 37 changed files with 192 additions and 81 deletions
... ... @@ -64,4 +64,6 @@ export class SpConstants{
// 个推推送
static GETUI_PUSH_CID = "cid"
static GETUI_PUSH_DEVICE_TOKEN = "deviceToken"
//link
static HAS_LINK="has_link"
}
\ No newline at end of file
... ...
... ... @@ -13,5 +13,7 @@ export const enum ViewType {
// 已加载结束/非失败/非空/可以是仅一页数据,即楼层数据列表PAGE_GROUP_LIST/
LOADED,
// 已加载的是tab导航数据(可嵌套page的楼层列表)
NAV_BAR
NAV_BAR,
// 无网络
NoNetwork
}
\ No newline at end of file
... ...
... ... @@ -8,7 +8,7 @@
"version": "1.0.0",
"dependencies": {
"@tingyun/harmonyos": "file:./src/main/ets/tingyunAPM/tingyun_0.0.6.har",
"@umeng/common": "^1.0.21",
"@umeng/common": "^1.0.31",
"@umeng/analytics": "^1.0.19",
"@mpaas/udid": "0.0.2",
"@mpaas/upgrade": "0.0.2",
... ...
import { Logger } from 'wdKit'
import { Logger, SPHelper, StringUtils } from 'wdKit'
import { Want } from '@kit.AbilityKit'
import { url } from '@kit.ArkTS'
import { AppInnerLinkGenerator } from './AppInnerLinkGenerator'
... ... @@ -6,6 +6,7 @@ import { ContentType } from '../common/ContentType'
import { AppInnerLink } from './AppInnerLink'
import { HttpBizUtil, HttpUrlUtils, ResponseDTO } from 'wdNetwork'
import { ContentDetailDTO } from 'wdBean'
import { SpConstants } from 'wdConstant'
const TAG = "AppLinkingManager"
... ... @@ -16,6 +17,7 @@ export class AppLinkingManager {
private hasEnterMain = false
private lastUrlObj?: url.URL
private isJumpInnerLink:boolean = true
private static manager: AppLinkingManager
private constructor() {
... ... @@ -58,13 +60,19 @@ export class AppLinkingManager {
this.comsumeLastUriContent()
}
comsumeLastUriContent() {
comsumeLastUriContent(isJump:boolean = true) {
this.isJumpInnerLink = isJump
Logger.debug(TAG, "尝试消费拉起链接: " + this.lastUrlObj?.toString())
if (!this.lastUrlObj) {
return
}
let path = this.lastUrlObj?.pathname ?? ""
if(!this.isJumpInnerLink && StringUtils.isNotEmpty(path)){
SPHelper.default.save(SpConstants.HAS_LINK, true)
return
}
if (this.dealWithRMHArticle()
|| this.dealWithNormalArticle()
|| this.dealWithCreator()
... ... @@ -187,7 +195,9 @@ export class AppLinkingManager {
}
jumpInnerLink(innerLink: string) {
if(this.isJumpInnerLink){
Logger.debug(TAG, "即将跳转链接: " + innerLink)
AppInnerLink.jumpWithLink(innerLink)
}
}
}
\ No newline at end of file
... ...
... ... @@ -260,7 +260,7 @@ export struct WdWebLocalComponent {
// animateTo({duration: 1000}, () => {
this.progressOpacity = 0
// })
}, 3000)
}, 4000)
}
cancelProgressTimer() {
if (this.progressTimerNumber > 0) {
... ...
... ... @@ -37,6 +37,7 @@ export struct CardParser {
pageShowTime: number = 0;
pageHideTime: number = 0;
isPeopleShipHome: boolean = false;
isNeedDivider:boolean = true
aboutToAppear(): void {
console.log('CardParser-', JSON.stringify(this.contentDTO))
... ... @@ -66,12 +67,14 @@ export struct CardParser {
@Builder
getBehindDivider() {
if(this.isNeedDivider){
behindDivider({
compDTO: this.compDTO,
nextCompDTO: this.nextCompDTO,
compIndex: this.compIndex
})
}
}
@Builder
contentBuilder(contentDTO: ContentDTO) {
... ... @@ -186,7 +189,8 @@ export struct CardParser {
contentDTO,
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName
pageName: this.pageName,
isPeopleShipHome:this.isPeopleShipHome
})
this.getBehindDivider()
} else if (contentDTO.appStyle === CompStyle.Card_20) {
... ...
... ... @@ -46,11 +46,17 @@ export struct ENewspaperItemComponent {
this.contentHeight = event?.contentHeight
}
// this.isShowSkeleton = false
this.isShowSkeleton = false
})
.objectFit(ImageFit.Contain)
.zIndex(10)
newsSkeleton({showBottom: this.isShowSkeleton})
.visibility(this.isShowSkeleton ? Visibility.Visible : Visibility.None)
.width('100%')
.zIndex(1)
if (this.contentWidth !== 0) {
Canvas(this.context)
.width(px2vp(this.contentWidth))
... ...
... ... @@ -25,7 +25,6 @@ export struct ENewspaperPageComponent {
@State picHeight: number = 0
@Provide itemPicWidth: number = 0
@Provide itemPicHeight: number = 0
@State isShowSkeleton:boolean = false
@Provide topMargin: number = DisplayUtils.getDeviceHeight()
... ... @@ -84,7 +83,6 @@ export struct ENewspaperPageComponent {
builder: ENewspaperCalendarDialog({
selectDate: this.selectDate,
onDateChange: (date: RMCalendarBean) => {
this.isShowSkeleton = true
console.log("onDateChange-日历选择弹框", "date:", JSON.stringify(date))
if (date.fullYear && date.month && date.date) {
let month: number = date.month + 1
... ... @@ -256,7 +254,7 @@ export struct ENewspaperPageComponent {
})
.id('e_newspaper_top')
if (!this.newspaperListBean || !this.newspaperListBean.list || this.newspaperListBean.list.length == 0 || this.isShowSkeleton) {
if (!this.newspaperListBean || !this.newspaperListBean.list || this.newspaperListBean.list.length == 0) {
newsSkeleton()
.alignRules({
top: { anchor: "e_newspaper_top", align: VerticalAlign.Bottom },
... ... @@ -478,7 +476,6 @@ export struct ENewspaperPageComponent {
let listBean =
await NewspaperViewModel.getNewspaperList(this.calendarDate, this.itemPicWidth + 'x' + this.itemPicHeight)
this.newspaperListBean = listBean;
this.isShowSkeleton = false
} else {
this.showToastTip('网络出小差了,请检查网络后重试')
}
... ...
... ... @@ -18,7 +18,7 @@ export struct LiveFollowComponent {
@Prop rmhInfo: RmhInfoDTO
@Consume contentDetailData: ContentDetailDTO
@Consume @Watch('getBatchAttentionStatus') pageShow: number
clickFollowButton?:()=>void
aboutToAppear(): void {
this.getBatchAttentionStatus()
}
... ... @@ -90,6 +90,9 @@ export struct LiveFollowComponent {
.backgroundColor(this.followStatus === '0' ? $r('app.color.color_ED2800') : $r('app.color.color_CCCCCC'))
.visibility(this.followStatus === '0' ? Visibility.Visible : Visibility.None)
.onClick(() => {
if (this.clickFollowButton) {
this.clickFollowButton()
}
this.handleAccention()
})
}
... ...
... ... @@ -23,6 +23,7 @@ export struct Card19Component {
@State clicked: boolean = false;
@State titleMarked: boolean = false;
@State textArr: textItem[] = []
isPeopleShipHome: boolean = false;
async aboutToAppear(): Promise<void> {
this.titleInit();
... ... @@ -47,7 +48,8 @@ export struct Card19Component {
contentDTO: this.contentDTO,
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName
pageName: this.pageName,
isPeopleShipHome:this.isPeopleShipHome
}
) // 标题
if (this.contentDTO.newsTitle) {
... ...
... ... @@ -142,6 +142,7 @@ export struct Card2Component {
this.clicked = true;
}
persistentStorage(this.contentDTO.objectId);
// console.log(TAG,'this.contentDTO.objectType', this.contentDTO.objectType)
this.jumpDetail()
})
}
... ... @@ -153,11 +154,13 @@ export struct Card2Component {
MinePageDatasModel.getAssertDetailData(this.contentDTO.relId,this.contentDTO.objectId,this.contentDTO.relType).then((value) => {
if(value == "1"){
ProcessUtils.processPage(this.contentDTO)
}else{
} else {
ToastUtils.shortToast("内容不存在")
}
}).catch((err: Error) => {
console.log(TAG, JSON.stringify(err))
// 网络出小差了进入详情页
ProcessUtils.processPage(this.contentDTO)
})
}
}
... ...
... ... @@ -118,7 +118,6 @@ export struct MoreComponent {
let contentDTO = MinePageDatasModel.dataTransform(rem,value, photos);
if(value.type != "13"){
this.contentDTO.sameContentList.push(contentDTO)
console.log("ycg","123")
}
})
... ...
... ... @@ -58,14 +58,14 @@ export default struct MinePageUserSimpleInfoUI {
.alt(this.userType === "1"?$r('app.media.default_head_userPage'):$r('app.media.AccountOwner_DefaultIcon'))
.width(64)
.height(64)
.objectFit(ImageFit.Fill)
.borderRadius(32)
.objectFit(ImageFit.Auto)
.clip(new Circle({ width: 64, height: 64 }))
if(StringUtils.isNotEmpty(this.levelHead)){
Image(this.levelHead)
.width(90)
.height(90)
.objectFit(ImageFit.Cover)
.objectFit(ImageFit.Auto)
// .borderRadius(50)
}
}
... ...
... ... @@ -9,6 +9,7 @@ import { TrackConstants,
import { WDShare } from 'wdShare/Index';
import { hasClicked, persistentStorage } from '../../utils/persistentStorage';
import { LottieView } from '../lottie/LottieView';
import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
const TAG: string = 'CardView';
... ... @@ -398,6 +399,7 @@ export struct PaperSingleColumn999CardView {
@State isRead: boolean = false;//已读状态
@State interactData: InteractDataDTO = new InteractDataDTO
@Consume @Watch('onChangeCommentList') commentList: InteractDataDTO[]
@State loadImg: boolean = false;
getPublishTime(): string {
const publishTimestamp = parseInt(this.item?.publishTime)
... ... @@ -441,7 +443,7 @@ export struct PaperSingleColumn999CardView {
.margin({ left: 16, right: 16, top: 16 })
if (this.item?.coverUrl) {
Stack({ alignContent: Alignment.BottomEnd }) {
Image(this.item?.coverUrl)
Image(this.loadImg?this.item?.coverUrl:'')
.borderRadius(5)
.objectFit(ImageFit.Fill)
.aspectRatio(319 / 179) ///图片设计比例
... ... @@ -624,7 +626,8 @@ export struct PaperSingleColumn999CardView {
})
}
aboutToAppear(): void {
async aboutToAppear(): Promise<void> {
this.loadImg = await onlyWifiLoadImg();
this.onChangeCommentList()
this.isRead = hasClicked(this.item.objectId, '')
}
... ...
... ... @@ -49,10 +49,10 @@ export struct PageComponent {
this.LoadingLayout()
} else if (this.pageModel.viewType == ViewType.LOADED) {
this.ListLayout()
} else if (this.pageModel.viewType == ViewType.EMPTY) {
} else if (this.pageModel.viewType == ViewType.EMPTY || this.pageModel.viewType == ViewType.NoNetwork) {
//缺省页
EmptyComponent({
emptyType: this.pageModel.emptyType,
emptyType: this.pageModel.viewType == ViewType.EMPTY ? this.pageModel.emptyType : this.pageModel.NoNetwork,
emptyButton: true,
retry: () => {
this.pageModel.viewType = ViewType.LOADING;
... ... @@ -297,7 +297,7 @@ export struct PageComponent {
this.needload = false;
}
} else {
this.pageModel.viewType = ViewType.EMPTY;
this.pageModel.viewType = ViewType.NoNetwork;
}
}
... ...
... ... @@ -96,8 +96,8 @@ export struct PeopleShipHomeListComponent {
startMargin: 0,
endMargin: 0
})
.onChange((index: number) => {
this.currentIndex = index
.onAnimationStart((index: number,targetindex:number) => {
this.currentIndex = targetindex
})
}
... ...
... ... @@ -65,6 +65,8 @@ export struct EmptyComponent {
@State timeNum: number = 10
///占位图上是否显示返回按钮
@State showBackButton: boolean = true
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
/**
* The empty image width percentage setting.
*/
... ... @@ -114,6 +116,7 @@ export struct EmptyComponent {
Stack({alignContent:Alignment.Bottom}) {
this.noProgrammeData();
if (this.showBackButton) {
Column(){
Image($r("app.media.icon_arrow_left_white"))
.width(24)
.height(24)
... ... @@ -121,10 +124,18 @@ export struct EmptyComponent {
router.back();
})
.position({
bottom: 15,
bottom: 16,
left: 16
})
}
.height(56)
.width('100%')
.justifyContent(FlexAlign.Center)
.alignItems(HorizontalAlign.Start)
.margin({
bottom: px2vp(this.bottomSafeHeight)
})
}
}
}
... ... @@ -147,7 +158,8 @@ export struct EmptyComponent {
.fontWeight(FontWeight.Normal)
.opacity(this.TEXT_OPACITY)
.margin({ top: this.EMPTY_TIP_TEXT_MARGIN_TOP })
.fontColor(this.emptyType === WDViewDefaultType.WDViewDefaultType_NoComment1 ? '#999999' : '#666666')
// .fontColor(this.emptyType === WDViewDefaultType.WDViewDefaultType_NoComment1 ? '#999999' : '#666666')
.fontColor('#666666')
.onClick((event: ClickEvent) => {
Logger.info(TAG, `noProgrammeData onClick event?.source: ${event.source}`);
})
... ...
... ... @@ -29,7 +29,7 @@ export struct RecommendList {
}
ForEach(this.recommendList, (item: ContentDTO, index: number) => {
Row() {
CardParser({ compDTO:new CompDTO,contentDTO: item });
CardParser({ compDTO:new CompDTO,contentDTO: item ,isNeedDivider:false});
}.padding({ left: 6, right: 6 })
if (this.recommendList.length !== index + 1) {
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
... ...
... ... @@ -272,9 +272,9 @@ struct MineHomePage {
}
.backgroundColor($r('app.color.white'))
.animationDuration(0)
.onChange((index: number) => {
this.currentIndex = index
trackTabFirstClick(index === 0 ? "评论":"关注")
.onAnimationStart((index: number,targetindex:number) => {
this.currentIndex = targetindex
trackTabFirstClick(targetindex === 0 ? "评论":"关注")
})
.vertical(false)
.barHeight(44)
... ... @@ -412,11 +412,13 @@ struct MineHomePage {
.fontWeight(400)
.fontColor($r('app.color.color_222222'))
.lineHeight(16)
.textOverflow({overflow:TextOverflow.Ellipsis})
.alignRules({
center: { anchor: "__container__", align: VerticalAlign.Center },
left: { anchor: "head_icon", align: HorizontalAlign.End }
left: { anchor: "head_icon", align: HorizontalAlign.End },
right: { anchor: "rightText", align: HorizontalAlign.Start },
})
.margin({ left: 6 })
.margin({ left: 6,right:6 })
Text("编辑资料")
.height(22)
... ...
... ... @@ -221,9 +221,9 @@ struct OtherNormalUserHomePage {
}
.backgroundColor($r('app.color.white'))
.animationDuration(0)
.onChange((index: number) => {
this.currentIndex = index
trackTabFirstClick(index === 0 ? "评论":"关注")
.onAnimationStart((index: number,targetindex:number) => {
this.currentIndex = targetindex
trackTabFirstClick(targetindex === 0 ? "评论":"关注")
})
.vertical(false)
.barHeight('77lpx')
... ... @@ -341,11 +341,13 @@ struct OtherNormalUserHomePage {
.fontWeight('400lpx')
.fontColor($r('app.color.color_222222'))
.lineHeight('42lpx')
.textOverflow({overflow:TextOverflow.Ellipsis})
.alignRules({
center: { anchor: "__container__", align: VerticalAlign.Center },
left: { anchor: "head_icon", align: HorizontalAlign.End }
left: { anchor: "head_icon", align: HorizontalAlign.End },
right: { anchor: "__container__", align: HorizontalAlign.End },
})
.margin({ left: '12lpx' })
.margin({ left: 6,right:6 })
}
.visibility(this.tileOpacity > 0 ? 0 : 1)
.height('84lpx')
... ...
... ... @@ -200,7 +200,8 @@ export class PageHelper {
pageModel.displayGroupInfoMd5 = pageDto.md5
} else {
pageDto = await PageViewModel.getPageGroupCompData(pageModel.bizCopy()) as PageDTO
if (pageDto.md5 == pageModel.displayGroupInfoMd5) {
//增加楼层数据异常判断条件
if (pageDto.md5 == pageModel.displayGroupInfoMd5 || pageDto.compList == null || pageDto.compList.length === 0 ) {
// Logger.debug(TAG, 'parseGroup cache load, return: ' + pageDto.md5)
// 下拉刷新场景,数据没变,拦截刷新UI,重置相关参数
if (pageModel.loadStrategy === 2) {
... ...
... ... @@ -55,6 +55,7 @@ export default class PageModel {
offsetY: number = 0;
viewType: number = ViewType.LOADING;
emptyType: WDViewDefaultType = WDViewDefaultType.WDViewDefaultType_Default
NoNetwork: WDViewDefaultType = WDViewDefaultType.WDViewDefaultType_NoNetwork
hasMore: boolean = true;
startIndex = 0;
endIndex = 0;
... ...
... ... @@ -75,9 +75,7 @@ export struct TabChatComponent {
Stack() {
if (this.pageModel.viewType == ViewType.LOADING) {
this.LoadingLayout()
} else if (this.pageModel.viewType == ViewType.ERROR) {
ErrorComponent()
} else if (this.pageModel.viewType == ViewType.EMPTY) {
} else if (this.pageModel.viewType == ViewType.EMPTY || this.pageModel.viewType == ViewType.ERROR) {
EmptyComponent({ emptyType: WDViewDefaultType.WDViewDefaultType_NoComment1, showBackButton:false})
} else {
... ...
... ... @@ -72,9 +72,7 @@ export struct TabLiveComponent {
Stack() {
if (this.pageModel.viewType == ViewType.LOADING) {
this.LoadingLayout()
} else if (this.pageModel.viewType == ViewType.ERROR) {
ErrorComponent()
} else if (this.pageModel.viewType == ViewType.EMPTY) {
} else if (this.pageModel.viewType == ViewType.EMPTY || this.pageModel.viewType == ViewType.ERROR) {
EmptyComponent({ emptyType: WDViewDefaultType.WDViewDefaultType_NoContent1, showBackButton:false })
} else {
CustomPullToRefresh({
... ...
... ... @@ -121,12 +121,7 @@ export struct PlayUIComponent {
right: 10
})
.onClick(() => {
this.displayDirection = DisplayDirection.VERTICAL
WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ?
window.Orientation.PORTRAIT :
window.Orientation.LANDSCAPE)
WindowModel.shared.setSpecificSystemBarEnabled(true)
this.quitFullScreen()
})
if (this.contentDetailData.liveInfo?.liveState != 'wait') {
//标题
... ... @@ -160,7 +155,12 @@ export struct PlayUIComponent {
Row() {
if (this.contentDetailData?.rmhInfo) {
LiveFollowComponent({
rmhInfo: this.contentDetailData.rmhInfo
rmhInfo: this.contentDetailData.rmhInfo,
clickFollowButton:() => {
if (this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL) {
this.quitFullScreen()
}
}
})
.margin({
// top:-7,
... ... @@ -450,4 +450,12 @@ export struct PlayUIComponent {
this.playerController?.setSeekTime(value, mode);
})
}
quitFullScreen() {
this.displayDirection = DisplayDirection.VERTICAL
WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ?
window.Orientation.PORTRAIT :
window.Orientation.LANDSCAPE)
WindowModel.shared.setSpecificSystemBarEnabled(true)
}
}
\ No newline at end of file
... ...
... ... @@ -52,21 +52,7 @@ export struct PlayerTitleComponent {
right: 10
})
.onClick(() => {
WindowModel.shared.setPreferredOrientation((this.isLarge && this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL) ?
window.Orientation.PORTRAIT :
window.Orientation.LANDSCAPE)
WindowModel.shared.setSpecificSystemBarEnabled(true)
this.isLarge = false
this.displayDirection = DisplayDirection.VERTICAL
if(this.playerController){
if(this.playerController.onVideoSizePlayerComponentBack){
this.playerController.onVideoSizePlayerComponentBack(2,1);
}
// if(this.playerController.onVideoSizePlayerUIComponentMethod){
// this.playerController.onVideoSizePlayerUIComponentMethod(2,1);
// }
}
this.isFullScreen = false
this.quitFullScreen()
})
Text(this.contentDetailData.newsTitle || '')
.maxLines(2)
... ... @@ -104,7 +90,12 @@ export struct PlayerTitleComponent {
getLiveStatusView() {
if (this.contentDetailData.rmhInfo?.rmhName) {
LiveFollowComponent({
rmhInfo: this.contentDetailData.rmhInfo
rmhInfo: this.contentDetailData.rmhInfo,
clickFollowButton:()=> {
if (this.isFullScreen) {
this.quitFullScreen()
}
}
}).margin({
right: 10
})
... ... @@ -159,4 +150,24 @@ export struct PlayerTitleComponent {
} : 4)
}
}
quitFullScreen() {
WindowModel.shared.setPreferredOrientation((this.isLarge && this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL) ?
window.Orientation.PORTRAIT :
window.Orientation.LANDSCAPE)
WindowModel.shared.setSpecificSystemBarEnabled(true)
this.isLarge = false
this.displayDirection = DisplayDirection.VERTICAL
if(this.playerController){
if(this.playerController.onVideoSizePlayerComponentBack){
this.playerController.onVideoSizePlayerComponentBack(2,1);
}
// if(this.playerController.onVideoSizePlayerUIComponentMethod){
// this.playerController.onVideoSizePlayerUIComponentMethod(2,1);
// }
}
this.isFullScreen = false
}
}
... ...
... ... @@ -13,9 +13,26 @@ import { DisplayDirection } from 'wdConstant';
export struct PlayerUIComponent {
private playerController?: WDAliPlayerController
@Provide isSmall:boolean = false
@Consume isShowControl: boolean
@Consume @Watch('onChangeMenuVisible') isShowControl: boolean
@Consume isFullScreen: boolean
@Consume displayDirection: DisplayDirection
@State isPlayStatus: boolean = true;
onChangeMenuVisible() {
if (this.displayDirection == DisplayDirection.VERTICAL
|| !this.isShowControl
|| !this.isPlayStatus) {
return
}
let time: number = 0
if (this.isShowControl) {
setTimeout(() => {
this.isShowControl = false
}, 5 * 1000)
} else {
clearTimeout(time)
}
}
aboutToAppear() {
if (!this.playerController) {
return
... ... @@ -76,7 +93,7 @@ export struct PlayerUIComponent {
.position({ y: '100%' })
.markAnchor({ y: '100%' })
PlayerVideoControlComponent({ playerController: this.playerController })
PlayerVideoControlComponent({ playerController: this.playerController,isPlayStatus: $isPlayStatus})
.visibility(this.isShowControl ? Visibility.Visible : Visibility.Hidden)
.animation({ duration: 500 })
.position({ y: '100%' })
... ...
... ... @@ -13,7 +13,7 @@ export struct PlayerVideoControlComponent {
@State totalTime: string = ''
@State progressVal: number = 0;
//是否处于播放状态中
@State isPlayStatus: boolean = true
@Link isPlayStatus?: boolean
@Consume displayDirection: DisplayDirection
@Consume contentDetailData: ContentDetailDTO
@Consume isSmall:boolean
... ...
... ... @@ -245,6 +245,13 @@ export struct DetailPlayShortVideoPage {
// 注册监听网络连接
if (this.currentIndex === this.index && type != NetworkType.TYPE_UNKNOWN) {
console.log(TAG, '网络连接状态变化', type, 'this.currentIndex', this.currentIndex, 'this.index', this.index)
if(type == NetworkType.TYPE_CELLULAR) {
this.toastTextVisible = true
this.onlyWifiLoadVideo = false
} else if(type == NetworkType.TYPE_WIFI) {
this.toastTextVisible = false
this.onlyWifiLoadVideo = true
}
this.currentIndexChange()
}
}, 1000)
... ... @@ -426,10 +433,7 @@ export struct DetailPlayShortVideoPage {
.onClick(() => {
this.onlyWifiLoadVideo = true
this.toastTextVisible = false
this.playerController?.play()
this.playerController.startRenderFrame(() => {
this.imageVisible = false
})
this.currentIndexChange()
})
}
.width('100%')
... ...
... ... @@ -97,6 +97,8 @@ export struct PlayerFullScreenView {
})
Text(this.getTitle())
.fontSize(18)
.lineHeight(24)
.fontWeight(600)
.fontColor(Color.White)
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
... ...
... ... @@ -7,6 +7,7 @@ import { BusinessError } from '@ohos.base';
import { DeviceUtil, EmitterEventId, EmitterUtils, Logger, SPHelper, WindowModel } from 'wdKit';
import { ConfigurationConstant } from '@kit.AbilityKit';
import { StartupManager } from '../startupmanager/StartupManager';
import { AppLinkingManager } from 'wdRouter';
let floatWindowClass: window.Window | null = null;
const TAG = 'EntryAbility'
... ... @@ -19,7 +20,8 @@ export default class EntryAbility extends UIAbility {
StartupManager.sharedInstance().appAgreedProtocol()
}
Logger.info(TAG, 'Ability onCreate');
//只判断不跳转
AppLinkingManager.sharedInstance().comsumeLastUriContent(false)
// 还没深色模式需求,暂直接不跟随系统。
this.context.getApplicationContext().setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_LIGHT);
... ...
... ... @@ -23,13 +23,17 @@ struct MultiPictureDetailPage {
@Provide pageName: string = TrackConstants.PageName.Atlas_Detail
@Provide bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
@Provide topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
action: Action = {} as Action
build() {
Row() {
Column() {
MultiPictureDetailPageComponent({
relId: this.relId,
contentId: this.contentId,
relType: this.relType
relType: this.relType,
action: this.action
})
}
... ... @@ -53,13 +57,15 @@ struct MultiPictureDetailPage {
Logger.info(TAG, 'aboutToDisappear');
let par:Action = router.getParams() as Action;
let params = par?.params;
let action:Action = router.getParams() as Action;
let params = action?.params;
this.relId = params?.extra?.relId || '';
this.relType = params?.extra?.relType || '';
this.contentId = params?.contentID || '';
Logger.info(TAG, 'aboutToAppear');
Logger.info(TAG, 'params', JSON.stringify(params));
this.action = action
}
onBackPress() {
... ...
... ... @@ -59,7 +59,14 @@ struct LaunchPage {
this.timerId = setTimeout(() => {
this.isJumpToAdvertising = true;
let hasLink = SPHelper.default.getSync(SpConstants.HAS_LINK,false)
if(hasLink){
SPHelper.default.deleteSync(SpConstants.HAS_LINK)
WDRouterRule.jumpWithPage(WDRouterPage.mainPage)
}else{
WDRouterRule.jumpWithPage(WDRouterPage.launchAdvertisingPage)
}
// router.pushUrl({
// url: 'pages/LaunchAdvertisingPage'
... ...
... ... @@ -214,7 +214,7 @@ export struct BottomNavigationComponent {
},
onLoadListener:{
onLoadFailed:(err)=>{
console.error("ycg","Load Failed Reason: " + err + " cost " + (new Date().getTime() ) + " milliseconds");
console.error("Load Failed Reason: " + err + " cost " + (new Date().getTime() ) + " milliseconds");
}
}
};
... ...
... ... @@ -7,7 +7,8 @@ import {
PhotoListBean,
postBatchAttentionStatusParams,
postInteractAccentionOperateParams,
postInteractBrowsOperateParams
postInteractBrowsOperateParams,
Action
} from 'wdBean';
import { DateTimeUtils } from 'wdKit/Index';
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
... ... @@ -65,6 +66,7 @@ export struct MultiPictureDetailPageComponent {
@State isScrollerTop: boolean = false;
@Provide duration: number = 0
@State executedStartTime: number = new Date().getTime()
action: Action = {} as Action
//watch监听页码回调
onCurrentPageNumUpdated(): void {
... ... @@ -97,6 +99,12 @@ export struct MultiPictureDetailPageComponent {
// })
this.getDetail()
this.contentTrackingDict()
if(this.action.params?.targetLayout == "comment"){
setTimeout(() => {
this.showCommentList = true
}, 1000)
}
}
contentTrackingDict() {
... ...
... ... @@ -108,6 +108,7 @@ export class StartupManager {
appOnDestory() {
Logger.debug(TAG, "App onDestory")
NetworkManager.getInstance().release()
SPHelper.default.deleteSync(SpConstants.HAS_LINK)
}
// 同意隐私协议之后,立即执行必要初始化
... ...