Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool
Showing
18 changed files
with
86 additions
and
35 deletions
| @@ -64,4 +64,6 @@ export class SpConstants{ | @@ -64,4 +64,6 @@ export class SpConstants{ | ||
| 64 | // 个推推送 | 64 | // 个推推送 |
| 65 | static GETUI_PUSH_CID = "cid" | 65 | static GETUI_PUSH_CID = "cid" |
| 66 | static GETUI_PUSH_DEVICE_TOKEN = "deviceToken" | 66 | static GETUI_PUSH_DEVICE_TOKEN = "deviceToken" |
| 67 | + //link | ||
| 68 | + static HAS_LINK="has_link" | ||
| 67 | } | 69 | } |
| 1 | -import { Logger } from 'wdKit' | 1 | +import { Logger, SPHelper, StringUtils } from 'wdKit' |
| 2 | import { Want } from '@kit.AbilityKit' | 2 | import { Want } from '@kit.AbilityKit' |
| 3 | import { url } from '@kit.ArkTS' | 3 | import { url } from '@kit.ArkTS' |
| 4 | import { AppInnerLinkGenerator } from './AppInnerLinkGenerator' | 4 | import { AppInnerLinkGenerator } from './AppInnerLinkGenerator' |
| @@ -6,6 +6,7 @@ import { ContentType } from '../common/ContentType' | @@ -6,6 +6,7 @@ import { ContentType } from '../common/ContentType' | ||
| 6 | import { AppInnerLink } from './AppInnerLink' | 6 | import { AppInnerLink } from './AppInnerLink' |
| 7 | import { HttpBizUtil, HttpUrlUtils, ResponseDTO } from 'wdNetwork' | 7 | import { HttpBizUtil, HttpUrlUtils, ResponseDTO } from 'wdNetwork' |
| 8 | import { ContentDetailDTO } from 'wdBean' | 8 | import { ContentDetailDTO } from 'wdBean' |
| 9 | +import { SpConstants } from 'wdConstant' | ||
| 9 | 10 | ||
| 10 | const TAG = "AppLinkingManager" | 11 | const TAG = "AppLinkingManager" |
| 11 | 12 | ||
| @@ -16,6 +17,7 @@ export class AppLinkingManager { | @@ -16,6 +17,7 @@ export class AppLinkingManager { | ||
| 16 | 17 | ||
| 17 | private hasEnterMain = false | 18 | private hasEnterMain = false |
| 18 | private lastUrlObj?: url.URL | 19 | private lastUrlObj?: url.URL |
| 20 | + private isJumpInnerLink:boolean = true | ||
| 19 | 21 | ||
| 20 | private static manager: AppLinkingManager | 22 | private static manager: AppLinkingManager |
| 21 | private constructor() { | 23 | private constructor() { |
| @@ -58,13 +60,19 @@ export class AppLinkingManager { | @@ -58,13 +60,19 @@ export class AppLinkingManager { | ||
| 58 | this.comsumeLastUriContent() | 60 | this.comsumeLastUriContent() |
| 59 | } | 61 | } |
| 60 | 62 | ||
| 61 | - comsumeLastUriContent() { | 63 | + comsumeLastUriContent(isJump:boolean = true) { |
| 64 | + this.isJumpInnerLink = isJump | ||
| 62 | Logger.debug(TAG, "尝试消费拉起链接: " + this.lastUrlObj?.toString()) | 65 | Logger.debug(TAG, "尝试消费拉起链接: " + this.lastUrlObj?.toString()) |
| 63 | if (!this.lastUrlObj) { | 66 | if (!this.lastUrlObj) { |
| 64 | return | 67 | return |
| 65 | } | 68 | } |
| 66 | let path = this.lastUrlObj?.pathname ?? "" | 69 | let path = this.lastUrlObj?.pathname ?? "" |
| 67 | 70 | ||
| 71 | + if(!this.isJumpInnerLink && StringUtils.isNotEmpty(path)){ | ||
| 72 | + SPHelper.default.save(SpConstants.HAS_LINK, true) | ||
| 73 | + return | ||
| 74 | + } | ||
| 75 | + | ||
| 68 | if (this.dealWithRMHArticle() | 76 | if (this.dealWithRMHArticle() |
| 69 | || this.dealWithNormalArticle() | 77 | || this.dealWithNormalArticle() |
| 70 | || this.dealWithCreator() | 78 | || this.dealWithCreator() |
| @@ -187,7 +195,9 @@ export class AppLinkingManager { | @@ -187,7 +195,9 @@ export class AppLinkingManager { | ||
| 187 | } | 195 | } |
| 188 | 196 | ||
| 189 | jumpInnerLink(innerLink: string) { | 197 | jumpInnerLink(innerLink: string) { |
| 190 | - Logger.debug(TAG, "即将跳转链接: " + innerLink) | ||
| 191 | - AppInnerLink.jumpWithLink(innerLink) | 198 | + if(this.isJumpInnerLink){ |
| 199 | + Logger.debug(TAG, "即将跳转链接: " + innerLink) | ||
| 200 | + AppInnerLink.jumpWithLink(innerLink) | ||
| 201 | + } | ||
| 192 | } | 202 | } |
| 193 | } | 203 | } |
| @@ -189,7 +189,8 @@ export struct CardParser { | @@ -189,7 +189,8 @@ export struct CardParser { | ||
| 189 | contentDTO, | 189 | contentDTO, |
| 190 | compDTO: this.compDTO, | 190 | compDTO: this.compDTO, |
| 191 | pageId: this.pageId, | 191 | pageId: this.pageId, |
| 192 | - pageName: this.pageName | 192 | + pageName: this.pageName, |
| 193 | + isPeopleShipHome:this.isPeopleShipHome | ||
| 193 | }) | 194 | }) |
| 194 | this.getBehindDivider() | 195 | this.getBehindDivider() |
| 195 | } else if (contentDTO.appStyle === CompStyle.Card_20) { | 196 | } else if (contentDTO.appStyle === CompStyle.Card_20) { |
| @@ -46,10 +46,16 @@ export struct ENewspaperItemComponent { | @@ -46,10 +46,16 @@ export struct ENewspaperItemComponent { | ||
| 46 | this.contentHeight = event?.contentHeight | 46 | this.contentHeight = event?.contentHeight |
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | - // this.isShowSkeleton = false | 49 | + this.isShowSkeleton = false |
| 50 | }) | 50 | }) |
| 51 | .objectFit(ImageFit.Contain) | 51 | .objectFit(ImageFit.Contain) |
| 52 | .zIndex(10) | 52 | .zIndex(10) |
| 53 | + | ||
| 54 | + newsSkeleton({showBottom: this.isShowSkeleton}) | ||
| 55 | + .visibility(this.isShowSkeleton ? Visibility.Visible : Visibility.None) | ||
| 56 | + .width('100%') | ||
| 57 | + .zIndex(1) | ||
| 58 | + | ||
| 53 | 59 | ||
| 54 | if (this.contentWidth !== 0) { | 60 | if (this.contentWidth !== 0) { |
| 55 | Canvas(this.context) | 61 | Canvas(this.context) |
| @@ -25,7 +25,6 @@ export struct ENewspaperPageComponent { | @@ -25,7 +25,6 @@ export struct ENewspaperPageComponent { | ||
| 25 | @State picHeight: number = 0 | 25 | @State picHeight: number = 0 |
| 26 | @Provide itemPicWidth: number = 0 | 26 | @Provide itemPicWidth: number = 0 |
| 27 | @Provide itemPicHeight: number = 0 | 27 | @Provide itemPicHeight: number = 0 |
| 28 | - @State isShowSkeleton:boolean = false | ||
| 29 | 28 | ||
| 30 | @Provide topMargin: number = DisplayUtils.getDeviceHeight() | 29 | @Provide topMargin: number = DisplayUtils.getDeviceHeight() |
| 31 | 30 | ||
| @@ -84,7 +83,6 @@ export struct ENewspaperPageComponent { | @@ -84,7 +83,6 @@ export struct ENewspaperPageComponent { | ||
| 84 | builder: ENewspaperCalendarDialog({ | 83 | builder: ENewspaperCalendarDialog({ |
| 85 | selectDate: this.selectDate, | 84 | selectDate: this.selectDate, |
| 86 | onDateChange: (date: RMCalendarBean) => { | 85 | onDateChange: (date: RMCalendarBean) => { |
| 87 | - this.isShowSkeleton = true | ||
| 88 | console.log("onDateChange-日历选择弹框", "date:", JSON.stringify(date)) | 86 | console.log("onDateChange-日历选择弹框", "date:", JSON.stringify(date)) |
| 89 | if (date.fullYear && date.month && date.date) { | 87 | if (date.fullYear && date.month && date.date) { |
| 90 | let month: number = date.month + 1 | 88 | let month: number = date.month + 1 |
| @@ -256,7 +254,7 @@ export struct ENewspaperPageComponent { | @@ -256,7 +254,7 @@ export struct ENewspaperPageComponent { | ||
| 256 | }) | 254 | }) |
| 257 | .id('e_newspaper_top') | 255 | .id('e_newspaper_top') |
| 258 | 256 | ||
| 259 | - if (!this.newspaperListBean || !this.newspaperListBean.list || this.newspaperListBean.list.length == 0 || this.isShowSkeleton) { | 257 | + if (!this.newspaperListBean || !this.newspaperListBean.list || this.newspaperListBean.list.length == 0) { |
| 260 | newsSkeleton() | 258 | newsSkeleton() |
| 261 | .alignRules({ | 259 | .alignRules({ |
| 262 | top: { anchor: "e_newspaper_top", align: VerticalAlign.Bottom }, | 260 | top: { anchor: "e_newspaper_top", align: VerticalAlign.Bottom }, |
| @@ -478,7 +476,6 @@ export struct ENewspaperPageComponent { | @@ -478,7 +476,6 @@ export struct ENewspaperPageComponent { | ||
| 478 | let listBean = | 476 | let listBean = |
| 479 | await NewspaperViewModel.getNewspaperList(this.calendarDate, this.itemPicWidth + 'x' + this.itemPicHeight) | 477 | await NewspaperViewModel.getNewspaperList(this.calendarDate, this.itemPicWidth + 'x' + this.itemPicHeight) |
| 480 | this.newspaperListBean = listBean; | 478 | this.newspaperListBean = listBean; |
| 481 | - this.isShowSkeleton = false | ||
| 482 | } else { | 479 | } else { |
| 483 | this.showToastTip('网络出小差了,请检查网络后重试') | 480 | this.showToastTip('网络出小差了,请检查网络后重试') |
| 484 | } | 481 | } |
| @@ -23,6 +23,7 @@ export struct Card19Component { | @@ -23,6 +23,7 @@ export struct Card19Component { | ||
| 23 | @State clicked: boolean = false; | 23 | @State clicked: boolean = false; |
| 24 | @State titleMarked: boolean = false; | 24 | @State titleMarked: boolean = false; |
| 25 | @State textArr: textItem[] = [] | 25 | @State textArr: textItem[] = [] |
| 26 | + isPeopleShipHome: boolean = false; | ||
| 26 | 27 | ||
| 27 | async aboutToAppear(): Promise<void> { | 28 | async aboutToAppear(): Promise<void> { |
| 28 | this.titleInit(); | 29 | this.titleInit(); |
| @@ -47,7 +48,8 @@ export struct Card19Component { | @@ -47,7 +48,8 @@ export struct Card19Component { | ||
| 47 | contentDTO: this.contentDTO, | 48 | contentDTO: this.contentDTO, |
| 48 | compDTO: this.compDTO, | 49 | compDTO: this.compDTO, |
| 49 | pageId: this.pageId, | 50 | pageId: this.pageId, |
| 50 | - pageName: this.pageName | 51 | + pageName: this.pageName, |
| 52 | + isPeopleShipHome:this.isPeopleShipHome | ||
| 51 | } | 53 | } |
| 52 | ) // 标题 | 54 | ) // 标题 |
| 53 | if (this.contentDTO.newsTitle) { | 55 | if (this.contentDTO.newsTitle) { |
| @@ -118,7 +118,6 @@ export struct MoreComponent { | @@ -118,7 +118,6 @@ export struct MoreComponent { | ||
| 118 | let contentDTO = MinePageDatasModel.dataTransform(rem,value, photos); | 118 | let contentDTO = MinePageDatasModel.dataTransform(rem,value, photos); |
| 119 | if(value.type != "13"){ | 119 | if(value.type != "13"){ |
| 120 | this.contentDTO.sameContentList.push(contentDTO) | 120 | this.contentDTO.sameContentList.push(contentDTO) |
| 121 | - console.log("ycg","123") | ||
| 122 | } | 121 | } |
| 123 | }) | 122 | }) |
| 124 | 123 |
| @@ -58,14 +58,14 @@ export default struct MinePageUserSimpleInfoUI { | @@ -58,14 +58,14 @@ export default struct MinePageUserSimpleInfoUI { | ||
| 58 | .alt(this.userType === "1"?$r('app.media.default_head_userPage'):$r('app.media.AccountOwner_DefaultIcon')) | 58 | .alt(this.userType === "1"?$r('app.media.default_head_userPage'):$r('app.media.AccountOwner_DefaultIcon')) |
| 59 | .width(64) | 59 | .width(64) |
| 60 | .height(64) | 60 | .height(64) |
| 61 | - .objectFit(ImageFit.Fill) | ||
| 62 | - .borderRadius(32) | 61 | + .objectFit(ImageFit.Auto) |
| 62 | + .clip(new Circle({ width: 64, height: 64 })) | ||
| 63 | 63 | ||
| 64 | if(StringUtils.isNotEmpty(this.levelHead)){ | 64 | if(StringUtils.isNotEmpty(this.levelHead)){ |
| 65 | Image(this.levelHead) | 65 | Image(this.levelHead) |
| 66 | .width(90) | 66 | .width(90) |
| 67 | .height(90) | 67 | .height(90) |
| 68 | - .objectFit(ImageFit.Cover) | 68 | + .objectFit(ImageFit.Auto) |
| 69 | // .borderRadius(50) | 69 | // .borderRadius(50) |
| 70 | } | 70 | } |
| 71 | } | 71 | } |
| @@ -9,6 +9,7 @@ import { TrackConstants, | @@ -9,6 +9,7 @@ import { TrackConstants, | ||
| 9 | import { WDShare } from 'wdShare/Index'; | 9 | import { WDShare } from 'wdShare/Index'; |
| 10 | import { hasClicked, persistentStorage } from '../../utils/persistentStorage'; | 10 | import { hasClicked, persistentStorage } from '../../utils/persistentStorage'; |
| 11 | import { LottieView } from '../lottie/LottieView'; | 11 | import { LottieView } from '../lottie/LottieView'; |
| 12 | +import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; | ||
| 12 | 13 | ||
| 13 | const TAG: string = 'CardView'; | 14 | const TAG: string = 'CardView'; |
| 14 | 15 | ||
| @@ -398,6 +399,7 @@ export struct PaperSingleColumn999CardView { | @@ -398,6 +399,7 @@ export struct PaperSingleColumn999CardView { | ||
| 398 | @State isRead: boolean = false;//已读状态 | 399 | @State isRead: boolean = false;//已读状态 |
| 399 | @State interactData: InteractDataDTO = new InteractDataDTO | 400 | @State interactData: InteractDataDTO = new InteractDataDTO |
| 400 | @Consume @Watch('onChangeCommentList') commentList: InteractDataDTO[] | 401 | @Consume @Watch('onChangeCommentList') commentList: InteractDataDTO[] |
| 402 | + @State loadImg: boolean = false; | ||
| 401 | 403 | ||
| 402 | getPublishTime(): string { | 404 | getPublishTime(): string { |
| 403 | const publishTimestamp = parseInt(this.item?.publishTime) | 405 | const publishTimestamp = parseInt(this.item?.publishTime) |
| @@ -441,7 +443,7 @@ export struct PaperSingleColumn999CardView { | @@ -441,7 +443,7 @@ export struct PaperSingleColumn999CardView { | ||
| 441 | .margin({ left: 16, right: 16, top: 16 }) | 443 | .margin({ left: 16, right: 16, top: 16 }) |
| 442 | if (this.item?.coverUrl) { | 444 | if (this.item?.coverUrl) { |
| 443 | Stack({ alignContent: Alignment.BottomEnd }) { | 445 | Stack({ alignContent: Alignment.BottomEnd }) { |
| 444 | - Image(this.item?.coverUrl) | 446 | + Image(this.loadImg?this.item?.coverUrl:'') |
| 445 | .borderRadius(5) | 447 | .borderRadius(5) |
| 446 | .objectFit(ImageFit.Fill) | 448 | .objectFit(ImageFit.Fill) |
| 447 | .aspectRatio(319 / 179) ///图片设计比例 | 449 | .aspectRatio(319 / 179) ///图片设计比例 |
| @@ -624,7 +626,8 @@ export struct PaperSingleColumn999CardView { | @@ -624,7 +626,8 @@ export struct PaperSingleColumn999CardView { | ||
| 624 | }) | 626 | }) |
| 625 | } | 627 | } |
| 626 | 628 | ||
| 627 | - aboutToAppear(): void { | 629 | + async aboutToAppear(): Promise<void> { |
| 630 | + this.loadImg = await onlyWifiLoadImg(); | ||
| 628 | this.onChangeCommentList() | 631 | this.onChangeCommentList() |
| 629 | this.isRead = hasClicked(this.item.objectId, '') | 632 | this.isRead = hasClicked(this.item.objectId, '') |
| 630 | } | 633 | } |
| @@ -96,8 +96,8 @@ export struct PeopleShipHomeListComponent { | @@ -96,8 +96,8 @@ export struct PeopleShipHomeListComponent { | ||
| 96 | startMargin: 0, | 96 | startMargin: 0, |
| 97 | endMargin: 0 | 97 | endMargin: 0 |
| 98 | }) | 98 | }) |
| 99 | - .onChange((index: number) => { | ||
| 100 | - this.currentIndex = index | 99 | + .onAnimationStart((index: number,targetindex:number) => { |
| 100 | + this.currentIndex = targetindex | ||
| 101 | }) | 101 | }) |
| 102 | 102 | ||
| 103 | } | 103 | } |
| @@ -272,9 +272,9 @@ struct MineHomePage { | @@ -272,9 +272,9 @@ struct MineHomePage { | ||
| 272 | } | 272 | } |
| 273 | .backgroundColor($r('app.color.white')) | 273 | .backgroundColor($r('app.color.white')) |
| 274 | .animationDuration(0) | 274 | .animationDuration(0) |
| 275 | - .onChange((index: number) => { | ||
| 276 | - this.currentIndex = index | ||
| 277 | - trackTabFirstClick(index === 0 ? "评论":"关注") | 275 | + .onAnimationStart((index: number,targetindex:number) => { |
| 276 | + this.currentIndex = targetindex | ||
| 277 | + trackTabFirstClick(targetindex === 0 ? "评论":"关注") | ||
| 278 | }) | 278 | }) |
| 279 | .vertical(false) | 279 | .vertical(false) |
| 280 | .barHeight(44) | 280 | .barHeight(44) |
| @@ -412,11 +412,13 @@ struct MineHomePage { | @@ -412,11 +412,13 @@ struct MineHomePage { | ||
| 412 | .fontWeight(400) | 412 | .fontWeight(400) |
| 413 | .fontColor($r('app.color.color_222222')) | 413 | .fontColor($r('app.color.color_222222')) |
| 414 | .lineHeight(16) | 414 | .lineHeight(16) |
| 415 | + .textOverflow({overflow:TextOverflow.Ellipsis}) | ||
| 415 | .alignRules({ | 416 | .alignRules({ |
| 416 | center: { anchor: "__container__", align: VerticalAlign.Center }, | 417 | center: { anchor: "__container__", align: VerticalAlign.Center }, |
| 417 | - left: { anchor: "head_icon", align: HorizontalAlign.End } | 418 | + left: { anchor: "head_icon", align: HorizontalAlign.End }, |
| 419 | + right: { anchor: "rightText", align: HorizontalAlign.Start }, | ||
| 418 | }) | 420 | }) |
| 419 | - .margin({ left: 6 }) | 421 | + .margin({ left: 6,right:6 }) |
| 420 | 422 | ||
| 421 | Text("编辑资料") | 423 | Text("编辑资料") |
| 422 | .height(22) | 424 | .height(22) |
| @@ -221,9 +221,9 @@ struct OtherNormalUserHomePage { | @@ -221,9 +221,9 @@ struct OtherNormalUserHomePage { | ||
| 221 | } | 221 | } |
| 222 | .backgroundColor($r('app.color.white')) | 222 | .backgroundColor($r('app.color.white')) |
| 223 | .animationDuration(0) | 223 | .animationDuration(0) |
| 224 | - .onChange((index: number) => { | ||
| 225 | - this.currentIndex = index | ||
| 226 | - trackTabFirstClick(index === 0 ? "评论":"关注") | 224 | + .onAnimationStart((index: number,targetindex:number) => { |
| 225 | + this.currentIndex = targetindex | ||
| 226 | + trackTabFirstClick(targetindex === 0 ? "评论":"关注") | ||
| 227 | }) | 227 | }) |
| 228 | .vertical(false) | 228 | .vertical(false) |
| 229 | .barHeight('77lpx') | 229 | .barHeight('77lpx') |
| @@ -341,11 +341,13 @@ struct OtherNormalUserHomePage { | @@ -341,11 +341,13 @@ struct OtherNormalUserHomePage { | ||
| 341 | .fontWeight('400lpx') | 341 | .fontWeight('400lpx') |
| 342 | .fontColor($r('app.color.color_222222')) | 342 | .fontColor($r('app.color.color_222222')) |
| 343 | .lineHeight('42lpx') | 343 | .lineHeight('42lpx') |
| 344 | + .textOverflow({overflow:TextOverflow.Ellipsis}) | ||
| 344 | .alignRules({ | 345 | .alignRules({ |
| 345 | center: { anchor: "__container__", align: VerticalAlign.Center }, | 346 | center: { anchor: "__container__", align: VerticalAlign.Center }, |
| 346 | - left: { anchor: "head_icon", align: HorizontalAlign.End } | 347 | + left: { anchor: "head_icon", align: HorizontalAlign.End }, |
| 348 | + right: { anchor: "__container__", align: HorizontalAlign.End }, | ||
| 347 | }) | 349 | }) |
| 348 | - .margin({ left: '12lpx' }) | 350 | + .margin({ left: 6,right:6 }) |
| 349 | } | 351 | } |
| 350 | .visibility(this.tileOpacity > 0 ? 0 : 1) | 352 | .visibility(this.tileOpacity > 0 ? 0 : 1) |
| 351 | .height('84lpx') | 353 | .height('84lpx') |
| @@ -13,9 +13,26 @@ import { DisplayDirection } from 'wdConstant'; | @@ -13,9 +13,26 @@ import { DisplayDirection } from 'wdConstant'; | ||
| 13 | export struct PlayerUIComponent { | 13 | export struct PlayerUIComponent { |
| 14 | private playerController?: WDAliPlayerController | 14 | private playerController?: WDAliPlayerController |
| 15 | @Provide isSmall:boolean = false | 15 | @Provide isSmall:boolean = false |
| 16 | - @Consume isShowControl: boolean | 16 | + @Consume @Watch('onChangeMenuVisible') isShowControl: boolean |
| 17 | @Consume isFullScreen: boolean | 17 | @Consume isFullScreen: boolean |
| 18 | @Consume displayDirection: DisplayDirection | 18 | @Consume displayDirection: DisplayDirection |
| 19 | + @State isPlayStatus: boolean = true; | ||
| 20 | + onChangeMenuVisible() { | ||
| 21 | + if (this.displayDirection == DisplayDirection.VERTICAL | ||
| 22 | + || !this.isShowControl | ||
| 23 | + || !this.isPlayStatus) { | ||
| 24 | + return | ||
| 25 | + } | ||
| 26 | + let time: number = 0 | ||
| 27 | + if (this.isShowControl) { | ||
| 28 | + setTimeout(() => { | ||
| 29 | + this.isShowControl = false | ||
| 30 | + }, 5 * 1000) | ||
| 31 | + } else { | ||
| 32 | + clearTimeout(time) | ||
| 33 | + } | ||
| 34 | + } | ||
| 35 | + | ||
| 19 | aboutToAppear() { | 36 | aboutToAppear() { |
| 20 | if (!this.playerController) { | 37 | if (!this.playerController) { |
| 21 | return | 38 | return |
| @@ -76,7 +93,7 @@ export struct PlayerUIComponent { | @@ -76,7 +93,7 @@ export struct PlayerUIComponent { | ||
| 76 | .position({ y: '100%' }) | 93 | .position({ y: '100%' }) |
| 77 | .markAnchor({ y: '100%' }) | 94 | .markAnchor({ y: '100%' }) |
| 78 | 95 | ||
| 79 | - PlayerVideoControlComponent({ playerController: this.playerController }) | 96 | + PlayerVideoControlComponent({ playerController: this.playerController,isPlayStatus: $isPlayStatus}) |
| 80 | .visibility(this.isShowControl ? Visibility.Visible : Visibility.Hidden) | 97 | .visibility(this.isShowControl ? Visibility.Visible : Visibility.Hidden) |
| 81 | .animation({ duration: 500 }) | 98 | .animation({ duration: 500 }) |
| 82 | .position({ y: '100%' }) | 99 | .position({ y: '100%' }) |
| @@ -13,7 +13,7 @@ export struct PlayerVideoControlComponent { | @@ -13,7 +13,7 @@ export struct PlayerVideoControlComponent { | ||
| 13 | @State totalTime: string = '' | 13 | @State totalTime: string = '' |
| 14 | @State progressVal: number = 0; | 14 | @State progressVal: number = 0; |
| 15 | //是否处于播放状态中 | 15 | //是否处于播放状态中 |
| 16 | - @State isPlayStatus: boolean = true | 16 | + @Link isPlayStatus?: boolean |
| 17 | @Consume displayDirection: DisplayDirection | 17 | @Consume displayDirection: DisplayDirection |
| 18 | @Consume contentDetailData: ContentDetailDTO | 18 | @Consume contentDetailData: ContentDetailDTO |
| 19 | @Consume isSmall:boolean | 19 | @Consume isSmall:boolean |
| @@ -7,6 +7,7 @@ import { BusinessError } from '@ohos.base'; | @@ -7,6 +7,7 @@ import { BusinessError } from '@ohos.base'; | ||
| 7 | import { DeviceUtil, EmitterEventId, EmitterUtils, Logger, SPHelper, WindowModel } from 'wdKit'; | 7 | import { DeviceUtil, EmitterEventId, EmitterUtils, Logger, SPHelper, WindowModel } from 'wdKit'; |
| 8 | import { ConfigurationConstant } from '@kit.AbilityKit'; | 8 | import { ConfigurationConstant } from '@kit.AbilityKit'; |
| 9 | import { StartupManager } from '../startupmanager/StartupManager'; | 9 | import { StartupManager } from '../startupmanager/StartupManager'; |
| 10 | +import { AppLinkingManager } from 'wdRouter'; | ||
| 10 | 11 | ||
| 11 | let floatWindowClass: window.Window | null = null; | 12 | let floatWindowClass: window.Window | null = null; |
| 12 | const TAG = 'EntryAbility' | 13 | const TAG = 'EntryAbility' |
| @@ -19,7 +20,8 @@ export default class EntryAbility extends UIAbility { | @@ -19,7 +20,8 @@ export default class EntryAbility extends UIAbility { | ||
| 19 | StartupManager.sharedInstance().appAgreedProtocol() | 20 | StartupManager.sharedInstance().appAgreedProtocol() |
| 20 | } | 21 | } |
| 21 | Logger.info(TAG, 'Ability onCreate'); | 22 | Logger.info(TAG, 'Ability onCreate'); |
| 22 | - | 23 | + //只判断不跳转 |
| 24 | + AppLinkingManager.sharedInstance().comsumeLastUriContent(false) | ||
| 23 | // 还没深色模式需求,暂直接不跟随系统。 | 25 | // 还没深色模式需求,暂直接不跟随系统。 |
| 24 | this.context.getApplicationContext().setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_LIGHT); | 26 | this.context.getApplicationContext().setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_LIGHT); |
| 25 | 27 |
| @@ -59,7 +59,14 @@ struct LaunchPage { | @@ -59,7 +59,14 @@ struct LaunchPage { | ||
| 59 | this.timerId = setTimeout(() => { | 59 | this.timerId = setTimeout(() => { |
| 60 | this.isJumpToAdvertising = true; | 60 | this.isJumpToAdvertising = true; |
| 61 | 61 | ||
| 62 | - WDRouterRule.jumpWithPage(WDRouterPage.launchAdvertisingPage) | 62 | + let hasLink = SPHelper.default.getSync(SpConstants.HAS_LINK,false) |
| 63 | + if(hasLink){ | ||
| 64 | + SPHelper.default.deleteSync(SpConstants.HAS_LINK) | ||
| 65 | + WDRouterRule.jumpWithPage(WDRouterPage.mainPage) | ||
| 66 | + }else{ | ||
| 67 | + WDRouterRule.jumpWithPage(WDRouterPage.launchAdvertisingPage) | ||
| 68 | + } | ||
| 69 | + | ||
| 63 | 70 | ||
| 64 | // router.pushUrl({ | 71 | // router.pushUrl({ |
| 65 | // url: 'pages/LaunchAdvertisingPage' | 72 | // url: 'pages/LaunchAdvertisingPage' |
| @@ -214,7 +214,7 @@ export struct BottomNavigationComponent { | @@ -214,7 +214,7 @@ export struct BottomNavigationComponent { | ||
| 214 | }, | 214 | }, |
| 215 | onLoadListener:{ | 215 | onLoadListener:{ |
| 216 | onLoadFailed:(err)=>{ | 216 | onLoadFailed:(err)=>{ |
| 217 | - console.error("ycg","Load Failed Reason: " + err + " cost " + (new Date().getTime() ) + " milliseconds"); | 217 | + console.error("Load Failed Reason: " + err + " cost " + (new Date().getTime() ) + " milliseconds"); |
| 218 | } | 218 | } |
| 219 | } | 219 | } |
| 220 | }; | 220 | }; |
| @@ -108,6 +108,7 @@ export class StartupManager { | @@ -108,6 +108,7 @@ export class StartupManager { | ||
| 108 | appOnDestory() { | 108 | appOnDestory() { |
| 109 | Logger.debug(TAG, "App onDestory") | 109 | Logger.debug(TAG, "App onDestory") |
| 110 | NetworkManager.getInstance().release() | 110 | NetworkManager.getInstance().release() |
| 111 | + SPHelper.default.deleteSync(SpConstants.HAS_LINK) | ||
| 111 | } | 112 | } |
| 112 | 113 | ||
| 113 | // 同意隐私协议之后,立即执行必要初始化 | 114 | // 同意隐私协议之后,立即执行必要初始化 |
-
Please register or login to post a comment