Showing
12 changed files
with
137 additions
and
52 deletions
| @@ -50,6 +50,13 @@ | @@ -50,6 +50,13 @@ | ||
| 50 | "compileSdkVersion": "5.0.0(12)", | 50 | "compileSdkVersion": "5.0.0(12)", |
| 51 | "compatibleSdkVersion": "5.0.0(12)", | 51 | "compatibleSdkVersion": "5.0.0(12)", |
| 52 | "runtimeOS": "HarmonyOS", | 52 | "runtimeOS": "HarmonyOS", |
| 53 | + "buildOption": { | ||
| 54 | + "arkOptions": { | ||
| 55 | + "buildProfileFields": { | ||
| 56 | + "BUILD_VERSION": "" | ||
| 57 | + } | ||
| 58 | + } | ||
| 59 | + }, | ||
| 53 | }, | 60 | }, |
| 54 | { | 61 | { |
| 55 | "name": "productRELEASE", | 62 | "name": "productRELEASE", |
| @@ -57,6 +64,13 @@ | @@ -57,6 +64,13 @@ | ||
| 57 | "compileSdkVersion": "5.0.0(12)", | 64 | "compileSdkVersion": "5.0.0(12)", |
| 58 | "compatibleSdkVersion": "5.0.0(12)", | 65 | "compatibleSdkVersion": "5.0.0(12)", |
| 59 | "runtimeOS": "HarmonyOS", | 66 | "runtimeOS": "HarmonyOS", |
| 67 | + "buildOption": { | ||
| 68 | + "arkOptions": { | ||
| 69 | + "buildProfileFields": { | ||
| 70 | + "BUILD_VERSION": "" | ||
| 71 | + } | ||
| 72 | + } | ||
| 73 | + } | ||
| 60 | } | 74 | } |
| 61 | ], | 75 | ], |
| 62 | "buildModeSet": [ | 76 | "buildModeSet": [ |
| @@ -2,7 +2,9 @@ | @@ -2,7 +2,9 @@ | ||
| 2 | "apiType": "stageMode", | 2 | "apiType": "stageMode", |
| 3 | "buildOption": { | 3 | "buildOption": { |
| 4 | "arkOptions": { | 4 | "arkOptions": { |
| 5 | - // "apPath": "./modules.ap" /* Profile used for profile-guided optimization (PGO), a compiler optimization technique to improve app runtime performance. */ | 5 | + "buildProfileFields": { |
| 6 | + "BUILD_TIME": "" | ||
| 7 | + } | ||
| 6 | } | 8 | } |
| 7 | }, | 9 | }, |
| 8 | "buildOptionSet": [ | 10 | "buildOptionSet": [ |
| @@ -16,6 +18,9 @@ | @@ -16,6 +18,9 @@ | ||
| 16 | "./obfuscation-rules.txt" | 18 | "./obfuscation-rules.txt" |
| 17 | ] | 19 | ] |
| 18 | } | 20 | } |
| 21 | + }, | ||
| 22 | + "buildProfileFields": { | ||
| 23 | + "BUILD_TIME": "" | ||
| 19 | } | 24 | } |
| 20 | } | 25 | } |
| 21 | }, | 26 | }, |
| 1 | import { hspTasks } from '@ohos/hvigor-ohos-plugin'; | 1 | import { hspTasks } from '@ohos/hvigor-ohos-plugin'; |
| 2 | +import { appTasks, OhosAppContext, OhosPluginId } from '@ohos/hvigor-ohos-plugin'; | ||
| 3 | +import { hvigor, getNode } from '@ohos/hvigor' | ||
| 4 | + | ||
| 5 | +// 获取根节点 | ||
| 6 | +const rootNode = getNode(__filename); | ||
| 7 | +// 为根节点添加一个afterNodeEvaluate hook 在hook中修改根目录下的build-profile.json5的内容并使能 | ||
| 8 | +rootNode.afterNodeEvaluate(node => { | ||
| 9 | + // 获取app插件的上下文对象 | ||
| 10 | + const appContext = node.getContext(OhosPluginId.OHOS_HSP_PLUGIN) as OhosHspContext; | ||
| 11 | + // 通过上下文对象获取从根目录build-profile.json5文件中读出来的obj对象 | ||
| 12 | + const buildProfileOpt = appContext.getBuildProfileOpt(); | ||
| 13 | + buildProfileOpt['buildOption']['arkOptions']['buildProfileFields'] = { | ||
| 14 | + "BUILD_VERSION": getBuildVersion(), | ||
| 15 | + }; | ||
| 16 | + // 将obj对象设置回上下文对象以使能到构建的过程与结果中 | ||
| 17 | + appContext.setBuildProfileOpt(buildProfileOpt); | ||
| 18 | +}) | ||
| 2 | 19 | ||
| 3 | export default { | 20 | export default { |
| 4 | system: hspTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ | 21 | system: hspTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ |
| 5 | - plugins:[] /* Custom plugin to extend the functionality of Hvigor. */ | 22 | + plugins: [] /* Custom plugin to extend the functionality of Hvigor. */ |
| 23 | +} | ||
| 24 | + | ||
| 25 | +function getBuildVersion() { | ||
| 26 | + // build时间作为版本 | ||
| 27 | + let now = new Date() | ||
| 28 | + let year = now.getFullYear() | ||
| 29 | + let month = ('0' + (now.getMonth() + 1)).slice(-2) | ||
| 30 | + let day = ('0' + (now.getDate())).slice(-2) | ||
| 31 | + let hours = ('0' + (now.getHours())).slice(-2) | ||
| 32 | + let minutes = ('0' + (now.getMinutes())).slice(-2) | ||
| 33 | + let str = year + month + day + hours + minutes | ||
| 34 | + return str; | ||
| 6 | } | 35 | } |
| 1 | import bundleManager from '@ohos.bundle.bundleManager'; | 1 | import bundleManager from '@ohos.bundle.bundleManager'; |
| 2 | import common from '@ohos.app.ability.common'; | 2 | import common from '@ohos.app.ability.common'; |
| 3 | import { Logger } from './Logger'; | 3 | import { Logger } from './Logger'; |
| 4 | +import BuildProfile from 'BuildProfile'; | ||
| 4 | 5 | ||
| 5 | const TAG: string = 'AppUtils'; | 6 | const TAG: string = 'AppUtils'; |
| 6 | 7 | ||
| @@ -8,9 +9,14 @@ const TAG: string = 'AppUtils'; | @@ -8,9 +9,14 @@ const TAG: string = 'AppUtils'; | ||
| 8 | * 与应用相关属性或操作 | 9 | * 与应用相关属性或操作 |
| 9 | */ | 10 | */ |
| 10 | export class AppUtils { | 11 | export class AppUtils { |
| 12 | + private static buildVersion: string = '' | ||
| 13 | + static { | ||
| 14 | + AppUtils.buildVersion = BuildProfile.BUILD_VERSION; | ||
| 15 | + } | ||
| 16 | + | ||
| 11 | /** | 17 | /** |
| 12 | * 获取应用名称 | 18 | * 获取应用名称 |
| 13 | - * 即:咪咕视频 | 19 | + * 即:人民日报 |
| 14 | */ | 20 | */ |
| 15 | static getAppName(context: common.Context): string { | 21 | static getAppName(context: common.Context): string { |
| 16 | // todo:获取到的是 $string:app_name | 22 | // todo:获取到的是 $string:app_name |
| @@ -20,7 +26,6 @@ export class AppUtils { | @@ -20,7 +26,6 @@ export class AppUtils { | ||
| 20 | 26 | ||
| 21 | /** | 27 | /** |
| 22 | * 获取应用的包名 | 28 | * 获取应用的包名 |
| 23 | - * 即:com.cmcc.myapplication | ||
| 24 | */ | 29 | */ |
| 25 | static getPackageName(context: common.Context): string { | 30 | static getPackageName(context: common.Context): string { |
| 26 | return context.applicationInfo?.name; | 31 | return context.applicationInfo?.name; |
| @@ -60,7 +65,6 @@ export class AppUtils { | @@ -60,7 +65,6 @@ export class AppUtils { | ||
| 60 | } | 65 | } |
| 61 | 66 | ||
| 62 | static getOSName() { | 67 | static getOSName() { |
| 63 | - // TODO: 待确认,暂时写死Android | ||
| 64 | return "Harmony" | 68 | return "Harmony" |
| 65 | } | 69 | } |
| 66 | 70 | ||
| @@ -74,5 +78,12 @@ export class AppUtils { | @@ -74,5 +78,12 @@ export class AppUtils { | ||
| 74 | } | 78 | } |
| 75 | return ''; | 79 | return ''; |
| 76 | } | 80 | } |
| 81 | + | ||
| 82 | + /** | ||
| 83 | + * 应用build版本,时间,如:'202405291450' | ||
| 84 | + */ | ||
| 85 | + static getBuildVersion(): string { | ||
| 86 | + return AppUtils.buildVersion; | ||
| 87 | + } | ||
| 77 | } | 88 | } |
| 78 | 89 |
| @@ -40,9 +40,6 @@ instance.interceptors.request.use( | @@ -40,9 +40,6 @@ instance.interceptors.request.use( | ||
| 40 | // 公共请求参数 | 40 | // 公共请求参数 |
| 41 | // config.params.key = key | 41 | // config.params.key = key |
| 42 | Logger.debug('HttpRequest', 'request: ' + config.url) | 42 | Logger.debug('HttpRequest', 'request: ' + config.url) |
| 43 | - // TODO 临时打印token,测试token失效。待删除 | ||
| 44 | - Logger.debug('HttpRequest', 'request token: ' + config?.headers?.get('RMRB-X-TOKEN')) | ||
| 45 | - Logger.debug('HttpRequest', 'request cookie: ' + config?.headers?.get('cookie')) | ||
| 46 | return config; | 43 | return config; |
| 47 | }, | 44 | }, |
| 48 | (error: AxiosError) => { | 45 | (error: AxiosError) => { |
| @@ -16,7 +16,7 @@ export class HttpParams { | @@ -16,7 +16,7 @@ export class HttpParams { | ||
| 16 | headers['plat'] = DeviceUtil.getPlat() | 16 | headers['plat'] = DeviceUtil.getPlat() |
| 17 | headers['Content-Type'] = 'application/json; charset=utf-8' | 17 | headers['Content-Type'] = 'application/json; charset=utf-8' |
| 18 | headers['device_id'] = DeviceUtil.clientId() | 18 | headers['device_id'] = DeviceUtil.clientId() |
| 19 | - headers['build_version'] = HttpParams.getVersion() | 19 | + headers['build_version'] = AppUtils.getBuildVersion() |
| 20 | headers['adcode'] = HttpUtils.getProvinceCode() | 20 | headers['adcode'] = HttpUtils.getProvinceCode() |
| 21 | headers['os_version'] = DeviceUtil.getOsVersion() | 21 | headers['os_version'] = DeviceUtil.getOsVersion() |
| 22 | headers['system'] = AppUtils.getOSName() | 22 | headers['system'] = AppUtils.getOSName() |
| @@ -80,9 +80,4 @@ export class HttpParams { | @@ -80,9 +80,4 @@ export class HttpParams { | ||
| 80 | headers['city_dode'] = encodeURI(cityCode) | 80 | headers['city_dode'] = encodeURI(cityCode) |
| 81 | } | 81 | } |
| 82 | } | 82 | } |
| 83 | - | ||
| 84 | - private static getVersion() { | ||
| 85 | - // TODO build时间,待对接build生成属性 | ||
| 86 | - return '202401242103'; | ||
| 87 | - } | ||
| 88 | } | 83 | } |
| 1 | import { ContentDTO, NewspaperListItemBean, NewspaperPositionItemBean, Params } from 'wdBean'; | 1 | import { ContentDTO, NewspaperListItemBean, NewspaperPositionItemBean, Params } from 'wdBean'; |
| 2 | import { StringUtils } from 'wdKit'; | 2 | import { StringUtils } from 'wdKit'; |
| 3 | import { ProcessUtils } from 'wdRouter'; | 3 | import { ProcessUtils } from 'wdRouter'; |
| 4 | -import { TrackingContent,TrackConstants } from 'wdTracking/Index'; | 4 | +import { TrackingContent, TrackConstants } from 'wdTracking/Index'; |
| 5 | import { newsSkeleton } from './skeleton/newsSkeleton'; | 5 | import { newsSkeleton } from './skeleton/newsSkeleton'; |
| 6 | 6 | ||
| 7 | @Component | 7 | @Component |
| @@ -21,21 +21,22 @@ export struct ENewspaperItemComponent { | @@ -21,21 +21,22 @@ export struct ENewspaperItemComponent { | ||
| 21 | aboutToAppear(): void { | 21 | aboutToAppear(): void { |
| 22 | for (let index = 0; index < this.newspaperListItemBean.items.length; index++) { | 22 | for (let index = 0; index < this.newspaperListItemBean.items.length; index++) { |
| 23 | const element = this.newspaperListItemBean.items[index]; | 23 | const element = this.newspaperListItemBean.items[index]; |
| 24 | - TrackingContent.common(TrackConstants.EventType.Show,TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage | ||
| 25 | - ,{ | ||
| 26 | - 'contentName':element.title, | ||
| 27 | - 'contentType':element.newsType, | ||
| 28 | - 'contentId':element.newsId, | ||
| 29 | - 'panelNumber':this.newspaperListItemBean.pageNum, | ||
| 30 | - 'panelName':this.newspaperListItemBean.pageName, | ||
| 31 | - 'readMode':'1', | 24 | + TrackingContent.common(TrackConstants.EventType.Show, TrackConstants.PageName.NewsPaperPage, |
| 25 | + TrackConstants.PageName.NewsPaperPage | ||
| 26 | + , { | ||
| 27 | + 'contentName': element.title, | ||
| 28 | + 'contentType': element.newsType, | ||
| 29 | + 'contentId': element.newsId, | ||
| 30 | + 'panelNumber': this.newspaperListItemBean.pageNum, | ||
| 31 | + 'panelName': this.newspaperListItemBean.pageName, | ||
| 32 | + 'readMode': '1', | ||
| 32 | }) | 33 | }) |
| 33 | } | 34 | } |
| 34 | } | 35 | } |
| 36 | + | ||
| 35 | build() { | 37 | build() { |
| 36 | Stack() { | 38 | Stack() { |
| 37 | - newsSkeleton() | ||
| 38 | - .visibility(this.isShowSkeleton ? Visibility.Visible : Visibility.None) | 39 | + |
| 39 | Image(this.newspaperListItemBean.pagePic) | 40 | Image(this.newspaperListItemBean.pagePic) |
| 40 | .width(px2vp(this.itemPicWidth)) | 41 | .width(px2vp(this.itemPicWidth)) |
| 41 | .height(px2vp(this.itemPicHeight)) | 42 | .height(px2vp(this.itemPicHeight)) |
| @@ -48,6 +49,8 @@ export struct ENewspaperItemComponent { | @@ -48,6 +49,8 @@ export struct ENewspaperItemComponent { | ||
| 48 | }) | 49 | }) |
| 49 | .objectFit(ImageFit.Fill) | 50 | .objectFit(ImageFit.Fill) |
| 50 | .visibility(this.isShowSkeleton ? Visibility.None : Visibility.Visible) | 51 | .visibility(this.isShowSkeleton ? Visibility.None : Visibility.Visible) |
| 52 | + newsSkeleton() | ||
| 53 | + .visibility(this.isShowSkeleton ? Visibility.Visible : Visibility.None) | ||
| 51 | if (this.contentWidth !== 0) { | 54 | if (this.contentWidth !== 0) { |
| 52 | Canvas(this.context) | 55 | Canvas(this.context) |
| 53 | .width(px2vp(this.contentWidth)) | 56 | .width(px2vp(this.contentWidth)) |
| @@ -58,7 +61,12 @@ export struct ENewspaperItemComponent { | @@ -58,7 +61,12 @@ export struct ENewspaperItemComponent { | ||
| 58 | }) | 61 | }) |
| 59 | } | 62 | } |
| 60 | } | 63 | } |
| 61 | - .padding({ top:14, right: 10, bottom: 14, left: 10 }) | 64 | + .padding({ |
| 65 | + top: 14, | ||
| 66 | + right: 10, | ||
| 67 | + bottom: 14, | ||
| 68 | + left: 10 | ||
| 69 | + }) | ||
| 62 | .backgroundColor(Color.White) | 70 | .backgroundColor(Color.White) |
| 63 | .width('100%') | 71 | .width('100%') |
| 64 | .onTouch((event: TouchEvent) => { | 72 | .onTouch((event: TouchEvent) => { |
| @@ -88,21 +96,22 @@ export struct ENewspaperItemComponent { | @@ -88,21 +96,22 @@ export struct ENewspaperItemComponent { | ||
| 88 | if (this.itemBeanClicked != null && this.itemBeanClicked.newsId != 0) { | 96 | if (this.itemBeanClicked != null && this.itemBeanClicked.newsId != 0) { |
| 89 | //公共跳转 | 97 | //公共跳转 |
| 90 | let content: ContentDTO = { | 98 | let content: ContentDTO = { |
| 91 | - objectId:this.itemBeanClicked.newsId+'', | ||
| 92 | - objectType:this.itemBeanClicked.newsType+'', | ||
| 93 | - relId:this.itemBeanClicked.relId+'', | ||
| 94 | - relType:this.itemBeanClicked.relType ?? '0' | 99 | + objectId: this.itemBeanClicked.newsId + '', |
| 100 | + objectType: this.itemBeanClicked.newsType + '', | ||
| 101 | + relId: this.itemBeanClicked.relId + '', | ||
| 102 | + relType: this.itemBeanClicked.relType ?? '0' | ||
| 95 | } as ContentDTO | 103 | } as ContentDTO |
| 96 | ProcessUtils.processPage(content) | 104 | ProcessUtils.processPage(content) |
| 97 | //内容点击 | 105 | //内容点击 |
| 98 | - TrackingContent.clickWithEvent('current_Number_Panel_content_click',TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage | ||
| 99 | - ,{ | ||
| 100 | - 'contentName':this.itemBeanClicked.title, | ||
| 101 | - 'contentType':this.itemBeanClicked.newsType, | ||
| 102 | - 'contentId':this.itemBeanClicked.newsId, | ||
| 103 | - 'panelNumber':this.newspaperListItemBean.pageNum, | ||
| 104 | - 'panelName':this.newspaperListItemBean.pageName, | ||
| 105 | - 'readMode':'1', | 106 | + TrackingContent.clickWithEvent('current_Number_Panel_content_click', TrackConstants.PageName.NewsPaperPage, |
| 107 | + TrackConstants.PageName.NewsPaperPage | ||
| 108 | + , { | ||
| 109 | + 'contentName': this.itemBeanClicked.title, | ||
| 110 | + 'contentType': this.itemBeanClicked.newsType, | ||
| 111 | + 'contentId': this.itemBeanClicked.newsId, | ||
| 112 | + 'panelNumber': this.newspaperListItemBean.pageNum, | ||
| 113 | + 'panelName': this.newspaperListItemBean.pageName, | ||
| 114 | + 'readMode': '1', | ||
| 106 | }) | 115 | }) |
| 107 | this.itemBeanClicked = {} as NewspaperPositionItemBean | 116 | this.itemBeanClicked = {} as NewspaperPositionItemBean |
| 108 | } | 117 | } |
| @@ -25,6 +25,7 @@ import { PeopleShipAttentionContentListTopComponent } from './PeopleShipAttentio | @@ -25,6 +25,7 @@ import { PeopleShipAttentionContentListTopComponent } from './PeopleShipAttentio | ||
| 25 | import { CardParser } from '../CardParser' | 25 | import { CardParser } from '../CardParser' |
| 26 | import { PeopleShipNoMoreData } from '../reusable/PeopleShipNoMoreData'; | 26 | import { PeopleShipNoMoreData } from '../reusable/PeopleShipNoMoreData'; |
| 27 | import PageFollowHelper from '../../viewmodel/PageFollowHelper'; | 27 | import PageFollowHelper from '../../viewmodel/PageFollowHelper'; |
| 28 | +import { MineFollowListItem } from '../../viewmodel/MineFollowListItem'; | ||
| 28 | 29 | ||
| 29 | const TAG = 'PeopleShipMainComponent'; | 30 | const TAG = 'PeopleShipMainComponent'; |
| 30 | 31 | ||
| @@ -228,12 +229,10 @@ export struct PeopleShipMainComponent { | @@ -228,12 +229,10 @@ export struct PeopleShipMainComponent { | ||
| 228 | this.followList = [] | 229 | this.followList = [] |
| 229 | this.getRmhRecommendInfo(resolve) | 230 | this.getRmhRecommendInfo(resolve) |
| 230 | } else { | 231 | } else { |
| 231 | - this.followList = [] | ||
| 232 | - this.followList.push(...followInfo.list) | ||
| 233 | - this.attentionList = [] | 232 | + |
| 234 | this.currentPage = 1 | 233 | this.currentPage = 1 |
| 235 | this.loadTime = DateTimeUtils.getCurDate(DateTimeUtils.PATTERN_DATE_TIME_HYPHEN) | 234 | this.loadTime = DateTimeUtils.getCurDate(DateTimeUtils.PATTERN_DATE_TIME_HYPHEN) |
| 236 | - this.getAttentionContentListData(resolve) | 235 | + this.getAttentionContentListData(resolve,followInfo) |
| 237 | } | 236 | } |
| 238 | } else { | 237 | } else { |
| 239 | this.followList = [] | 238 | this.followList = [] |
| @@ -273,7 +272,7 @@ export struct PeopleShipMainComponent { | @@ -273,7 +272,7 @@ export struct PeopleShipMainComponent { | ||
| 273 | } | 272 | } |
| 274 | 273 | ||
| 275 | // 获取关注 | 274 | // 获取关注 |
| 276 | - private async getAttentionContentListData(resolve?: (value: string | PromiseLike<string>) => void) { | 275 | + private async getAttentionContentListData(resolve?: (value: string | PromiseLike<string>) => void,myFollowInfor?:MineFollowListItem) { |
| 277 | if (this.isLoading && this.currentPage != 1) { | 276 | if (this.isLoading && this.currentPage != 1) { |
| 278 | if (resolve) { | 277 | if (resolve) { |
| 279 | resolve('') | 278 | resolve('') |
| @@ -291,11 +290,9 @@ export struct PeopleShipMainComponent { | @@ -291,11 +290,9 @@ export struct PeopleShipMainComponent { | ||
| 291 | } else { | 290 | } else { |
| 292 | this.hasMore = false; | 291 | this.hasMore = false; |
| 293 | } | 292 | } |
| 294 | - if (this.currentPage == 1) { | ||
| 295 | - this.attentionList = [] | ||
| 296 | - } | 293 | + |
| 297 | //批量查询各类型内容动态数据接口 | 294 | //批量查询各类型内容动态数据接口 |
| 298 | - this.checkContentInteractData(listData.list, resolve) | 295 | + this.checkContentInteractData(listData.list, resolve,myFollowInfor) |
| 299 | } else { | 296 | } else { |
| 300 | this.hasMore = false; | 297 | this.hasMore = false; |
| 301 | this.resolveEnd(true, resolve) | 298 | this.resolveEnd(true, resolve) |
| @@ -307,7 +304,7 @@ export struct PeopleShipMainComponent { | @@ -307,7 +304,7 @@ export struct PeopleShipMainComponent { | ||
| 307 | } | 304 | } |
| 308 | 305 | ||
| 309 | // 批量查询各类型内容动态数据接口 | 306 | // 批量查询各类型内容动态数据接口 |
| 310 | - private async checkContentInteractData(list: ContentDTO[], resolve?: (value: string | PromiseLike<string>) => void) { | 307 | + private async checkContentInteractData(list: ContentDTO[], resolve?: (value: string | PromiseLike<string>) => void,myFollowInfor?:MineFollowListItem) { |
| 311 | // 批量查询内容当前用户点赞、收藏状态 | 308 | // 批量查询内容当前用户点赞、收藏状态 |
| 312 | try { | 309 | try { |
| 313 | // 获取列表数据 | 310 | // 获取列表数据 |
| @@ -324,6 +321,15 @@ export struct PeopleShipMainComponent { | @@ -324,6 +321,15 @@ export struct PeopleShipMainComponent { | ||
| 324 | let listData = await PeopleShipMainViewModel.getContentInteractInfo(params) | 321 | let listData = await PeopleShipMainViewModel.getContentInteractInfo(params) |
| 325 | Logger.debug('PeopleShipMainComponent', '获取页面信息' + `${JSON.stringify(listData)}`) | 322 | Logger.debug('PeopleShipMainComponent', '获取页面信息' + `${JSON.stringify(listData)}`) |
| 326 | this.resolveEnd(true, resolve) | 323 | this.resolveEnd(true, resolve) |
| 324 | + | ||
| 325 | + if (this.currentPage == 1) { | ||
| 326 | + this.attentionList = [] | ||
| 327 | + this.followList = [] | ||
| 328 | + } | ||
| 329 | + | ||
| 330 | + if(myFollowInfor){ | ||
| 331 | + this.followList.push(...myFollowInfor.list) | ||
| 332 | + } | ||
| 327 | list.forEach((element: ContentDTO) => { | 333 | list.forEach((element: ContentDTO) => { |
| 328 | // 获取 interactData 数据 | 334 | // 获取 interactData 数据 |
| 329 | if (listData && listData.length > 0) { | 335 | if (listData && listData.length > 0) { |
| @@ -21,7 +21,7 @@ export struct SearchHistoryComponent{ | @@ -21,7 +21,7 @@ export struct SearchHistoryComponent{ | ||
| 21 | }, | 21 | }, |
| 22 | title: "确认清空历史记录?", | 22 | title: "确认清空历史记录?", |
| 23 | tipShow:false, | 23 | tipShow:false, |
| 24 | - leftTextColor:$r('app.color.color_648DF2') | 24 | + leftTextColor:$r('app.color.color_333333') |
| 25 | }), | 25 | }), |
| 26 | autoCancel: true, | 26 | autoCancel: true, |
| 27 | alignment: DialogAlignment.Center, | 27 | alignment: DialogAlignment.Center, |
| @@ -47,7 +47,7 @@ export struct AboutPageUI { | @@ -47,7 +47,7 @@ export struct AboutPageUI { | ||
| 47 | context.getApplicationContext(); | 47 | context.getApplicationContext(); |
| 48 | let appVerion = AppUtils.getAppVersionName() | 48 | let appVerion = AppUtils.getAppVersionName() |
| 49 | if (StringUtils.isNotEmpty(appVerion)) { | 49 | if (StringUtils.isNotEmpty(appVerion)) { |
| 50 | - this.version = "版本号:" + appVerion | 50 | + this.version = "版本号:" + appVerion + '.' + AppUtils.getBuildVersion() |
| 51 | } | 51 | } |
| 52 | } | 52 | } |
| 53 | 53 |
| @@ -403,7 +403,8 @@ export struct DetailPlayShortVideoPage { | @@ -403,7 +403,8 @@ export struct DetailPlayShortVideoPage { | ||
| 403 | this.playerController.firstPlay(this.contentDetailData.videoInfo[0].videoUrl, this.PageName, this.PageName, | 403 | this.playerController.firstPlay(this.contentDetailData.videoInfo[0].videoUrl, this.PageName, this.PageName, |
| 404 | this.pageParam); | 404 | this.pageParam); |
| 405 | } | 405 | } |
| 406 | - } | 406 | + }, |
| 407 | + liftVideo: $showCommentList, | ||
| 407 | }) | 408 | }) |
| 408 | .width(this.playerWidth) | 409 | .width(this.playerWidth) |
| 409 | .height(this.playerHeight) | 410 | .height(this.playerHeight) |
| @@ -49,6 +49,9 @@ export struct WDPlayerRenderView { | @@ -49,6 +49,9 @@ export struct WDPlayerRenderView { | ||
| 49 | @State videoHeight: number = 9 | 49 | @State videoHeight: number = 9 |
| 50 | @State videoRatio: number = 16 / 9 | 50 | @State videoRatio: number = 16 / 9 |
| 51 | @State selfSize: Size = new Size('100%', '100%'); | 51 | @State selfSize: Size = new Size('100%', '100%'); |
| 52 | + | ||
| 53 | + // 是否上推视频中 | ||
| 54 | + @Link liftVideo: boolean | ||
| 52 | private enableAliPlayer = false | 55 | private enableAliPlayer = false |
| 53 | 56 | ||
| 54 | aboutToAppear() { | 57 | aboutToAppear() { |
| @@ -61,7 +64,7 @@ export struct WDPlayerRenderView { | @@ -61,7 +64,7 @@ export struct WDPlayerRenderView { | ||
| 61 | 64 | ||
| 62 | this.playerController.onVideoSizeChange = (width: number, height: number) => { | 65 | this.playerController.onVideoSizeChange = (width: number, height: number) => { |
| 63 | // console.log(`WDPlayerRenderView onVideoSizeChange width:${width} videoTop:${height}`) | 66 | // console.log(`WDPlayerRenderView onVideoSizeChange width:${width} videoTop:${height}`) |
| 64 | - Logger.info(TAG, ` onVideoSizeChange width:${width} videoTop:${height}`) | 67 | + Logger.info(TAG, ` onVideoSizeChange width:${width} height:${height}`) |
| 65 | this.videoWidth = width; | 68 | this.videoWidth = width; |
| 66 | this.videoHeight = height; | 69 | this.videoHeight = height; |
| 67 | this.videoRatio = width / height | 70 | this.videoRatio = width / height |
| @@ -127,6 +130,21 @@ export struct WDPlayerRenderView { | @@ -127,6 +130,21 @@ export struct WDPlayerRenderView { | ||
| 127 | 130 | ||
| 128 | if (info.size.width > 0 && info.size.height > 0) { | 131 | if (info.size.width > 0 && info.size.height > 0) { |
| 129 | 132 | ||
| 133 | + if (!this.liftVideo) { | ||
| 134 | + if (this.videoHeight > 0 && this.videoWidth > 0) { | ||
| 135 | + this.xComponentController.setXComponentSurfaceRect({ | ||
| 136 | + surfaceWidth: info.size.width, | ||
| 137 | + surfaceHeight: info.size.width / this.videoRatio, | ||
| 138 | + }); | ||
| 139 | + return | ||
| 140 | + } | ||
| 141 | + this.xComponentController.setXComponentSurfaceRect({ | ||
| 142 | + surfaceWidth: info.size.width, | ||
| 143 | + surfaceHeight: info.size.height, | ||
| 144 | + }); | ||
| 145 | + return | ||
| 146 | + } | ||
| 147 | + | ||
| 130 | // 竖屏 | 148 | // 竖屏 |
| 131 | if (this.videoHeight > 0 && this.videoWidth > 0 && this.videoWidth < this.videoHeight) { | 149 | if (this.videoHeight > 0 && this.videoWidth > 0 && this.videoWidth < this.videoHeight) { |
| 132 | let ratio = this.videoWidth / this.videoHeight | 150 | let ratio = this.videoWidth / this.videoHeight |
-
Please register or login to post a comment