Showing
37 changed files
with
192 additions
and
81 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 | } |
| @@ -13,5 +13,7 @@ export const enum ViewType { | @@ -13,5 +13,7 @@ export const enum ViewType { | ||
| 13 | // 已加载结束/非失败/非空/可以是仅一页数据,即楼层数据列表PAGE_GROUP_LIST/ | 13 | // 已加载结束/非失败/非空/可以是仅一页数据,即楼层数据列表PAGE_GROUP_LIST/ |
| 14 | LOADED, | 14 | LOADED, |
| 15 | // 已加载的是tab导航数据(可嵌套page的楼层列表) | 15 | // 已加载的是tab导航数据(可嵌套page的楼层列表) |
| 16 | - NAV_BAR | 16 | + NAV_BAR, |
| 17 | + // 无网络 | ||
| 18 | + NoNetwork | ||
| 17 | } | 19 | } |
| @@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
| 8 | "version": "1.0.0", | 8 | "version": "1.0.0", |
| 9 | "dependencies": { | 9 | "dependencies": { |
| 10 | "@tingyun/harmonyos": "file:./src/main/ets/tingyunAPM/tingyun_0.0.6.har", | 10 | "@tingyun/harmonyos": "file:./src/main/ets/tingyunAPM/tingyun_0.0.6.har", |
| 11 | - "@umeng/common": "^1.0.21", | 11 | + "@umeng/common": "^1.0.31", |
| 12 | "@umeng/analytics": "^1.0.19", | 12 | "@umeng/analytics": "^1.0.19", |
| 13 | "@mpaas/udid": "0.0.2", | 13 | "@mpaas/udid": "0.0.2", |
| 14 | "@mpaas/upgrade": "0.0.2", | 14 | "@mpaas/upgrade": "0.0.2", |
| 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) { |
| 198 | + if(this.isJumpInnerLink){ | ||
| 190 | Logger.debug(TAG, "即将跳转链接: " + innerLink) | 199 | Logger.debug(TAG, "即将跳转链接: " + innerLink) |
| 191 | AppInnerLink.jumpWithLink(innerLink) | 200 | AppInnerLink.jumpWithLink(innerLink) |
| 192 | } | 201 | } |
| 202 | + } | ||
| 193 | } | 203 | } |
| @@ -260,7 +260,7 @@ export struct WdWebLocalComponent { | @@ -260,7 +260,7 @@ export struct WdWebLocalComponent { | ||
| 260 | // animateTo({duration: 1000}, () => { | 260 | // animateTo({duration: 1000}, () => { |
| 261 | this.progressOpacity = 0 | 261 | this.progressOpacity = 0 |
| 262 | // }) | 262 | // }) |
| 263 | - }, 3000) | 263 | + }, 4000) |
| 264 | } | 264 | } |
| 265 | cancelProgressTimer() { | 265 | cancelProgressTimer() { |
| 266 | if (this.progressTimerNumber > 0) { | 266 | if (this.progressTimerNumber > 0) { |
| @@ -37,6 +37,7 @@ export struct CardParser { | @@ -37,6 +37,7 @@ export struct CardParser { | ||
| 37 | pageShowTime: number = 0; | 37 | pageShowTime: number = 0; |
| 38 | pageHideTime: number = 0; | 38 | pageHideTime: number = 0; |
| 39 | isPeopleShipHome: boolean = false; | 39 | isPeopleShipHome: boolean = false; |
| 40 | + isNeedDivider:boolean = true | ||
| 40 | 41 | ||
| 41 | aboutToAppear(): void { | 42 | aboutToAppear(): void { |
| 42 | console.log('CardParser-', JSON.stringify(this.contentDTO)) | 43 | console.log('CardParser-', JSON.stringify(this.contentDTO)) |
| @@ -66,12 +67,14 @@ export struct CardParser { | @@ -66,12 +67,14 @@ export struct CardParser { | ||
| 66 | 67 | ||
| 67 | @Builder | 68 | @Builder |
| 68 | getBehindDivider() { | 69 | getBehindDivider() { |
| 70 | + if(this.isNeedDivider){ | ||
| 69 | behindDivider({ | 71 | behindDivider({ |
| 70 | compDTO: this.compDTO, | 72 | compDTO: this.compDTO, |
| 71 | nextCompDTO: this.nextCompDTO, | 73 | nextCompDTO: this.nextCompDTO, |
| 72 | compIndex: this.compIndex | 74 | compIndex: this.compIndex |
| 73 | }) | 75 | }) |
| 74 | } | 76 | } |
| 77 | + } | ||
| 75 | 78 | ||
| 76 | @Builder | 79 | @Builder |
| 77 | contentBuilder(contentDTO: ContentDTO) { | 80 | contentBuilder(contentDTO: ContentDTO) { |
| @@ -186,7 +189,8 @@ export struct CardParser { | @@ -186,7 +189,8 @@ export struct CardParser { | ||
| 186 | contentDTO, | 189 | contentDTO, |
| 187 | compDTO: this.compDTO, | 190 | compDTO: this.compDTO, |
| 188 | pageId: this.pageId, | 191 | pageId: this.pageId, |
| 189 | - pageName: this.pageName | 192 | + pageName: this.pageName, |
| 193 | + isPeopleShipHome:this.isPeopleShipHome | ||
| 190 | }) | 194 | }) |
| 191 | this.getBehindDivider() | 195 | this.getBehindDivider() |
| 192 | } else if (contentDTO.appStyle === CompStyle.Card_20) { | 196 | } else if (contentDTO.appStyle === CompStyle.Card_20) { |
| @@ -46,11 +46,17 @@ export struct ENewspaperItemComponent { | @@ -46,11 +46,17 @@ 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 | 53 | ||
| 54 | + newsSkeleton({showBottom: this.isShowSkeleton}) | ||
| 55 | + .visibility(this.isShowSkeleton ? Visibility.Visible : Visibility.None) | ||
| 56 | + .width('100%') | ||
| 57 | + .zIndex(1) | ||
| 58 | + | ||
| 59 | + | ||
| 54 | if (this.contentWidth !== 0) { | 60 | if (this.contentWidth !== 0) { |
| 55 | Canvas(this.context) | 61 | Canvas(this.context) |
| 56 | .width(px2vp(this.contentWidth)) | 62 | .width(px2vp(this.contentWidth)) |
| @@ -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 | } |
| @@ -18,7 +18,7 @@ export struct LiveFollowComponent { | @@ -18,7 +18,7 @@ export struct LiveFollowComponent { | ||
| 18 | @Prop rmhInfo: RmhInfoDTO | 18 | @Prop rmhInfo: RmhInfoDTO |
| 19 | @Consume contentDetailData: ContentDetailDTO | 19 | @Consume contentDetailData: ContentDetailDTO |
| 20 | @Consume @Watch('getBatchAttentionStatus') pageShow: number | 20 | @Consume @Watch('getBatchAttentionStatus') pageShow: number |
| 21 | - | 21 | + clickFollowButton?:()=>void |
| 22 | aboutToAppear(): void { | 22 | aboutToAppear(): void { |
| 23 | this.getBatchAttentionStatus() | 23 | this.getBatchAttentionStatus() |
| 24 | } | 24 | } |
| @@ -90,6 +90,9 @@ export struct LiveFollowComponent { | @@ -90,6 +90,9 @@ export struct LiveFollowComponent { | ||
| 90 | .backgroundColor(this.followStatus === '0' ? $r('app.color.color_ED2800') : $r('app.color.color_CCCCCC')) | 90 | .backgroundColor(this.followStatus === '0' ? $r('app.color.color_ED2800') : $r('app.color.color_CCCCCC')) |
| 91 | .visibility(this.followStatus === '0' ? Visibility.Visible : Visibility.None) | 91 | .visibility(this.followStatus === '0' ? Visibility.Visible : Visibility.None) |
| 92 | .onClick(() => { | 92 | .onClick(() => { |
| 93 | + if (this.clickFollowButton) { | ||
| 94 | + this.clickFollowButton() | ||
| 95 | + } | ||
| 93 | this.handleAccention() | 96 | this.handleAccention() |
| 94 | }) | 97 | }) |
| 95 | } | 98 | } |
| @@ -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) { |
| @@ -142,6 +142,7 @@ export struct Card2Component { | @@ -142,6 +142,7 @@ export struct Card2Component { | ||
| 142 | this.clicked = true; | 142 | this.clicked = true; |
| 143 | } | 143 | } |
| 144 | persistentStorage(this.contentDTO.objectId); | 144 | persistentStorage(this.contentDTO.objectId); |
| 145 | + // console.log(TAG,'this.contentDTO.objectType', this.contentDTO.objectType) | ||
| 145 | this.jumpDetail() | 146 | this.jumpDetail() |
| 146 | }) | 147 | }) |
| 147 | } | 148 | } |
| @@ -153,11 +154,13 @@ export struct Card2Component { | @@ -153,11 +154,13 @@ export struct Card2Component { | ||
| 153 | MinePageDatasModel.getAssertDetailData(this.contentDTO.relId,this.contentDTO.objectId,this.contentDTO.relType).then((value) => { | 154 | MinePageDatasModel.getAssertDetailData(this.contentDTO.relId,this.contentDTO.objectId,this.contentDTO.relType).then((value) => { |
| 154 | if(value == "1"){ | 155 | if(value == "1"){ |
| 155 | ProcessUtils.processPage(this.contentDTO) | 156 | ProcessUtils.processPage(this.contentDTO) |
| 156 | - }else{ | 157 | + } else { |
| 157 | ToastUtils.shortToast("内容不存在") | 158 | ToastUtils.shortToast("内容不存在") |
| 158 | } | 159 | } |
| 159 | }).catch((err: Error) => { | 160 | }).catch((err: Error) => { |
| 160 | console.log(TAG, JSON.stringify(err)) | 161 | console.log(TAG, JSON.stringify(err)) |
| 162 | + // 网络出小差了进入详情页 | ||
| 163 | + ProcessUtils.processPage(this.contentDTO) | ||
| 161 | }) | 164 | }) |
| 162 | } | 165 | } |
| 163 | } | 166 | } |
| @@ -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 | } |
| @@ -49,10 +49,10 @@ export struct PageComponent { | @@ -49,10 +49,10 @@ export struct PageComponent { | ||
| 49 | this.LoadingLayout() | 49 | this.LoadingLayout() |
| 50 | } else if (this.pageModel.viewType == ViewType.LOADED) { | 50 | } else if (this.pageModel.viewType == ViewType.LOADED) { |
| 51 | this.ListLayout() | 51 | this.ListLayout() |
| 52 | - } else if (this.pageModel.viewType == ViewType.EMPTY) { | 52 | + } else if (this.pageModel.viewType == ViewType.EMPTY || this.pageModel.viewType == ViewType.NoNetwork) { |
| 53 | //缺省页 | 53 | //缺省页 |
| 54 | EmptyComponent({ | 54 | EmptyComponent({ |
| 55 | - emptyType: this.pageModel.emptyType, | 55 | + emptyType: this.pageModel.viewType == ViewType.EMPTY ? this.pageModel.emptyType : this.pageModel.NoNetwork, |
| 56 | emptyButton: true, | 56 | emptyButton: true, |
| 57 | retry: () => { | 57 | retry: () => { |
| 58 | this.pageModel.viewType = ViewType.LOADING; | 58 | this.pageModel.viewType = ViewType.LOADING; |
| @@ -297,7 +297,7 @@ export struct PageComponent { | @@ -297,7 +297,7 @@ export struct PageComponent { | ||
| 297 | this.needload = false; | 297 | this.needload = false; |
| 298 | } | 298 | } |
| 299 | } else { | 299 | } else { |
| 300 | - this.pageModel.viewType = ViewType.EMPTY; | 300 | + this.pageModel.viewType = ViewType.NoNetwork; |
| 301 | } | 301 | } |
| 302 | } | 302 | } |
| 303 | 303 |
| @@ -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 | } |
| @@ -65,6 +65,8 @@ export struct EmptyComponent { | @@ -65,6 +65,8 @@ export struct EmptyComponent { | ||
| 65 | @State timeNum: number = 10 | 65 | @State timeNum: number = 10 |
| 66 | ///占位图上是否显示返回按钮 | 66 | ///占位图上是否显示返回按钮 |
| 67 | @State showBackButton: boolean = true | 67 | @State showBackButton: boolean = true |
| 68 | + | ||
| 69 | + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | ||
| 68 | /** | 70 | /** |
| 69 | * The empty image width percentage setting. | 71 | * The empty image width percentage setting. |
| 70 | */ | 72 | */ |
| @@ -114,6 +116,7 @@ export struct EmptyComponent { | @@ -114,6 +116,7 @@ export struct EmptyComponent { | ||
| 114 | Stack({alignContent:Alignment.Bottom}) { | 116 | Stack({alignContent:Alignment.Bottom}) { |
| 115 | this.noProgrammeData(); | 117 | this.noProgrammeData(); |
| 116 | if (this.showBackButton) { | 118 | if (this.showBackButton) { |
| 119 | + Column(){ | ||
| 117 | Image($r("app.media.icon_arrow_left_white")) | 120 | Image($r("app.media.icon_arrow_left_white")) |
| 118 | .width(24) | 121 | .width(24) |
| 119 | .height(24) | 122 | .height(24) |
| @@ -121,10 +124,18 @@ export struct EmptyComponent { | @@ -121,10 +124,18 @@ export struct EmptyComponent { | ||
| 121 | router.back(); | 124 | router.back(); |
| 122 | }) | 125 | }) |
| 123 | .position({ | 126 | .position({ |
| 124 | - bottom: 15, | 127 | + bottom: 16, |
| 125 | left: 16 | 128 | left: 16 |
| 126 | }) | 129 | }) |
| 127 | } | 130 | } |
| 131 | + .height(56) | ||
| 132 | + .width('100%') | ||
| 133 | + .justifyContent(FlexAlign.Center) | ||
| 134 | + .alignItems(HorizontalAlign.Start) | ||
| 135 | + .margin({ | ||
| 136 | + bottom: px2vp(this.bottomSafeHeight) | ||
| 137 | + }) | ||
| 138 | + } | ||
| 128 | } | 139 | } |
| 129 | } | 140 | } |
| 130 | 141 | ||
| @@ -147,7 +158,8 @@ export struct EmptyComponent { | @@ -147,7 +158,8 @@ export struct EmptyComponent { | ||
| 147 | .fontWeight(FontWeight.Normal) | 158 | .fontWeight(FontWeight.Normal) |
| 148 | .opacity(this.TEXT_OPACITY) | 159 | .opacity(this.TEXT_OPACITY) |
| 149 | .margin({ top: this.EMPTY_TIP_TEXT_MARGIN_TOP }) | 160 | .margin({ top: this.EMPTY_TIP_TEXT_MARGIN_TOP }) |
| 150 | - .fontColor(this.emptyType === WDViewDefaultType.WDViewDefaultType_NoComment1 ? '#999999' : '#666666') | 161 | + // .fontColor(this.emptyType === WDViewDefaultType.WDViewDefaultType_NoComment1 ? '#999999' : '#666666') |
| 162 | + .fontColor('#666666') | ||
| 151 | .onClick((event: ClickEvent) => { | 163 | .onClick((event: ClickEvent) => { |
| 152 | Logger.info(TAG, `noProgrammeData onClick event?.source: ${event.source}`); | 164 | Logger.info(TAG, `noProgrammeData onClick event?.source: ${event.source}`); |
| 153 | }) | 165 | }) |
| @@ -29,7 +29,7 @@ export struct RecommendList { | @@ -29,7 +29,7 @@ export struct RecommendList { | ||
| 29 | } | 29 | } |
| 30 | ForEach(this.recommendList, (item: ContentDTO, index: number) => { | 30 | ForEach(this.recommendList, (item: ContentDTO, index: number) => { |
| 31 | Row() { | 31 | Row() { |
| 32 | - CardParser({ compDTO:new CompDTO,contentDTO: item }); | 32 | + CardParser({ compDTO:new CompDTO,contentDTO: item ,isNeedDivider:false}); |
| 33 | }.padding({ left: 6, right: 6 }) | 33 | }.padding({ left: 6, right: 6 }) |
| 34 | if (this.recommendList.length !== index + 1) { | 34 | if (this.recommendList.length !== index + 1) { |
| 35 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | 35 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| @@ -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') |
| @@ -200,7 +200,8 @@ export class PageHelper { | @@ -200,7 +200,8 @@ export class PageHelper { | ||
| 200 | pageModel.displayGroupInfoMd5 = pageDto.md5 | 200 | pageModel.displayGroupInfoMd5 = pageDto.md5 |
| 201 | } else { | 201 | } else { |
| 202 | pageDto = await PageViewModel.getPageGroupCompData(pageModel.bizCopy()) as PageDTO | 202 | pageDto = await PageViewModel.getPageGroupCompData(pageModel.bizCopy()) as PageDTO |
| 203 | - if (pageDto.md5 == pageModel.displayGroupInfoMd5) { | 203 | + //增加楼层数据异常判断条件 |
| 204 | + if (pageDto.md5 == pageModel.displayGroupInfoMd5 || pageDto.compList == null || pageDto.compList.length === 0 ) { | ||
| 204 | // Logger.debug(TAG, 'parseGroup cache load, return: ' + pageDto.md5) | 205 | // Logger.debug(TAG, 'parseGroup cache load, return: ' + pageDto.md5) |
| 205 | // 下拉刷新场景,数据没变,拦截刷新UI,重置相关参数 | 206 | // 下拉刷新场景,数据没变,拦截刷新UI,重置相关参数 |
| 206 | if (pageModel.loadStrategy === 2) { | 207 | if (pageModel.loadStrategy === 2) { |
| @@ -55,6 +55,7 @@ export default class PageModel { | @@ -55,6 +55,7 @@ export default class PageModel { | ||
| 55 | offsetY: number = 0; | 55 | offsetY: number = 0; |
| 56 | viewType: number = ViewType.LOADING; | 56 | viewType: number = ViewType.LOADING; |
| 57 | emptyType: WDViewDefaultType = WDViewDefaultType.WDViewDefaultType_Default | 57 | emptyType: WDViewDefaultType = WDViewDefaultType.WDViewDefaultType_Default |
| 58 | + NoNetwork: WDViewDefaultType = WDViewDefaultType.WDViewDefaultType_NoNetwork | ||
| 58 | hasMore: boolean = true; | 59 | hasMore: boolean = true; |
| 59 | startIndex = 0; | 60 | startIndex = 0; |
| 60 | endIndex = 0; | 61 | endIndex = 0; |
| @@ -75,9 +75,7 @@ export struct TabChatComponent { | @@ -75,9 +75,7 @@ export struct TabChatComponent { | ||
| 75 | Stack() { | 75 | Stack() { |
| 76 | if (this.pageModel.viewType == ViewType.LOADING) { | 76 | if (this.pageModel.viewType == ViewType.LOADING) { |
| 77 | this.LoadingLayout() | 77 | this.LoadingLayout() |
| 78 | - } else if (this.pageModel.viewType == ViewType.ERROR) { | ||
| 79 | - ErrorComponent() | ||
| 80 | - } else if (this.pageModel.viewType == ViewType.EMPTY) { | 78 | + } else if (this.pageModel.viewType == ViewType.EMPTY || this.pageModel.viewType == ViewType.ERROR) { |
| 81 | EmptyComponent({ emptyType: WDViewDefaultType.WDViewDefaultType_NoComment1, showBackButton:false}) | 79 | EmptyComponent({ emptyType: WDViewDefaultType.WDViewDefaultType_NoComment1, showBackButton:false}) |
| 82 | } else { | 80 | } else { |
| 83 | 81 |
| @@ -72,9 +72,7 @@ export struct TabLiveComponent { | @@ -72,9 +72,7 @@ export struct TabLiveComponent { | ||
| 72 | Stack() { | 72 | Stack() { |
| 73 | if (this.pageModel.viewType == ViewType.LOADING) { | 73 | if (this.pageModel.viewType == ViewType.LOADING) { |
| 74 | this.LoadingLayout() | 74 | this.LoadingLayout() |
| 75 | - } else if (this.pageModel.viewType == ViewType.ERROR) { | ||
| 76 | - ErrorComponent() | ||
| 77 | - } else if (this.pageModel.viewType == ViewType.EMPTY) { | 75 | + } else if (this.pageModel.viewType == ViewType.EMPTY || this.pageModel.viewType == ViewType.ERROR) { |
| 78 | EmptyComponent({ emptyType: WDViewDefaultType.WDViewDefaultType_NoContent1, showBackButton:false }) | 76 | EmptyComponent({ emptyType: WDViewDefaultType.WDViewDefaultType_NoContent1, showBackButton:false }) |
| 79 | } else { | 77 | } else { |
| 80 | CustomPullToRefresh({ | 78 | CustomPullToRefresh({ |
| @@ -121,12 +121,7 @@ export struct PlayUIComponent { | @@ -121,12 +121,7 @@ export struct PlayUIComponent { | ||
| 121 | right: 10 | 121 | right: 10 |
| 122 | }) | 122 | }) |
| 123 | .onClick(() => { | 123 | .onClick(() => { |
| 124 | - this.displayDirection = DisplayDirection.VERTICAL | ||
| 125 | - WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ? | ||
| 126 | - window.Orientation.PORTRAIT : | ||
| 127 | - window.Orientation.LANDSCAPE) | ||
| 128 | - WindowModel.shared.setSpecificSystemBarEnabled(true) | ||
| 129 | - | 124 | + this.quitFullScreen() |
| 130 | }) | 125 | }) |
| 131 | if (this.contentDetailData.liveInfo?.liveState != 'wait') { | 126 | if (this.contentDetailData.liveInfo?.liveState != 'wait') { |
| 132 | //标题 | 127 | //标题 |
| @@ -160,7 +155,12 @@ export struct PlayUIComponent { | @@ -160,7 +155,12 @@ export struct PlayUIComponent { | ||
| 160 | Row() { | 155 | Row() { |
| 161 | if (this.contentDetailData?.rmhInfo) { | 156 | if (this.contentDetailData?.rmhInfo) { |
| 162 | LiveFollowComponent({ | 157 | LiveFollowComponent({ |
| 163 | - rmhInfo: this.contentDetailData.rmhInfo | 158 | + rmhInfo: this.contentDetailData.rmhInfo, |
| 159 | + clickFollowButton:() => { | ||
| 160 | + if (this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL) { | ||
| 161 | + this.quitFullScreen() | ||
| 162 | + } | ||
| 163 | + } | ||
| 164 | }) | 164 | }) |
| 165 | .margin({ | 165 | .margin({ |
| 166 | // top:-7, | 166 | // top:-7, |
| @@ -450,4 +450,12 @@ export struct PlayUIComponent { | @@ -450,4 +450,12 @@ export struct PlayUIComponent { | ||
| 450 | this.playerController?.setSeekTime(value, mode); | 450 | this.playerController?.setSeekTime(value, mode); |
| 451 | }) | 451 | }) |
| 452 | } | 452 | } |
| 453 | + | ||
| 454 | + quitFullScreen() { | ||
| 455 | + this.displayDirection = DisplayDirection.VERTICAL | ||
| 456 | + WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ? | ||
| 457 | + window.Orientation.PORTRAIT : | ||
| 458 | + window.Orientation.LANDSCAPE) | ||
| 459 | + WindowModel.shared.setSpecificSystemBarEnabled(true) | ||
| 460 | + } | ||
| 453 | } | 461 | } |
| @@ -52,21 +52,7 @@ export struct PlayerTitleComponent { | @@ -52,21 +52,7 @@ export struct PlayerTitleComponent { | ||
| 52 | right: 10 | 52 | right: 10 |
| 53 | }) | 53 | }) |
| 54 | .onClick(() => { | 54 | .onClick(() => { |
| 55 | - WindowModel.shared.setPreferredOrientation((this.isLarge && this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL) ? | ||
| 56 | - window.Orientation.PORTRAIT : | ||
| 57 | - window.Orientation.LANDSCAPE) | ||
| 58 | - WindowModel.shared.setSpecificSystemBarEnabled(true) | ||
| 59 | - this.isLarge = false | ||
| 60 | - this.displayDirection = DisplayDirection.VERTICAL | ||
| 61 | - if(this.playerController){ | ||
| 62 | - if(this.playerController.onVideoSizePlayerComponentBack){ | ||
| 63 | - this.playerController.onVideoSizePlayerComponentBack(2,1); | ||
| 64 | - } | ||
| 65 | - // if(this.playerController.onVideoSizePlayerUIComponentMethod){ | ||
| 66 | - // this.playerController.onVideoSizePlayerUIComponentMethod(2,1); | ||
| 67 | - // } | ||
| 68 | - } | ||
| 69 | - this.isFullScreen = false | 55 | + this.quitFullScreen() |
| 70 | }) | 56 | }) |
| 71 | Text(this.contentDetailData.newsTitle || '') | 57 | Text(this.contentDetailData.newsTitle || '') |
| 72 | .maxLines(2) | 58 | .maxLines(2) |
| @@ -104,7 +90,12 @@ export struct PlayerTitleComponent { | @@ -104,7 +90,12 @@ export struct PlayerTitleComponent { | ||
| 104 | getLiveStatusView() { | 90 | getLiveStatusView() { |
| 105 | if (this.contentDetailData.rmhInfo?.rmhName) { | 91 | if (this.contentDetailData.rmhInfo?.rmhName) { |
| 106 | LiveFollowComponent({ | 92 | LiveFollowComponent({ |
| 107 | - rmhInfo: this.contentDetailData.rmhInfo | 93 | + rmhInfo: this.contentDetailData.rmhInfo, |
| 94 | + clickFollowButton:()=> { | ||
| 95 | + if (this.isFullScreen) { | ||
| 96 | + this.quitFullScreen() | ||
| 97 | + } | ||
| 98 | + } | ||
| 108 | }).margin({ | 99 | }).margin({ |
| 109 | right: 10 | 100 | right: 10 |
| 110 | }) | 101 | }) |
| @@ -159,4 +150,24 @@ export struct PlayerTitleComponent { | @@ -159,4 +150,24 @@ export struct PlayerTitleComponent { | ||
| 159 | } : 4) | 150 | } : 4) |
| 160 | } | 151 | } |
| 161 | } | 152 | } |
| 153 | + | ||
| 154 | + quitFullScreen() { | ||
| 155 | + WindowModel.shared.setPreferredOrientation((this.isLarge && this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL) ? | ||
| 156 | + window.Orientation.PORTRAIT : | ||
| 157 | + window.Orientation.LANDSCAPE) | ||
| 158 | + WindowModel.shared.setSpecificSystemBarEnabled(true) | ||
| 159 | + this.isLarge = false | ||
| 160 | + this.displayDirection = DisplayDirection.VERTICAL | ||
| 161 | + if(this.playerController){ | ||
| 162 | + if(this.playerController.onVideoSizePlayerComponentBack){ | ||
| 163 | + this.playerController.onVideoSizePlayerComponentBack(2,1); | ||
| 164 | + } | ||
| 165 | + // if(this.playerController.onVideoSizePlayerUIComponentMethod){ | ||
| 166 | + // this.playerController.onVideoSizePlayerUIComponentMethod(2,1); | ||
| 167 | + // } | ||
| 168 | + } | ||
| 169 | + this.isFullScreen = false | ||
| 170 | + } | ||
| 162 | } | 171 | } |
| 172 | + | ||
| 173 | + |
| @@ -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 |
| @@ -245,6 +245,13 @@ export struct DetailPlayShortVideoPage { | @@ -245,6 +245,13 @@ export struct DetailPlayShortVideoPage { | ||
| 245 | // 注册监听网络连接 | 245 | // 注册监听网络连接 |
| 246 | if (this.currentIndex === this.index && type != NetworkType.TYPE_UNKNOWN) { | 246 | if (this.currentIndex === this.index && type != NetworkType.TYPE_UNKNOWN) { |
| 247 | console.log(TAG, '网络连接状态变化', type, 'this.currentIndex', this.currentIndex, 'this.index', this.index) | 247 | console.log(TAG, '网络连接状态变化', type, 'this.currentIndex', this.currentIndex, 'this.index', this.index) |
| 248 | + if(type == NetworkType.TYPE_CELLULAR) { | ||
| 249 | + this.toastTextVisible = true | ||
| 250 | + this.onlyWifiLoadVideo = false | ||
| 251 | + } else if(type == NetworkType.TYPE_WIFI) { | ||
| 252 | + this.toastTextVisible = false | ||
| 253 | + this.onlyWifiLoadVideo = true | ||
| 254 | + } | ||
| 248 | this.currentIndexChange() | 255 | this.currentIndexChange() |
| 249 | } | 256 | } |
| 250 | }, 1000) | 257 | }, 1000) |
| @@ -426,10 +433,7 @@ export struct DetailPlayShortVideoPage { | @@ -426,10 +433,7 @@ export struct DetailPlayShortVideoPage { | ||
| 426 | .onClick(() => { | 433 | .onClick(() => { |
| 427 | this.onlyWifiLoadVideo = true | 434 | this.onlyWifiLoadVideo = true |
| 428 | this.toastTextVisible = false | 435 | this.toastTextVisible = false |
| 429 | - this.playerController?.play() | ||
| 430 | - this.playerController.startRenderFrame(() => { | ||
| 431 | - this.imageVisible = false | ||
| 432 | - }) | 436 | + this.currentIndexChange() |
| 433 | }) | 437 | }) |
| 434 | } | 438 | } |
| 435 | .width('100%') | 439 | .width('100%') |
| @@ -97,6 +97,8 @@ export struct PlayerFullScreenView { | @@ -97,6 +97,8 @@ export struct PlayerFullScreenView { | ||
| 97 | }) | 97 | }) |
| 98 | Text(this.getTitle()) | 98 | Text(this.getTitle()) |
| 99 | .fontSize(18) | 99 | .fontSize(18) |
| 100 | + .lineHeight(24) | ||
| 101 | + .fontWeight(600) | ||
| 100 | .fontColor(Color.White) | 102 | .fontColor(Color.White) |
| 101 | .maxLines(1) | 103 | .maxLines(1) |
| 102 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 104 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| @@ -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 |
| @@ -23,13 +23,17 @@ struct MultiPictureDetailPage { | @@ -23,13 +23,17 @@ struct MultiPictureDetailPage { | ||
| 23 | @Provide pageName: string = TrackConstants.PageName.Atlas_Detail | 23 | @Provide pageName: string = TrackConstants.PageName.Atlas_Detail |
| 24 | @Provide bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | 24 | @Provide bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 |
| 25 | @Provide topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | 25 | @Provide topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 |
| 26 | + action: Action = {} as Action | ||
| 27 | + | ||
| 28 | + | ||
| 26 | build() { | 29 | build() { |
| 27 | Row() { | 30 | Row() { |
| 28 | Column() { | 31 | Column() { |
| 29 | MultiPictureDetailPageComponent({ | 32 | MultiPictureDetailPageComponent({ |
| 30 | relId: this.relId, | 33 | relId: this.relId, |
| 31 | contentId: this.contentId, | 34 | contentId: this.contentId, |
| 32 | - relType: this.relType | 35 | + relType: this.relType, |
| 36 | + action: this.action | ||
| 33 | }) | 37 | }) |
| 34 | } | 38 | } |
| 35 | 39 | ||
| @@ -53,13 +57,15 @@ struct MultiPictureDetailPage { | @@ -53,13 +57,15 @@ struct MultiPictureDetailPage { | ||
| 53 | 57 | ||
| 54 | Logger.info(TAG, 'aboutToDisappear'); | 58 | Logger.info(TAG, 'aboutToDisappear'); |
| 55 | 59 | ||
| 56 | - let par:Action = router.getParams() as Action; | ||
| 57 | - let params = par?.params; | 60 | + let action:Action = router.getParams() as Action; |
| 61 | + let params = action?.params; | ||
| 58 | this.relId = params?.extra?.relId || ''; | 62 | this.relId = params?.extra?.relId || ''; |
| 59 | this.relType = params?.extra?.relType || ''; | 63 | this.relType = params?.extra?.relType || ''; |
| 60 | this.contentId = params?.contentID || ''; | 64 | this.contentId = params?.contentID || ''; |
| 61 | Logger.info(TAG, 'aboutToAppear'); | 65 | Logger.info(TAG, 'aboutToAppear'); |
| 62 | Logger.info(TAG, 'params', JSON.stringify(params)); | 66 | Logger.info(TAG, 'params', JSON.stringify(params)); |
| 67 | + | ||
| 68 | + this.action = action | ||
| 63 | } | 69 | } |
| 64 | 70 | ||
| 65 | onBackPress() { | 71 | onBackPress() { |
| @@ -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 | + 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{ | ||
| 62 | WDRouterRule.jumpWithPage(WDRouterPage.launchAdvertisingPage) | 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 | }; |
| @@ -7,7 +7,8 @@ import { | @@ -7,7 +7,8 @@ import { | ||
| 7 | PhotoListBean, | 7 | PhotoListBean, |
| 8 | postBatchAttentionStatusParams, | 8 | postBatchAttentionStatusParams, |
| 9 | postInteractAccentionOperateParams, | 9 | postInteractAccentionOperateParams, |
| 10 | - postInteractBrowsOperateParams | 10 | + postInteractBrowsOperateParams, |
| 11 | + Action | ||
| 11 | } from 'wdBean'; | 12 | } from 'wdBean'; |
| 12 | import { DateTimeUtils } from 'wdKit/Index'; | 13 | import { DateTimeUtils } from 'wdKit/Index'; |
| 13 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; | 14 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; |
| @@ -65,6 +66,7 @@ export struct MultiPictureDetailPageComponent { | @@ -65,6 +66,7 @@ export struct MultiPictureDetailPageComponent { | ||
| 65 | @State isScrollerTop: boolean = false; | 66 | @State isScrollerTop: boolean = false; |
| 66 | @Provide duration: number = 0 | 67 | @Provide duration: number = 0 |
| 67 | @State executedStartTime: number = new Date().getTime() | 68 | @State executedStartTime: number = new Date().getTime() |
| 69 | + action: Action = {} as Action | ||
| 68 | 70 | ||
| 69 | //watch监听页码回调 | 71 | //watch监听页码回调 |
| 70 | onCurrentPageNumUpdated(): void { | 72 | onCurrentPageNumUpdated(): void { |
| @@ -97,6 +99,12 @@ export struct MultiPictureDetailPageComponent { | @@ -97,6 +99,12 @@ export struct MultiPictureDetailPageComponent { | ||
| 97 | // }) | 99 | // }) |
| 98 | this.getDetail() | 100 | this.getDetail() |
| 99 | this.contentTrackingDict() | 101 | this.contentTrackingDict() |
| 102 | + | ||
| 103 | + if(this.action.params?.targetLayout == "comment"){ | ||
| 104 | + setTimeout(() => { | ||
| 105 | + this.showCommentList = true | ||
| 106 | + }, 1000) | ||
| 107 | + } | ||
| 100 | } | 108 | } |
| 101 | 109 | ||
| 102 | contentTrackingDict() { | 110 | contentTrackingDict() { |
| @@ -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