Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool
Showing
4 changed files
with
44 additions
and
15 deletions
| 1 | import { Action } from './Action'; | 1 | import { Action } from './Action'; |
| 2 | 2 | ||
| 3 | +interface IImgItem { | ||
| 4 | + pic: string | ||
| 5 | + width: number | ||
| 6 | + height: number | ||
| 7 | +} | ||
| 8 | + | ||
| 9 | +export interface IImgListData { | ||
| 10 | + imgIndex: number | ||
| 11 | + imgArr: IImgItem[] | ||
| 12 | +} | ||
| 13 | + | ||
| 3 | interface dataObject { | 14 | interface dataObject { |
| 4 | // dataSource: | 15 | // dataSource: |
| 5 | // 1、图文详情数据 | 16 | // 1、图文详情数据 |
| @@ -13,7 +24,7 @@ interface dataObject { | @@ -13,7 +24,7 @@ interface dataObject { | ||
| 13 | // 9、活动投稿 视频跳转 | 24 | // 9、活动投稿 视频跳转 |
| 14 | // 10、活动投稿 动态跳转 | 25 | // 10、活动投稿 动态跳转 |
| 15 | // 11、活动投稿 图集跳转 | 26 | // 11、活动投稿 图集跳转 |
| 16 | - dataSource: number | 27 | + dataSource: string |
| 17 | operateType?: string | 28 | operateType?: string |
| 18 | webViewHeight?: string | 29 | webViewHeight?: string |
| 19 | dataJson?: string | 30 | dataJson?: string |
| @@ -27,6 +38,7 @@ interface dataObject { | @@ -27,6 +38,7 @@ interface dataObject { | ||
| 27 | positionLeft?: string | 38 | positionLeft?: string |
| 28 | positionTop?: string | 39 | positionTop?: string |
| 29 | videoLandscape?: string | 40 | videoLandscape?: string |
| 41 | + imgListData?: string | ||
| 30 | } | 42 | } |
| 31 | 43 | ||
| 32 | /** | 44 | /** |
| 1 | import HashMap from '@ohos.util.HashMap'; | 1 | import HashMap from '@ohos.util.HashMap'; |
| 2 | import { Callback } from 'wdJsBridge'; | 2 | import { Callback } from 'wdJsBridge'; |
| 3 | -import { Message } from 'wdJsBridge/src/main/ets/bean/Message'; | 3 | +import { Message, IImgListData } from 'wdJsBridge/src/main/ets/bean/Message'; |
| 4 | import { Logger } from 'wdKit'; | 4 | import { Logger } from 'wdKit'; |
| 5 | import { H5CallNativeType } from './H5CallNativeType'; | 5 | import { H5CallNativeType } from './H5CallNativeType'; |
| 6 | import { H5OperateType } from './H5OperateType'; | 6 | import { H5OperateType } from './H5OperateType'; |
| @@ -8,7 +8,7 @@ import { ContentConstants } from 'wdConstant'; | @@ -8,7 +8,7 @@ import { ContentConstants } from 'wdConstant'; | ||
| 8 | import { ProcessUtils } from 'wdRouter'; | 8 | import { ProcessUtils } from 'wdRouter'; |
| 9 | import router from '@ohos.router'; | 9 | import router from '@ohos.router'; |
| 10 | import Url from '@ohos.url' | 10 | import Url from '@ohos.url' |
| 11 | -import { ContentDTO } from 'wdBean/Index'; | 11 | +import { ContentDTO, PhotoListBean } from 'wdBean'; |
| 12 | import { ResponseDTO, WDHttp, HttpUrlUtils } from 'wdNetwork'; | 12 | import { ResponseDTO, WDHttp, HttpUrlUtils } from 'wdNetwork'; |
| 13 | 13 | ||
| 14 | const TAG = 'JsBridgeBiz' | 14 | const TAG = 'JsBridgeBiz' |
| @@ -96,11 +96,25 @@ function getAppPublicInfo(): string { | @@ -96,11 +96,25 @@ function getAppPublicInfo(): string { | ||
| 96 | 96 | ||
| 97 | function handleJsCallReceiveH5Data(data: Message) { | 97 | function handleJsCallReceiveH5Data(data: Message) { |
| 98 | switch (data?.data?.dataSource) { | 98 | switch (data?.data?.dataSource) { |
| 99 | - case 5: | ||
| 100 | - if (data?.data?.dataSource === 5) { | ||
| 101 | - ProcessUtils.processPage(JSON.parse(data?.data?.dataJson || '{}')) | 99 | + case '3': |
| 100 | + let imgListData: IImgListData = JSON.parse(data?.data?.imgListData || "{}") | ||
| 101 | + let imgArr = imgListData?.imgArr || [] | ||
| 102 | + if (imgArr.length > 0) { | ||
| 103 | + const photoList: PhotoListBean[] = imgArr.map(item => { | ||
| 104 | + const photo: PhotoListBean = { | ||
| 105 | + width: item.width, | ||
| 106 | + height: item.height, | ||
| 107 | + picPath: item.pic, | ||
| 108 | + picDesc: '' | ||
| 109 | + } | ||
| 110 | + return photo | ||
| 111 | + }) | ||
| 112 | + ProcessUtils.gotoMultiPictureListPage(photoList) | ||
| 102 | } | 113 | } |
| 103 | break; | 114 | break; |
| 115 | + case '5': | ||
| 116 | + ProcessUtils.processPage(JSON.parse(data?.data?.dataJson || '{}')) | ||
| 117 | + break; | ||
| 104 | default: | 118 | default: |
| 105 | break; | 119 | break; |
| 106 | } | 120 | } |
| @@ -90,7 +90,7 @@ export struct ImageAndTextPageComponent { | @@ -90,7 +90,7 @@ export struct ImageAndTextPageComponent { | ||
| 90 | .height(24) | 90 | .height(24) |
| 91 | .margin({ right: 5 }) | 91 | .margin({ right: 5 }) |
| 92 | } | 92 | } |
| 93 | - Text(`${this.interactData?.likeNum || 0}`) | 93 | + Text(`${this.interactData?.likeNum || 0 }`) |
| 94 | .fontSize(16) | 94 | .fontSize(16) |
| 95 | .fontColor(this.newsStatusOfUser?.likeStatus === '1' ? '#ED2800' : '#999999') | 95 | .fontColor(this.newsStatusOfUser?.likeStatus === '1' ? '#ED2800' : '#999999') |
| 96 | .fontWeight(500) | 96 | .fontWeight(500) |
| @@ -100,10 +100,10 @@ export struct ImageAndTextPageComponent { | @@ -100,10 +100,10 @@ export struct ImageAndTextPageComponent { | ||
| 100 | .justifyContent(FlexAlign.Center) | 100 | .justifyContent(FlexAlign.Center) |
| 101 | .alignItems(VerticalAlign.Center) | 101 | .alignItems(VerticalAlign.Center) |
| 102 | .borderRadius(20) | 102 | .borderRadius(20) |
| 103 | - .border({ | ||
| 104 | - width: 1, | ||
| 105 | - color: '#EDEDED', | ||
| 106 | - }) | 103 | + // .border({ |
| 104 | + // width: 1, | ||
| 105 | + // color: '#EDEDED', | ||
| 106 | + // }) | ||
| 107 | .onClick(() => { | 107 | .onClick(() => { |
| 108 | this.toggleLikeStatus() | 108 | this.toggleLikeStatus() |
| 109 | }) | 109 | }) |
| @@ -11,7 +11,7 @@ export struct ChartItemCompereComponent { | @@ -11,7 +11,7 @@ export struct ChartItemCompereComponent { | ||
| 11 | ListItem() { | 11 | ListItem() { |
| 12 | Column() { | 12 | Column() { |
| 13 | Row() { | 13 | Row() { |
| 14 | - Image($r('app.media.icon_live_status_running')) | 14 | + Image($r('app.media.default_head')) |
| 15 | .borderRadius(10) | 15 | .borderRadius(10) |
| 16 | .width(20) | 16 | .width(20) |
| 17 | .height(20) | 17 | .height(20) |
| @@ -24,13 +24,15 @@ export struct ChartItemCompereComponent { | @@ -24,13 +24,15 @@ export struct ChartItemCompereComponent { | ||
| 24 | 24 | ||
| 25 | Text(' 主持人 ') | 25 | Text(' 主持人 ') |
| 26 | .fontSize(11) | 26 | .fontSize(11) |
| 27 | - .backgroundColor('808562') | 27 | + .backgroundColor('#FFFFC63F') |
| 28 | .fontColor('#FFFFFFFF') | 28 | .fontColor('#FFFFFFFF') |
| 29 | .padding({ top: 2, bottom: 2, left: 4, right: 4 }) | 29 | .padding({ top: 2, bottom: 2, left: 4, right: 4 }) |
| 30 | .borderRadius(4) | 30 | .borderRadius(4) |
| 31 | - }.margin({ bottom: 8 }) | 31 | + } |
| 32 | + .margin({ bottom: 8 }) | ||
| 33 | + .justifyContent(FlexAlign.Start) | ||
| 32 | 34 | ||
| 33 | - Text(this.liveDetailsBean.newIntroduction).lineHeight(22) | 35 | + Text(this.liveDetailsBean.newIntroduction).lineHeight(22).fontColor('#FFFFFFFF').fontSize(14) |
| 34 | } | 36 | } |
| 35 | .backgroundColor('#4D000000') | 37 | .backgroundColor('#4D000000') |
| 36 | .borderRadius(3) | 38 | .borderRadius(3) |
| @@ -41,6 +43,7 @@ export struct ChartItemCompereComponent { | @@ -41,6 +43,7 @@ export struct ChartItemCompereComponent { | ||
| 41 | right: 8 | 43 | right: 8 |
| 42 | }) | 44 | }) |
| 43 | .margin({ left: 16, bottom: 4 }) | 45 | .margin({ left: 16, bottom: 4 }) |
| 46 | + .alignItems(HorizontalAlign.Start) | ||
| 44 | } | 47 | } |
| 45 | 48 | ||
| 46 | } | 49 | } |
-
Please register or login to post a comment