Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool into main
* 'main' of http://192.168.1.42/developOne/harmonyPool: (21 commits) 图片放大可以超过父控件 fix |> 专题详情页挂角广告显示优化 切换图片后下载对应的图片 图片下载过时方法替换 fix: 沉浸式渐变色注掉,登录成功弹框修改 fix: '我的'预约、消息修改ui修改 全屏后会向下移,待解决 直播时去掉顶部遮罩设置背景为白色视频字体设置黑色与安卓保持一致 顶部遮罩空隙改出来的问题 沉浸视频页搜索图标 fix: '我的'预约、消息修改ui修改 fix |> 修复直播详情点赞数展示不全问题 fix: '我的'预约、消息修改ui修改 顶部遮罩没顶到topSafeHeight区,临时解决 体育-广东体育-小视频撑到顶部,修复折叠屏带出的问题 底部渐变方向修复 新增全屏播放图片,返回更改 第四行截取微调 fix |> 修复直播回放全屏时,滑动进度条时容易触发上推app动作 fix: '我的'个人信息ui修改,更新版本号7.3.9.6 人民号号主视频页点击进入到播放详情页上下翻页应该和号主视频关联 ...
Showing
39 changed files
with
911 additions
and
790 deletions
| @@ -2,8 +2,8 @@ | @@ -2,8 +2,8 @@ | ||
| 2 | "app": { | 2 | "app": { |
| 3 | "bundleName": "com.peopledailychina.hosactivity", | 3 | "bundleName": "com.peopledailychina.hosactivity", |
| 4 | "vendor": "$string:app_vendor", | 4 | "vendor": "$string:app_vendor", |
| 5 | - "versionCode": 7395, | ||
| 6 | - "versionName": "7.3.9.5", | 5 | + "versionCode": 7396, |
| 6 | + "versionName": "7.3.9.6", | ||
| 7 | "icon": "$media:app_icon", | 7 | "icon": "$media:app_icon", |
| 8 | "label": "$string:app_name" | 8 | "label": "$string:app_name" |
| 9 | } | 9 | } |
| 1 | -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><g><g></g><g style="opacity:0.5;"><g><path d="M20.314453125,11.330568125C20.314453125,6.360008125,16.285053124999997,2.330566406,11.314453125,2.330566406C6.343893125,2.330566406,2.314453125,6.360008125,2.314453125,11.330568125C2.314453125,13.375078125,2.999354125,15.317678125,4.237673125,16.891578125000002C5.933093125,19.046478125,8.518933125,20.330578125,11.314453125,20.330578125C16.285053124999997,20.330578125,20.314453125,16.301178125,20.314453125,11.330568125ZM4.314453125,11.330568125C4.314453125,7.464568125,7.448463125,4.330568125,11.314453125,4.330568125C15.180453125,4.330568125,18.314453125,7.464568125,18.314453125,11.330568125C18.314453125,15.196578125,15.180453125,18.330578125,11.314453125,18.330578125C9.138813125,18.330578125,7.129653125,17.332878125,5.8094931249999995,15.654978125C4.846133125,14.430478125,4.314453125,12.922378125,4.314453125,11.330568125Z" fill-rule="evenodd" fill="#8794A3" fill-opacity="1"/></g><g transform="matrix(0.7071067690849304,0.7071067690849304,-0.7071067690849304,0.7071067690849304,16.41416933434084,-7.627309776376933)" style="opacity:0.800000011920929;"><path d="M17.6140625,16L22.7906525,16C22.9393225,16,23.0360225,16.156463,22.9695325,16.289443L22.1695325,17.88944C22.1356625,17.9572,22.0664025,18,21.9906525,18L17.6140625,18C17.5036056,18,17.4140625,17.91046,17.4140625,17.8L17.4140625,16.2C17.4140625,16.0895431,17.5036056,16,17.6140625,16" fill="#8794A3" fill-opacity="0.800000011920929"/></g></g></g></svg> | ||
| 1 | +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><g><g></g><g style="opacity:0.5;"><g><path d="M20.314453125,11.330568125C20.314453125,6.360008125,16.285053124999997,2.330566406,11.314453125,2.330566406C6.343893125,2.330566406,2.314453125,6.360008125,2.314453125,11.330568125C2.314453125,13.375078125,2.999354125,15.317678125,4.237673125,16.891578125000002C5.933093125,19.046478125,8.518933125,20.330578125,11.314453125,20.330578125C16.285053124999997,20.330578125,20.314453125,16.301178125,20.314453125,11.330568125ZM4.314453125,11.330568125C4.314453125,7.464568125,7.448463125,4.330568125,11.314453125,4.330568125C15.180453125,4.330568125,18.314453125,7.464568125,18.314453125,11.330568125C18.314453125,15.196578125,15.180453125,18.330578125,11.314453125,18.330578125C9.138813125,18.330578125,7.129653125,17.332878125,5.8094931249999995,15.654978125C4.846133125,14.430478125,4.314453125,12.922378125,4.314453125,11.330568125Z" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="0.6"/></g><g transform="matrix(0.7071067690849304,0.7071067690849304,-0.7071067690849304,0.7071067690849304,16.41416933434084,-7.627309776376933)" style="opacity:0.800000011920929;"><path d="M17.6140625,16L22.7906525,16C22.9393225,16,23.0360225,16.156463,22.9695325,16.289443L22.1695325,17.88944C22.1356625,17.9572,22.0664025,18,21.9906525,18L17.6140625,18C17.5036056,18,17.4140625,17.91046,17.4140625,17.8L17.4140625,16.2C17.4140625,16.0895431,17.5036056,16,17.6140625,16" fill="#FFFFFF" fill-opacity="0.6"/></g></g></g></svg> |
| @@ -8,8 +8,8 @@ export struct CustomToast { | @@ -8,8 +8,8 @@ export struct CustomToast { | ||
| 8 | @State bgBorderRadius: number = 10 | 8 | @State bgBorderRadius: number = 10 |
| 9 | opacityValue: number = 0.7 | 9 | opacityValue: number = 0.7 |
| 10 | bgColor: ResourceColor = $r("app.color.black") | 10 | bgColor: ResourceColor = $r("app.color.black") |
| 11 | - fontSizeValue :number | string | Resource = 27 | ||
| 12 | - lineHeightValue :number | string | Resource = 38 | 11 | + fontSizeValue :number | string | Resource = 16 |
| 12 | + lineHeightValue :number | string | Resource = 20 | ||
| 13 | controller: CustomDialogController | 13 | controller: CustomDialogController |
| 14 | marginTop :number | string | Resource = 0 | 14 | marginTop :number | string | Resource = 0 |
| 15 | 15 | ||
| @@ -36,7 +36,7 @@ export struct CustomToast { | @@ -36,7 +36,7 @@ export struct CustomToast { | ||
| 36 | .textAlign(TextAlign.Center) | 36 | .textAlign(TextAlign.Center) |
| 37 | }.borderRadius(`${this.bgBorderRadius}`) | 37 | }.borderRadius(`${this.bgBorderRadius}`) |
| 38 | .constraintSize({maxWidth:"86%"}) | 38 | .constraintSize({maxWidth:"86%"}) |
| 39 | - .padding({top:23,bottom:23,left:35,right:35}) | 39 | + .padding({top:12,bottom:12,left:16,right:16}) |
| 40 | .backgroundColor(this.bgColor) | 40 | .backgroundColor(this.bgColor) |
| 41 | .opacity(this.opacityValue) | 41 | .opacity(this.opacityValue) |
| 42 | .margin({top:this.marginTop}) | 42 | .margin({top:this.marginTop}) |
| @@ -32,6 +32,10 @@ export class HttpUrlUtils { | @@ -32,6 +32,10 @@ export class HttpUrlUtils { | ||
| 32 | * 详情页面详情接口 | 32 | * 详情页面详情接口 |
| 33 | */ | 33 | */ |
| 34 | static readonly DETAIL_PATH: string = "/api/rmrb-bff-display-zh/content/zh/c/content/detail"; | 34 | static readonly DETAIL_PATH: string = "/api/rmrb-bff-display-zh/content/zh/c/content/detail"; |
| 35 | + /** | ||
| 36 | + * 号主作品 | ||
| 37 | + */ | ||
| 38 | + static readonly PUBLISH_NEXT_PATH: string = "/api/rmrb-bff-display-zh/content/zh/c/publishNexts"; | ||
| 35 | 39 | ||
| 36 | /** | 40 | /** |
| 37 | * 获取视频直播间拉流地址 | 41 | * 获取视频直播间拉流地址 |
| @@ -162,6 +162,10 @@ export { | @@ -162,6 +162,10 @@ export { | ||
| 162 | } from './src/main/ets/bean/peoples/PeopleShipContentListDTO'; | 162 | } from './src/main/ets/bean/peoples/PeopleShipContentListDTO'; |
| 163 | 163 | ||
| 164 | export { | 164 | export { |
| 165 | + PeopleShipNextListDTO | ||
| 166 | +} from './src/main/ets/bean/peoples/PeopleShipNextListDTO'; | ||
| 167 | + | ||
| 168 | +export { | ||
| 165 | AttentionBatchDTO, | 169 | AttentionBatchDTO, |
| 166 | CreatorDTO | 170 | CreatorDTO |
| 167 | } from './src/main/ets/bean/peoples/AttentionBatchDTO'; | 171 | } from './src/main/ets/bean/peoples/AttentionBatchDTO'; |
| 1 | +import { ContentDTO } from '../content/ContentDTO' | ||
| 2 | +import { ContentDetailDTO } from '../detail/ContentDetailDTO'; | ||
| 3 | + | ||
| 4 | + | ||
| 5 | +export interface PeopleShipNextListDTO { | ||
| 6 | + followCreators: boolean; | ||
| 7 | + hasNext: number; | ||
| 8 | + list: ContentDetailDTO[]; | ||
| 9 | + pageNum: number; | ||
| 10 | + pageSize: number; | ||
| 11 | + totalCount: number; | ||
| 12 | +} |
| @@ -91,6 +91,8 @@ export { OperRowListView } from './src/main/ets/components/view/OperRowListView' | @@ -91,6 +91,8 @@ export { OperRowListView } from './src/main/ets/components/view/OperRowListView' | ||
| 91 | 91 | ||
| 92 | export { LiveOperRowListView } from './src/main/ets/components/view/LiveOperRowListView'; | 92 | export { LiveOperRowListView } from './src/main/ets/components/view/LiveOperRowListView'; |
| 93 | 93 | ||
| 94 | +export { SaveNetWorkPictures } from './src/main/ets/components/SaveNetWorkPictures'; | ||
| 95 | + | ||
| 94 | export { ImageDownloadComponent } from './src/main/ets/components/ImageDownloadComponent'; | 96 | export { ImageDownloadComponent } from './src/main/ets/components/ImageDownloadComponent'; |
| 95 | 97 | ||
| 96 | export { PageRepository } from './src/main/ets/repository/PageRepository'; | 98 | export { PageRepository } from './src/main/ets/repository/PageRepository'; |
| @@ -107,6 +109,6 @@ export { MorningEveningViewModel } from './src/main/ets/viewmodel/MorningEvening | @@ -107,6 +109,6 @@ export { MorningEveningViewModel } from './src/main/ets/viewmodel/MorningEvening | ||
| 107 | 109 | ||
| 108 | export { GrayManageModel } from './src/main/ets/viewmodel/GrayManageModel' | 110 | export { GrayManageModel } from './src/main/ets/viewmodel/GrayManageModel' |
| 109 | 111 | ||
| 110 | -export { VoiceInputView } from './src/main/ets/components/comment/view/VoiceInputView' | 112 | +export { VoiceInputView } from './src/main/ets/components/comment/view/VoiceInputView' |
| 111 | 113 | ||
| 112 | // export {voicese} | 114 | // export {voicese} |
| @@ -155,8 +155,8 @@ export struct MultiPictureDetailItemComponent { | @@ -155,8 +155,8 @@ export struct MultiPictureDetailItemComponent { | ||
| 155 | build() { | 155 | build() { |
| 156 | Swiper(this.swiperControllerItem){ | 156 | Swiper(this.swiperControllerItem){ |
| 157 | Row(){ // 居中显示 | 157 | Row(){ // 居中显示 |
| 158 | - List(){ | ||
| 159 | - ListItem(){ | 158 | + // List(){ |
| 159 | + // ListItem(){ | ||
| 160 | if(this.imageUri != null && (this.imageUri.includes('.gif') || this.imageUri.includes('.GIF'))){ | 160 | if(this.imageUri != null && (this.imageUri.includes('.gif') || this.imageUri.includes('.GIF'))){ |
| 161 | Image(this.imageUri)// TODO:知识点:宽高只根据其尺寸设置一个,通过保持宽高比来设置另一个属性 | 161 | Image(this.imageUri)// TODO:知识点:宽高只根据其尺寸设置一个,通过保持宽高比来设置另一个属性 |
| 162 | .alt($r('app.media.datail_imageLoading_w')) | 162 | .alt($r('app.media.datail_imageLoading_w')) |
| @@ -179,7 +179,7 @@ export struct MultiPictureDetailItemComponent { | @@ -179,7 +179,7 @@ export struct MultiPictureDetailItemComponent { | ||
| 179 | Image(this.imagePixelMap || 'app.media.datail_imageLoading_w')// TODO:知识点:宽高只根据其尺寸设置一个,通过保持宽高比来设置另一个属性 | 179 | Image(this.imagePixelMap || 'app.media.datail_imageLoading_w')// TODO:知识点:宽高只根据其尺寸设置一个,通过保持宽高比来设置另一个属性 |
| 180 | .alt($r('app.media.datail_imageLoading_w')) | 180 | .alt($r('app.media.datail_imageLoading_w')) |
| 181 | .width(this.imageWidth) | 181 | .width(this.imageWidth) |
| 182 | - .objectFit(ImageFit.Auto)// TODO:知识点:保持宽高比进行缩放,可以超出父组件,以便实现多图切换的增强功能 | 182 | + .objectFit(ImageFit.Cover)// TODO:知识点:保持宽高比进行缩放,可以超出父组件,以便实现多图切换的增强功能 |
| 183 | .interpolation(ImageInterpolation.High) | 183 | .interpolation(ImageInterpolation.High) |
| 184 | .autoResize(false) | 184 | .autoResize(false) |
| 185 | .transform(this.matrix)// TODO:知识点:通过matrix控制图片的缩放 | 185 | .transform(this.matrix)// TODO:知识点:通过matrix控制图片的缩放 |
| @@ -189,14 +189,15 @@ export struct MultiPictureDetailItemComponent { | @@ -189,14 +189,15 @@ export struct MultiPictureDetailItemComponent { | ||
| 189 | x: this.imageOffsetInfo.currentX, | 189 | x: this.imageOffsetInfo.currentX, |
| 190 | y: this.imageOffsetInfo.currentY | 190 | y: this.imageOffsetInfo.currentY |
| 191 | }) | 191 | }) |
| 192 | + | ||
| 192 | .onComplete(event => { | 193 | .onComplete(event => { |
| 193 | this.imageWidth = '100%' | 194 | this.imageWidth = '100%' |
| 194 | }) | 195 | }) |
| 195 | } | 196 | } |
| 196 | - } | ||
| 197 | - } | ||
| 198 | - .alignListItem(ListItemAlign.Center) | ||
| 199 | - .scrollBarWidth(0) | 197 | + // } |
| 198 | + // } | ||
| 199 | + // .alignListItem(ListItemAlign.Center) | ||
| 200 | + // .scrollBarWidth(0) | ||
| 200 | } | 201 | } |
| 201 | .justifyContent(FlexAlign.Center) | 202 | .justifyContent(FlexAlign.Center) |
| 202 | } | 203 | } |
| 1 | +/* | ||
| 2 | + * Copyright (c) 2024 Huawei Device Co., Ltd. | ||
| 3 | + * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 4 | + * you may not use this file except in compliance with the License. | ||
| 5 | + * You may obtain a copy of the License at | ||
| 6 | + * | ||
| 7 | + * http://www.apache.org/licenses/LICENSE-2.0 | ||
| 8 | + * | ||
| 9 | + * Unless required by applicable law or agreed to in writing, software | ||
| 10 | + * distributed under the License is distributed on an "AS IS" BASIS, | ||
| 11 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 12 | + * See the License for the specific language governing permissions and | ||
| 13 | + * limitations under the License. | ||
| 14 | + */ | ||
| 15 | + | ||
| 16 | +import http from '@ohos.net.http'; | ||
| 17 | +import ResponseCode from '@ohos.net.http'; | ||
| 18 | +import { image } from '@kit.ImageKit'; | ||
| 19 | +import { BusinessError } from '@ohos.base'; | ||
| 20 | +import common from '@ohos.app.ability.common'; | ||
| 21 | +import photoAccessHelper from '@ohos.file.photoAccessHelper'; | ||
| 22 | +import fs from '@ohos.file.fs'; | ||
| 23 | +import promptAction from '@ohos.promptAction'; | ||
| 24 | +import picker from '@ohos.file.picker'; | ||
| 25 | +import { taskpool } from '@kit.ArkTS'; | ||
| 26 | +import { httpRequest } from '../utils/httpRequest'; | ||
| 27 | + | ||
| 28 | + | ||
| 29 | +/** | ||
| 30 | + * 实现步骤: | ||
| 31 | + * 点击上部“下载”按钮进入”下载网络图片到手机相册”场景示例;点击下部“下载到指定路径”按钮进入”下载文件到指定用户目录”场景示例, | ||
| 32 | + * 从而实现手机相册并进行网络图片的下载和保存。 | ||
| 33 | + * photoAccessHelper参考文档: | ||
| 34 | + * https://developer.huawei.com/consumer/cn/doc/harmonyos-references/js-apis-photoaccesshelper | ||
| 35 | + * saveButton参考文档 | ||
| 36 | + * https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/savebutton-0000001820999677 | ||
| 37 | + */ | ||
| 38 | +@Concurrent | ||
| 39 | +async function getPicture(imageUrl: string): Promise<ArrayBuffer> { | ||
| 40 | + let ret: ArrayBuffer = await new Promise((resolve, reject) => { | ||
| 41 | + httpRequest.httpRequestInStream(imageUrl, (res: ArrayBuffer) => { | ||
| 42 | + resolve(res); // 成功时解析Promise | ||
| 43 | + }, () => { | ||
| 44 | + // 下载失败时弹窗提示检查网络 | ||
| 45 | + promptAction.showToast({ | ||
| 46 | + message: $r('app.string.image_request_fail'), | ||
| 47 | + duration: 2000 | ||
| 48 | + }); | ||
| 49 | + reject(new Error('Image download failed')); // 失败时拒绝Promise | ||
| 50 | + }); | ||
| 51 | + }); | ||
| 52 | + return ret | ||
| 53 | +} | ||
| 54 | + | ||
| 55 | +@Component | ||
| 56 | +export struct SaveNetWorkPictures { | ||
| 57 | + @State image: PixelMap | undefined = undefined; | ||
| 58 | + @State photoAccessHelper: photoAccessHelper.PhotoAccessHelper | undefined = undefined; // 相册模块管理实例 | ||
| 59 | + @State imageBuffer: ArrayBuffer | undefined = undefined; // 图片ArrayBuffer | ||
| 60 | + // @Prop @Watch('onChangeUrl') url: string = '' | ||
| 61 | + @Prop @Watch('onChangeUrl') url: string = '' | ||
| 62 | + | ||
| 63 | + /** | ||
| 64 | + * 通过http的request方法从网络下载图片资源 | ||
| 65 | + */ | ||
| 66 | + async getPicture() { | ||
| 67 | + http.createHttp()// 显示网络图片的地址 | ||
| 68 | + // .request('https://gitee.com/harmonyos-cases/cases/raw/master/CommonAppDevelopment/feature/variablewatch/src/main/resources/base/media/variablewatch_grape.png', | ||
| 69 | + // .request('https://cdnjdphoto.aikan.pdnews.cn/zhbj-20240830/image/content/4d61839662044ac796ec7331a90da5d8.jpg', | ||
| 70 | + .request(this.url, | ||
| 71 | + (error: BusinessError, data: http.HttpResponse) => { | ||
| 72 | + if (error) { | ||
| 73 | + // 下载失败时弹窗提示检查网络,不执行后续逻辑 | ||
| 74 | + promptAction.showToast({ | ||
| 75 | + message: '下载失败', | ||
| 76 | + duration: 2000 | ||
| 77 | + }) | ||
| 78 | + return; | ||
| 79 | + } | ||
| 80 | + this.transcodePixelMap(data); | ||
| 81 | + // 判断网络获取到的资源是否为ArrayBuffer类型 | ||
| 82 | + if (data.result instanceof ArrayBuffer) { | ||
| 83 | + this.imageBuffer = data.result as ArrayBuffer; | ||
| 84 | + } | ||
| 85 | + } | ||
| 86 | + ) | ||
| 87 | + } | ||
| 88 | + | ||
| 89 | + /** | ||
| 90 | + * 使用createPixelMap将ArrayBuffer类型的图片装换为PixelMap类型 | ||
| 91 | + * @param data:网络获取到的资源 | ||
| 92 | + */ | ||
| 93 | + transcodePixelMap(data: http.HttpResponse) { | ||
| 94 | + if (ResponseCode.ResponseCode.OK === data.responseCode) { | ||
| 95 | + const imageData: ArrayBuffer = data.result as ArrayBuffer; | ||
| 96 | + // 通过ArrayBuffer创建图片源实例。 | ||
| 97 | + const imageSource: image.ImageSource = image.createImageSource(imageData); | ||
| 98 | + const options: image.InitializationOptions = { | ||
| 99 | + 'alphaType': 0, // 透明度 | ||
| 100 | + 'editable': false, // 是否可编辑 | ||
| 101 | + 'pixelFormat': 3, // 像素格式 | ||
| 102 | + 'scaleMode': 1, // 缩略值 | ||
| 103 | + 'size': { height: 50, width: 50 } | ||
| 104 | + }; // 创建图片大小 | ||
| 105 | + | ||
| 106 | + // 通过属性创建PixelMap | ||
| 107 | + imageSource.createPixelMap(options).then((pixelMap: PixelMap) => { | ||
| 108 | + this.image = pixelMap; | ||
| 109 | + }); | ||
| 110 | + } | ||
| 111 | + } | ||
| 112 | + | ||
| 113 | + /** | ||
| 114 | + * 保存ArrayBuffer到图库 | ||
| 115 | + * @param buffer:图片ArrayBuffer | ||
| 116 | + * @returns | ||
| 117 | + */ | ||
| 118 | + async saveImage(buffer: ArrayBuffer | string): Promise<void> { | ||
| 119 | + const context = getContext(this) as common.UIAbilityContext; // 获取getPhotoAccessHelper需要的context | ||
| 120 | + const helper = photoAccessHelper.getPhotoAccessHelper(context); // 获取相册管理模块的实例 | ||
| 121 | + const uri = await helper.createAsset(photoAccessHelper.PhotoType.IMAGE, 'jpg'); // 指定待创建的文件类型、后缀和创建选项,创建图片或视频资源 | ||
| 122 | + const file = await fs.open(uri, fs.OpenMode.READ_WRITE | fs.OpenMode.CREATE); | ||
| 123 | + await fs.write(file.fd, buffer); | ||
| 124 | + await fs.close(file.fd); | ||
| 125 | + } | ||
| 126 | + | ||
| 127 | + /** | ||
| 128 | + * 保存ArrayBuffer到用户选择的路径 | ||
| 129 | + * @param buffer:图片ArrayBuffer | ||
| 130 | + * @returns | ||
| 131 | + */ | ||
| 132 | + async pickerSave(buffer: ArrayBuffer | string): Promise<void> { | ||
| 133 | + const photoSaveOptions = new picker.PhotoSaveOptions(); // 创建文件管理器保存选项实例 | ||
| 134 | + photoSaveOptions.newFileNames = ['PhotoViewPicker ' + new Date().getTime() + '.jpg']; // 保存文件名(可选) | ||
| 135 | + const photoViewPicker = new picker.PhotoViewPicker; | ||
| 136 | + photoViewPicker.save(photoSaveOptions) | ||
| 137 | + .then(async (photoSvaeResult) => { | ||
| 138 | + const uri = photoSvaeResult[0]; | ||
| 139 | + const file = await fs.open(uri, fs.OpenMode.READ_WRITE | fs.OpenMode.CREATE); | ||
| 140 | + await fs.write(file.fd, buffer); | ||
| 141 | + await fs.close(file.fd); | ||
| 142 | + promptAction.showToast({ | ||
| 143 | + message: '保存成功', | ||
| 144 | + duration: 2000 | ||
| 145 | + }) | ||
| 146 | + }); | ||
| 147 | + } | ||
| 148 | + | ||
| 149 | + async aboutToAppear(): Promise<void> { | ||
| 150 | + // this.getPicture(); | ||
| 151 | + this.onChangeUrl() | ||
| 152 | + } | ||
| 153 | + | ||
| 154 | + build() { | ||
| 155 | + Stack({ alignContent: Alignment.Center }) { | ||
| 156 | + // Column() { | ||
| 157 | + // Text('下载') | ||
| 158 | + // .fontWeight(FontWeight.Medium) | ||
| 159 | + // } | ||
| 160 | + | ||
| 161 | + Image(this.image) | ||
| 162 | + .objectFit(ImageFit.Contain) | ||
| 163 | + .width('50%') | ||
| 164 | + .height(28) | ||
| 165 | + | ||
| 166 | + SaveButton({ icon: SaveIconStyle.FULL_FILLED, buttonType: ButtonType.Capsule }) | ||
| 167 | + .iconSize(24) | ||
| 168 | + .backgroundColor(Color.Transparent) | ||
| 169 | + .iconColor(Color.White)// .markAnchor({ x: '100%' }) | ||
| 170 | + .position({ x: '25%' }) | ||
| 171 | + .onClick(async () => { | ||
| 172 | + if (this.imageBuffer !== undefined) { | ||
| 173 | + await this.saveImage(this.imageBuffer); | ||
| 174 | + promptAction.showToast({ | ||
| 175 | + message: '保存成功', | ||
| 176 | + duration: 2000 | ||
| 177 | + }) | ||
| 178 | + } | ||
| 179 | + }) | ||
| 180 | + | ||
| 181 | + } | ||
| 182 | + | ||
| 183 | + // .alignSelf(ItemAlign.Center) | ||
| 184 | + // .align(Alignment.Center) | ||
| 185 | + // .backgroundColor(Color.Red) | ||
| 186 | + } | ||
| 187 | + | ||
| 188 | + async onChangeUrl(): Promise<void> { | ||
| 189 | + console.info(`cj2024 图片下载 ${this.url}`) | ||
| 190 | + // const context = getContext(this) as common.UIAbilityContext; | ||
| 191 | + // const atManager = abilityAccessCtrl.createAtManager(); | ||
| 192 | + // await atManager.requestPermissionsFromUser(context, PERMISSIONS); | ||
| 193 | + // 通过任务池(taskpool)从网络下载图片资源 | ||
| 194 | + taskpool.execute(getPicture, this.url).then((res) => { | ||
| 195 | + const imgBuffer = res as ArrayBuffer | ||
| 196 | + this.imageBuffer = imgBuffer; | ||
| 197 | + }) | ||
| 198 | + } | ||
| 199 | +} |
| @@ -155,24 +155,26 @@ export struct SpacialTopicPageComponent { | @@ -155,24 +155,26 @@ export struct SpacialTopicPageComponent { | ||
| 155 | // .fontWeight(500) | 155 | // .fontWeight(500) |
| 156 | // .visibility(this.action?.params?.backVisibility && this.isPageEnd ? Visibility.Visible : Visibility.None) | 156 | // .visibility(this.action?.params?.backVisibility && this.isPageEnd ? Visibility.Visible : Visibility.None) |
| 157 | 157 | ||
| 158 | - WdWebComponent({ | ||
| 159 | - webviewControl: this.webviewControl, | ||
| 160 | - webUrl: this.webUrl, | ||
| 161 | - reload: this.reload, | ||
| 162 | - onWebPrepared: this.onWebPrepared.bind(this), | ||
| 163 | - isPageEnd: $isPageEnd, | ||
| 164 | - receiveH5SendToNativeData: this.receiveH5SendToNativeData.bind(this) | ||
| 165 | - }) | 158 | + RelativeContainer() { |
| 159 | + | ||
| 160 | + WdWebComponent({ | ||
| 161 | + webviewControl: this.webviewControl, | ||
| 162 | + webUrl: this.webUrl, | ||
| 163 | + reload: this.reload, | ||
| 164 | + onWebPrepared: this.onWebPrepared.bind(this), | ||
| 165 | + isPageEnd: $isPageEnd, | ||
| 166 | + receiveH5SendToNativeData: this.receiveH5SendToNativeData.bind(this) | ||
| 167 | + }) | ||
| 168 | + .id('web_page') | ||
| 169 | + | ||
| 170 | + // 挂角广告 | ||
| 171 | + this.pageHornAd() | ||
| 172 | + } | ||
| 166 | } | 173 | } |
| 167 | .width(CommonConstants.FULL_WIDTH) | 174 | .width(CommonConstants.FULL_WIDTH) |
| 168 | .height(CommonConstants.FULL_HEIGHT) | 175 | .height(CommonConstants.FULL_HEIGHT) |
| 169 | .padding({ bottom: this.action?.params?.backVisibility ? 115 : 75 }) | 176 | .padding({ bottom: this.action?.params?.backVisibility ? 115 : 75 }) |
| 170 | 177 | ||
| 171 | - // RelativeContainer() { | ||
| 172 | - // // 挂角广告 | ||
| 173 | - // this.pageHornAd() | ||
| 174 | - // } | ||
| 175 | - | ||
| 176 | if (!this.isNetConnected) { | 178 | if (!this.isNetConnected) { |
| 177 | Column() { | 179 | Column() { |
| 178 | Image($r('app.media.line')) | 180 | Image($r('app.media.line')) |
| @@ -37,28 +37,28 @@ export struct AppointmentListChildComponent { | @@ -37,28 +37,28 @@ export struct AppointmentListChildComponent { | ||
| 37 | Image(this.loadImg ? this.item?.imageUrl[0] : '') | 37 | Image(this.loadImg ? this.item?.imageUrl[0] : '') |
| 38 | .backgroundColor(this.loadImg ? $r('app.color.color_B0B0B0') : 0xf5f5f5) | 38 | .backgroundColor(this.loadImg ? $r('app.color.color_B0B0B0') : 0xf5f5f5) |
| 39 | .width('100%') | 39 | .width('100%') |
| 40 | + .constraintSize({ | ||
| 41 | + maxHeight: 196 | ||
| 42 | + }) | ||
| 40 | .aspectRatio(16 / 9) | 43 | .aspectRatio(16 / 9) |
| 41 | .objectFit(ImageFit.Auto) | 44 | .objectFit(ImageFit.Auto) |
| 42 | .interpolation(ImageInterpolation.High) | 45 | .interpolation(ImageInterpolation.High) |
| 46 | + .borderRadius(4) | ||
| 43 | 47 | ||
| 44 | 48 | ||
| 45 | if (this.item.status == "wait") { | 49 | if (this.item.status == "wait") { |
| 46 | Row() { | 50 | Row() { |
| 47 | Row() { | 51 | Row() { |
| 48 | Image($r('app.media.reserve_icon')) | 52 | Image($r('app.media.reserve_icon')) |
| 49 | - // .width('27lpx') | ||
| 50 | - .width(27) | ||
| 51 | - // .height('27lpx') | ||
| 52 | - .height(27) | 53 | + .width(14) |
| 54 | + .height(14) | ||
| 53 | .objectFit(ImageFit.Auto) | 55 | .objectFit(ImageFit.Auto) |
| 54 | .interpolation(ImageInterpolation.High) | 56 | .interpolation(ImageInterpolation.High) |
| 55 | - // .margin({right:"6lpx"}) | ||
| 56 | - .margin({right: 6}) | 57 | + .margin({right: 3}) |
| 57 | 58 | ||
| 58 | Text("预约") | 59 | Text("预约") |
| 59 | .fontWeight(400) | 60 | .fontWeight(400) |
| 60 | - // .fontSize('23lpx') | ||
| 61 | - .fontSize(23) | 61 | + .fontSize(12) |
| 62 | .textShadow({ | 62 | .textShadow({ |
| 63 | radius: 2, | 63 | radius: 2, |
| 64 | color: `rgba(0,0,0,0.3)`, | 64 | color: `rgba(0,0,0,0.3)`, |
| @@ -66,38 +66,34 @@ export struct AppointmentListChildComponent { | @@ -66,38 +66,34 @@ export struct AppointmentListChildComponent { | ||
| 66 | offsetX:0 | 66 | offsetX:0 |
| 67 | }) | 67 | }) |
| 68 | .fontColor($r('app.color.white')) | 68 | .fontColor($r('app.color.white')) |
| 69 | - // .lineHeight('31lpx') | ||
| 70 | - .lineHeight(31) | 69 | + .lineHeight(16) |
| 71 | .layoutWeight(1) | 70 | .layoutWeight(1) |
| 72 | .textAlign(TextAlign.Start) | 71 | .textAlign(TextAlign.Start) |
| 73 | } | 72 | } |
| 74 | - // .width('94lpx') | ||
| 75 | - .width(94) | ||
| 76 | - // .margin({ bottom: '15lpx', right: '15lpx' }) | ||
| 77 | - .margin({ bottom: 15, right: 15 }) | 73 | + .margin({ bottom: 12, right: 8 }) |
| 78 | .alignItems(VerticalAlign.Center) | 74 | .alignItems(VerticalAlign.Center) |
| 79 | - }.width('100%') | 75 | + } |
| 76 | + .width('100%') | ||
| 80 | .height('100%') | 77 | .height('100%') |
| 81 | .alignItems(VerticalAlign.Bottom) | 78 | .alignItems(VerticalAlign.Bottom) |
| 82 | .justifyContent(FlexAlign.End) | 79 | .justifyContent(FlexAlign.End) |
| 80 | + .position({ | ||
| 81 | + x: '80.5%' | ||
| 82 | + }) | ||
| 83 | } | 83 | } |
| 84 | - }.width('100%') | ||
| 85 | - // .height('376lpx') | ||
| 86 | - .height(376) | 84 | + } |
| 85 | + .width('100%') | ||
| 86 | + .height(196) | ||
| 87 | 87 | ||
| 88 | Column() { | 88 | Column() { |
| 89 | Text(this.item.title) | 89 | Text(this.item.title) |
| 90 | - // .fontWeight('400lpx') | ||
| 91 | .fontWeight(400) | 90 | .fontWeight(400) |
| 92 | - // .fontSize('33lpx') | ||
| 93 | - .fontSize(33) | 91 | + .fontSize(17) |
| 94 | .fontColor($r('app.color.color_222222')) | 92 | .fontColor($r('app.color.color_222222')) |
| 95 | - // .lineHeight('48lpx') | ||
| 96 | - .lineHeight(48) | 93 | + .lineHeight(25) |
| 97 | .maxLines(2) | 94 | .maxLines(2) |
| 98 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 95 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 99 | - // .margin({ bottom: '23lpx' }) | ||
| 100 | - .margin({ bottom: 23 }) | 96 | + .margin({ bottom: 12 }) |
| 101 | .textAlign(TextAlign.Start) | 97 | .textAlign(TextAlign.Start) |
| 102 | .width('100%') | 98 | .width('100%') |
| 103 | Row() { | 99 | Row() { |
| @@ -106,144 +102,105 @@ export struct AppointmentListChildComponent { | @@ -106,144 +102,105 @@ export struct AppointmentListChildComponent { | ||
| 106 | Image($r('app.media.play_status_history_icon')) | 102 | Image($r('app.media.play_status_history_icon')) |
| 107 | .objectFit(ImageFit.Auto) | 103 | .objectFit(ImageFit.Auto) |
| 108 | .interpolation(ImageInterpolation.High) | 104 | .interpolation(ImageInterpolation.High) |
| 109 | - // .width('38lpx') | ||
| 110 | - .width(38) | ||
| 111 | - // .height('38lpx') | ||
| 112 | - .height(38) | ||
| 113 | - // .margin({ right: '12lpx' }) | ||
| 114 | - .margin({ right: 12 }) | 105 | + .width(20) |
| 106 | + .height(20) | ||
| 107 | + .margin({ right: 6 }) | ||
| 115 | Text('已结束').fontColor($r('app.color.color_999999')) | 108 | Text('已结束').fontColor($r('app.color.color_999999')) |
| 116 | - // .fontWeight('500lpx') | ||
| 117 | .fontWeight(500) | 109 | .fontWeight(500) |
| 118 | - // .fontSize('23lpx') | ||
| 119 | - .fontSize(23) | 110 | + .fontSize(12) |
| 111 | + .lineHeight(16) | ||
| 120 | }else if(this.item.status == "running"){ | 112 | }else if(this.item.status == "running"){ |
| 121 | Image($r('app.media.play_status_icon')) | 113 | Image($r('app.media.play_status_icon')) |
| 122 | .objectFit(ImageFit.Auto) | 114 | .objectFit(ImageFit.Auto) |
| 123 | .interpolation(ImageInterpolation.High) | 115 | .interpolation(ImageInterpolation.High) |
| 124 | - // .width('38lpx') | ||
| 125 | - .width(38) | ||
| 126 | - // .height('38lpx') | ||
| 127 | - .height(38) | ||
| 128 | - // .margin({ right: '12lpx' }) | ||
| 129 | - .margin({ right: 12 }) | ||
| 130 | - Text('已开始').fontColor($r('app.color.color_999999')) | ||
| 131 | - // .fontWeight('500lpx') | 116 | + .width(20) |
| 117 | + .height(20) | ||
| 118 | + .margin({ right: 6 }) | ||
| 119 | + Text('已开始').fontColor($r('app.color.color_ED2800')) | ||
| 132 | .fontWeight(500) | 120 | .fontWeight(500) |
| 133 | - // .fontSize('23lpx') | ||
| 134 | - .fontSize(23) | 121 | + .fontSize(12) |
| 122 | + .lineHeight(16) | ||
| 135 | } else { | 123 | } else { |
| 136 | Image($r('app.media.play_status_icon')) | 124 | Image($r('app.media.play_status_icon')) |
| 137 | .objectFit(ImageFit.Auto) | 125 | .objectFit(ImageFit.Auto) |
| 138 | .interpolation(ImageInterpolation.High) | 126 | .interpolation(ImageInterpolation.High) |
| 139 | - // .width('38lpx') | ||
| 140 | - .width(38) | ||
| 141 | - // .height('38lpx') | ||
| 142 | - .height(38) | ||
| 143 | - // .margin({ right: '12lpx' }) | ||
| 144 | - .margin({ right: 12 }) | 127 | + .width(20) |
| 128 | + .height(20) | ||
| 129 | + .margin({ right: 6 }) | ||
| 145 | Text(this.item.timePre).fontColor($r('app.color.color_ED2800')) | 130 | Text(this.item.timePre).fontColor($r('app.color.color_ED2800')) |
| 146 | - // .fontWeight('500lpx') | ||
| 147 | .fontWeight(500) | 131 | .fontWeight(500) |
| 148 | - // .fontSize('23lpx') | ||
| 149 | - .fontSize(23) | 132 | + .fontSize(12) |
| 133 | + .lineHeight(16) | ||
| 150 | Image($r('app.media.point_icon')) | 134 | Image($r('app.media.point_icon')) |
| 151 | .objectFit(ImageFit.Auto) | 135 | .objectFit(ImageFit.Auto) |
| 152 | .interpolation(ImageInterpolation.High) | 136 | .interpolation(ImageInterpolation.High) |
| 153 | - // .width('12lpx') | ||
| 154 | - .width(12) | ||
| 155 | - // .height('31lpx') | ||
| 156 | - .height(31) | ||
| 157 | - // .margin({ right: '4lpx' }) | ||
| 158 | - .margin({ right: 4 }) | 137 | + .width(6) |
| 138 | + .height(16) | ||
| 139 | + .margin({ right: 2 }) | ||
| 159 | Text(`${this.item.timeBack}开始`).fontColor($r('app.color.color_ED2800')) | 140 | Text(`${this.item.timeBack}开始`).fontColor($r('app.color.color_ED2800')) |
| 160 | - // .fontWeight('500lpx') | ||
| 161 | .fontWeight(500) | 141 | .fontWeight(500) |
| 162 | - // .fontSize('23lpx') | ||
| 163 | - .fontSize(23) | ||
| 164 | - // .lineHeight('31lpx') | ||
| 165 | - .lineHeight(31) | 142 | + .fontSize(12) |
| 143 | + .lineHeight(16) | ||
| 166 | } | 144 | } |
| 167 | } | 145 | } |
| 168 | - // .padding({ left: '19lpx', right: '19lpx' }) | ||
| 169 | - .padding({ left: 19, right: 19 }) | ||
| 170 | - // .height('46lpx') | ||
| 171 | - .height(46) | 146 | + .height(24) |
| 147 | + .width(82) | ||
| 148 | + .padding({ left: 10, right: 10}) | ||
| 172 | .alignItems(VerticalAlign.Center) | 149 | .alignItems(VerticalAlign.Center) |
| 173 | .backgroundColor($r('app.color.color_F5F5F5')) | 150 | .backgroundColor($r('app.color.color_F5F5F5')) |
| 174 | - // .borderRadius('4lpx') | ||
| 175 | - .borderRadius(4) | 151 | + .borderRadius(2) |
| 176 | 152 | ||
| 177 | Blank() | 153 | Blank() |
| 178 | .layoutWeight(1) | 154 | .layoutWeight(1) |
| 179 | if (this.item.status === "wait") { | 155 | if (this.item.status === "wait") { |
| 180 | Text(this.item.isAppointment ? "已预约" : "预约") | 156 | Text(this.item.isAppointment ? "已预约" : "预约") |
| 181 | .fontWeight(400) | 157 | .fontWeight(400) |
| 182 | - // .fontSize('23lpx') | ||
| 183 | - .fontSize(23) | 158 | + .fontSize(12) |
| 184 | .backgroundColor(this.item.isAppointment ? $r('app.color.color_F5F5F5') : $r('app.color.color_ED2800')) | 159 | .backgroundColor(this.item.isAppointment ? $r('app.color.color_F5F5F5') : $r('app.color.color_ED2800')) |
| 185 | .fontColor(this.item.isAppointment ? $r('app.color.color_CCCCCC') : $r('app.color.white')) | 160 | .fontColor(this.item.isAppointment ? $r('app.color.color_CCCCCC') : $r('app.color.white')) |
| 186 | - // .lineHeight('31lpx') | ||
| 187 | - .lineHeight(31) | 161 | + .lineHeight(18) |
| 188 | .textAlign(TextAlign.Center) | 162 | .textAlign(TextAlign.Center) |
| 189 | - // .width('100lpx') | ||
| 190 | - .width(100) | ||
| 191 | - // .height('46lpx') | ||
| 192 | - .height(46) | ||
| 193 | - // .borderRadius('6lpx') | ||
| 194 | - .borderRadius(6) | 163 | + .width(52) |
| 164 | + .height(24) | ||
| 165 | + .borderRadius(3) | ||
| 195 | .onClick(() => { | 166 | .onClick(() => { |
| 196 | this.dialogController.open() | 167 | this.dialogController.open() |
| 197 | }) | 168 | }) |
| 198 | }else if(this.item.status == "running"){ | 169 | }else if(this.item.status == "running"){ |
| 199 | Text("去观看" ) | 170 | Text("去观看" ) |
| 200 | .fontWeight(400) | 171 | .fontWeight(400) |
| 201 | - // .fontSize('23lpx') | ||
| 202 | - .fontSize(23) | 172 | + .fontSize(12) |
| 203 | .backgroundColor($r('app.color.color_ED2800')) | 173 | .backgroundColor($r('app.color.color_ED2800')) |
| 204 | .fontColor($r('app.color.white')) | 174 | .fontColor($r('app.color.white')) |
| 205 | - // .lineHeight('31lpx') | ||
| 206 | - .lineHeight(31) | 175 | + .lineHeight(18) |
| 207 | .textAlign(TextAlign.Center) | 176 | .textAlign(TextAlign.Center) |
| 208 | - // .width('100lpx') | ||
| 209 | - .width(100) | ||
| 210 | - // .height('46lpx') | ||
| 211 | - .height(46) | ||
| 212 | - // .borderRadius('6lpx') | ||
| 213 | - .borderRadius(6) | 177 | + .width(52) |
| 178 | + .height(24) | ||
| 179 | + .borderRadius(3) | ||
| 214 | } else { | 180 | } else { |
| 215 | Text("看回放") | 181 | Text("看回放") |
| 216 | .fontWeight(400) | 182 | .fontWeight(400) |
| 217 | - // .fontSize('23lpx') | ||
| 218 | - .fontSize(23) | 183 | + .fontSize(12) |
| 219 | .backgroundColor($r('app.color.color_ED2800')) | 184 | .backgroundColor($r('app.color.color_ED2800')) |
| 220 | .fontColor($r('app.color.white')) | 185 | .fontColor($r('app.color.white')) |
| 221 | - // .lineHeight('31lpx') | ||
| 222 | - .lineHeight(31) | 186 | + .lineHeight(18) |
| 223 | .textAlign(TextAlign.Center) | 187 | .textAlign(TextAlign.Center) |
| 224 | - // .width('100lpx') | ||
| 225 | - .width(100) | ||
| 226 | - // .height('46lpx') | ||
| 227 | - .height(46) | ||
| 228 | - // .borderRadius('6lpx') | ||
| 229 | - .borderRadius(6) | 188 | + .width(52) |
| 189 | + .height(24) | ||
| 190 | + .borderRadius(3) | ||
| 230 | } | 191 | } |
| 231 | } | 192 | } |
| 232 | } | 193 | } |
| 233 | .padding({ | 194 | .padding({ |
| 234 | - // left: '23lpx', | ||
| 235 | - left: 23, | ||
| 236 | - // right: '23lpx', | ||
| 237 | - right: 23, | ||
| 238 | - // top: '15lpx', | ||
| 239 | - top: 15, | ||
| 240 | - // bottom: '23lpx' | ||
| 241 | - bottom: 23 | 195 | + left: 12, |
| 196 | + right: 12, | ||
| 197 | + top: 8, | ||
| 198 | + bottom: 12 | ||
| 242 | }) | 199 | }) |
| 243 | - }.margin({ left: 10, right: 10 }) | 200 | + } |
| 244 | .backgroundColor($r('app.color.white')) | 201 | .backgroundColor($r('app.color.white')) |
| 245 | - // .borderRadius('8lpx') | ||
| 246 | - .borderRadius(8) | 202 | + .borderRadius(4) |
| 203 | + .margin({top: 8}) | ||
| 247 | // } | 204 | // } |
| 248 | } | 205 | } |
| 249 | 206 |
| @@ -140,8 +140,7 @@ export struct AppointmentListUI { | @@ -140,8 +140,7 @@ export struct AppointmentListUI { | ||
| 140 | .cachedCount(4) | 140 | .cachedCount(4) |
| 141 | .scrollBar(BarState.Off) | 141 | .scrollBar(BarState.Off) |
| 142 | .edgeEffect(EdgeEffect.None) | 142 | .edgeEffect(EdgeEffect.None) |
| 143 | - // .margin({ top: '23lpx', left: '23lpx', right: '23lpx'}) | ||
| 144 | - .margin({ top: 23, left: 23, right: 23}) | 143 | + .margin({ top: 4, left: 12, right: 12}) |
| 145 | .layoutWeight(1) | 144 | .layoutWeight(1) |
| 146 | } | 145 | } |
| 147 | 146 |
| @@ -31,62 +31,45 @@ export struct FollowChildComponent{ | @@ -31,62 +31,45 @@ export struct FollowChildComponent{ | ||
| 31 | Stack({alignContent: Alignment.Bottom}){ | 31 | Stack({alignContent: Alignment.Bottom}){ |
| 32 | Image(StringUtils.isEmpty(this.data.headPhotoUrl)?$r('app.media.icon_default_head_mater'):this.data.headPhotoUrl) | 32 | Image(StringUtils.isEmpty(this.data.headPhotoUrl)?$r('app.media.icon_default_head_mater'):this.data.headPhotoUrl) |
| 33 | .objectFit(ImageFit.Auto) | 33 | .objectFit(ImageFit.Auto) |
| 34 | - // .width('92lpx') | ||
| 35 | - .width(92) | ||
| 36 | - // .height('92lpx') | ||
| 37 | - .height(92) | 34 | + .width(48) |
| 35 | + .height(48) | ||
| 38 | .borderRadius(50) | 36 | .borderRadius(50) |
| 39 | - // .borderWidth('1lpx') | ||
| 40 | .borderWidth(1) | 37 | .borderWidth(1) |
| 41 | .borderColor($r('app.color.color_0D000000')) | 38 | .borderColor($r('app.color.color_0D000000')) |
| 42 | Row(){ | 39 | Row(){ |
| 43 | Image(this.data.authIcon) | 40 | Image(this.data.authIcon) |
| 44 | - // .width('32lpx') | ||
| 45 | - .width(32) | ||
| 46 | - // .height('32lpx') | ||
| 47 | - .height(32) | 41 | + .width(16.89) |
| 42 | + .height(16.89) | ||
| 48 | .objectFit(ImageFit.Cover) | 43 | .objectFit(ImageFit.Cover) |
| 49 | } | 44 | } |
| 50 | - // .width('92lpx') | ||
| 51 | - .width(92) | 45 | + .width(48) |
| 52 | .justifyContent(FlexAlign.End) | 46 | .justifyContent(FlexAlign.End) |
| 53 | } | 47 | } |
| 54 | - // .width('92lpx') | ||
| 55 | - .width(92) | ||
| 56 | - // .height('92lpx') | ||
| 57 | - .height(92) | ||
| 58 | - // .margin({right:'15lpx'}) | ||
| 59 | - .margin({right: 15}) | 48 | + .width(48) |
| 49 | + .height(48) | ||
| 50 | + .margin({right: 11}) | ||
| 60 | 51 | ||
| 61 | 52 | ||
| 62 | Column(){ | 53 | Column(){ |
| 63 | Text(this.data.cnUserName) | 54 | Text(this.data.cnUserName) |
| 64 | - // .fontWeight('400lpx') | ||
| 65 | .fontWeight(400) | 55 | .fontWeight(400) |
| 66 | - // .fontSize('31lpx') | ||
| 67 | - .fontSize(31) | ||
| 68 | - // .lineHeight('38lpx') | ||
| 69 | - .lineHeight(38) | 56 | + .fontSize(18) |
| 57 | + .lineHeight(22) | ||
| 70 | .fontColor($r('app.color.color_222222')) | 58 | .fontColor($r('app.color.color_222222')) |
| 71 | .maxLines(1) | 59 | .maxLines(1) |
| 72 | - // .margin({bottom:'8lpx'}) | ||
| 73 | - .margin({bottom: 8}) | 60 | + .margin({bottom: 2}) |
| 74 | 61 | ||
| 75 | Text(`粉丝${this.data.cnFansNum}`) | 62 | Text(`粉丝${this.data.cnFansNum}`) |
| 76 | .fontColor($r('app.color.color_B0B0B0')) | 63 | .fontColor($r('app.color.color_B0B0B0')) |
| 77 | - // .fontSize('23lpx') | ||
| 78 | - .fontSize(23) | ||
| 79 | - // .fontWeight('400lpx') | 64 | + .fontSize(12) |
| 80 | .fontWeight(400) | 65 | .fontWeight(400) |
| 81 | - // .lineHeight('31lpx') | ||
| 82 | - .lineHeight(31) | ||
| 83 | - // .margin({bottom:'8lpx'}) | ||
| 84 | - .margin({bottom: 8}) | 66 | + .lineHeight(16) |
| 67 | + .margin({bottom: 4}) | ||
| 85 | 68 | ||
| 86 | Text(`${this.data.introduction}`) | 69 | Text(`${this.data.introduction}`) |
| 87 | .fontColor($r('app.color.color_B0B0B0')) | 70 | .fontColor($r('app.color.color_B0B0B0')) |
| 88 | - // .fontSize('23lpx') | ||
| 89 | - .fontSize(23) | 71 | + .fontSize(12) |
| 72 | + .lineHeight(16) | ||
| 90 | .maxLines(2) | 73 | .maxLines(2) |
| 91 | .textAlign(TextAlign.Start) | 74 | .textAlign(TextAlign.Start) |
| 92 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 75 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| @@ -110,30 +93,23 @@ export struct FollowChildComponent{ | @@ -110,30 +93,23 @@ export struct FollowChildComponent{ | ||
| 110 | }else { | 93 | }else { |
| 111 | Text(`已关注`) | 94 | Text(`已关注`) |
| 112 | .fontColor($r('app.color.color_CCCCCC')) | 95 | .fontColor($r('app.color.color_CCCCCC')) |
| 113 | - // .fontSize('23lpx') | ||
| 114 | - .fontSize(23) | ||
| 115 | - // .fontWeight('500lpx') | 96 | + .fontSize(12) |
| 116 | .fontWeight(500) | 97 | .fontWeight(500) |
| 117 | - // .lineHeight('35lpx') | ||
| 118 | - .lineHeight(35) | 98 | + .lineHeight(18) |
| 119 | } | 99 | } |
| 120 | } | 100 | } |
| 121 | .justifyContent(FlexAlign.Center) | 101 | .justifyContent(FlexAlign.Center) |
| 122 | - // .width('100lpx') | ||
| 123 | - .width(100) | 102 | + .width(52) |
| 124 | .backgroundColor($r("app.color.color_F5F5F5")) | 103 | .backgroundColor($r("app.color.color_F5F5F5")) |
| 125 | - // .borderRadius("6lpx") | ||
| 126 | - .borderRadius(6) | ||
| 127 | - // .height('46lpx') | ||
| 128 | - .height(46) | 104 | + .borderRadius(3) |
| 105 | + .height(24) | ||
| 129 | .onClick(()=>{ | 106 | .onClick(()=>{ |
| 130 | if (this.isLoadingAttention) return | 107 | if (this.isLoadingAttention) return |
| 131 | this.isLoadingAttention = true | 108 | this.isLoadingAttention = true |
| 132 | 109 | ||
| 133 | this.followOperation() | 110 | this.followOperation() |
| 134 | }) | 111 | }) |
| 135 | - // .margin({top:'29lpx'}) | ||
| 136 | - .margin({top: 29}) | 112 | + .margin({top: 26}) |
| 137 | }else{ | 113 | }else{ |
| 138 | Row(){ | 114 | Row(){ |
| 139 | if(this.isLoadingAttention) { | 115 | if(this.isLoadingAttention) { |
| @@ -141,36 +117,25 @@ export struct FollowChildComponent{ | @@ -141,36 +117,25 @@ export struct FollowChildComponent{ | ||
| 141 | .width(20) | 117 | .width(20) |
| 142 | .height(20) | 118 | .height(20) |
| 143 | .color($r('app.color.main_red')) | 119 | .color($r('app.color.main_red')) |
| 144 | - }else { | 120 | + } else { |
| 145 | Image($r('app.media.follow_icon')) | 121 | Image($r('app.media.follow_icon')) |
| 146 | - // .margin({right:'4lpx'}) | ||
| 147 | - .margin({right: 4}) | ||
| 148 | - // .width('23lpx') | ||
| 149 | - .width(23) | ||
| 150 | - // .height('23lpx') | ||
| 151 | - .height(23) | 122 | + .margin({right: 2}) |
| 123 | + .width(12) | ||
| 124 | + .height(12) | ||
| 152 | Text(`关注`) | 125 | Text(`关注`) |
| 153 | .fontColor($r('app.color.color_ED2800')) | 126 | .fontColor($r('app.color.color_ED2800')) |
| 154 | - // .fontSize('23lpx') | ||
| 155 | - .fontSize(23) | ||
| 156 | - // .fontWeight('500lpx') | 127 | + .fontSize(12) |
| 157 | .fontWeight(500) | 128 | .fontWeight(500) |
| 158 | - // .lineHeight('35lpx') | ||
| 159 | - .lineHeight(35) | 129 | + .lineHeight(18) |
| 160 | } | 130 | } |
| 161 | 131 | ||
| 162 | }.borderColor($r('app.color.color_1AED2800')) | 132 | }.borderColor($r('app.color.color_1AED2800')) |
| 163 | - // .borderRadius('6lpx') | ||
| 164 | - .borderRadius(6) | ||
| 165 | - // .borderWidth('2lpx') | ||
| 166 | - .borderWidth(2) | 133 | + .borderRadius(3) |
| 134 | + .borderWidth(1) | ||
| 167 | .justifyContent(FlexAlign.Center) | 135 | .justifyContent(FlexAlign.Center) |
| 168 | - // .width('100lpx') | ||
| 169 | - .width(100) | ||
| 170 | - // .height('46lpx') | ||
| 171 | - .height(46) | ||
| 172 | - // .margin({top:'29lpx'}) | ||
| 173 | - .margin({top: 29}) | 136 | + .width(52) |
| 137 | + .height(24) | ||
| 138 | + .margin({top: 26}) | ||
| 174 | .onClick(()=>{ | 139 | .onClick(()=>{ |
| 175 | if (this.isLoadingAttention) return | 140 | if (this.isLoadingAttention) return |
| 176 | this.isLoadingAttention = true | 141 | this.isLoadingAttention = true |
| @@ -179,23 +144,19 @@ export struct FollowChildComponent{ | @@ -179,23 +144,19 @@ export struct FollowChildComponent{ | ||
| 179 | }) | 144 | }) |
| 180 | } | 145 | } |
| 181 | } | 146 | } |
| 182 | - // .padding({top:'27lpx'}) | ||
| 183 | - .padding({top: 27}) | 147 | + .padding({top: 14}) |
| 184 | .width('100%') | 148 | .width('100%') |
| 185 | .justifyContent(FlexAlign.SpaceBetween) | 149 | .justifyContent(FlexAlign.SpaceBetween) |
| 186 | .alignItems(VerticalAlign.Top) | 150 | .alignItems(VerticalAlign.Top) |
| 187 | 151 | ||
| 188 | } | 152 | } |
| 189 | - // .height(`${this.columnHeight}lpx`) | ||
| 190 | - .height(`${this.columnHeight}`) | 153 | + .height(105) |
| 191 | .justifyContent(FlexAlign.Start) | 154 | .justifyContent(FlexAlign.Start) |
| 192 | 155 | ||
| 193 | Divider() | 156 | Divider() |
| 194 | .width('100%') | 157 | .width('100%') |
| 195 | - // .height('2lpx') | ||
| 196 | - .height(2) | 158 | + .height(1) |
| 197 | .color($r('app.color.color_F5F5F5')) | 159 | .color($r('app.color.color_F5F5F5')) |
| 198 | - // .strokeWidth('1lpx') | ||
| 199 | .strokeWidth(1) | 160 | .strokeWidth(1) |
| 200 | }.width('100%') | 161 | }.width('100%') |
| 201 | 162 | ||
| @@ -208,65 +169,51 @@ export struct FollowChildComponent{ | @@ -208,65 +169,51 @@ export struct FollowChildComponent{ | ||
| 208 | Stack({alignContent: Alignment.Bottom}){ | 169 | Stack({alignContent: Alignment.Bottom}){ |
| 209 | Image(StringUtils.isEmpty(this.data.headPhotoUrl)?$r('app.media.icon_default_head_mater'):this.data.headPhotoUrl) | 170 | Image(StringUtils.isEmpty(this.data.headPhotoUrl)?$r('app.media.icon_default_head_mater'):this.data.headPhotoUrl) |
| 210 | .objectFit(ImageFit.Auto) | 171 | .objectFit(ImageFit.Auto) |
| 211 | - // .width('92lpx') | ||
| 212 | - .width(92) | ||
| 213 | - // .height('92lpx') | ||
| 214 | - .height(92) | 172 | + .width(48) |
| 173 | + .height(48) | ||
| 215 | .borderRadius(50) | 174 | .borderRadius(50) |
| 216 | - // .borderWidth('1lpx') | ||
| 217 | .borderWidth(1) | 175 | .borderWidth(1) |
| 218 | .borderColor($r('app.color.color_0D000000')) | 176 | .borderColor($r('app.color.color_0D000000')) |
| 219 | Row(){ | 177 | Row(){ |
| 220 | Image(this.data.authIcon) | 178 | Image(this.data.authIcon) |
| 221 | - // .width('32lpx') | ||
| 222 | - .width(32) | ||
| 223 | - // .height('32lpx') | ||
| 224 | - .height(32) | 179 | + .width(16.89) |
| 180 | + .height(16.89) | ||
| 225 | .objectFit(ImageFit.Cover) | 181 | .objectFit(ImageFit.Cover) |
| 226 | } | 182 | } |
| 227 | - // .width('92lpx') | ||
| 228 | - .width(92) | 183 | + .width(48) |
| 229 | .justifyContent(FlexAlign.End) | 184 | .justifyContent(FlexAlign.End) |
| 230 | } | 185 | } |
| 231 | - // .width('92lpx') | ||
| 232 | - .width(92) | ||
| 233 | - // .height('92lpx') | ||
| 234 | - .height(92) | ||
| 235 | - // .margin({right:'15lpx'}) | ||
| 236 | - .margin({right: 15}) | 186 | + .width(48) |
| 187 | + .height(48) | ||
| 188 | + .margin({right: 11}) | ||
| 237 | 189 | ||
| 238 | Column(){ | 190 | Column(){ |
| 239 | Text(this.data.cnUserName) | 191 | Text(this.data.cnUserName) |
| 240 | - // .fontWeight('400lpx') | ||
| 241 | .fontWeight(400) | 192 | .fontWeight(400) |
| 242 | - // .fontSize('31lpx') | ||
| 243 | - .fontSize(31) | ||
| 244 | - // .lineHeight('38lpx') | ||
| 245 | - .lineHeight(38) | 193 | + .fontSize(18) |
| 194 | + .lineHeight(22) | ||
| 246 | .fontColor($r('app.color.color_222222')) | 195 | .fontColor($r('app.color.color_222222')) |
| 247 | .maxLines(1) | 196 | .maxLines(1) |
| 248 | - // .margin({bottom:'12lpx'}) | ||
| 249 | - .margin({bottom: 12}) | 197 | + .margin({bottom: 2}) |
| 250 | Row(){ | 198 | Row(){ |
| 251 | if(this.data.cnFansNum!="0"){ | 199 | if(this.data.cnFansNum!="0"){ |
| 252 | Text(`粉丝${this.data.cnFansNum}`) | 200 | Text(`粉丝${this.data.cnFansNum}`) |
| 253 | .fontColor($r('app.color.color_B0B0B0')) | 201 | .fontColor($r('app.color.color_B0B0B0')) |
| 254 | - // .fontSize('23lpx') | ||
| 255 | - .fontSize(23) | 202 | + .fontSize(12) |
| 203 | + .fontWeight(400) | ||
| 204 | + .lineHeight(16) | ||
| 256 | } | 205 | } |
| 257 | if(this.data.cnFansNum!="0" && StringUtils.isNotEmpty(this.data.introduction)){ | 206 | if(this.data.cnFansNum!="0" && StringUtils.isNotEmpty(this.data.introduction)){ |
| 258 | Image($r("app.media.point")) | 207 | Image($r("app.media.point")) |
| 259 | - // .width('31lpx') | ||
| 260 | - .width(31) | ||
| 261 | - // .height('31lpx') | ||
| 262 | - .height(31) | 208 | + .width(16) |
| 209 | + .height(16) | ||
| 263 | .objectFit(ImageFit.Auto) | 210 | .objectFit(ImageFit.Auto) |
| 264 | } | 211 | } |
| 265 | 212 | ||
| 266 | Text(`${this.data.introduction}`) | 213 | Text(`${this.data.introduction}`) |
| 267 | .fontColor($r('app.color.color_B0B0B0')) | 214 | .fontColor($r('app.color.color_B0B0B0')) |
| 268 | - // .fontSize('23lpx') | ||
| 269 | - .fontSize(23) | 215 | + .fontSize(12) |
| 216 | + .lineHeight(16) | ||
| 270 | .layoutWeight(1) | 217 | .layoutWeight(1) |
| 271 | .maxLines(1) | 218 | .maxLines(1) |
| 272 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 219 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| @@ -292,22 +239,16 @@ export struct FollowChildComponent{ | @@ -292,22 +239,16 @@ export struct FollowChildComponent{ | ||
| 292 | }else { | 239 | }else { |
| 293 | Text(`已关注`) | 240 | Text(`已关注`) |
| 294 | .fontColor($r('app.color.color_CCCCCC')) | 241 | .fontColor($r('app.color.color_CCCCCC')) |
| 295 | - // .fontSize('23lpx') | ||
| 296 | - .fontSize(23) | ||
| 297 | - // .fontWeight('500lpx') | 242 | + .fontSize(12) |
| 298 | .fontWeight(500) | 243 | .fontWeight(500) |
| 299 | - // .lineHeight('35lpx') | ||
| 300 | - .lineHeight(35) | 244 | + .lineHeight(18) |
| 301 | } | 245 | } |
| 302 | } | 246 | } |
| 303 | .backgroundColor($r("app.color.color_F5F5F5")) | 247 | .backgroundColor($r("app.color.color_F5F5F5")) |
| 304 | .justifyContent(FlexAlign.Center) | 248 | .justifyContent(FlexAlign.Center) |
| 305 | - // .borderRadius("6lpx") | ||
| 306 | - .borderRadius(6) | ||
| 307 | - // .width('100lpx') | ||
| 308 | - .width(100) | ||
| 309 | - // .height('46lpx') | ||
| 310 | - .height(46) | 249 | + .borderRadius(3) |
| 250 | + .width(52) | ||
| 251 | + .height(24) | ||
| 311 | .onClick(()=>{ | 252 | .onClick(()=>{ |
| 312 | if (this.isLoadingAttention) return | 253 | if (this.isLoadingAttention) return |
| 313 | this.isLoadingAttention = true | 254 | this.isLoadingAttention = true |
| @@ -323,31 +264,21 @@ export struct FollowChildComponent{ | @@ -323,31 +264,21 @@ export struct FollowChildComponent{ | ||
| 323 | .color($r('app.color.main_red')) | 264 | .color($r('app.color.main_red')) |
| 324 | }else { | 265 | }else { |
| 325 | Image($r('app.media.follow_icon')) | 266 | Image($r('app.media.follow_icon')) |
| 326 | - // .margin({right:'4lpx'}) | ||
| 327 | - .margin({right: 4}) | ||
| 328 | - // .width('23lpx') | ||
| 329 | - .width(23) | ||
| 330 | - // .height('23lpx') | ||
| 331 | - .height(23) | 267 | + .margin({right: 2}) |
| 268 | + .width(12) | ||
| 269 | + .height(12) | ||
| 332 | Text(`关注`) | 270 | Text(`关注`) |
| 333 | .fontColor($r('app.color.color_ED2800')) | 271 | .fontColor($r('app.color.color_ED2800')) |
| 334 | - // .fontSize('23lpx') | ||
| 335 | - .fontSize(23) | ||
| 336 | - // .fontWeight('500lpx') | 272 | + .fontSize(12) |
| 337 | .fontWeight(500) | 273 | .fontWeight(500) |
| 338 | - // .lineHeight('35lpx') | ||
| 339 | - .lineHeight(35) | 274 | + .lineHeight(18) |
| 340 | } | 275 | } |
| 341 | }.borderColor($r('app.color.color_1AED2800')) | 276 | }.borderColor($r('app.color.color_1AED2800')) |
| 342 | - // .borderRadius('6lpx') | ||
| 343 | - .borderRadius(6) | ||
| 344 | - // .borderWidth('2lpx') | ||
| 345 | - .borderWidth(2) | 277 | + .borderRadius(3) |
| 278 | + .borderWidth(1) | ||
| 346 | .justifyContent(FlexAlign.Center) | 279 | .justifyContent(FlexAlign.Center) |
| 347 | - // .width('100lpx') | ||
| 348 | - .width(100) | ||
| 349 | - // .height('46lpx') | ||
| 350 | - .height(46) | 280 | + .width(52) |
| 281 | + .height(24) | ||
| 351 | .onClick(()=>{ | 282 | .onClick(()=>{ |
| 352 | if (this.isLoadingAttention) return | 283 | if (this.isLoadingAttention) return |
| 353 | this.isLoadingAttention = true | 284 | this.isLoadingAttention = true |
| @@ -358,21 +289,16 @@ export struct FollowChildComponent{ | @@ -358,21 +289,16 @@ export struct FollowChildComponent{ | ||
| 358 | } | 289 | } |
| 359 | } | 290 | } |
| 360 | .width('100%') | 291 | .width('100%') |
| 361 | - // .height('92lpx') | ||
| 362 | - .height(92) | ||
| 363 | .justifyContent(FlexAlign.SpaceBetween) | 292 | .justifyContent(FlexAlign.SpaceBetween) |
| 364 | 293 | ||
| 365 | } | 294 | } |
| 366 | - // .height('146lpx') | ||
| 367 | - .height(146) | 295 | + .height(76) |
| 368 | .justifyContent(FlexAlign.Center) | 296 | .justifyContent(FlexAlign.Center) |
| 369 | 297 | ||
| 370 | Divider() | 298 | Divider() |
| 371 | .width('100%') | 299 | .width('100%') |
| 372 | - // .height('2lpx') | ||
| 373 | - .height(2) | 300 | + .height(1) |
| 374 | .color($r('app.color.color_F5F5F5')) | 301 | .color($r('app.color.color_F5F5F5')) |
| 375 | - // .strokeWidth('1lpx') | ||
| 376 | .strokeWidth(1) | 302 | .strokeWidth(1) |
| 377 | }.width('100%') | 303 | }.width('100%') |
| 378 | 304 |
| @@ -54,26 +54,18 @@ export struct FollowFirstTabsComponent{ | @@ -54,26 +54,18 @@ export struct FollowFirstTabsComponent{ | ||
| 54 | @Builder TabBuilder(index: number, item: FollowListItem) { | 54 | @Builder TabBuilder(index: number, item: FollowListItem) { |
| 55 | Stack(){ | 55 | Stack(){ |
| 56 | Text(item.directoryName) | 56 | Text(item.directoryName) |
| 57 | - // .height('38lpx') | ||
| 58 | - .height(38) | ||
| 59 | - // .fontSize('33lpx') | ||
| 60 | - .fontSize(33) | 57 | + .fontSize(18) |
| 61 | .fontWeight(this.currentIndex === index ? 600 : 400) | 58 | .fontWeight(this.currentIndex === index ? 600 : 400) |
| 62 | .fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor) | 59 | .fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor) |
| 63 | - // .lineHeight('38lpx') | ||
| 64 | - .lineHeight(38) | 60 | + .lineHeight(20) |
| 65 | 61 | ||
| 66 | if(this.currentIndex === index){ | 62 | if(this.currentIndex === index){ |
| 67 | Divider() | 63 | Divider() |
| 68 | - // .width('31lpx') | ||
| 69 | - .width(31) | ||
| 70 | - // .height('4lpx') | ||
| 71 | - .height(4) | 64 | + .width(16) |
| 65 | + .height(2) | ||
| 72 | .color('#ED2800') | 66 | .color('#ED2800') |
| 73 | - // .strokeWidth('4lpx') | ||
| 74 | - .strokeWidth(4) | ||
| 75 | - // .margin({top:'50lpx'}) | ||
| 76 | - .margin({top: 50}) | 67 | + .strokeWidth(2) |
| 68 | + .margin({top: 35}) | ||
| 77 | .id("divTag") | 69 | .id("divTag") |
| 78 | } | 70 | } |
| 79 | }.onClick(()=>{ | 71 | }.onClick(()=>{ |
| @@ -83,10 +75,7 @@ export struct FollowFirstTabsComponent{ | @@ -83,10 +75,7 @@ export struct FollowFirstTabsComponent{ | ||
| 83 | trackTabFirstClick(item.directoryName) | 75 | trackTabFirstClick(item.directoryName) |
| 84 | }) | 76 | }) |
| 85 | .height('100%') | 77 | .height('100%') |
| 86 | - // .margin({right:'9lpx'}) | ||
| 87 | - .margin({right: 9}) | ||
| 88 | - // .padding({left:'31lpx',right:index === this.data.length-1?"31lpx":"0lpx"}) | ||
| 89 | - .padding({left: 31,right:index === this.data.length-1 ? 31 : 0}) | 78 | + .padding({left: 16,right:index === this.data.length-1 ? 16 : 0}) |
| 90 | } | 79 | } |
| 91 | 80 | ||
| 92 | build() { | 81 | build() { |
| @@ -111,8 +100,7 @@ export struct FollowFirstTabsComponent{ | @@ -111,8 +100,7 @@ export struct FollowFirstTabsComponent{ | ||
| 111 | }.listDirection(Axis.Horizontal) | 100 | }.listDirection(Axis.Horizontal) |
| 112 | .backgroundColor($r('app.color.white')) | 101 | .backgroundColor($r('app.color.white')) |
| 113 | .width("100%") | 102 | .width("100%") |
| 114 | - .height(84) | ||
| 115 | - // .height("84lpx") | 103 | + .height(44) |
| 116 | .edgeEffect(EdgeEffect.None) | 104 | .edgeEffect(EdgeEffect.None) |
| 117 | .scrollBar(BarState.Off) | 105 | .scrollBar(BarState.Off) |
| 118 | 106 |
| @@ -99,14 +99,12 @@ export struct FollowListDetailUI { | @@ -99,14 +99,12 @@ export struct FollowListDetailUI { | ||
| 99 | ListItem() { | 99 | ListItem() { |
| 100 | ListHasNoMoreDataUI() | 100 | ListHasNoMoreDataUI() |
| 101 | } | 101 | } |
| 102 | - // .margin({bottom:"40lpx"}) | ||
| 103 | - .margin({bottom: 40}) | 102 | + .margin({bottom: 20}) |
| 104 | } | 103 | } |
| 105 | } | 104 | } |
| 106 | .edgeEffect(EdgeEffect.None) | 105 | .edgeEffect(EdgeEffect.None) |
| 107 | .cachedCount(5) | 106 | .cachedCount(5) |
| 108 | - // .padding({ left: '31lpx', right: '31lpx' }) | ||
| 109 | - .padding({ left: 31, right: 31 }) | 107 | + .padding({ left: 16, right: 16 }) |
| 110 | .layoutWeight(1) | 108 | .layoutWeight(1) |
| 111 | .scrollBar(BarState.Off) | 109 | .scrollBar(BarState.Off) |
| 112 | .onReachEnd(() => { | 110 | .onReachEnd(() => { |
sight_harmony/features/wdComponent/src/main/ets/components/mine/follow/FollowSecondTabsComponent.ets
| @@ -18,7 +18,6 @@ export struct FollowSecondTabsComponent{ | @@ -18,7 +18,6 @@ export struct FollowSecondTabsComponent{ | ||
| 18 | Column(){ | 18 | Column(){ |
| 19 | Text().backgroundColor($r('app.color.color_EDEDED')) | 19 | Text().backgroundColor($r('app.color.color_EDEDED')) |
| 20 | .width('100%') | 20 | .width('100%') |
| 21 | - // .height('2lpx') | ||
| 22 | .height(2) | 21 | .height(2) |
| 23 | 22 | ||
| 24 | if(this.data != null){ | 23 | if(this.data != null){ |
| @@ -94,25 +93,19 @@ export struct FollowSecondTabsComponent{ | @@ -94,25 +93,19 @@ export struct FollowSecondTabsComponent{ | ||
| 94 | Column(){ | 93 | Column(){ |
| 95 | Text(item.directoryName) | 94 | Text(item.directoryName) |
| 96 | .width('100%') | 95 | .width('100%') |
| 97 | - // .height('38lpx') | ||
| 98 | - .height(38) | ||
| 99 | - // .fontSize('30lpx') | ||
| 100 | - .fontSize(30) | 96 | + .fontSize(14) |
| 101 | .textAlign(TextAlign.Center) | 97 | .textAlign(TextAlign.Center) |
| 102 | .fontWeight(this.currentIndex === index ? 600 : 400) | 98 | .fontWeight(this.currentIndex === index ? 600 : 400) |
| 103 | .fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor) | 99 | .fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor) |
| 104 | - // .lineHeight('38lpx') | ||
| 105 | - .lineHeight(38) | 100 | + .lineHeight(22) |
| 106 | } | 101 | } |
| 107 | .onClick(()=>{ | 102 | .onClick(()=>{ |
| 108 | this.currentIndex = index | 103 | this.currentIndex = index |
| 109 | this.swiperController.changeIndex(this.currentIndex) | 104 | this.swiperController.changeIndex(this.currentIndex) |
| 110 | }) | 105 | }) |
| 111 | .justifyContent(FlexAlign.Center) | 106 | .justifyContent(FlexAlign.Center) |
| 112 | - // .height('84lpx') | ||
| 113 | - .height(84) | ||
| 114 | - // .width('140lpx') | ||
| 115 | - .width(140) | 107 | + .height(50) |
| 108 | + .width(80) | ||
| 116 | .backgroundColor(this.currentIndex === index?$r('app.color.white'):$r('app.color.color_F9F9F9')) | 109 | .backgroundColor(this.currentIndex === index?$r('app.color.white'):$r('app.color.color_F9F9F9')) |
| 117 | } | 110 | } |
| 118 | 111 |
| @@ -29,22 +29,22 @@ export struct FollowThirdTabsComponent{ | @@ -29,22 +29,22 @@ export struct FollowThirdTabsComponent{ | ||
| 29 | Column(){ | 29 | Column(){ |
| 30 | Row(){ | 30 | Row(){ |
| 31 | Image(index === 0?$r("app.media.ic_collect_left_left"):(index === this.data[this.firstIndex].children[this.secondIndex].children.length-1?$r('app.media.ic_collect_right_left'):$r('app.media.ic_collect_mid_left'))) | 31 | Image(index === 0?$r("app.media.ic_collect_left_left"):(index === this.data[this.firstIndex].children[this.secondIndex].children.length-1?$r('app.media.ic_collect_right_left'):$r('app.media.ic_collect_mid_left'))) |
| 32 | - .width(index === 0?"19lpx":"35lpx") | ||
| 33 | - .height('61lpx') | 32 | + .width(index === 0? 10 : 18) |
| 33 | + .height(32) | ||
| 34 | .objectFit(ImageFit.Fill) | 34 | .objectFit(ImageFit.Fill) |
| 35 | 35 | ||
| 36 | Text(item.directoryName) | 36 | Text(item.directoryName) |
| 37 | - .fontSize('27lpx') | 37 | + .fontSize(14) |
| 38 | .fontWeight(this.currentIndex === index ? 600 : 400) | 38 | .fontWeight(this.currentIndex === index ? 600 : 400) |
| 39 | .fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor) | 39 | .fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor) |
| 40 | - .lineHeight('35lpx') | 40 | + .lineHeight(18) |
| 41 | .backgroundImage($r('app.media.ic_collect_mid')) | 41 | .backgroundImage($r('app.media.ic_collect_mid')) |
| 42 | .backgroundImageSize(ImageSize.Cover) | 42 | .backgroundImageSize(ImageSize.Cover) |
| 43 | - .padding({top:"13lpx",bottom:"13lpx"}) | 43 | + .padding({top:7,bottom:7}) |
| 44 | 44 | ||
| 45 | Image(index === 0?$r("app.media.ic_collect_left_right"):(index === this.data[this.firstIndex].children[this.secondIndex].children.length-1?$r('app.media.ic_collect_right_right'):$r('app.media.ic_collect_mid_right'))) | 45 | Image(index === 0?$r("app.media.ic_collect_left_right"):(index === this.data[this.firstIndex].children[this.secondIndex].children.length-1?$r('app.media.ic_collect_right_right'):$r('app.media.ic_collect_mid_right'))) |
| 46 | - .width(index === this.data[this.firstIndex].children[this.secondIndex].children.length-1?"19lpx":"35lpx") | ||
| 47 | - .height('61lpx') | 46 | + .width(index === this.data[this.firstIndex].children[this.secondIndex].children.length-1 ? 10 : 18) |
| 47 | + .height(32) | ||
| 48 | .objectFit(ImageFit.Fill) | 48 | .objectFit(ImageFit.Fill) |
| 49 | } | 49 | } |
| 50 | } | 50 | } |
| @@ -53,8 +53,8 @@ export struct FollowThirdTabsComponent{ | @@ -53,8 +53,8 @@ export struct FollowThirdTabsComponent{ | ||
| 53 | this.swiperController.changeIndex(this.currentIndex) | 53 | this.swiperController.changeIndex(this.currentIndex) |
| 54 | this.listScroller.scrollToIndex(index, true, ScrollAlign.CENTER) | 54 | this.listScroller.scrollToIndex(index, true, ScrollAlign.CENTER) |
| 55 | }) | 55 | }) |
| 56 | - .offset({x:index === 0?"0lpx":"-5lpx"}) | ||
| 57 | - .height('80lpx') | 56 | + .offset({x: -5}) |
| 57 | + .height(84) | ||
| 58 | .justifyContent(FlexAlign.End) | 58 | .justifyContent(FlexAlign.End) |
| 59 | } | 59 | } |
| 60 | 60 | ||
| @@ -76,10 +76,8 @@ export struct FollowThirdTabsComponent{ | @@ -76,10 +76,8 @@ export struct FollowThirdTabsComponent{ | ||
| 76 | .scrollBar(BarState.Off) | 76 | .scrollBar(BarState.Off) |
| 77 | .listDirection(Axis.Horizontal) | 77 | .listDirection(Axis.Horizontal) |
| 78 | .width('100%') | 78 | .width('100%') |
| 79 | - // .height("84lpx") | ||
| 80 | .height(84) | 79 | .height(84) |
| 81 | - // .padding({left:'31lpx',right:'48lpx'}) | ||
| 82 | - .padding({left: 31,right: 48}) | 80 | + .padding({left: 16,right: 25}) |
| 83 | 81 | ||
| 84 | // Column() { | 82 | // Column() { |
| 85 | // // 页签 | 83 | // // 页签 |
| @@ -24,45 +24,31 @@ export struct ChildCommentComponent { | @@ -24,45 +24,31 @@ export struct ChildCommentComponent { | ||
| 24 | Image(this.data.fromUserHeader&&this.data.fromUserHeader.length>0?this.data.fromUserHeader:(this.data.fromUserType === 1?$r('app.media.default_head_userPage'):$r('app.media.AccountOwner_DefaultIcon'))) | 24 | Image(this.data.fromUserHeader&&this.data.fromUserHeader.length>0?this.data.fromUserHeader:(this.data.fromUserType === 1?$r('app.media.default_head_userPage'):$r('app.media.AccountOwner_DefaultIcon'))) |
| 25 | .alt($r('app.media.default_head')) | 25 | .alt($r('app.media.default_head')) |
| 26 | .objectFit(ImageFit.Auto) | 26 | .objectFit(ImageFit.Auto) |
| 27 | - // .width('69lpx') | ||
| 28 | - .width(69) | ||
| 29 | - // .height('69lpx') | ||
| 30 | - .height(69) | 27 | + .width(35.47) |
| 28 | + .height(35.47) | ||
| 31 | .borderRadius(50) | 29 | .borderRadius(50) |
| 32 | Image(this.levelHead) | 30 | Image(this.levelHead) |
| 33 | - // .width('89lpx') | ||
| 34 | - .width(89) | ||
| 35 | - // .height('89lpx') | ||
| 36 | - .height(89) | 31 | + .width(54) |
| 32 | + .height(54) | ||
| 37 | .objectFit(ImageFit.Cover) | 33 | .objectFit(ImageFit.Cover) |
| 38 | .borderRadius(50) | 34 | .borderRadius(50) |
| 39 | } | 35 | } |
| 40 | - // .width('89lpx') | ||
| 41 | - .width(89) | ||
| 42 | - // .height('89lpx') | ||
| 43 | - .height(89) | ||
| 44 | - // .margin({ right: '3lpx' }) | ||
| 45 | - .margin({ right: 3 }) | 36 | + .width(54) |
| 37 | + .height(54) | ||
| 38 | + .margin({ right: 5 }) | ||
| 46 | 39 | ||
| 47 | Column() { | 40 | Column() { |
| 48 | Text(this.data.fromUserName) | 41 | Text(this.data.fromUserName) |
| 49 | - // .fontSize('25lpx') | ||
| 50 | - .fontSize(25) | ||
| 51 | - // .lineHeight('35lpx') | ||
| 52 | - .lineHeight(35) | ||
| 53 | - // .fontWeight('600lpx') | 42 | + .fontSize(15) |
| 43 | + .lineHeight(21) | ||
| 54 | .fontWeight(600) | 44 | .fontWeight(600) |
| 55 | .fontColor($r('app.color.color_222222')) | 45 | .fontColor($r('app.color.color_222222')) |
| 56 | - // .margin({ bottom: '6lpx' }) | ||
| 57 | - .margin({ bottom: 6 }) | 46 | + .margin({ bottom: 1 }) |
| 58 | .maxLines(1) | 47 | .maxLines(1) |
| 59 | Text(`${this.data.createTime}`) | 48 | Text(`${this.data.createTime}`) |
| 60 | .fontColor($r('app.color.color_B0B0B0')) | 49 | .fontColor($r('app.color.color_B0B0B0')) |
| 61 | - // .fontSize('23lpx') | ||
| 62 | - .fontSize(23) | ||
| 63 | - // .lineHeight('31lpx') | ||
| 64 | - .lineHeight(31) | ||
| 65 | - // .fontWeight('400lpx') | 50 | + .fontSize(12) |
| 51 | + .lineHeight(16) | ||
| 66 | .fontWeight(400) | 52 | .fontWeight(400) |
| 67 | .maxLines(1) | 53 | .maxLines(1) |
| 68 | }.layoutWeight(1) | 54 | }.layoutWeight(1) |
| @@ -72,21 +58,15 @@ export struct ChildCommentComponent { | @@ -72,21 +58,15 @@ export struct ChildCommentComponent { | ||
| 72 | if (this.data.checkStatus != 3) { | 58 | if (this.data.checkStatus != 3) { |
| 73 | Row() { | 59 | Row() { |
| 74 | Text(this.data.likeNum.toString()) | 60 | Text(this.data.likeNum.toString()) |
| 75 | - // .fontWeight("500lpx") | ||
| 76 | .fontWeight(500) | 61 | .fontWeight(500) |
| 77 | - // .fontSize("27lpx") | ||
| 78 | - .fontSize(27) | ||
| 79 | - // .lineHeight("31lpx") | ||
| 80 | - .lineHeight(31) | 62 | + .fontSize(14) |
| 63 | + .lineHeight(16) | ||
| 81 | .fontColor(this.data.like_status === 0 ? $r('app.color.color_666666') : $r('app.color.color_ED2800')) | 64 | .fontColor(this.data.like_status === 0 ? $r('app.color.color_666666') : $r('app.color.color_ED2800')) |
| 82 | - // .margin({ right: '8lpx' }) | ||
| 83 | - .margin({ right: 8 }) | 65 | + .margin({ right: 4 }) |
| 84 | .visibility(this.data.likeNum <= 0||StringUtils.isEmpty(this.data.likeNum.toString()) ? Visibility.Hidden : Visibility.Visible) | 66 | .visibility(this.data.likeNum <= 0||StringUtils.isEmpty(this.data.likeNum.toString()) ? Visibility.Hidden : Visibility.Visible) |
| 85 | Image(this.data.like_status === 0 ? $r('app.media.like_default_status') : $r('app.media.liked_status')) | 67 | Image(this.data.like_status === 0 ? $r('app.media.like_default_status') : $r('app.media.liked_status')) |
| 86 | - // .width('31lpx') | ||
| 87 | - .width(31) | ||
| 88 | - // .height('31lpx') | ||
| 89 | - .height(31) | 68 | + .width(16) |
| 69 | + .height(16) | ||
| 90 | .objectFit(ImageFit.Auto) | 70 | .objectFit(ImageFit.Auto) |
| 91 | .interpolation(ImageInterpolation.Medium) | 71 | .interpolation(ImageInterpolation.Medium) |
| 92 | .borderRadius(50) | 72 | .borderRadius(50) |
| @@ -95,13 +75,10 @@ export struct ChildCommentComponent { | @@ -95,13 +75,10 @@ export struct ChildCommentComponent { | ||
| 95 | }) | 75 | }) |
| 96 | } | 76 | } |
| 97 | } | 77 | } |
| 98 | - // .margin({ bottom: '5lpx' }) | ||
| 99 | .margin({ bottom: 5 }) | 78 | .margin({ bottom: 5 }) |
| 100 | .width('100%') | 79 | .width('100%') |
| 101 | - // .height('108lpx') | ||
| 102 | - .height(108) | ||
| 103 | - // .padding({ left: '31lpx', right: '31lpx' }) | ||
| 104 | - .padding({ left: 31, right: 31 }) | 80 | + .height(56) |
| 81 | + .padding({ left: 11, right: 15 }) | ||
| 105 | 82 | ||
| 106 | Row() { | 83 | Row() { |
| 107 | if (this.isExpand) { | 84 | if (this.isExpand) { |
| @@ -124,151 +101,119 @@ export struct ChildCommentComponent { | @@ -124,151 +101,119 @@ export struct ChildCommentComponent { | ||
| 124 | .textStyle() | 101 | .textStyle() |
| 125 | } | 102 | } |
| 126 | } | 103 | } |
| 127 | - // .padding({ left: '31lpx', right: '31lpx' }) | ||
| 128 | - .padding({ left: 31, right: 31 }) | 104 | + .padding({ left: 15, right: 15 }) |
| 129 | .width('100%') | 105 | .width('100%') |
| 130 | 106 | ||
| 131 | Column() { | 107 | Column() { |
| 132 | - if (StringUtils.isNotEmpty(this.data.parentCommentContent)) { | ||
| 133 | - //父评论 | ||
| 134 | - Row() { | ||
| 135 | - if (this.isExpandParent) { | ||
| 136 | - Text() { | ||
| 137 | - Span(`@${this.data.parentCommentUserName}:`) | ||
| 138 | - .fontColor($r('app.color.color_000000')) | ||
| 139 | - // .fontWeight('500lpx') | ||
| 140 | - .fontWeight(500) | ||
| 141 | - // .fontSize('27lpx') | ||
| 142 | - .fontSize(27) | ||
| 143 | - // .lineHeight('40lpx') | ||
| 144 | - .lineHeight(40) | ||
| 145 | - Span(this.data.parentCommentContent) | ||
| 146 | - .fontColor($r('app.color.color_000000')) | ||
| 147 | - // .fontWeight('400lpx') | ||
| 148 | - .fontWeight(400) | ||
| 149 | - // .fontSize('27lpx') | ||
| 150 | - .fontSize(27) | ||
| 151 | - // .lineHeight('40lpx') | ||
| 152 | - .lineHeight(40) | 108 | + Column(){ |
| 109 | + if (StringUtils.isNotEmpty(this.data.parentCommentContent)) { | ||
| 110 | + //父评论 | ||
| 111 | + Row() { | ||
| 112 | + if (this.isExpandParent) { | ||
| 113 | + Text() { | ||
| 114 | + Span(`@${this.data.parentCommentUserName}:`) | ||
| 115 | + .fontColor($r('app.color.color_000000')) | ||
| 116 | + .fontWeight(500) | ||
| 117 | + .fontSize(14) | ||
| 118 | + .lineHeight(21) | ||
| 119 | + Span(this.data.parentCommentContent) | ||
| 120 | + .fontColor($r('app.color.color_000000')) | ||
| 121 | + .fontWeight(400) | ||
| 122 | + .fontSize(14) | ||
| 123 | + .lineHeight(21) | ||
| 124 | + } | ||
| 125 | + .width('100%') | ||
| 126 | + .textAlign(TextAlign.Start) | ||
| 127 | + } else { | ||
| 128 | + Text() { | ||
| 129 | + Span(`@${this.data.parentCommentUserName}:`) | ||
| 130 | + .fontColor($r('app.color.color_000000')) | ||
| 131 | + .fontWeight(400) | ||
| 132 | + .fontSize(14) | ||
| 133 | + .lineHeight(21) | ||
| 134 | + | ||
| 135 | + Span(this.clipText(this.data.parentCommentContent, 31, 5, 630, 1)) | ||
| 136 | + .fontColor($r('app.color.color_000000')) | ||
| 137 | + .fontWeight(400) | ||
| 138 | + .fontSize(14) | ||
| 139 | + .lineHeight(21) | ||
| 140 | + if (this.isOverLinesParent) { | ||
| 141 | + Span('... 展开') | ||
| 142 | + .fontColor($r('app.color.color_999999')) | ||
| 143 | + .fontWeight(400) | ||
| 144 | + .fontSize(14) | ||
| 145 | + .lineHeight(21) | ||
| 146 | + .onClick(() => { | ||
| 147 | + this.isExpandParent = true | ||
| 148 | + }) | ||
| 149 | + } | ||
| 150 | + }.maxLines(5) | ||
| 151 | + .wordBreak(WordBreak.BREAK_ALL) | ||
| 152 | + .textAlign(TextAlign.Start) | ||
| 153 | + .width('100%') | ||
| 153 | } | 154 | } |
| 154 | - .width('100%') | ||
| 155 | - .textAlign(TextAlign.Start) | ||
| 156 | - } else { | ||
| 157 | - Text() { | ||
| 158 | - Span(`@${this.data.parentCommentUserName}:`) | ||
| 159 | - .fontColor($r('app.color.color_000000')) | ||
| 160 | - // .fontWeight('500lpx') | ||
| 161 | - .fontWeight(500) | ||
| 162 | - // .fontSize('27lpx') | ||
| 163 | - .fontSize(27) | ||
| 164 | - // .lineHeight('40lpx') | ||
| 165 | - .lineHeight(40) | 155 | + } |
| 156 | + .width('100%') | ||
| 166 | 157 | ||
| 167 | - Span(this.clipText(this.data.parentCommentContent, 31, 5, 630, 1)) | ||
| 168 | - .fontColor($r('app.color.color_000000')) | ||
| 169 | - // .fontWeight('400lpx') | ||
| 170 | - .fontWeight(400) | ||
| 171 | - // .fontSize('27lpx') | ||
| 172 | - .fontSize(27) | ||
| 173 | - // .lineHeight('40lpx') | ||
| 174 | - .lineHeight(40) | ||
| 175 | - if (this.isOverLinesParent) { | ||
| 176 | - Span('...展开') | ||
| 177 | - .fontColor($r('app.color.color_999999')) | ||
| 178 | - .onClick(() => { | ||
| 179 | - this.isExpandParent = true | ||
| 180 | - }) | ||
| 181 | - } | ||
| 182 | - }.maxLines(5) | ||
| 183 | - .wordBreak(WordBreak.BREAK_ALL) | ||
| 184 | - .textAlign(TextAlign.Start) | 158 | + Divider() |
| 185 | .width('100%') | 159 | .width('100%') |
| 186 | - } | 160 | + .height(0.5) |
| 161 | + .strokeWidth(0.5) | ||
| 162 | + .backgroundColor($r('app.color.color_EDEDED')) | ||
| 163 | + .margin({ top: 10, bottom: 10 }) | ||
| 187 | } | 164 | } |
| 188 | - .width('100%') | ||
| 189 | - // .padding({ top: '23lpx', bottom: '15lpx', right: '23lpx' }) | ||
| 190 | - .padding({ top: 23, bottom: 15, right: 23 }) | ||
| 191 | 165 | ||
| 192 | - Divider() | ||
| 193 | - .width('100%') | ||
| 194 | - // .height('1lpx') | ||
| 195 | - .height(1) | ||
| 196 | - // .strokeWidth('1lpx') | ||
| 197 | - .strokeWidth(1) | ||
| 198 | - .backgroundColor($r('app.color.color_EDEDED')) | ||
| 199 | - // .margin({ top: '4lpx', bottom: '4lpx' }) | ||
| 200 | - .margin({ top: 4, bottom: 4 }) | ||
| 201 | - } | ||
| 202 | - | ||
| 203 | - Column() { | ||
| 204 | - Row() { | 166 | + Column() { |
| 205 | Row() { | 167 | Row() { |
| 206 | - Image($r('app.media.comment_link_icon')) | ||
| 207 | - .objectFit(ImageFit.Auto) | ||
| 208 | - // .width('31lpx') | ||
| 209 | - .width(31) | ||
| 210 | - // .height('31lpx') | ||
| 211 | - .height(31) | ||
| 212 | - // .margin({ right: '10lpx' }) | ||
| 213 | - .margin({ right: 10 }) | 168 | + Row() { |
| 169 | + Image($r('app.media.comment_link_icon')) | ||
| 170 | + .objectFit(ImageFit.Auto) | ||
| 171 | + .width(16) | ||
| 172 | + .height(16) | ||
| 173 | + .margin({ right: 5 }) | ||
| 214 | 174 | ||
| 215 | - Column() { | ||
| 216 | - Row() { | ||
| 217 | - Text(`${this.data.targetTitle}`) | ||
| 218 | - // .fontWeight('400lpx') | ||
| 219 | - .fontWeight(400) | ||
| 220 | - .fontColor($r('app.color.color_666666')) | ||
| 221 | - // .lineHeight('38lpx') | ||
| 222 | - .lineHeight(38) | ||
| 223 | - // .fontSize('27lpx') | ||
| 224 | - .fontSize(27) | ||
| 225 | - .layoutWeight(1) | ||
| 226 | - .maxLines(1) | ||
| 227 | - .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 228 | - }.width('100%') | ||
| 229 | - } | ||
| 230 | - .layoutWeight(1) | ||
| 231 | - .alignItems(HorizontalAlign.Start) | ||
| 232 | - }.layoutWeight(1) | 175 | + Column() { |
| 176 | + Row() { | ||
| 177 | + Text(`${this.data.targetTitle}`) | ||
| 178 | + .fontWeight(400) | ||
| 179 | + .fontColor($r('app.color.color_666666')) | ||
| 180 | + .lineHeight(20) | ||
| 181 | + .fontSize(14) | ||
| 182 | + .layoutWeight(1) | ||
| 183 | + .maxLines(1) | ||
| 184 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 185 | + }.width('100%') | ||
| 186 | + } | ||
| 187 | + .layoutWeight(1) | ||
| 188 | + .alignItems(HorizontalAlign.Start) | ||
| 189 | + }.layoutWeight(1) | ||
| 233 | 190 | ||
| 234 | - Image($r('app.media.arrow_icon_right')) | ||
| 235 | - // .margin({ right: '4lpx' }) | ||
| 236 | - .margin({ right: 4 }) | ||
| 237 | - // .width('23lpx') | ||
| 238 | - .width(23) | ||
| 239 | - // .height('23lpx') | ||
| 240 | - .height(23) | ||
| 241 | - .margin({right: 23}) | ||
| 242 | - } | ||
| 243 | - .width('100%') | ||
| 244 | - // .height('69lpx') | ||
| 245 | - .height(69) | ||
| 246 | - .justifyContent(FlexAlign.SpaceBetween) | ||
| 247 | - .onClick(()=>{ | ||
| 248 | - let content = getParams(this.data) | ||
| 249 | - TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.PageName.Customer_Personal,TrackConstants.PageName.Customer_Personal,TrackParamConvert.program(content)) | ||
| 250 | - ProcessUtils.processPage(content) | ||
| 251 | - }) | 191 | + Image($r('app.media.arrow_icon_right')) |
| 192 | + .width(12) | ||
| 193 | + .height(12) | ||
| 194 | + } | ||
| 195 | + .width('100%') | ||
| 196 | + .justifyContent(FlexAlign.SpaceBetween) | ||
| 197 | + .onClick(()=>{ | ||
| 198 | + let content = getParams(this.data) | ||
| 199 | + TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.PageName.Customer_Personal,TrackConstants.PageName.Customer_Personal,TrackParamConvert.program(content)) | ||
| 200 | + ProcessUtils.processPage(content) | ||
| 201 | + }) | ||
| 252 | 202 | ||
| 203 | + } | ||
| 204 | + .justifyContent(FlexAlign.Center) | ||
| 253 | } | 205 | } |
| 254 | - // .height('69lpx') | ||
| 255 | - .height(69) | ||
| 256 | - .justifyContent(FlexAlign.Center) | 206 | + .backgroundColor($r('app.color.color_F5F5F5')) |
| 207 | + .padding(12) | ||
| 208 | + .width("100%") | ||
| 257 | } | 209 | } |
| 258 | - // .margin({ top: '19lpx', bottom: '31lpx', left: '31lpx', right: '31lpx' }) | ||
| 259 | - .margin({ top: 19, bottom: 31, left: 31, right: 31 }) | ||
| 260 | - // .padding({ left: '23lpx' }) | ||
| 261 | - .padding({ left: 23 }) | ||
| 262 | - // .width('662lpx') | ||
| 263 | - .width(662) | ||
| 264 | - .backgroundColor($r('app.color.color_F5F5F5')) | 210 | + .width("100%") |
| 211 | + .padding({ top: 10, bottom: 16, left: 15, right: 15 }) | ||
| 265 | 212 | ||
| 266 | if (!this.isLastItem) { | 213 | if (!this.isLastItem) { |
| 267 | Divider().width('100%') | 214 | Divider().width('100%') |
| 268 | - // .height('12lpx') | ||
| 269 | - .height(12) | ||
| 270 | - // .strokeWidth('12lpx') | ||
| 271 | - .strokeWidth(12) | 215 | + .height(6) |
| 216 | + .strokeWidth(6) | ||
| 272 | .color($r('app.color.color_F5F5F5')) | 217 | .color($r('app.color.color_F5F5F5')) |
| 273 | } | 218 | } |
| 274 | } | 219 | } |
| @@ -334,15 +279,10 @@ export struct ChildCommentComponent { | @@ -334,15 +279,10 @@ export struct ChildCommentComponent { | ||
| 334 | 279 | ||
| 335 | @Extend(Text) | 280 | @Extend(Text) |
| 336 | function textStyle() { | 281 | function textStyle() { |
| 337 | - // .width('630lpx') | ||
| 338 | - .width(630) | ||
| 339 | - // .fontSize('31lpx') | ||
| 340 | - .fontSize(31) | ||
| 341 | - // .fontWeight('400lpx') | 282 | + .fontSize(16) |
| 342 | .fontWeight(400) | 283 | .fontWeight(400) |
| 343 | .fontColor($r('app.color.color_222222')) | 284 | .fontColor($r('app.color.color_222222')) |
| 344 | - // .lineHeight('46lpx') | ||
| 345 | - .lineHeight(46) | 285 | + .lineHeight(24) |
| 346 | } | 286 | } |
| 347 | 287 | ||
| 348 | function getParams(item: CommentListItem) : ContentDTO{ | 288 | function getParams(item: CommentListItem) : ContentDTO{ |
| @@ -37,7 +37,6 @@ export struct HomePageBottomCommentComponent { | @@ -37,7 +37,6 @@ export struct HomePageBottomCommentComponent { | ||
| 37 | if (this.isGetRequest == true) { | 37 | if (this.isGetRequest == true) { |
| 38 | Text().backgroundColor($r('app.color.color_EDEDED')) | 38 | Text().backgroundColor($r('app.color.color_EDEDED')) |
| 39 | .width('100%') | 39 | .width('100%') |
| 40 | - // .height('2lpx') | ||
| 41 | .height(2) | 40 | .height(2) |
| 42 | } | 41 | } |
| 43 | if (this.count === 0) { | 42 | if (this.count === 0) { |
| @@ -45,7 +44,6 @@ export struct HomePageBottomCommentComponent { | @@ -45,7 +44,6 @@ export struct HomePageBottomCommentComponent { | ||
| 45 | EmptyComponent({ emptyType: 11 }) | 44 | EmptyComponent({ emptyType: 11 }) |
| 46 | .layoutWeight(1) | 45 | .layoutWeight(1) |
| 47 | .width('100%') | 46 | .width('100%') |
| 48 | - // .offset({ y: "-200lpx" }) | ||
| 49 | .offset({ y: -200 }) | 47 | .offset({ y: -200 }) |
| 50 | } | 48 | } |
| 51 | } else { | 49 | } else { |
| @@ -67,7 +65,7 @@ export struct HomePageBottomCommentComponent { | @@ -67,7 +65,7 @@ export struct HomePageBottomCommentComponent { | ||
| 67 | } | 65 | } |
| 68 | }, | 66 | }, |
| 69 | onLoadMore:(resolve)=> { | 67 | onLoadMore:(resolve)=> { |
| 70 | - console.log(TAG, "触底了"); | 68 | + // console.log(TAG, "触底了"); |
| 71 | if (!this.isLoading) { | 69 | if (!this.isLoading) { |
| 72 | this.isLoading = true | 70 | this.isLoading = true |
| 73 | //加载分页数据 | 71 | //加载分页数据 |
| @@ -138,7 +136,7 @@ export struct HomePageBottomCommentComponent { | @@ -138,7 +136,7 @@ export struct HomePageBottomCommentComponent { | ||
| 138 | this.getCommentListStatus(value) | 136 | this.getCommentListStatus(value) |
| 139 | } | 137 | } |
| 140 | }).catch((err: Error) => { | 138 | }).catch((err: Error) => { |
| 141 | - console.log(TAG, "请求失败") | 139 | + // console.log(TAG, "请求失败") |
| 142 | this.isLoading = false | 140 | this.isLoading = false |
| 143 | this.isGetRequest = true | 141 | this.isGetRequest = true |
| 144 | }) | 142 | }) |
| @@ -236,7 +234,7 @@ export struct HomePageBottomCommentComponent { | @@ -236,7 +234,7 @@ export struct HomePageBottomCommentComponent { | ||
| 236 | this.isLoading = false | 234 | this.isLoading = false |
| 237 | this.isGetRequest = true | 235 | this.isGetRequest = true |
| 238 | }).catch((err: Error) => { | 236 | }).catch((err: Error) => { |
| 239 | - console.log(TAG, "请求失败") | 237 | + // console.log(TAG, "请求失败") |
| 240 | this.isLoading = false | 238 | this.isLoading = false |
| 241 | this.isGetRequest = true | 239 | this.isGetRequest = true |
| 242 | }) | 240 | }) |
| @@ -71,7 +71,6 @@ export struct HomePageBottomFollowComponent { | @@ -71,7 +71,6 @@ export struct HomePageBottomFollowComponent { | ||
| 71 | if (this.isGetRequest == true) { | 71 | if (this.isGetRequest == true) { |
| 72 | Text().backgroundColor($r('app.color.color_EDEDED')) | 72 | Text().backgroundColor($r('app.color.color_EDEDED')) |
| 73 | .width('100%') | 73 | .width('100%') |
| 74 | - // .height('2lpx') | ||
| 75 | .height(2) | 74 | .height(2) |
| 76 | } | 75 | } |
| 77 | 76 | ||
| @@ -81,38 +80,30 @@ export struct HomePageBottomFollowComponent { | @@ -81,38 +80,30 @@ export struct HomePageBottomFollowComponent { | ||
| 81 | EmptyComponent({ emptyType: 14 }) | 80 | EmptyComponent({ emptyType: 14 }) |
| 82 | .layoutWeight(1) | 81 | .layoutWeight(1) |
| 83 | .width('100%') | 82 | .width('100%') |
| 84 | - // .offset({ y: "-200lpx" }) | ||
| 85 | .offset({ y: -200 }) | 83 | .offset({ y: -200 }) |
| 86 | } | 84 | } |
| 87 | 85 | ||
| 88 | Row() { | 86 | Row() { |
| 89 | - Text("关注更多人民号") | ||
| 90 | - // .fontWeight('400lpx') | ||
| 91 | - .fontWeight(400) | ||
| 92 | - .fontColor($r('app.color.color_222222')) | ||
| 93 | - // .lineHeight('38lpx') | ||
| 94 | - .lineHeight(38) | ||
| 95 | - // .fontSize('27lpx') | ||
| 96 | - .fontSize(27) | ||
| 97 | - .textAlign(TextAlign.Center) | ||
| 98 | - // .margin({ right: '4lpx' }) | ||
| 99 | - .margin({ right: 4 }) | ||
| 100 | - Image($r('app.media.arrow_icon_right')) | ||
| 101 | - .objectFit(ImageFit.Auto) | ||
| 102 | - // .width('27lpx') | ||
| 103 | - .width(27) | ||
| 104 | - // .height('27lpx') | ||
| 105 | - .height(27) | 87 | + Row(){ |
| 88 | + Text("关注更多人民号") | ||
| 89 | + .fontWeight(400) | ||
| 90 | + .fontColor($r('app.color.color_222222')) | ||
| 91 | + .lineHeight(20) | ||
| 92 | + .fontSize(14) | ||
| 93 | + .textAlign(TextAlign.Center) | ||
| 94 | + .margin({ right: 2 }) | ||
| 95 | + Image($r('app.media.arrow_icon_right')) | ||
| 96 | + .objectFit(ImageFit.Auto) | ||
| 97 | + .width(14) | ||
| 98 | + .height(14) | ||
| 99 | + } | ||
| 100 | + .backgroundColor($r('app.color.color_F5F5F5')) | ||
| 101 | + .height(36) | ||
| 102 | + .width('100%') | ||
| 103 | + .alignItems(VerticalAlign.Center) | ||
| 104 | + .justifyContent(FlexAlign.Center) | ||
| 106 | } | 105 | } |
| 107 | - // .height('69lpx') | ||
| 108 | - .height(69) | ||
| 109 | - // .width('659lpx') | ||
| 110 | - .width(659) | ||
| 111 | - .alignItems(VerticalAlign.Center) | ||
| 112 | - .justifyContent(FlexAlign.Center) | ||
| 113 | - .backgroundColor($r('app.color.color_F5F5F5')) | ||
| 114 | - // .margin({ top: '31lpx', bottom: '4lpx' }) | ||
| 115 | - .margin({ top: 31, bottom: 4 }) | 106 | + .margin({ top: 10, bottom: 2, left: 16, right: 16}) |
| 116 | .onClick(() => { | 107 | .onClick(() => { |
| 117 | let params = { 'index': "1" } as Record<string, string> | 108 | let params = { 'index': "1" } as Record<string, string> |
| 118 | WDRouterRule.jumpWithPage(WDRouterPage.followListPage, params) | 109 | WDRouterRule.jumpWithPage(WDRouterPage.followListPage, params) |
| @@ -137,7 +128,7 @@ export struct HomePageBottomFollowComponent { | @@ -137,7 +128,7 @@ export struct HomePageBottomFollowComponent { | ||
| 137 | } | 128 | } |
| 138 | }, | 129 | }, |
| 139 | onLoadMore:(resolve)=> { | 130 | onLoadMore:(resolve)=> { |
| 140 | - console.log(TAG, "触底了"); | 131 | + // console.log(TAG, "触底了"); |
| 141 | if (!this.isLoading) { | 132 | if (!this.isLoading) { |
| 142 | this.isLoading = true | 133 | this.isLoading = true |
| 143 | //加载分页数据 | 134 | //加载分页数据 |
| @@ -157,32 +148,23 @@ export struct HomePageBottomFollowComponent { | @@ -157,32 +148,23 @@ export struct HomePageBottomFollowComponent { | ||
| 157 | ListItem() { | 148 | ListItem() { |
| 158 | Row() { | 149 | Row() { |
| 159 | Text("关注更多人民号") | 150 | Text("关注更多人民号") |
| 160 | - // .fontWeight('400lpx') | ||
| 161 | .fontWeight(400) | 151 | .fontWeight(400) |
| 162 | .fontColor($r('app.color.color_222222')) | 152 | .fontColor($r('app.color.color_222222')) |
| 163 | - // .lineHeight('38lpx') | ||
| 164 | - .lineHeight(38) | ||
| 165 | - // .fontSize('27lpx') | ||
| 166 | - .fontSize(27) | 153 | + .lineHeight(20) |
| 154 | + .fontSize(14) | ||
| 167 | .textAlign(TextAlign.Center) | 155 | .textAlign(TextAlign.Center) |
| 168 | - // .margin({ right: '4lpx' }) | ||
| 169 | - .margin({ right: 4 }) | 156 | + .margin({ right: 2 }) |
| 170 | Image($r('app.media.arrow_icon_right')) | 157 | Image($r('app.media.arrow_icon_right')) |
| 171 | .objectFit(ImageFit.Auto) | 158 | .objectFit(ImageFit.Auto) |
| 172 | - // .width('27lpx') | ||
| 173 | - .width(27) | ||
| 174 | - // .height('27lpx') | ||
| 175 | - .height(27) | 159 | + .width(14) |
| 160 | + .height(14) | ||
| 176 | } | 161 | } |
| 177 | - // .height('69lpx') | ||
| 178 | - .height(69) | ||
| 179 | - // .width('659lpx') | ||
| 180 | - .width(659) | 162 | + .height(36) |
| 163 | + .width('100%') | ||
| 181 | .alignItems(VerticalAlign.Center) | 164 | .alignItems(VerticalAlign.Center) |
| 182 | .justifyContent(FlexAlign.Center) | 165 | .justifyContent(FlexAlign.Center) |
| 183 | .backgroundColor($r('app.color.color_F5F5F5')) | 166 | .backgroundColor($r('app.color.color_F5F5F5')) |
| 184 | - // .margin({ top: '31lpx', bottom: '4lpx' }) | ||
| 185 | - .margin({ top: 31, bottom: 4 }) | 167 | + .margin({ top: 10, bottom: 2}) |
| 186 | }.onClick(() => { | 168 | }.onClick(() => { |
| 187 | let params = { 'index': "1" } as Record<string, string> | 169 | let params = { 'index': "1" } as Record<string, string> |
| 188 | WDRouterRule.jumpWithPage(WDRouterPage.followListPage, params) | 170 | WDRouterRule.jumpWithPage(WDRouterPage.followListPage, params) |
| @@ -202,8 +184,7 @@ export struct HomePageBottomFollowComponent { | @@ -202,8 +184,7 @@ export struct HomePageBottomFollowComponent { | ||
| 202 | } | 184 | } |
| 203 | } | 185 | } |
| 204 | .cachedCount(5) | 186 | .cachedCount(5) |
| 205 | - // .padding({ left: '31lpx', right: '31lpx' }) | ||
| 206 | - .padding({ left: 31, right: 31 }) | 187 | + .padding({ left: 16, right: 16 }) |
| 207 | .layoutWeight(1) | 188 | .layoutWeight(1) |
| 208 | .scrollBar(BarState.Off) | 189 | .scrollBar(BarState.Off) |
| 209 | .edgeEffect(EdgeEffect.None) | 190 | .edgeEffect(EdgeEffect.None) |
| @@ -15,91 +15,72 @@ export struct MessageListItemUI { | @@ -15,91 +15,72 @@ export struct MessageListItemUI { | ||
| 15 | Row() { | 15 | Row() { |
| 16 | Image(this.item.imgSrc) | 16 | Image(this.item.imgSrc) |
| 17 | .objectFit(ImageFit.Auto) | 17 | .objectFit(ImageFit.Auto) |
| 18 | - // .width('92lpx') | ||
| 19 | - .width(92) | ||
| 20 | - // .height('92lpx') | ||
| 21 | - .height(92) | ||
| 22 | - // .margin({ right: '15lpx' }) | ||
| 23 | - .margin({ right: 15 }) | 18 | + .width(48) |
| 19 | + .height(48) | ||
| 20 | + .margin({ right: 8 }) | ||
| 24 | 21 | ||
| 25 | Column() { | 22 | Column() { |
| 26 | Text(this.item.title) | 23 | Text(this.item.title) |
| 27 | .fontWeight(500) | 24 | .fontWeight(500) |
| 28 | - // .fontSize('31lpx') | ||
| 29 | - .fontSize(31) | ||
| 30 | - // .lineHeight('42lpx') | ||
| 31 | - .lineHeight(42) | 25 | + .fontSize(16) |
| 26 | + .lineHeight(22) | ||
| 32 | .fontColor($r('app.color.color_222222')) | 27 | .fontColor($r('app.color.color_222222')) |
| 33 | .maxLines(1) | 28 | .maxLines(1) |
| 34 | - // .margin({ bottom: StringUtils.isNotEmpty(this.item.desc)?'8lpx':0 }) | ||
| 35 | - .margin({ bottom: StringUtils.isNotEmpty(this.item.desc) ? 8 : 0 }) | 29 | + .margin({ bottom: StringUtils.isNotEmpty(this.item.desc) ? 4 : 0 }) |
| 36 | 30 | ||
| 37 | if(StringUtils.isNotEmpty(this.item.desc)){ | 31 | if(StringUtils.isNotEmpty(this.item.desc)){ |
| 38 | Text(`${this.item.desc}`) | 32 | Text(`${this.item.desc}`) |
| 39 | .fontColor($r('app.color.color_999999')) | 33 | .fontColor($r('app.color.color_999999')) |
| 40 | - // .fontSize('27lpx') | ||
| 41 | - .fontSize(27) | ||
| 42 | - // .lineHeight('38lpx') | ||
| 43 | - .lineHeight(38) | 34 | + .fontSize(14) |
| 35 | + .lineHeight(20) | ||
| 44 | .fontWeight(400) | 36 | .fontWeight(400) |
| 45 | .maxLines(1) | 37 | .maxLines(1) |
| 46 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 38 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 47 | } | 39 | } |
| 48 | } | 40 | } |
| 49 | - // .height('92lpx') | ||
| 50 | - .height(92) | ||
| 51 | .layoutWeight(1) | 41 | .layoutWeight(1) |
| 52 | .alignItems(HorizontalAlign.Start) | 42 | .alignItems(HorizontalAlign.Start) |
| 53 | .justifyContent(StringUtils.isNotEmpty(this.item.desc)?FlexAlign.Start:FlexAlign.Center) | 43 | .justifyContent(StringUtils.isNotEmpty(this.item.desc)?FlexAlign.Start:FlexAlign.Center) |
| 44 | + .height(46) | ||
| 54 | }.layoutWeight(1) | 45 | }.layoutWeight(1) |
| 55 | 46 | ||
| 56 | Column() { | 47 | Column() { |
| 57 | Text(`${this.item.time}`) | 48 | Text(`${this.item.time}`) |
| 58 | .fontColor($r('app.color.color_999999')) | 49 | .fontColor($r('app.color.color_999999')) |
| 59 | - // .fontSize('23lpx') | ||
| 60 | - .fontSize(23) | ||
| 61 | - .fontWeight(500) | ||
| 62 | - // .lineHeight('35lpx') | ||
| 63 | - .lineHeight(35) | ||
| 64 | - // .margin({ bottom: this.item.unReadCount > 0 ?'8lpx':0 }) | ||
| 65 | - .margin({ bottom: this.item.unReadCount > 0 ? 8 : 0 }) | 50 | + .fontSize(14) |
| 51 | + .fontWeight(400) | ||
| 52 | + .lineHeight(20) | ||
| 53 | + .margin({ bottom: this.item.unReadCount > 0 ? 4 : 0 }) | ||
| 66 | 54 | ||
| 67 | if(this.item.unReadCount > 0){ | 55 | if(this.item.unReadCount > 0){ |
| 68 | Button(){ | 56 | Button(){ |
| 69 | Text(`${this.item.unReadCount}`) | 57 | Text(`${this.item.unReadCount}`) |
| 70 | .fontWeight(400) | 58 | .fontWeight(400) |
| 71 | - // .fontSize("18lpx") | ||
| 72 | - .fontSize(18) | 59 | + .fontSize(14) |
| 73 | .fontColor($r('app.color.white')) | 60 | .fontColor($r('app.color.white')) |
| 74 | } | 61 | } |
| 75 | .type((this.item.unReadCount>0 && this.item.unReadCount < 10 ? ButtonType.Circle:ButtonType.Capsule)) | 62 | .type((this.item.unReadCount>0 && this.item.unReadCount < 10 ? ButtonType.Circle:ButtonType.Capsule)) |
| 76 | .backgroundColor($r("app.color.color_ED2800")) | 63 | .backgroundColor($r("app.color.color_ED2800")) |
| 77 | .stateEffect(false) | 64 | .stateEffect(false) |
| 78 | - // .height("27lpx") | ||
| 79 | - .height(27) | ||
| 80 | - // .constraintSize({minWidth:"27lpx"}) | ||
| 81 | - .constraintSize({minWidth: 27}) | 65 | + .height(16) |
| 66 | + .constraintSize({minWidth: 16}) | ||
| 82 | } | 67 | } |
| 83 | } | 68 | } |
| 84 | .justifyContent(FlexAlign.Start) | 69 | .justifyContent(FlexAlign.Start) |
| 85 | .alignItems(HorizontalAlign.End) | 70 | .alignItems(HorizontalAlign.End) |
| 86 | - // .height('92lpx') | ||
| 87 | - .height(92) | 71 | + .height(46) |
| 88 | } | 72 | } |
| 89 | .width('100%') | 73 | .width('100%') |
| 90 | - // .height('92lpx') | ||
| 91 | - .height(92) | 74 | + .height(46) |
| 92 | .justifyContent(FlexAlign.SpaceBetween) | 75 | .justifyContent(FlexAlign.SpaceBetween) |
| 93 | 76 | ||
| 94 | } | 77 | } |
| 95 | - // .height('154lpx') | ||
| 96 | - .height(154) | 78 | + .height(80) |
| 97 | .width("100%") | 79 | .width("100%") |
| 98 | .justifyContent(FlexAlign.Center) | 80 | .justifyContent(FlexAlign.Center) |
| 99 | 81 | ||
| 100 | Text().backgroundColor($r('app.color.color_EDEDED')) | 82 | Text().backgroundColor($r('app.color.color_EDEDED')) |
| 101 | .width('100%') | 83 | .width('100%') |
| 102 | - // .height('1lpx') | ||
| 103 | .height(1) | 84 | .height(1) |
| 104 | .visibility(this.index != 3 ?Visibility.Visible:Visibility.None) | 85 | .visibility(this.index != 3 ?Visibility.Visible:Visibility.None) |
| 105 | } | 86 | } |
| @@ -180,7 +180,7 @@ export struct MessageListUI { | @@ -180,7 +180,7 @@ export struct MessageListUI { | ||
| 180 | ListItem() { | 180 | ListItem() { |
| 181 | MessageListItemUI({ item: item, index: index }) | 181 | MessageListItemUI({ item: item, index: index }) |
| 182 | } | 182 | } |
| 183 | - .padding({ left: "31lpx", right: "31lpx" }) | 183 | + .padding({ left: 16, right: 16 }) |
| 184 | .onClick(() => { | 184 | .onClick(() => { |
| 185 | this.messageCenterCommonButtonTracking(index) | 185 | this.messageCenterCommonButtonTracking(index) |
| 186 | switch (index) { | 186 | switch (index) { |
| @@ -202,7 +202,7 @@ export struct MessageListUI { | @@ -202,7 +202,7 @@ export struct MessageListUI { | ||
| 202 | break; | 202 | break; |
| 203 | } | 203 | } |
| 204 | }) | 204 | }) |
| 205 | - .height('154lpx') | 205 | + .height(80) |
| 206 | .width("100%") | 206 | .width("100%") |
| 207 | }) | 207 | }) |
| 208 | } | 208 | } |
| @@ -148,6 +148,10 @@ struct MyCollectionListPage { | @@ -148,6 +148,10 @@ struct MyCollectionListPage { | ||
| 148 | .scrollBar(BarState.Off) | 148 | .scrollBar(BarState.Off) |
| 149 | .height(CommonConstants.FULL_PARENT) | 149 | .height(CommonConstants.FULL_PARENT) |
| 150 | .edgeEffect(EdgeEffect.None) // 必须设置列表为滑动到边缘无效果 | 150 | .edgeEffect(EdgeEffect.None) // 必须设置列表为滑动到边缘无效果 |
| 151 | + .margin({ | ||
| 152 | + left: 16, | ||
| 153 | + right: 16 | ||
| 154 | + }) | ||
| 151 | } | 155 | } |
| 152 | 156 | ||
| 153 | @Builder | 157 | @Builder |
| @@ -159,7 +163,7 @@ struct MyCollectionListPage { | @@ -159,7 +163,7 @@ struct MyCollectionListPage { | ||
| 159 | selectCallback:(isOn)=>{ | 163 | selectCallback:(isOn)=>{ |
| 160 | this.addCompDTO(isOn,compDTO) | 164 | this.addCompDTO(isOn,compDTO) |
| 161 | } | 165 | } |
| 162 | - }).margin({left:16}) | 166 | + }).margin({right: 16}) |
| 163 | } | 167 | } |
| 164 | Column() { | 168 | Column() { |
| 165 | BigPicCardComponent({compDTO:new CompDTO,contentDTO:compDTO,pageId:TrackConstants.PageName.My_Collect,pageName:TrackConstants.PageName.My_Collect}) | 169 | BigPicCardComponent({compDTO:new CompDTO,contentDTO:compDTO,pageId:TrackConstants.PageName.My_Collect,pageName:TrackConstants.PageName.My_Collect}) |
| @@ -13,7 +13,8 @@ import { | @@ -13,7 +13,8 @@ import { | ||
| 13 | ArticleTypeData, | 13 | ArticleTypeData, |
| 14 | ArticleListData, | 14 | ArticleListData, |
| 15 | PeopleShipUserDetailData, | 15 | PeopleShipUserDetailData, |
| 16 | - CompDTO | 16 | + CompDTO, |
| 17 | + ContentDetailDTO | ||
| 17 | } from 'wdBean' | 18 | } from 'wdBean' |
| 18 | import { CardParser } from '../CardParser' | 19 | import { CardParser } from '../CardParser' |
| 19 | import { PageRepository } from '../../repository/PageRepository' | 20 | import { PageRepository } from '../../repository/PageRepository' |
| @@ -28,6 +29,7 @@ const TAG = 'PeopleShipHomeArticleListComponent'; | @@ -28,6 +29,7 @@ const TAG = 'PeopleShipHomeArticleListComponent'; | ||
| 28 | @Component | 29 | @Component |
| 29 | export struct PeopleShipHomeArticleListComponent { | 30 | export struct PeopleShipHomeArticleListComponent { |
| 30 | @State arr: ContentDTO[] = [] | 31 | @State arr: ContentDTO[] = [] |
| 32 | + //@State arrDetailList: ContentDetailDTO[] = [] | ||
| 31 | // @State arr: LazyDataSource<ContentDTO> = new LazyDataSource(); | 33 | // @State arr: LazyDataSource<ContentDTO> = new LazyDataSource(); |
| 32 | @State typeModel: ArticleTypeData = new ArticleTypeData() | 34 | @State typeModel: ArticleTypeData = new ArticleTypeData() |
| 33 | @State creatorId: string = '' | 35 | @State creatorId: string = '' |
| @@ -125,12 +127,19 @@ export struct PeopleShipHomeArticleListComponent { | @@ -125,12 +127,19 @@ export struct PeopleShipHomeArticleListComponent { | ||
| 125 | } | 127 | } |
| 126 | 128 | ||
| 127 | aboutToAppear() { | 129 | aboutToAppear() { |
| 130 | + console.log(TAG, 'cj2024 aboutToAppear') | ||
| 131 | + AppStorage.setOrCreate<string>('peopleShipHomeCreatorId', this.creatorId) | ||
| 128 | if (this.currentIndex == this.currentTopSelectedIndex) { | 132 | if (this.currentIndex == this.currentTopSelectedIndex) { |
| 129 | this.currentPage = 1 | 133 | this.currentPage = 1 |
| 130 | this.getPeopleShipPageArticleList() | 134 | this.getPeopleShipPageArticleList() |
| 131 | } | 135 | } |
| 132 | } | 136 | } |
| 133 | 137 | ||
| 138 | + aboutToDisappear(): void { | ||
| 139 | + console.log(TAG, 'cj2024 aboutToDisappear') | ||
| 140 | + AppStorage.setOrCreate<string>('peopleShipHomeCreatorId', '') //清空人民号动态等过来的数据 | ||
| 141 | + } | ||
| 142 | + | ||
| 134 | onChange() { | 143 | onChange() { |
| 135 | if (this.currentIndex == this.currentTopSelectedIndex && this.arr.length == 0) { | 144 | if (this.currentIndex == this.currentTopSelectedIndex && this.arr.length == 0) { |
| 136 | this.currentPage = 1 | 145 | this.currentPage = 1 |
| @@ -223,6 +232,7 @@ export struct PeopleShipHomeArticleListComponent { | @@ -223,6 +232,7 @@ export struct PeopleShipHomeArticleListComponent { | ||
| 223 | } | 232 | } |
| 224 | for (const element of listData.list) { | 233 | for (const element of listData.list) { |
| 225 | let contentDTO = new ContentDTO() | 234 | let contentDTO = new ContentDTO() |
| 235 | + //let contentDetailDTO = new ContentDetailDTO() | ||
| 226 | console.info(TAG, 'element.appStyle'+`${element.appStyle}`) | 236 | console.info(TAG, 'element.appStyle'+`${element.appStyle}`) |
| 227 | contentDTO.appStyle = this.changeCommon(element.appStyle) | 237 | contentDTO.appStyle = this.changeCommon(element.appStyle) |
| 228 | contentDTO.newsTitle = element.title; | 238 | contentDTO.newsTitle = element.title; |
| @@ -13,10 +13,8 @@ export struct CustomTitleAndEditUI { | @@ -13,10 +13,8 @@ export struct CustomTitleAndEditUI { | ||
| 13 | //标题栏目 | 13 | //标题栏目 |
| 14 | if(this.imgBack){ | 14 | if(this.imgBack){ |
| 15 | Image($r('app.media.back_icon')) | 15 | Image($r('app.media.back_icon')) |
| 16 | - // .width('46lpx') | ||
| 17 | - .width(46) | ||
| 18 | - // .height('46lpx') | ||
| 19 | - .height(46) | 16 | + .width(24) |
| 17 | + .height(24) | ||
| 20 | .objectFit(ImageFit.Auto) | 18 | .objectFit(ImageFit.Auto) |
| 21 | .interpolation(ImageInterpolation.High) | 19 | .interpolation(ImageInterpolation.High) |
| 22 | .id("back_icon") | 20 | .id("back_icon") |
| @@ -24,24 +22,19 @@ export struct CustomTitleAndEditUI { | @@ -24,24 +22,19 @@ export struct CustomTitleAndEditUI { | ||
| 24 | center: {anchor: "__container__", align: VerticalAlign.Center}, | 22 | center: {anchor: "__container__", align: VerticalAlign.Center}, |
| 25 | left: {anchor: "__container__", align: HorizontalAlign.Start} | 23 | left: {anchor: "__container__", align: HorizontalAlign.Start} |
| 26 | }) | 24 | }) |
| 27 | - // .margin({left:'31lpx'}) | ||
| 28 | - .margin({left: 31}) | 25 | + .margin({left: 16}) |
| 29 | .onClick(()=>{ | 26 | .onClick(()=>{ |
| 30 | router.back() | 27 | router.back() |
| 31 | }) | 28 | }) |
| 32 | } | 29 | } |
| 33 | 30 | ||
| 34 | Text(this.titleName) | 31 | Text(this.titleName) |
| 35 | - // .height('42lpx') | ||
| 36 | - .height(42) | ||
| 37 | .maxLines(1) | 32 | .maxLines(1) |
| 38 | .id("title") | 33 | .id("title") |
| 39 | - // .fontSize('35lpx') | ||
| 40 | - .fontSize(35) | ||
| 41 | - .fontWeight(400) | 34 | + .fontSize(18) |
| 35 | + .fontWeight(500) | ||
| 42 | .fontColor($r('app.color.color_222222')) | 36 | .fontColor($r('app.color.color_222222')) |
| 43 | - // .lineHeight('42lpx') | ||
| 44 | - .lineHeight(42) | 37 | + .lineHeight(26) |
| 45 | .alignRules({ | 38 | .alignRules({ |
| 46 | center: {anchor: "__container__", align: VerticalAlign.Center}, | 39 | center: {anchor: "__container__", align: VerticalAlign.Center}, |
| 47 | middle: {anchor: "__container__", align: HorizontalAlign.Center} | 40 | middle: {anchor: "__container__", align: HorizontalAlign.Center} |
| @@ -51,22 +44,22 @@ export struct CustomTitleAndEditUI { | @@ -51,22 +44,22 @@ export struct CustomTitleAndEditUI { | ||
| 51 | Button(this.isEditState === true?'取消':'编辑') | 44 | Button(this.isEditState === true?'取消':'编辑') |
| 52 | .type(ButtonType.Normal) | 45 | .type(ButtonType.Normal) |
| 53 | .fontColor($r('app.color.color_222222')) | 46 | .fontColor($r('app.color.color_222222')) |
| 47 | + .fontSize(16) | ||
| 48 | + .height(20) | ||
| 54 | .backgroundColor(Color.White) | 49 | .backgroundColor(Color.White) |
| 55 | .id("edit_Button") | 50 | .id("edit_Button") |
| 56 | .alignRules({ | 51 | .alignRules({ |
| 57 | center: {anchor: "__container__", align: VerticalAlign.Center}, | 52 | center: {anchor: "__container__", align: VerticalAlign.Center}, |
| 58 | right: {anchor: "__container__", align: HorizontalAlign.End} | 53 | right: {anchor: "__container__", align: HorizontalAlign.End} |
| 59 | }) | 54 | }) |
| 60 | - // .margin({right:'31lpx'}) | ||
| 61 | - .margin({right: 31}) | 55 | + .margin({right: 16}) |
| 62 | .onClick(()=>{ | 56 | .onClick(()=>{ |
| 63 | this.isEditState = !this.isEditState | 57 | this.isEditState = !this.isEditState |
| 64 | this.editCallback() | 58 | this.editCallback() |
| 65 | }) | 59 | }) |
| 66 | } | 60 | } |
| 67 | } | 61 | } |
| 68 | - // .height('84lpx') | ||
| 69 | - .height(84) | 62 | + .height(44) |
| 70 | .width('100%') | 63 | .width('100%') |
| 71 | .backgroundColor($r('app.color.white')) | 64 | .backgroundColor($r('app.color.white')) |
| 72 | 65 |
| @@ -7,29 +7,27 @@ export struct ListHasNoMoreDataUI{ | @@ -7,29 +7,27 @@ export struct ListHasNoMoreDataUI{ | ||
| 7 | Row(){ | 7 | Row(){ |
| 8 | Text("已显示全部内容") | 8 | Text("已显示全部内容") |
| 9 | .fontColor($r('app.color.color_999999')) | 9 | .fontColor($r('app.color.color_999999')) |
| 10 | - // .fontWeight('500lpx') | ||
| 11 | - .fontWeight(500) | ||
| 12 | - // .fontSize('23lpx') | ||
| 13 | - .fontSize(23) | 10 | + .fontWeight(400) |
| 11 | + .fontSize(14) | ||
| 12 | + .lineHeight(20) | ||
| 14 | }.justifyContent(FlexAlign.Center) | 13 | }.justifyContent(FlexAlign.Center) |
| 15 | .width('100%') | 14 | .width('100%') |
| 16 | - // .margin({top:'20lpx',bottom:'20lpx'}) | ||
| 17 | - .margin({top: 20,bottom: 20}) | 15 | + .margin({top: 24,bottom: 24}) |
| 18 | }else if (this.style === 2){ | 16 | }else if (this.style === 2){ |
| 19 | Column(){ | 17 | Column(){ |
| 20 | Image($r('app.media.empty_icon')) | 18 | Image($r('app.media.empty_icon')) |
| 21 | - // .width('200lpx') | ||
| 22 | - .width(200) | ||
| 23 | - // .height('200lpx') | ||
| 24 | - .height(200) | 19 | + .width(160) |
| 20 | + .height(112) | ||
| 25 | .objectFit(ImageFit.Auto) | 21 | .objectFit(ImageFit.Auto) |
| 26 | .interpolation(ImageInterpolation.High) | 22 | .interpolation(ImageInterpolation.High) |
| 27 | Text("暂无内容") | 23 | Text("暂无内容") |
| 28 | .fontColor($r('app.color.color_999999')) | 24 | .fontColor($r('app.color.color_999999')) |
| 29 | - // .fontWeight('500lpx') | ||
| 30 | - .fontWeight(500) | ||
| 31 | - // .fontSize('23lpx') | ||
| 32 | - .fontSize(23) | 25 | + .fontWeight(400) |
| 26 | + .fontSize(14) | ||
| 27 | + .lineHeight(20) | ||
| 28 | + .margin({ | ||
| 29 | + top: 6 | ||
| 30 | + }) | ||
| 33 | } | 31 | } |
| 34 | .justifyContent(FlexAlign.Center) | 32 | .justifyContent(FlexAlign.Center) |
| 35 | .width('100%') | 33 | .width('100%') |
| @@ -149,7 +149,7 @@ export struct LiveLikeComponent { | @@ -149,7 +149,7 @@ export struct LiveLikeComponent { | ||
| 149 | .textAlign(TextAlign.Center) | 149 | .textAlign(TextAlign.Center) |
| 150 | .alignRules({ | 150 | .alignRules({ |
| 151 | top: { anchor: "__container__", align: VerticalAlign.Top }, | 151 | top: { anchor: "__container__", align: VerticalAlign.Top }, |
| 152 | - left: { anchor: "__container__", align: HorizontalAlign.Start } | 152 | + right: { anchor: "__container__", align: HorizontalAlign.End } |
| 153 | }) | 153 | }) |
| 154 | /*动态计算文字宽度*/ | 154 | /*动态计算文字宽度*/ |
| 155 | .width(this.getMeasureText(NumberFormatterUtils.formatNumberWithWan(this.likeCount || '')) + | 155 | .width(this.getMeasureText(NumberFormatterUtils.formatNumberWithWan(this.likeCount || '')) + |
| @@ -158,10 +158,7 @@ export struct LiveLikeComponent { | @@ -158,10 +158,7 @@ export struct LiveLikeComponent { | ||
| 158 | .id("Text") | 158 | .id("Text") |
| 159 | .visibility(this.likeCount > 0 ? Visibility.Visible : Visibility.Hidden) | 159 | .visibility(this.likeCount > 0 ? Visibility.Visible : Visibility.Hidden) |
| 160 | } | 160 | } |
| 161 | - .margin({left:10,top:3}) | ||
| 162 | - .offset({ | ||
| 163 | - x: 18 | ||
| 164 | - }) | 161 | + .margin({right:0,top:3}) |
| 165 | } | 162 | } |
| 166 | } | 163 | } |
| 167 | .width(36) | 164 | .width(36) |
| @@ -103,24 +103,20 @@ struct MineHomePage { | @@ -103,24 +103,20 @@ struct MineHomePage { | ||
| 103 | Stack(){ | 103 | Stack(){ |
| 104 | Image(this.headPhotoUrl&&this.headPhotoUrl.length>0?this.headPhotoUrl:(this.userType === "1"?$r('app.media.default_head_userPage'):$r('app.media.AccountOwner_DefaultIcon'))) | 104 | Image(this.headPhotoUrl&&this.headPhotoUrl.length>0?this.headPhotoUrl:(this.userType === "1"?$r('app.media.default_head_userPage'):$r('app.media.AccountOwner_DefaultIcon'))) |
| 105 | .alt($r('app.media.default_head')) | 105 | .alt($r('app.media.default_head')) |
| 106 | - .width(60) | ||
| 107 | - .height(60) | 106 | + .width(64) |
| 107 | + .height(64) | ||
| 108 | .objectFit(ImageFit.Auto) | 108 | .objectFit(ImageFit.Auto) |
| 109 | - .clip(new Circle({ width: 60, height: 60 })) | 109 | + .clip(new Circle({ width: 64, height: 64 })) |
| 110 | Image(this.levelHead) | 110 | Image(this.levelHead) |
| 111 | - // .width('165lpx') | ||
| 112 | - .width(165) | ||
| 113 | - // .height('165lpx') | ||
| 114 | - .height(165) | 111 | + .width(90) |
| 112 | + .height(90) | ||
| 115 | .objectFit(ImageFit.Auto) | 113 | .objectFit(ImageFit.Auto) |
| 116 | }.onClick(()=>{ | 114 | }.onClick(()=>{ |
| 117 | let params = {'headPhotoUrl': this.headPhotoUrl} as Record<string, string>; | 115 | let params = {'headPhotoUrl': this.headPhotoUrl} as Record<string, string>; |
| 118 | WDRouterRule.jumpWithPage(WDRouterPage.showUserHeaderPage,params) | 116 | WDRouterRule.jumpWithPage(WDRouterPage.showUserHeaderPage,params) |
| 119 | }) | 117 | }) |
| 120 | - // .width('165lpx') | ||
| 121 | - .width(165) | ||
| 122 | - // .height('165lpx') | ||
| 123 | - .height(165) | 118 | + .width(90) |
| 119 | + .height(90) | ||
| 124 | 120 | ||
| 125 | Column() { | 121 | Column() { |
| 126 | Row() { | 122 | Row() { |
| @@ -128,11 +124,8 @@ struct MineHomePage { | @@ -128,11 +124,8 @@ struct MineHomePage { | ||
| 128 | .fontColor($r('app.color.white')) | 124 | .fontColor($r('app.color.white')) |
| 129 | .maxLines(1) | 125 | .maxLines(1) |
| 130 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 126 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 131 | - // .fontSize('38lpx') | ||
| 132 | - .fontSize(38) | ||
| 133 | - // .lineHeight('50lpx') | ||
| 134 | - .lineHeight(50) | ||
| 135 | - // .fontWeight('500lpx') | 127 | + .fontSize(20) |
| 128 | + .lineHeight(26) | ||
| 136 | .fontWeight(500) | 129 | .fontWeight(500) |
| 137 | .onClick(()=>{ | 130 | .onClick(()=>{ |
| 138 | let params: editModelParams = { | 131 | let params: editModelParams = { |
| @@ -144,24 +137,19 @@ struct MineHomePage { | @@ -144,24 +137,19 @@ struct MineHomePage { | ||
| 144 | if(this.levelId>0){ | 137 | if(this.levelId>0){ |
| 145 | Text(`等级${this.levelId}`) | 138 | Text(`等级${this.levelId}`) |
| 146 | .fontColor($r('app.color.color_ED2800')) | 139 | .fontColor($r('app.color.color_ED2800')) |
| 147 | - // .fontSize('23lpx') | ||
| 148 | - .fontSize(23) | 140 | + .fontSize(12) |
| 141 | + .lineHeight(18) | ||
| 149 | .fontWeight(500) | 142 | .fontWeight(500) |
| 150 | - // .margin({ left: '10lpx' }) | ||
| 151 | - .margin({ left: 10 }) | 143 | + .margin({ left: 6 }) |
| 152 | .backgroundImage($r("app.media.my_grade_bg")) | 144 | .backgroundImage($r("app.media.my_grade_bg")) |
| 153 | .backgroundImageSize(ImageSize.Cover) | 145 | .backgroundImageSize(ImageSize.Cover) |
| 154 | - // .padding({left:"17lpx",right:"8lpx"}) | ||
| 155 | - .padding({left: 17,right: 8}) | ||
| 156 | - // .height('35lpx') | ||
| 157 | - .height(35) | 146 | + .padding({left: 6,right: 6}) |
| 147 | + .height(18) | ||
| 158 | .borderRadius({topRight:2,bottomRight:2}) | 148 | .borderRadius({topRight:2,bottomRight:2}) |
| 159 | } | 149 | } |
| 160 | 150 | ||
| 161 | Blank() | 151 | Blank() |
| 162 | } | 152 | } |
| 163 | - // .width('507lpx') | ||
| 164 | - .width(507) | ||
| 165 | 153 | ||
| 166 | Row() { | 154 | Row() { |
| 167 | Row() { | 155 | Row() { |
| @@ -170,14 +158,11 @@ struct MineHomePage { | @@ -170,14 +158,11 @@ struct MineHomePage { | ||
| 170 | Text("阅读") | 158 | Text("阅读") |
| 171 | .textStyle2() | 159 | .textStyle2() |
| 172 | } | 160 | } |
| 173 | - // .margin({ right: '15lpx' }) | ||
| 174 | - .margin({ right: 15 }) | 161 | + .margin({ right: 8 }) |
| 175 | 162 | ||
| 176 | Divider() | 163 | Divider() |
| 177 | - // .height('19lpx') | ||
| 178 | - .height(19) | ||
| 179 | - // .width('2lpx') | ||
| 180 | - .width(2) | 164 | + .height(10) |
| 165 | + .width(1) | ||
| 181 | .color($r('app.color.white')) | 166 | .color($r('app.color.white')) |
| 182 | .vertical(true) | 167 | .vertical(true) |
| 183 | .opacity(0.4) | 168 | .opacity(0.4) |
| @@ -187,14 +172,11 @@ struct MineHomePage { | @@ -187,14 +172,11 @@ struct MineHomePage { | ||
| 187 | Text("评论") | 172 | Text("评论") |
| 188 | .textStyle2() | 173 | .textStyle2() |
| 189 | } | 174 | } |
| 190 | - // .margin({ right: '15lpx', left: '15lpx' }) | ||
| 191 | - .margin({ right: 15, left: 15 }) | 175 | + .margin({ right: 8, left: 8 }) |
| 192 | 176 | ||
| 193 | Divider() | 177 | Divider() |
| 194 | - // .height('19lpx') | ||
| 195 | - .height(19) | ||
| 196 | - // .width('2lpx') | ||
| 197 | - .width(2) | 178 | + .height(10) |
| 179 | + .width(1) | ||
| 198 | .color($r('app.color.white')) | 180 | .color($r('app.color.white')) |
| 199 | .vertical(true) | 181 | .vertical(true) |
| 200 | .opacity(0.4) | 182 | .opacity(0.4) |
| @@ -204,14 +186,11 @@ struct MineHomePage { | @@ -204,14 +186,11 @@ struct MineHomePage { | ||
| 204 | Text("关注") | 186 | Text("关注") |
| 205 | .textStyle2() | 187 | .textStyle2() |
| 206 | } | 188 | } |
| 207 | - // .margin({ left: '15lpx' }) | ||
| 208 | - .margin({ left: 15 }) | 189 | + .margin({ left: 8 }) |
| 209 | } | 190 | } |
| 210 | - // .margin({ top: '23lpx' }) | ||
| 211 | - .margin({ top: 23 }) | 191 | + .margin({ top: 12 }) |
| 212 | }.alignItems(HorizontalAlign.Start) | 192 | }.alignItems(HorizontalAlign.Start) |
| 213 | - // .margin({ left: StringUtils.isEmpty(this.levelHead)?'32lpx':"3lpx" }) | ||
| 214 | - .margin({ left: StringUtils.isEmpty(this.levelHead) ? 32 : 3 }) | 193 | + .margin({ left: StringUtils.isEmpty(this.levelHead) ? 16 : 3 }) |
| 215 | } | 194 | } |
| 216 | .onAreaChange((oldValue: Area, newValue: Area) => { | 195 | .onAreaChange((oldValue: Area, newValue: Area) => { |
| 217 | if (this.firstPositionY === 0) { | 196 | if (this.firstPositionY === 0) { |
| @@ -225,36 +204,32 @@ struct MineHomePage { | @@ -225,36 +204,32 @@ struct MineHomePage { | ||
| 225 | } | 204 | } |
| 226 | }) | 205 | }) |
| 227 | .backgroundColor($r('app.color.color_transparent')) | 206 | .backgroundColor($r('app.color.color_transparent')) |
| 228 | - // .height('184lpx') | ||
| 229 | - .height(184) | 207 | + .height(86) |
| 230 | .width('100%') | 208 | .width('100%') |
| 231 | - // .padding({ left: '6lpx' }) | ||
| 232 | - .padding({ left: 6 }) | 209 | + .padding({ left: 16 }) |
| 233 | 210 | ||
| 234 | 211 | ||
| 235 | //用户简介区域 | 212 | //用户简介区域 |
| 236 | Column() { | 213 | Column() { |
| 237 | Row() { | 214 | Row() { |
| 238 | Text(this.isHasIntroduction?"简介:"+this.desc:this.desc) | 215 | Text(this.isHasIntroduction?"简介:"+this.desc:this.desc) |
| 239 | - // .fontSize('27lpx') | ||
| 240 | - .fontSize(27) | 216 | + .fontSize(14) |
| 241 | .maxLines(3) | 217 | .maxLines(3) |
| 242 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 218 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 243 | - // .lineHeight('40lpx') | ||
| 244 | - .lineHeight(40) | ||
| 245 | - // .fontWeight('400lpx') | 219 | + .lineHeight(21) |
| 246 | .fontWeight(400) | 220 | .fontWeight(400) |
| 247 | .fontColor(this.isHasIntroduction?$r('app.color.color_222222'):$r('app.color.color_999999')) | 221 | .fontColor(this.isHasIntroduction?$r('app.color.color_222222'):$r('app.color.color_999999')) |
| 248 | .textAlign(TextAlign.Start) | 222 | .textAlign(TextAlign.Start) |
| 249 | 223 | ||
| 250 | if(!this.isHasIntroduction){ | 224 | if(!this.isHasIntroduction){ |
| 251 | Image($r('app.media.user_info_edit_icon')) | 225 | Image($r('app.media.user_info_edit_icon')) |
| 252 | - // .width('27lpx') | ||
| 253 | - .width(27) | ||
| 254 | - // .height('27lpx') | ||
| 255 | - .height(27) | 226 | + .width(14) |
| 227 | + .height(14) | ||
| 256 | .interpolation(ImageInterpolation.High) | 228 | .interpolation(ImageInterpolation.High) |
| 257 | .objectFit(ImageFit.Auto) | 229 | .objectFit(ImageFit.Auto) |
| 230 | + .margin({ | ||
| 231 | + left: 6 | ||
| 232 | + }) | ||
| 258 | } | 233 | } |
| 259 | }.onClick(()=>{ | 234 | }.onClick(()=>{ |
| 260 | let params: editModelParams = { | 235 | let params: editModelParams = { |
| @@ -265,28 +240,22 @@ struct MineHomePage { | @@ -265,28 +240,22 @@ struct MineHomePage { | ||
| 265 | 240 | ||
| 266 | 241 | ||
| 267 | Text(`来到人民日报${this.registerTimeForDay}天`) | 242 | Text(`来到人民日报${this.registerTimeForDay}天`) |
| 268 | - // .fontSize('23lpx') | ||
| 269 | - .fontSize(23) | ||
| 270 | - // .lineHeight('25lpx') | ||
| 271 | - .lineHeight(25) | ||
| 272 | - // .fontWeight('400lpx') | 243 | + .fontSize(12) |
| 244 | + .lineHeight(13) | ||
| 273 | .fontWeight(400) | 245 | .fontWeight(400) |
| 274 | .fontColor($r('app.color.color_999999')) | 246 | .fontColor($r('app.color.color_999999')) |
| 275 | .textAlign(TextAlign.Start) | 247 | .textAlign(TextAlign.Start) |
| 276 | - // .margin({ top: '15lpx' }) | ||
| 277 | - .margin({ top: 15 }) | 248 | + .margin({ top: 10 }) |
| 278 | 249 | ||
| 279 | } | 250 | } |
| 280 | - // .padding({ left: '31lpx',right:'31lpx',top:'19lpx',bottom:'31lpx'}) | ||
| 281 | - .padding({ left: 31,right: 31,top: 19,bottom: 31}) | 251 | + .padding({ left: 16,right: 16,top: 12,bottom: 12}) |
| 282 | .alignItems(HorizontalAlign.Start) | 252 | .alignItems(HorizontalAlign.Start) |
| 283 | .justifyContent(FlexAlign.Center) | 253 | .justifyContent(FlexAlign.Center) |
| 284 | .width('100%') | 254 | .width('100%') |
| 285 | .backgroundColor($r('app.color.white')) | 255 | .backgroundColor($r('app.color.white')) |
| 286 | //间隔符 | 256 | //间隔符 |
| 287 | 257 | ||
| 288 | - // Divider().width('100%').height('12lpx').color($r('app.color.color_F5F5F5')).strokeWidth('12lpx') | ||
| 289 | - Divider().width('100%').height(12).color($r('app.color.color_F5F5F5')).strokeWidth(12) | 258 | + Divider().width('100%').height(6).color($r('app.color.color_F5F5F5')).strokeWidth(6) |
| 290 | 259 | ||
| 291 | //tab 页面 | 260 | //tab 页面 |
| 292 | Stack({ alignContent: Alignment.Top }){ | 261 | Stack({ alignContent: Alignment.Top }){ |
| @@ -305,12 +274,11 @@ struct MineHomePage { | @@ -305,12 +274,11 @@ struct MineHomePage { | ||
| 305 | trackTabFirstClick(index === 0 ? "评论":"关注") | 274 | trackTabFirstClick(index === 0 ? "评论":"关注") |
| 306 | }) | 275 | }) |
| 307 | .vertical(false) | 276 | .vertical(false) |
| 308 | - // .barHeight("77lpx") | ||
| 309 | - .barHeight(77) | 277 | + .barHeight(44) |
| 310 | 278 | ||
| 311 | Column() { | 279 | Column() { |
| 312 | // 页签 | 280 | // 页签 |
| 313 | - Row({ space: 7 }) { | 281 | + Row({ space: 30 }) { |
| 314 | Scroll() { | 282 | Scroll() { |
| 315 | Row() { | 283 | Row() { |
| 316 | this.TabBuilder(0,"评论") | 284 | this.TabBuilder(0,"评论") |
| @@ -322,8 +290,7 @@ struct MineHomePage { | @@ -322,8 +290,7 @@ struct MineHomePage { | ||
| 322 | .scrollable(ScrollDirection.Horizontal) | 290 | .scrollable(ScrollDirection.Horizontal) |
| 323 | .scrollBar(BarState.Off) | 291 | .scrollBar(BarState.Off) |
| 324 | .width('100%') | 292 | .width('100%') |
| 325 | - // .padding({left:'31lpx'}) | ||
| 326 | - .padding({left: 31}) | 293 | + .padding({left: 16}) |
| 327 | } | 294 | } |
| 328 | .alignItems(VerticalAlign.Bottom) | 295 | .alignItems(VerticalAlign.Bottom) |
| 329 | .width('100%') | 296 | .width('100%') |
| @@ -331,8 +298,7 @@ struct MineHomePage { | @@ -331,8 +298,7 @@ struct MineHomePage { | ||
| 331 | .backgroundColor($r('app.color.white')) | 298 | .backgroundColor($r('app.color.white')) |
| 332 | .alignItems(HorizontalAlign.Start) | 299 | .alignItems(HorizontalAlign.Start) |
| 333 | .width('100%') | 300 | .width('100%') |
| 334 | - // .height('77lpx') | ||
| 335 | - .height(77) | 301 | + .height(44) |
| 336 | } | 302 | } |
| 337 | }.width("100%") | 303 | }.width("100%") |
| 338 | } | 304 | } |
| @@ -343,7 +309,6 @@ struct MineHomePage { | @@ -343,7 +309,6 @@ struct MineHomePage { | ||
| 343 | } | 309 | } |
| 344 | .margin({top:px2vp(this.topSafeHeight)}) | 310 | .margin({top:px2vp(this.topSafeHeight)}) |
| 345 | }.width('100%') | 311 | }.width('100%') |
| 346 | - // .padding({bottom:px2vp(this.bottomSafeHeight)}) | ||
| 347 | .layoutWeight(1) | 312 | .layoutWeight(1) |
| 348 | } else { | 313 | } else { |
| 349 | Column(){ | 314 | Column(){ |
| @@ -477,26 +442,18 @@ struct MineHomePage { | @@ -477,26 +442,18 @@ struct MineHomePage { | ||
| 477 | @Builder TabBuilder(index: number, title: string) { | 442 | @Builder TabBuilder(index: number, title: string) { |
| 478 | Stack(){ | 443 | Stack(){ |
| 479 | Text(title) | 444 | Text(title) |
| 480 | - // .height('38lpx') | ||
| 481 | - .height(38) | ||
| 482 | - // .fontSize('33lpx') | ||
| 483 | - .fontSize(33) | 445 | + .fontSize(18) |
| 484 | .fontWeight(this.currentIndex === index ? 600 : 400) | 446 | .fontWeight(this.currentIndex === index ? 600 : 400) |
| 485 | .fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor) | 447 | .fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor) |
| 486 | - // .lineHeight('38lpx') | ||
| 487 | - .lineHeight(38) | 448 | + .lineHeight(20) |
| 488 | 449 | ||
| 489 | if(this.currentIndex === index){ | 450 | if(this.currentIndex === index){ |
| 490 | Divider() | 451 | Divider() |
| 491 | - // .width('31lpx') | ||
| 492 | - .width(31) | ||
| 493 | - // .height('4lpx') | ||
| 494 | - .height(4) | 452 | + .width(16) |
| 453 | + .height(2) | ||
| 495 | .color('#ED2800') | 454 | .color('#ED2800') |
| 496 | - // .strokeWidth('4lpx') | ||
| 497 | - .strokeWidth(4) | ||
| 498 | - // .margin({top:'50lpx'}) | ||
| 499 | - .margin({top: 50}) | 455 | + .strokeWidth(2) |
| 456 | + .margin({top: 35}) | ||
| 500 | .id("divTag") | 457 | .id("divTag") |
| 501 | } | 458 | } |
| 502 | }.onClick(()=>{ | 459 | }.onClick(()=>{ |
| @@ -504,12 +461,9 @@ struct MineHomePage { | @@ -504,12 +461,9 @@ struct MineHomePage { | ||
| 504 | this.controller.changeIndex(this.currentIndex) | 461 | this.controller.changeIndex(this.currentIndex) |
| 505 | trackTabFirstClick(index === 0 ? "评论":"关注") | 462 | trackTabFirstClick(index === 0 ? "评论":"关注") |
| 506 | }) | 463 | }) |
| 507 | - // .height('77lpx') | ||
| 508 | - .height(77) | ||
| 509 | - // .width('70lpx') | ||
| 510 | - .width(70) | ||
| 511 | - // .margin({right:'29lpx'}) | ||
| 512 | - .margin({right: 29}) | 464 | + .height(35) |
| 465 | + .width(36) | ||
| 466 | + .margin({right: 30}) | ||
| 513 | } | 467 | } |
| 514 | 468 | ||
| 515 | /** | 469 | /** |
| @@ -589,8 +543,7 @@ struct MineHomePage { | @@ -589,8 +543,7 @@ struct MineHomePage { | ||
| 589 | @Extend(Text) function textStyle() { | 543 | @Extend(Text) function textStyle() { |
| 590 | .fontColor($r('app.color.white')) | 544 | .fontColor($r('app.color.white')) |
| 591 | .textStyleDefault() | 545 | .textStyleDefault() |
| 592 | - // .margin({ right: '10lpx' }) | ||
| 593 | - .margin({ right: 10 }) | 546 | + .margin({ right: 6 }) |
| 594 | } | 547 | } |
| 595 | 548 | ||
| 596 | @Extend(Text) function textStyle2() { | 549 | @Extend(Text) function textStyle2() { |
| @@ -600,12 +553,9 @@ struct MineHomePage { | @@ -600,12 +553,9 @@ struct MineHomePage { | ||
| 600 | 553 | ||
| 601 | @Extend(Text) function textStyleDefault() { | 554 | @Extend(Text) function textStyleDefault() { |
| 602 | .textAlign(TextAlign.Start) | 555 | .textAlign(TextAlign.Start) |
| 603 | - // .fontSize('23lpx') | ||
| 604 | - .fontSize(23) | ||
| 605 | - // .fontWeight('400lpx') | 556 | + .fontSize(12) |
| 606 | .fontWeight(400) | 557 | .fontWeight(400) |
| 607 | - // .lineHeight('31lpx') | ||
| 608 | - .lineHeight(31) | 558 | + .lineHeight(16) |
| 609 | } | 559 | } |
| 610 | 560 | ||
| 611 | function trackTabFirstClick(firstLevelTabName: string){ | 561 | function trackTabFirstClick(firstLevelTabName: string){ |
| 1 | import { PhotoListBean } from 'wdBean/Index'; | 1 | import { PhotoListBean } from 'wdBean/Index'; |
| 2 | import { display, router } from '@kit.ArkUI'; | 2 | import { display, router } from '@kit.ArkUI'; |
| 3 | -import { ImageDownloadComponent } from '../components/ImageDownloadComponent'; | ||
| 4 | import { MultiPictureDetailItemComponent } from '../components/MultiPictureDetailItemComponent'; | 3 | import { MultiPictureDetailItemComponent } from '../components/MultiPictureDetailItemComponent'; |
| 5 | 4 | ||
| 6 | import { Action } from 'wdBean'; | 5 | import { Action } from 'wdBean'; |
| 7 | import { WindowModel } from 'wdKit/Index'; | 6 | import { WindowModel } from 'wdKit/Index'; |
| 7 | +import { SaveNetWorkPictures } from '../components/SaveNetWorkPictures'; | ||
| 8 | 8 | ||
| 9 | const TAG = 'MultiPictureListPage'; | 9 | const TAG = 'MultiPictureListPage'; |
| 10 | 10 | ||
| @@ -28,10 +28,9 @@ export struct MultiPictureListPage { | @@ -28,10 +28,9 @@ export struct MultiPictureListPage { | ||
| 28 | 28 | ||
| 29 | pageTransition() { | 29 | pageTransition() { |
| 30 | // PageTransitionEnter({ duration: this.noAnimation ? 0 : 300 }) | 30 | // PageTransitionEnter({ duration: this.noAnimation ? 0 : 300 }) |
| 31 | - PageTransitionExit({ duration: !this.noAnimation ? 0 : 300 }) | 31 | + PageTransitionExit({ duration: !this.noAnimation ? 0 : 300 }) |
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | - | ||
| 35 | aboutToAppear(): void { | 34 | aboutToAppear(): void { |
| 36 | //获取宽高尺寸 | 35 | //获取宽高尺寸 |
| 37 | this.screenWidth = this.displayTool.width | 36 | this.screenWidth = this.displayTool.width |
| @@ -47,17 +46,17 @@ export struct MultiPictureListPage { | @@ -47,17 +46,17 @@ export struct MultiPictureListPage { | ||
| 47 | 46 | ||
| 48 | onPageShow(): void { | 47 | onPageShow(): void { |
| 49 | console.log(TAG, 'onPageShow') | 48 | console.log(TAG, 'onPageShow') |
| 50 | - WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff'}) | 49 | + WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff' }) |
| 51 | } | 50 | } |
| 52 | 51 | ||
| 53 | onPageHide(): void { | 52 | onPageHide(): void { |
| 54 | console.log(TAG, 'onPageHide') | 53 | console.log(TAG, 'onPageHide') |
| 55 | - WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000'}) | 54 | + WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000' }) |
| 56 | } | 55 | } |
| 57 | 56 | ||
| 58 | build() { | 57 | build() { |
| 59 | RelativeContainer() { | 58 | RelativeContainer() { |
| 60 | - Row(){ | 59 | + Row() { |
| 61 | Image($r('app.media.icon_arrow_left_white')) | 60 | Image($r('app.media.icon_arrow_left_white')) |
| 62 | .width(24) | 61 | .width(24) |
| 63 | .height(24) | 62 | .height(24) |
| @@ -121,7 +120,9 @@ export struct MultiPictureListPage { | @@ -121,7 +120,9 @@ export struct MultiPictureListPage { | ||
| 121 | } | 120 | } |
| 122 | .alignSelf(ItemAlign.Center) | 121 | .alignSelf(ItemAlign.Center) |
| 123 | .fontColor(Color.White) | 122 | .fontColor(Color.White) |
| 124 | - ImageDownloadComponent({ url: this.currentUrl }) | 123 | + |
| 124 | + // ImageDownloadComponent({ url: this.currentUrl }) | ||
| 125 | + SaveNetWorkPictures({ url: this.currentUrl }) | ||
| 125 | } | 126 | } |
| 126 | .margin({ | 127 | .margin({ |
| 127 | top: 14, | 128 | top: 14, |
| @@ -129,6 +130,7 @@ export struct MultiPictureListPage { | @@ -129,6 +130,7 @@ export struct MultiPictureListPage { | ||
| 129 | bottom: 14, | 130 | bottom: 14, |
| 130 | right: 0 | 131 | right: 0 |
| 131 | }) | 132 | }) |
| 133 | + // .backgroundColor(Color.Blue) | ||
| 132 | .id('e_swiper_titles') | 134 | .id('e_swiper_titles') |
| 133 | .alignRules({ | 135 | .alignRules({ |
| 134 | bottom: { anchor: "__container__", align: VerticalAlign.Bottom }, | 136 | bottom: { anchor: "__container__", align: VerticalAlign.Bottom }, |
| 1 | import { Logger, ResourcesUtils, EmitterUtils, EmitterEventId } from 'wdKit'; | 1 | import { Logger, ResourcesUtils, EmitterUtils, EmitterEventId } from 'wdKit'; |
| 2 | import { HttpUrlUtils, ResponseDTO, WDHttp } from 'wdNetwork'; | 2 | import { HttpUrlUtils, ResponseDTO, WDHttp } from 'wdNetwork'; |
| 3 | -import { ContentDetailDTO, GetPullAddressBean, InteractDataDTO } from 'wdBean'; | 3 | +import { ContentDetailDTO, GetPullAddressBean, InteractDataDTO, PeopleShipNextListDTO } from 'wdBean'; |
| 4 | import { HttpRequest } from 'wdNetwork/src/main/ets/http/HttpRequest'; | 4 | import { HttpRequest } from 'wdNetwork/src/main/ets/http/HttpRequest'; |
| 5 | 5 | ||
| 6 | const TAG = 'ContentDetailRequest'; | 6 | const TAG = 'ContentDetailRequest'; |
| 7 | 7 | ||
| 8 | const mock_switch = false; | 8 | const mock_switch = false; |
| 9 | 9 | ||
| 10 | +export interface RmhPublishNextsParams { | ||
| 11 | + creatorId: string | ||
| 12 | + contentId: string | ||
| 13 | + contentType: number | ||
| 14 | + nextFlag: number | ||
| 15 | + pageSize: number | ||
| 16 | + refreshTime:number | ||
| 17 | +} | ||
| 18 | + | ||
| 10 | export interface ContentDetailRequestParams { | 19 | export interface ContentDetailRequestParams { |
| 11 | contentId: string | 20 | contentId: string |
| 12 | relId: string | 21 | relId: string |
| @@ -209,6 +218,21 @@ export class ContentDetailRequest { | @@ -209,6 +218,21 @@ export class ContentDetailRequest { | ||
| 209 | return url; | 218 | return url; |
| 210 | } | 219 | } |
| 211 | 220 | ||
| 221 | + /** | ||
| 222 | + * 获取号主发布的视频 | ||
| 223 | + * */ | ||
| 224 | + static getRmhPublishNextsUrl(creatorId: string,contentId: string, contentType: number, nextFlag: number, pageSize: number, refreshTime: number) { //params.creatorId,params.contentId, params.contentType, params.nextFlag, params.pageSize, params.refreshTime | ||
| 225 | + let url = HttpUrlUtils.getHost() + HttpUrlUtils.PUBLISH_NEXT_PATH | ||
| 226 | + url = url + "?creatorId=" + creatorId | ||
| 227 | + + "&contentId=" + contentId | ||
| 228 | + + "&contentType=" + contentType | ||
| 229 | + + "&nextFlag=" + nextFlag | ||
| 230 | + + "&pageSize=" + pageSize | ||
| 231 | + + "&refreshTime=" + refreshTime; | ||
| 232 | + console.info(`cj2024 getRmhPublishNextsUrl url = ${url}`) | ||
| 233 | + return url; | ||
| 234 | + } | ||
| 235 | + | ||
| 212 | 236 | ||
| 213 | static getLiveRoomPullStreamUrl(vliveId:string){ | 237 | static getLiveRoomPullStreamUrl(vliveId:string){ |
| 214 | let url = HttpUrlUtils.getHost() + HttpUrlUtils.PULL_STREAM_PATH | 238 | let url = HttpUrlUtils.getHost() + HttpUrlUtils.PULL_STREAM_PATH |
| @@ -230,6 +254,14 @@ export class ContentDetailRequest { | @@ -230,6 +254,14 @@ export class ContentDetailRequest { | ||
| 230 | return WDHttp.get<ResponseDTO<ContentDetailDTO[]>>(url) | 254 | return WDHttp.get<ResponseDTO<ContentDetailDTO[]>>(url) |
| 231 | } | 255 | } |
| 232 | 256 | ||
| 257 | + static getRmhPublishNexts(params: RmhPublishNextsParams): Promise<ResponseDTO<PeopleShipNextListDTO>> { | ||
| 258 | + // if (mock_switch) { | ||
| 259 | + // return ContentDetailRequest.getContentDetailDataMock(getContext()); | ||
| 260 | + // } | ||
| 261 | + let url = ContentDetailRequest.getRmhPublishNextsUrl(params.creatorId,params.contentId, params.contentType, params.nextFlag, params.pageSize, params.refreshTime) | ||
| 262 | + return WDHttp.get<ResponseDTO<PeopleShipNextListDTO>>(url) | ||
| 263 | + } | ||
| 264 | + | ||
| 233 | 265 | ||
| 234 | 266 | ||
| 235 | /** | 267 | /** |
| @@ -371,7 +371,7 @@ export struct PlayUIComponent { | @@ -371,7 +371,7 @@ export struct PlayUIComponent { | ||
| 371 | left: this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? '40vp' : '16vp', | 371 | left: this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? '40vp' : '16vp', |
| 372 | right: this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? '40vp' : '16vp', | 372 | right: this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? '40vp' : '16vp', |
| 373 | top: 15, | 373 | top: 15, |
| 374 | - bottom: 15 | 374 | + bottom: 15 + (this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? 15 : 0) |
| 375 | }) | 375 | }) |
| 376 | .visibility(this.isMenuVisible ? Visibility.Visible : Visibility.None) | 376 | .visibility(this.isMenuVisible ? Visibility.Visible : Visibility.None) |
| 377 | } | 377 | } |
| 1 | -import { Action, ContentDetailDTO, InteractDataDTO } from 'wdBean/Index'; | 1 | +import { Action, ContentDetailDTO, ContentDTO, InteractDataDTO, PeopleShipNextListDTO } from 'wdBean/Index'; |
| 2 | import { NetworkUtil, WindowModel } from 'wdKit'; | 2 | import { NetworkUtil, WindowModel } from 'wdKit'; |
| 3 | import { ContentDetailRequest } from 'wdDetailPlayApi/Index' | 3 | import { ContentDetailRequest } from 'wdDetailPlayApi/Index' |
| 4 | import { ResponseDTO } from 'wdNetwork/Index'; | 4 | import { ResponseDTO } from 'wdNetwork/Index'; |
| @@ -11,7 +11,7 @@ import { EmptyComponent, LottieView } from 'wdComponent/Index'; | @@ -11,7 +11,7 @@ import { EmptyComponent, LottieView } from 'wdComponent/Index'; | ||
| 11 | import { DateTimeUtils } from 'wdKit/Index'; | 11 | import { DateTimeUtils } from 'wdKit/Index'; |
| 12 | import { TrackConstants, TrackingPageBrowse } from 'wdTracking/Index'; | 12 | import { TrackConstants, TrackingPageBrowse } from 'wdTracking/Index'; |
| 13 | import { AudioSuspensionModel } from 'wdComponent' | 13 | import { AudioSuspensionModel } from 'wdComponent' |
| 14 | -import { BusinessError } from '@kit.BasicServicesKit'; | 14 | +import { BusinessError, systemDateTime } from '@kit.BasicServicesKit'; |
| 15 | 15 | ||
| 16 | const storage = LocalStorage.getShared(); | 16 | const storage = LocalStorage.getShared(); |
| 17 | const TAG = 'DetailVideoListPage' | 17 | const TAG = 'DetailVideoListPage' |
| @@ -19,6 +19,7 @@ const TAG = 'DetailVideoListPage' | @@ -19,6 +19,7 @@ const TAG = 'DetailVideoListPage' | ||
| 19 | @Entry(storage) | 19 | @Entry(storage) |
| 20 | @Component | 20 | @Component |
| 21 | export struct DetailVideoListPage { | 21 | export struct DetailVideoListPage { |
| 22 | + @State peopleShipHomeCreatorId: string = ''; | ||
| 22 | private contentId: string = '' | 23 | private contentId: string = '' |
| 23 | private relId: string = '' | 24 | private relId: string = '' |
| 24 | private relType: string = '' | 25 | private relType: string = '' |
| @@ -48,6 +49,30 @@ export struct DetailVideoListPage { | @@ -48,6 +49,30 @@ export struct DetailVideoListPage { | ||
| 48 | @State isShowAudioCom: boolean = false | 49 | @State isShowAudioCom: boolean = false |
| 49 | @StorageLink('GestureLoadStrategy') GestureLoadStrategy: number = 0 | 50 | @StorageLink('GestureLoadStrategy') GestureLoadStrategy: number = 0 |
| 50 | 51 | ||
| 52 | + // async getRmhDetail() { | ||
| 53 | + // // 注册监听网络连接 | ||
| 54 | + // this.netStatus = undefined | ||
| 55 | + // let netStatus = NetworkUtil.isNetConnected() | ||
| 56 | + // if (netStatus) { | ||
| 57 | + // this.openFullScreen() | ||
| 58 | + // const action: Action = router.getParams() as Action | ||
| 59 | + // if (action) { | ||
| 60 | + // this.contentId = action.params?.contentID || '' | ||
| 61 | + // if (action.params && action.params.extra) { | ||
| 62 | + // this.relId = action.params.extra.relId || '' | ||
| 63 | + // this.relType = action.params.extra.relType || '' | ||
| 64 | + // } | ||
| 65 | + // await this.getContentDetail(this.contentId, this.relId, this.relType) | ||
| 66 | + // } | ||
| 67 | + // await this.queryVideoList() | ||
| 68 | + // // console.log(TAG, 'aboutToAppear', JSON.stringify(action.params)) | ||
| 69 | + // | ||
| 70 | + // } else { | ||
| 71 | + // // 无网络 | ||
| 72 | + // this.netStatus = 1 | ||
| 73 | + // } | ||
| 74 | + // } | ||
| 75 | + | ||
| 51 | async getDetail() { | 76 | async getDetail() { |
| 52 | // 注册监听网络连接 | 77 | // 注册监听网络连接 |
| 53 | this.netStatus = undefined | 78 | this.netStatus = undefined |
| @@ -73,11 +98,37 @@ export struct DetailVideoListPage { | @@ -73,11 +98,37 @@ export struct DetailVideoListPage { | ||
| 73 | } | 98 | } |
| 74 | 99 | ||
| 75 | aboutToAppear() { | 100 | aboutToAppear() { |
| 76 | - this.getDetail() | 101 | + // 在视频详情页 |
| 102 | + this.peopleShipHomeCreatorId = AppStorage.get<string>('peopleShipHomeCreatorId') || ''; | ||
| 103 | + console.info(`cj2024 peopleShipHomeCreatorId = ${this.peopleShipHomeCreatorId}`) | ||
| 104 | + if (this.peopleShipHomeCreatorId) { | ||
| 105 | + // 从人民号号主传过来的 | ||
| 106 | + this.getPeopleShipHomeDetail(this.peopleShipHomeCreatorId); | ||
| 107 | + } else { | ||
| 108 | + // 根据ID重新获取列表 | ||
| 109 | + this.getDetail() | ||
| 110 | + } | ||
| 111 | + | ||
| 112 | + } | ||
| 113 | + | ||
| 114 | + async getPeopleShipHomeDetail(peopleShipHomeCreatorId: string) { | ||
| 115 | + this.openFullScreen(); | ||
| 116 | + const action: Action = router.getParams() as Action; | ||
| 117 | + if (action) { | ||
| 118 | + this.contentId = action.params?.contentID || ''; | ||
| 119 | + if (action.params && action.params.extra) { | ||
| 120 | + this.relId = action.params.extra.relId || ''; | ||
| 121 | + this.relType = action.params.extra.relType || ''; | ||
| 122 | + } | ||
| 123 | + console.info(`cj2024 getPeopleShipHomeDetail contentId = ${this.contentId}`) | ||
| 124 | + await this.getContentDetail(this.contentId, this.relId, this.relType) | ||
| 125 | + this.getRmhPublishNexts(peopleShipHomeCreatorId, this.contentId, 1, 1, 10, systemDateTime.getTime(false)); | ||
| 126 | + } | ||
| 77 | } | 127 | } |
| 78 | 128 | ||
| 79 | aboutToDisappear(): void { | 129 | aboutToDisappear(): void { |
| 80 | // console.log(TAG, 'aboutToDisappear') | 130 | // console.log(TAG, 'aboutToDisappear') |
| 131 | + // AppStorage.setOrCreate<string>('peopleShipHomeCreatorId', '') //清空人民号动态等过来的数据 | ||
| 81 | this.closeFullScreen() | 132 | this.closeFullScreen() |
| 82 | } | 133 | } |
| 83 | 134 | ||
| @@ -191,6 +242,76 @@ export struct DetailVideoListPage { | @@ -191,6 +242,76 @@ export struct DetailVideoListPage { | ||
| 191 | }) | 242 | }) |
| 192 | } | 243 | } |
| 193 | 244 | ||
| 245 | + //获取号主关联视频 | ||
| 246 | + async getRmhContentDetail(contentId: string, relId: string, relType: string) { | ||
| 247 | + await ContentDetailRequest.getContentDetail({ | ||
| 248 | + contentId: contentId, | ||
| 249 | + relId: relId, | ||
| 250 | + relType: relType | ||
| 251 | + }).then(async (resDTO: ResponseDTO<ContentDetailDTO[]>) => { | ||
| 252 | + console.log(TAG, 'getContentDetail:', JSON.stringify(resDTO.data)) | ||
| 253 | + this.isOffLine = resDTO.data == null ? true : false | ||
| 254 | + if (resDTO.data) { | ||
| 255 | + const params: contentListParams = { | ||
| 256 | + contentList: [{ | ||
| 257 | + contentId: resDTO.data[0].newsId + '', | ||
| 258 | + contentType: resDTO.data[0].newsType | ||
| 259 | + }] | ||
| 260 | + } | ||
| 261 | + // 批量查询内容当前用户点赞、收藏状态 | ||
| 262 | + await ContentDetailRequest.getContentInteract(params).then(res => { | ||
| 263 | + if (res.data) { | ||
| 264 | + this.interactDataList = this.interactDataList.concat(res.data) | ||
| 265 | + } | ||
| 266 | + // console.log('获取互动点赞等数据===', JSON.stringify(res)) | ||
| 267 | + }) | ||
| 268 | + this.data.push(resDTO.data[0]) | ||
| 269 | + } | ||
| 270 | + }) | ||
| 271 | + } | ||
| 272 | + | ||
| 273 | + /** | ||
| 274 | + * 获取号主相关视频 | ||
| 275 | + creatorId 创作者id | ||
| 276 | + contentId 播放视频id | ||
| 277 | + contentType 1-视频 | ||
| 278 | + nextFlag 0:上页,1:下页 | ||
| 279 | + pageSize 10 返回数量 | ||
| 280 | + refreshTime 1694073009294 | ||
| 281 | + * */ | ||
| 282 | + async getRmhPublishNexts(creatorId: string, contentId: string, contentType: number,nextFlag: number,pageSize: number,refreshTime:number) { | ||
| 283 | + await ContentDetailRequest.getRmhPublishNexts({ | ||
| 284 | + creatorId: creatorId, | ||
| 285 | + contentId: contentId, | ||
| 286 | + contentType: contentType, | ||
| 287 | + nextFlag: nextFlag, | ||
| 288 | + pageSize: pageSize, | ||
| 289 | + refreshTime: refreshTime | ||
| 290 | + }).then(async (resDTO: ResponseDTO<PeopleShipNextListDTO>) => { | ||
| 291 | + console.log(TAG, 'cj2024 getRmhPublishNexts:', JSON.stringify(resDTO.data)) | ||
| 292 | + this.isOffLine = resDTO.data == null ? true : false | ||
| 293 | + if (resDTO.data && resDTO.data.list && resDTO.data.list.length > 0) { | ||
| 294 | + const params: contentListParams = { | ||
| 295 | + contentList: [{ | ||
| 296 | + contentId: resDTO.data.list[0].newsId + '', | ||
| 297 | + contentType: resDTO.data.list[0].newsType | ||
| 298 | + }] | ||
| 299 | + } | ||
| 300 | + // 批量查询内容当前用户点赞、收藏状态 | ||
| 301 | + await ContentDetailRequest.getContentInteract(params).then(res => { | ||
| 302 | + if (res.data) { | ||
| 303 | + this.interactDataList = this.interactDataList.concat(res.data) | ||
| 304 | + } | ||
| 305 | + // console.log('获取互动点赞等数据===', JSON.stringify(res)) | ||
| 306 | + }) | ||
| 307 | + resDTO.data.list.forEach(element => { | ||
| 308 | + this.data.push(element) | ||
| 309 | + }); | ||
| 310 | + | ||
| 311 | + } | ||
| 312 | + }) | ||
| 313 | + } | ||
| 314 | + | ||
| 194 | /** | 315 | /** |
| 195 | * 查询视频列表用于翻页 | 316 | * 查询视频列表用于翻页 |
| 196 | */ | 317 | */ |
| @@ -200,6 +321,7 @@ export struct DetailVideoListPage { | @@ -200,6 +321,7 @@ export struct DetailVideoListPage { | ||
| 200 | refreshCnt: 1 | 321 | refreshCnt: 1 |
| 201 | }).then(async res => { | 322 | }).then(async res => { |
| 202 | if (res.data) { | 323 | if (res.data) { |
| 324 | + console.log(TAG, 'cj2024 queryVideoList:', JSON.stringify(res.data)) | ||
| 203 | await this.getContentInteract(res.data) | 325 | await this.getContentInteract(res.data) |
| 204 | this.data = this.data.concat(res.data) | 326 | this.data = this.data.concat(res.data) |
| 205 | // console.log('视频列表===', JSON.stringify(res.data)) | 327 | // console.log('视频列表===', JSON.stringify(res.data)) |
| @@ -279,7 +401,10 @@ export struct DetailVideoListPage { | @@ -279,7 +401,10 @@ export struct DetailVideoListPage { | ||
| 279 | this.currentIndex = index | 401 | this.currentIndex = index |
| 280 | if (this.currentIndex === this.data.length - 1) { | 402 | if (this.currentIndex === this.data.length - 1) { |
| 281 | // TODO:下拉刷新“努力加载中” | 403 | // TODO:下拉刷新“努力加载中” |
| 282 | - this.queryVideoList() | 404 | + if (!this.peopleShipHomeCreatorId) { |
| 405 | + this.queryVideoList() | ||
| 406 | + } | ||
| 407 | + // this.getRmhPublishNexts(this.peopleShipHomeCreatorId, this.contentId, 1, 1, 10, systemDateTime.getTime(false)); | ||
| 283 | } | 408 | } |
| 284 | }) | 409 | }) |
| 285 | // 作为手势动画的背景 | 410 | // 作为手势动画的背景 |
| @@ -85,7 +85,7 @@ export struct PlayerFullScreenView { | @@ -85,7 +85,7 @@ export struct PlayerFullScreenView { | ||
| 85 | headerBuilder() { | 85 | headerBuilder() { |
| 86 | Row() { | 86 | Row() { |
| 87 | Row() { | 87 | Row() { |
| 88 | - Image($r(`app.media.ic_back`)).height(24).width(24) | 88 | + Image($r(`app.media.icon_arrow_left_white`)).height(24).width(24) |
| 89 | .onClick(() => { | 89 | .onClick(() => { |
| 90 | this.displayDirection = this.displayDirection == DisplayDirection.VERTICAL ? | 90 | this.displayDirection = this.displayDirection == DisplayDirection.VERTICAL ? |
| 91 | DisplayDirection.VIDEO_HORIZONTAL : | 91 | DisplayDirection.VIDEO_HORIZONTAL : |
| @@ -144,12 +144,12 @@ export struct PlayerFullScreenView { | @@ -144,12 +144,12 @@ export struct PlayerFullScreenView { | ||
| 144 | .visibility(this.isDragging ? Visibility.Visible : Visibility.None) | 144 | .visibility(this.isDragging ? Visibility.Visible : Visibility.None) |
| 145 | 145 | ||
| 146 | Row() { | 146 | Row() { |
| 147 | - Image($r(`app.media.ic_play`)).height(24).width(24) | 147 | + Image($r(`app.media.ic_play_2`)).height(24).width(24) |
| 148 | .visibility(this.status === PlayerConstants.STATUS_START ? Visibility.None : Visibility.Visible) | 148 | .visibility(this.status === PlayerConstants.STATUS_START ? Visibility.None : Visibility.Visible) |
| 149 | .onClick(() => { | 149 | .onClick(() => { |
| 150 | this.playerController?.switchPlayOrPause() | 150 | this.playerController?.switchPlayOrPause() |
| 151 | }) | 151 | }) |
| 152 | - Image($r(`app.media.ic_pause`)).height(24).width(24) | 152 | + Image($r(`app.media.ic_pause_2`)).height(24).width(24) |
| 153 | .visibility(this.status === PlayerConstants.STATUS_PAUSE ? Visibility.None : Visibility.Visible) | 153 | .visibility(this.status === PlayerConstants.STATUS_PAUSE ? Visibility.None : Visibility.Visible) |
| 154 | .onClick(() => { | 154 | .onClick(() => { |
| 155 | this.playerController?.switchPlayOrPause() | 155 | this.playerController?.switchPlayOrPause() |
| @@ -196,8 +196,8 @@ export struct PlayerFullScreenView { | @@ -196,8 +196,8 @@ export struct PlayerFullScreenView { | ||
| 196 | .visibility(this.showOperator ? Visibility.Visible : Visibility.Hidden) | 196 | .visibility(this.showOperator ? Visibility.Visible : Visibility.Hidden) |
| 197 | .linearGradient({ | 197 | .linearGradient({ |
| 198 | direction: GradientDirection.Bottom, // 渐变方向 | 198 | direction: GradientDirection.Bottom, // 渐变方向 |
| 199 | - colors: [['rgba(0,0,0,0.5)', 0], | ||
| 200 | - ['rgba(1,1,1,0)', 1.0]] // 数组末尾元素占比小于1时满足重复着色效果 | 199 | + colors: [['rgba(1,1,1,0)', 1.0], |
| 200 | + ['rgba(0,0,0,0.5)', 0]] // 数组末尾元素占比小于1时满足重复着色效果 | ||
| 201 | }) | 201 | }) |
| 202 | 202 | ||
| 203 | } | 203 | } |
| @@ -283,7 +283,7 @@ export struct PlayerTitleView { | @@ -283,7 +283,7 @@ export struct PlayerTitleView { | ||
| 283 | @Builder | 283 | @Builder |
| 284 | titleBuilder() { | 284 | titleBuilder() { |
| 285 | Text() { | 285 | Text() { |
| 286 | - Span(this.clipTitleText(this.getTitle(), 16, 4, this.windowWidth - 234 - vp2px(50))) | 286 | + Span(this.clipTitleText(this.getTitle(), 16, 4, this.windowWidth - 160 - vp2px(50))) |
| 287 | .fontSize(16) | 287 | .fontSize(16) |
| 288 | .fontColor(Color.White) | 288 | .fontColor(Color.White) |
| 289 | .lineHeight(22) | 289 | .lineHeight(22) |
sight_harmony/features/wdDetailPlayShortVideo/src/main/resources/base/media/ic_pause_2.png
0 → 100644
571 Bytes
sight_harmony/features/wdDetailPlayShortVideo/src/main/resources/base/media/ic_play_2.png
0 → 100644
655 Bytes
| @@ -160,11 +160,14 @@ export struct WDPlayerRenderView { | @@ -160,11 +160,14 @@ export struct WDPlayerRenderView { | ||
| 160 | if (info.size.width > 0 && info.size.height > 0) { | 160 | if (info.size.width > 0 && info.size.height > 0) { |
| 161 | 161 | ||
| 162 | if (!this.liftVideo) { | 162 | if (!this.liftVideo) { |
| 163 | + let ratio = this.videoWidth / this.videoHeight | ||
| 164 | + const height = info.size.width / ratio | ||
| 165 | + Logger.debug(TAG, "ratio = " + ratio + " ==> new height = " + height) | ||
| 163 | if (this.videoHeight > 0 && this.videoWidth > 0) { | 166 | if (this.videoHeight > 0 && this.videoWidth > 0) { |
| 164 | this.xComponentController.setXComponentSurfaceRect({ | 167 | this.xComponentController.setXComponentSurfaceRect({ |
| 165 | surfaceWidth: info.size.width, | 168 | surfaceWidth: info.size.width, |
| 166 | surfaceHeight: info.size.width / this.videoRatio, | 169 | surfaceHeight: info.size.width / this.videoRatio, |
| 167 | - offsetY: this.isPad ? this.topSafeHeight : 0 | 170 | + // offsetY: this.isPad ? this.topSafeHeight : (info.size.height - height) / 2 |
| 168 | }); | 171 | }); |
| 169 | return | 172 | return |
| 170 | } | 173 | } |
| 1 | -import { NetworkUtil, Logger, SPHelper, StringUtils } from 'wdKit'; | 1 | +import { Logger, NetworkUtil, SPHelper, StringUtils } from 'wdKit'; |
| 2 | import { ResponseDTO } from 'wdNetwork'; | 2 | import { ResponseDTO } from 'wdNetwork'; |
| 3 | import { | 3 | import { |
| 4 | ContentDetailDTO, | 4 | ContentDetailDTO, |
| 5 | + InteractDataDTO, | ||
| 6 | + Params, | ||
| 5 | PhotoListBean, | 7 | PhotoListBean, |
| 6 | - postInteractBrowsOperateParams, | ||
| 7 | postBatchAttentionStatusParams, | 8 | postBatchAttentionStatusParams, |
| 8 | postInteractAccentionOperateParams, | 9 | postInteractAccentionOperateParams, |
| 9 | - Params, | ||
| 10 | - InteractDataDTO | 10 | + postInteractBrowsOperateParams |
| 11 | } from 'wdBean'; | 11 | } from 'wdBean'; |
| 12 | import { DateTimeUtils } from 'wdKit/Index'; | 12 | import { DateTimeUtils } from 'wdKit/Index'; |
| 13 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; | 13 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; |
| 14 | import { SpConstants } from 'wdConstant/Index'; | 14 | import { SpConstants } from 'wdConstant/Index'; |
| 15 | import { common } from '@kit.AbilityKit'; | 15 | import { common } from '@kit.AbilityKit'; |
| 16 | import { CommentDialogView } from 'wdDetailPlayShortVideo/Index'; | 16 | import { CommentDialogView } from 'wdDetailPlayShortVideo/Index'; |
| 17 | -import { EmptyComponent, | ||
| 18 | - ImageDownloadComponent, | 17 | +import { |
| 18 | + EmptyComponent, | ||
| 19 | MultiPictureDetailItemComponent, | 19 | MultiPictureDetailItemComponent, |
| 20 | MultiPictureDetailViewModel, | 20 | MultiPictureDetailViewModel, |
| 21 | OperRowListView, | 21 | OperRowListView, |
| 22 | PageRepository, | 22 | PageRepository, |
| 23 | publishCommentModel, | 23 | publishCommentModel, |
| 24 | - viewBlogItemInsightIntentShare} from 'wdComponent/Index'; | ||
| 25 | -import { ParamType, TrackConstants, TrackingButton, TrackingContent } from 'wdTracking/Index'; | 24 | + SaveNetWorkPictures, |
| 25 | + viewBlogItemInsightIntentShare | ||
| 26 | +} from 'wdComponent/Index'; | ||
| 27 | +import { ParamType, TrackConstants, TrackingContent } from 'wdTracking/Index'; | ||
| 26 | 28 | ||
| 27 | const TAG = 'MultiPictureDetailPageComponent'; | 29 | const TAG = 'MultiPictureDetailPageComponent'; |
| 30 | + | ||
| 28 | /** | 31 | /** |
| 29 | * 多图(图集详情页)UI | 32 | * 多图(图集详情页)UI |
| 30 | */ | 33 | */ |
| @@ -96,7 +99,7 @@ export struct MultiPictureDetailPageComponent { | @@ -96,7 +99,7 @@ export struct MultiPictureDetailPageComponent { | ||
| 96 | this.contentTrackingDict() | 99 | this.contentTrackingDict() |
| 97 | } | 100 | } |
| 98 | 101 | ||
| 99 | - contentTrackingDict(){ | 102 | + contentTrackingDict() { |
| 100 | this.pageParam = { | 103 | this.pageParam = { |
| 101 | 'contentType': `${this.contentDetailData.newsType}`, | 104 | 'contentType': `${this.contentDetailData.newsType}`, |
| 102 | 'contentId': `${this.contentDetailData.newsId}`, | 105 | 'contentId': `${this.contentDetailData.newsId}`, |
| @@ -138,6 +141,7 @@ export struct MultiPictureDetailPageComponent { | @@ -138,6 +141,7 @@ export struct MultiPictureDetailPageComponent { | ||
| 138 | bottom: { anchor: "__container__", align: VerticalAlign.Bottom }, | 141 | bottom: { anchor: "__container__", align: VerticalAlign.Bottom }, |
| 139 | middle: { anchor: "__container__", align: HorizontalAlign.Center } | 142 | middle: { anchor: "__container__", align: HorizontalAlign.Center } |
| 140 | }) | 143 | }) |
| 144 | + | ||
| 141 | CommentDialogView({ | 145 | CommentDialogView({ |
| 142 | index: $index, | 146 | index: $index, |
| 143 | currentIndex: $currentIndex, | 147 | currentIndex: $currentIndex, |
| @@ -156,7 +160,7 @@ export struct MultiPictureDetailPageComponent { | @@ -156,7 +160,7 @@ export struct MultiPictureDetailPageComponent { | ||
| 156 | @Builder | 160 | @Builder |
| 157 | rmh() { | 161 | rmh() { |
| 158 | if (!this.showDownload) { | 162 | if (!this.showDownload) { |
| 159 | - Row(){ | 163 | + Row() { |
| 160 | Row() { | 164 | Row() { |
| 161 | Row({ space: 8 }) { | 165 | Row({ space: 8 }) { |
| 162 | if (this.getImgUrl()) { | 166 | if (this.getImgUrl()) { |
| @@ -257,7 +261,7 @@ export struct MultiPictureDetailPageComponent { | @@ -257,7 +261,7 @@ export struct MultiPictureDetailPageComponent { | ||
| 257 | Image($r('app.media.add')) | 261 | Image($r('app.media.add')) |
| 258 | .width(12) | 262 | .width(12) |
| 259 | .height(12) | 263 | .height(12) |
| 260 | - .margin({right: 3}) | 264 | + .margin({ right: 3 }) |
| 261 | 265 | ||
| 262 | Text('关注').fontSize(12).fontColor(0xffffff) | 266 | Text('关注').fontSize(12).fontColor(0xffffff) |
| 263 | }.alignItems(VerticalAlign.Center) | 267 | }.alignItems(VerticalAlign.Center) |
| @@ -268,7 +272,8 @@ export struct MultiPictureDetailPageComponent { | @@ -268,7 +272,8 @@ export struct MultiPictureDetailPageComponent { | ||
| 268 | .height(24) | 272 | .height(24) |
| 269 | .onClick(() => { | 273 | .onClick(() => { |
| 270 | this.handleAccention() | 274 | this.handleAccention() |
| 271 | - }).visibility(this.isShowButton ? Visibility.Visible : Visibility.None) | 275 | + }) |
| 276 | + .visibility(this.isShowButton ? Visibility.Visible : Visibility.None) | ||
| 272 | } else { | 277 | } else { |
| 273 | Button({ type: ButtonType.Normal, stateEffect: true }) { | 278 | Button({ type: ButtonType.Normal, stateEffect: true }) { |
| 274 | Row() { | 279 | Row() { |
| @@ -281,7 +286,8 @@ export struct MultiPictureDetailPageComponent { | @@ -281,7 +286,8 @@ export struct MultiPictureDetailPageComponent { | ||
| 281 | .height(24) | 286 | .height(24) |
| 282 | .onClick(() => { | 287 | .onClick(() => { |
| 283 | this.handleAccention() | 288 | this.handleAccention() |
| 284 | - }).visibility(this.isShowButton ? Visibility.Visible : Visibility.None) | 289 | + }) |
| 290 | + .visibility(this.isShowButton ? Visibility.Visible : Visibility.None) | ||
| 285 | } | 291 | } |
| 286 | 292 | ||
| 287 | } | 293 | } |
| @@ -429,6 +435,7 @@ export struct MultiPictureDetailPageComponent { | @@ -429,6 +435,7 @@ export struct MultiPictureDetailPageComponent { | ||
| 429 | ListItem() { | 435 | ListItem() { |
| 430 | this.ListItemTitle() | 436 | this.ListItemTitle() |
| 431 | } | 437 | } |
| 438 | + | ||
| 432 | ListItem() { | 439 | ListItem() { |
| 433 | this.ListItemDescription() | 440 | this.ListItemDescription() |
| 434 | } | 441 | } |
| @@ -499,11 +506,18 @@ export struct MultiPictureDetailPageComponent { | @@ -499,11 +506,18 @@ export struct MultiPictureDetailPageComponent { | ||
| 499 | } | 506 | } |
| 500 | 507 | ||
| 501 | if (this.contentDetailData.photoList?.[this.swiperIndex].picPath) { | 508 | if (this.contentDetailData.photoList?.[this.swiperIndex].picPath) { |
| 502 | - ImageDownloadComponent({ url: this.contentDetailData.photoList?.[this.swiperIndex].picPath }) | 509 | + // ImageDownloadComponent({ url: this.contentDetailData.photoList?.[this.swiperIndex].picPath }) |
| 510 | + // .parallelGesture( | ||
| 511 | + // TapGesture() | ||
| 512 | + // .onAction((event: GestureEvent) => { | ||
| 513 | + // TrackingContent.download(1,TrackConstants.PageName.Atlas_Detail,TrackConstants.PageName.Atlas_Detail,this.pageParam) | ||
| 514 | + // })) | ||
| 515 | + SaveNetWorkPictures({ url: this.contentDetailData.photoList?.[this.swiperIndex].picPath }) | ||
| 503 | .parallelGesture( | 516 | .parallelGesture( |
| 504 | TapGesture() | 517 | TapGesture() |
| 505 | .onAction((event: GestureEvent) => { | 518 | .onAction((event: GestureEvent) => { |
| 506 | - TrackingContent.download(1,TrackConstants.PageName.Atlas_Detail,TrackConstants.PageName.Atlas_Detail,this.pageParam) | 519 | + TrackingContent.download(1, TrackConstants.PageName.Atlas_Detail, TrackConstants.PageName.Atlas_Detail, |
| 520 | + this.pageParam) | ||
| 507 | })) | 521 | })) |
| 508 | } | 522 | } |
| 509 | } | 523 | } |
| @@ -521,7 +535,10 @@ export struct MultiPictureDetailPageComponent { | @@ -521,7 +535,10 @@ export struct MultiPictureDetailPageComponent { | ||
| 521 | @Builder | 535 | @Builder |
| 522 | noNet() { | 536 | noNet() { |
| 523 | EmptyComponent({ | 537 | EmptyComponent({ |
| 524 | - emptyType: 1, emptyButton: true, isBlack: true, retry: () => { | 538 | + emptyType: 1, |
| 539 | + emptyButton: true, | ||
| 540 | + isBlack: true, | ||
| 541 | + retry: () => { | ||
| 525 | this.getDetail() | 542 | this.getDetail() |
| 526 | } | 543 | } |
| 527 | }) | 544 | }) |
| @@ -659,10 +676,12 @@ export struct MultiPictureDetailPageComponent { | @@ -659,10 +676,12 @@ export struct MultiPictureDetailPageComponent { | ||
| 659 | // console.log(TAG, '关注号主==', JSON.stringify(res.data)) | 676 | // console.log(TAG, '关注号主==', JSON.stringify(res.data)) |
| 660 | if (this.followStatus == '1') { | 677 | if (this.followStatus == '1') { |
| 661 | this.followStatus = '0' | 678 | this.followStatus = '0' |
| 662 | - TrackingContent.follow(true,this.followUserId,this.followUserName,TrackConstants.PageName.Atlas_Detail,TrackConstants.PageName.Atlas_Detail,this.pageParam) | 679 | + TrackingContent.follow(true, this.followUserId, this.followUserName, TrackConstants.PageName.Atlas_Detail, |
| 680 | + TrackConstants.PageName.Atlas_Detail, this.pageParam) | ||
| 663 | } else { | 681 | } else { |
| 664 | this.followStatus = '1' | 682 | this.followStatus = '1' |
| 665 | - TrackingContent.follow(false,this.followUserId,this.followUserName,TrackConstants.PageName.Atlas_Detail,TrackConstants.PageName.Atlas_Detail,this.pageParam) | 683 | + TrackingContent.follow(false, this.followUserId, this.followUserName, TrackConstants.PageName.Atlas_Detail, |
| 684 | + TrackConstants.PageName.Atlas_Detail, this.pageParam) | ||
| 666 | } | 685 | } |
| 667 | }) | 686 | }) |
| 668 | } | 687 | } |
| @@ -48,6 +48,7 @@ export struct VideoChannelPage { | @@ -48,6 +48,7 @@ export struct VideoChannelPage { | ||
| 48 | async aboutToAppear() { | 48 | async aboutToAppear() { |
| 49 | // 背景图高度 | 49 | // 背景图高度 |
| 50 | this.backgroundImageH = px2vp(this.topSafeHeight) + 44 | 50 | this.backgroundImageH = px2vp(this.topSafeHeight) + 44 |
| 51 | + console.info(`cj2024 backgroundImageH = ${this.backgroundImageH} this.topSafeHeight = ${this.topSafeHeight}`) | ||
| 51 | this.setBarBackgroundColor() | 52 | this.setBarBackgroundColor() |
| 52 | } | 53 | } |
| 53 | 54 | ||
| @@ -88,12 +89,13 @@ export struct VideoChannelPage { | @@ -88,12 +89,13 @@ export struct VideoChannelPage { | ||
| 88 | * @returns | 89 | * @returns |
| 89 | */ | 90 | */ |
| 90 | tabSelectedColor(selected: boolean): string { | 91 | tabSelectedColor(selected: boolean): string { |
| 91 | - console.info(`cj2024 selected this.navItem.channelChooseColor=${this.navItem.channelChooseColor}`) | 92 | + console.info(`cj2024 selected this.navItem.channelChooseColor=${this.navItem.channelChooseColor} selected = ${selected}`) |
| 92 | if (selected) { | 93 | if (selected) { |
| 93 | return this.navItem.channelChooseColor ? this.navItem.channelChooseColor : '#222222' | 94 | return this.navItem.channelChooseColor ? this.navItem.channelChooseColor : '#222222' |
| 94 | } else { | 95 | } else { |
| 95 | - let ccolor = this.navItem.channelChooseCColor.replace('#', '#B3') | ||
| 96 | - return this.navItem.channelChooseCColor ? ccolor : '#666666' | 96 | + let ccolor = this.navItem.channelChooseCColor.replace('#', '#99') |
| 97 | + let defaultColor = this.isImmerseChannel() ? '#99FFFFFF' : '#222222' | ||
| 98 | + return this.navItem.channelChooseCColor ? ccolor : defaultColor | ||
| 97 | } | 99 | } |
| 98 | 100 | ||
| 99 | } | 101 | } |
| @@ -105,6 +107,7 @@ export struct VideoChannelPage { | @@ -105,6 +107,7 @@ export struct VideoChannelPage { | ||
| 105 | 107 | ||
| 106 | this.topNavView() | 108 | this.topNavView() |
| 107 | } | 109 | } |
| 110 | + .backgroundColor(this.isImmerseChannel()? Color.Black : Color.White) | ||
| 108 | .width('100%') | 111 | .width('100%') |
| 109 | .height('100%') | 112 | .height('100%') |
| 110 | } | 113 | } |
| @@ -172,13 +175,13 @@ export struct VideoChannelPage { | @@ -172,13 +175,13 @@ export struct VideoChannelPage { | ||
| 172 | 175 | ||
| 173 | // 搜索按钮 | 176 | // 搜索按钮 |
| 174 | Row() { | 177 | Row() { |
| 175 | - Image($r(this.isImmerseChannel() ? 'app.media.icon_search' : | 178 | + Image($r(this.isImmerseChannel() ? 'app.media.icon_search_gray_svg' : |
| 176 | 'app.media.icon_search')) | 179 | 'app.media.icon_search')) |
| 177 | .colorFilter(this.isImmerseChannel() ? undefined : | 180 | .colorFilter(this.isImmerseChannel() ? undefined : |
| 178 | ColorUtils.getDrawingColorFilter(this.getBothColor(""))) | 181 | ColorUtils.getDrawingColorFilter(this.getBothColor(""))) |
| 179 | .width('24vp') | 182 | .width('24vp') |
| 180 | .height('24vp') | 183 | .height('24vp') |
| 181 | - .opacity(this.isImmerseChannel() ? 0.8 : 1.0) | 184 | + // .opacity(this.isImmerseChannel() ? 0.8 : 1.0) |
| 182 | } | 185 | } |
| 183 | .width('40vp') | 186 | .width('40vp') |
| 184 | .margin({ | 187 | .margin({ |
| @@ -207,11 +210,12 @@ export struct VideoChannelPage { | @@ -207,11 +210,12 @@ export struct VideoChannelPage { | ||
| 207 | top: px2vp(this.topSafeHeight) | 210 | top: px2vp(this.topSafeHeight) |
| 208 | }) | 211 | }) |
| 209 | .visibility(this.displayDirection === DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None) | 212 | .visibility(this.displayDirection === DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None) |
| 210 | - .linearGradient({ | ||
| 211 | - colors: [ | ||
| 212 | - ['rgba(18, 18, 18, 0.5)', 0.0], ['rgba(18, 18, 18, 0.0)', 1.0] | ||
| 213 | - ] | ||
| 214 | - }) | 213 | + // .backgroundColor(Color.Blue) |
| 214 | + // .linearGradient(this.isImmerseChannel() ? { | ||
| 215 | + // colors: [ | ||
| 216 | + // ['rgba(18, 18, 18, 0.5)', 0.0], ['rgba(18, 18, 18, 0.0)', 1.0] | ||
| 217 | + // ] | ||
| 218 | + // } : undefined) | ||
| 215 | } | 219 | } |
| 216 | 220 | ||
| 217 | /** | 221 | /** |
| @@ -269,6 +273,7 @@ export struct VideoChannelPage { | @@ -269,6 +273,7 @@ export struct VideoChannelPage { | ||
| 269 | } | 273 | } |
| 270 | }, (item: TopNavDTO) => item.channelId + '') | 274 | }, (item: TopNavDTO) => item.channelId + '') |
| 271 | } | 275 | } |
| 276 | + .position({y:3})//顶部遮罩会空出一点,临时解决 | ||
| 272 | .indicator(false) | 277 | .indicator(false) |
| 273 | .loop(false) | 278 | .loop(false) |
| 274 | .width('100%') | 279 | .width('100%') |
-
Please register or login to post a comment