zhenghy
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 })