wangliang_wd

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 @@
"app": {
"bundleName": "com.peopledailychina.hosactivity",
"vendor": "$string:app_vendor",
"versionCode": 7395,
"versionName": "7.3.9.5",
"versionCode": 7396,
"versionName": "7.3.9.6",
"icon": "$media:app_icon",
"label": "$string:app_name"
}
... ...
<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>
\ No newline at end of file
<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>
\ No newline at end of file
... ...
... ... @@ -8,8 +8,8 @@ export struct CustomToast {
@State bgBorderRadius: number = 10
opacityValue: number = 0.7
bgColor: ResourceColor = $r("app.color.black")
fontSizeValue :number | string | Resource = 27
lineHeightValue :number | string | Resource = 38
fontSizeValue :number | string | Resource = 16
lineHeightValue :number | string | Resource = 20
controller: CustomDialogController
marginTop :number | string | Resource = 0
... ... @@ -36,7 +36,7 @@ export struct CustomToast {
.textAlign(TextAlign.Center)
}.borderRadius(`${this.bgBorderRadius}`)
.constraintSize({maxWidth:"86%"})
.padding({top:23,bottom:23,left:35,right:35})
.padding({top:12,bottom:12,left:16,right:16})
.backgroundColor(this.bgColor)
.opacity(this.opacityValue)
.margin({top:this.marginTop})
... ...
... ... @@ -32,6 +32,10 @@ export class HttpUrlUtils {
* 详情页面详情接口
*/
static readonly DETAIL_PATH: string = "/api/rmrb-bff-display-zh/content/zh/c/content/detail";
/**
* 号主作品
*/
static readonly PUBLISH_NEXT_PATH: string = "/api/rmrb-bff-display-zh/content/zh/c/publishNexts";
/**
* 获取视频直播间拉流地址
... ...
... ... @@ -162,6 +162,10 @@ export {
} from './src/main/ets/bean/peoples/PeopleShipContentListDTO';
export {
PeopleShipNextListDTO
} from './src/main/ets/bean/peoples/PeopleShipNextListDTO';
export {
AttentionBatchDTO,
CreatorDTO
} from './src/main/ets/bean/peoples/AttentionBatchDTO';
... ...
import { ContentDTO } from '../content/ContentDTO'
import { ContentDetailDTO } from '../detail/ContentDetailDTO';
export interface PeopleShipNextListDTO {
followCreators: boolean;
hasNext: number;
list: ContentDetailDTO[];
pageNum: number;
pageSize: number;
totalCount: number;
}
\ No newline at end of file
... ...
... ... @@ -91,6 +91,8 @@ export { OperRowListView } from './src/main/ets/components/view/OperRowListView'
export { LiveOperRowListView } from './src/main/ets/components/view/LiveOperRowListView';
export { SaveNetWorkPictures } from './src/main/ets/components/SaveNetWorkPictures';
export { ImageDownloadComponent } from './src/main/ets/components/ImageDownloadComponent';
export { PageRepository } from './src/main/ets/repository/PageRepository';
... ... @@ -107,6 +109,6 @@ export { MorningEveningViewModel } from './src/main/ets/viewmodel/MorningEvening
export { GrayManageModel } from './src/main/ets/viewmodel/GrayManageModel'
export { VoiceInputView } from './src/main/ets/components/comment/view/VoiceInputView'
export { VoiceInputView } from './src/main/ets/components/comment/view/VoiceInputView'
// export {voicese}
\ No newline at end of file
... ...
... ... @@ -155,8 +155,8 @@ export struct MultiPictureDetailItemComponent {
build() {
Swiper(this.swiperControllerItem){
Row(){ // 居中显示
List(){
ListItem(){
// List(){
// ListItem(){
if(this.imageUri != null && (this.imageUri.includes('.gif') || this.imageUri.includes('.GIF'))){
Image(this.imageUri)// TODO:知识点:宽高只根据其尺寸设置一个,通过保持宽高比来设置另一个属性
.alt($r('app.media.datail_imageLoading_w'))
... ... @@ -179,7 +179,7 @@ export struct MultiPictureDetailItemComponent {
Image(this.imagePixelMap || 'app.media.datail_imageLoading_w')// TODO:知识点:宽高只根据其尺寸设置一个,通过保持宽高比来设置另一个属性
.alt($r('app.media.datail_imageLoading_w'))
.width(this.imageWidth)
.objectFit(ImageFit.Auto)// TODO:知识点:保持宽高比进行缩放,可以超出父组件,以便实现多图切换的增强功能
.objectFit(ImageFit.Cover)// TODO:知识点:保持宽高比进行缩放,可以超出父组件,以便实现多图切换的增强功能
.interpolation(ImageInterpolation.High)
.autoResize(false)
.transform(this.matrix)// TODO:知识点:通过matrix控制图片的缩放
... ... @@ -189,14 +189,15 @@ export struct MultiPictureDetailItemComponent {
x: this.imageOffsetInfo.currentX,
y: this.imageOffsetInfo.currentY
})
.onComplete(event => {
this.imageWidth = '100%'
})
}
}
}
.alignListItem(ListItemAlign.Center)
.scrollBarWidth(0)
// }
// }
// .alignListItem(ListItemAlign.Center)
// .scrollBarWidth(0)
}
.justifyContent(FlexAlign.Center)
}
... ...
/*
* Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import http from '@ohos.net.http';
import ResponseCode from '@ohos.net.http';
import { image } from '@kit.ImageKit';
import { BusinessError } from '@ohos.base';
import common from '@ohos.app.ability.common';
import photoAccessHelper from '@ohos.file.photoAccessHelper';
import fs from '@ohos.file.fs';
import promptAction from '@ohos.promptAction';
import picker from '@ohos.file.picker';
import { taskpool } from '@kit.ArkTS';
import { httpRequest } from '../utils/httpRequest';
/**
* 实现步骤:
* 点击上部“下载”按钮进入”下载网络图片到手机相册”场景示例;点击下部“下载到指定路径”按钮进入”下载文件到指定用户目录”场景示例,
* 从而实现手机相册并进行网络图片的下载和保存。
* photoAccessHelper参考文档:
* https://developer.huawei.com/consumer/cn/doc/harmonyos-references/js-apis-photoaccesshelper
* saveButton参考文档
* https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/savebutton-0000001820999677
*/
@Concurrent
async function getPicture(imageUrl: string): Promise<ArrayBuffer> {
let ret: ArrayBuffer = await new Promise((resolve, reject) => {
httpRequest.httpRequestInStream(imageUrl, (res: ArrayBuffer) => {
resolve(res); // 成功时解析Promise
}, () => {
// 下载失败时弹窗提示检查网络
promptAction.showToast({
message: $r('app.string.image_request_fail'),
duration: 2000
});
reject(new Error('Image download failed')); // 失败时拒绝Promise
});
});
return ret
}
@Component
export struct SaveNetWorkPictures {
@State image: PixelMap | undefined = undefined;
@State photoAccessHelper: photoAccessHelper.PhotoAccessHelper | undefined = undefined; // 相册模块管理实例
@State imageBuffer: ArrayBuffer | undefined = undefined; // 图片ArrayBuffer
// @Prop @Watch('onChangeUrl') url: string = ''
@Prop @Watch('onChangeUrl') url: string = ''
/**
* 通过http的request方法从网络下载图片资源
*/
async getPicture() {
http.createHttp()// 显示网络图片的地址
// .request('https://gitee.com/harmonyos-cases/cases/raw/master/CommonAppDevelopment/feature/variablewatch/src/main/resources/base/media/variablewatch_grape.png',
// .request('https://cdnjdphoto.aikan.pdnews.cn/zhbj-20240830/image/content/4d61839662044ac796ec7331a90da5d8.jpg',
.request(this.url,
(error: BusinessError, data: http.HttpResponse) => {
if (error) {
// 下载失败时弹窗提示检查网络,不执行后续逻辑
promptAction.showToast({
message: '下载失败',
duration: 2000
})
return;
}
this.transcodePixelMap(data);
// 判断网络获取到的资源是否为ArrayBuffer类型
if (data.result instanceof ArrayBuffer) {
this.imageBuffer = data.result as ArrayBuffer;
}
}
)
}
/**
* 使用createPixelMap将ArrayBuffer类型的图片装换为PixelMap类型
* @param data:网络获取到的资源
*/
transcodePixelMap(data: http.HttpResponse) {
if (ResponseCode.ResponseCode.OK === data.responseCode) {
const imageData: ArrayBuffer = data.result as ArrayBuffer;
// 通过ArrayBuffer创建图片源实例。
const imageSource: image.ImageSource = image.createImageSource(imageData);
const options: image.InitializationOptions = {
'alphaType': 0, // 透明度
'editable': false, // 是否可编辑
'pixelFormat': 3, // 像素格式
'scaleMode': 1, // 缩略值
'size': { height: 50, width: 50 }
}; // 创建图片大小
// 通过属性创建PixelMap
imageSource.createPixelMap(options).then((pixelMap: PixelMap) => {
this.image = pixelMap;
});
}
}
/**
* 保存ArrayBuffer到图库
* @param buffer:图片ArrayBuffer
* @returns
*/
async saveImage(buffer: ArrayBuffer | string): Promise<void> {
const context = getContext(this) as common.UIAbilityContext; // 获取getPhotoAccessHelper需要的context
const helper = photoAccessHelper.getPhotoAccessHelper(context); // 获取相册管理模块的实例
const uri = await helper.createAsset(photoAccessHelper.PhotoType.IMAGE, 'jpg'); // 指定待创建的文件类型、后缀和创建选项,创建图片或视频资源
const file = await fs.open(uri, fs.OpenMode.READ_WRITE | fs.OpenMode.CREATE);
await fs.write(file.fd, buffer);
await fs.close(file.fd);
}
/**
* 保存ArrayBuffer到用户选择的路径
* @param buffer:图片ArrayBuffer
* @returns
*/
async pickerSave(buffer: ArrayBuffer | string): Promise<void> {
const photoSaveOptions = new picker.PhotoSaveOptions(); // 创建文件管理器保存选项实例
photoSaveOptions.newFileNames = ['PhotoViewPicker ' + new Date().getTime() + '.jpg']; // 保存文件名(可选)
const photoViewPicker = new picker.PhotoViewPicker;
photoViewPicker.save(photoSaveOptions)
.then(async (photoSvaeResult) => {
const uri = photoSvaeResult[0];
const file = await fs.open(uri, fs.OpenMode.READ_WRITE | fs.OpenMode.CREATE);
await fs.write(file.fd, buffer);
await fs.close(file.fd);
promptAction.showToast({
message: '保存成功',
duration: 2000
})
});
}
async aboutToAppear(): Promise<void> {
// this.getPicture();
this.onChangeUrl()
}
build() {
Stack({ alignContent: Alignment.Center }) {
// Column() {
// Text('下载')
// .fontWeight(FontWeight.Medium)
// }
Image(this.image)
.objectFit(ImageFit.Contain)
.width('50%')
.height(28)
SaveButton({ icon: SaveIconStyle.FULL_FILLED, buttonType: ButtonType.Capsule })
.iconSize(24)
.backgroundColor(Color.Transparent)
.iconColor(Color.White)// .markAnchor({ x: '100%' })
.position({ x: '25%' })
.onClick(async () => {
if (this.imageBuffer !== undefined) {
await this.saveImage(this.imageBuffer);
promptAction.showToast({
message: '保存成功',
duration: 2000
})
}
})
}
// .alignSelf(ItemAlign.Center)
// .align(Alignment.Center)
// .backgroundColor(Color.Red)
}
async onChangeUrl(): Promise<void> {
console.info(`cj2024 图片下载 ${this.url}`)
// const context = getContext(this) as common.UIAbilityContext;
// const atManager = abilityAccessCtrl.createAtManager();
// await atManager.requestPermissionsFromUser(context, PERMISSIONS);
// 通过任务池(taskpool)从网络下载图片资源
taskpool.execute(getPicture, this.url).then((res) => {
const imgBuffer = res as ArrayBuffer
this.imageBuffer = imgBuffer;
})
}
}
... ...
... ... @@ -155,24 +155,26 @@ export struct SpacialTopicPageComponent {
// .fontWeight(500)
// .visibility(this.action?.params?.backVisibility && this.isPageEnd ? Visibility.Visible : Visibility.None)
WdWebComponent({
webviewControl: this.webviewControl,
webUrl: this.webUrl,
reload: this.reload,
onWebPrepared: this.onWebPrepared.bind(this),
isPageEnd: $isPageEnd,
receiveH5SendToNativeData: this.receiveH5SendToNativeData.bind(this)
})
RelativeContainer() {
WdWebComponent({
webviewControl: this.webviewControl,
webUrl: this.webUrl,
reload: this.reload,
onWebPrepared: this.onWebPrepared.bind(this),
isPageEnd: $isPageEnd,
receiveH5SendToNativeData: this.receiveH5SendToNativeData.bind(this)
})
.id('web_page')
// 挂角广告
this.pageHornAd()
}
}
.width(CommonConstants.FULL_WIDTH)
.height(CommonConstants.FULL_HEIGHT)
.padding({ bottom: this.action?.params?.backVisibility ? 115 : 75 })
// RelativeContainer() {
// // 挂角广告
// this.pageHornAd()
// }
if (!this.isNetConnected) {
Column() {
Image($r('app.media.line'))
... ...
... ... @@ -37,28 +37,28 @@ export struct AppointmentListChildComponent {
Image(this.loadImg ? this.item?.imageUrl[0] : '')
.backgroundColor(this.loadImg ? $r('app.color.color_B0B0B0') : 0xf5f5f5)
.width('100%')
.constraintSize({
maxHeight: 196
})
.aspectRatio(16 / 9)
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.High)
.borderRadius(4)
if (this.item.status == "wait") {
Row() {
Row() {
Image($r('app.media.reserve_icon'))
// .width('27lpx')
.width(27)
// .height('27lpx')
.height(27)
.width(14)
.height(14)
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.High)
// .margin({right:"6lpx"})
.margin({right: 6})
.margin({right: 3})
Text("预约")
.fontWeight(400)
// .fontSize('23lpx')
.fontSize(23)
.fontSize(12)
.textShadow({
radius: 2,
color: `rgba(0,0,0,0.3)`,
... ... @@ -66,38 +66,34 @@ export struct AppointmentListChildComponent {
offsetX:0
})
.fontColor($r('app.color.white'))
// .lineHeight('31lpx')
.lineHeight(31)
.lineHeight(16)
.layoutWeight(1)
.textAlign(TextAlign.Start)
}
// .width('94lpx')
.width(94)
// .margin({ bottom: '15lpx', right: '15lpx' })
.margin({ bottom: 15, right: 15 })
.margin({ bottom: 12, right: 8 })
.alignItems(VerticalAlign.Center)
}.width('100%')
}
.width('100%')
.height('100%')
.alignItems(VerticalAlign.Bottom)
.justifyContent(FlexAlign.End)
.position({
x: '80.5%'
})
}
}.width('100%')
// .height('376lpx')
.height(376)
}
.width('100%')
.height(196)
Column() {
Text(this.item.title)
// .fontWeight('400lpx')
.fontWeight(400)
// .fontSize('33lpx')
.fontSize(33)
.fontSize(17)
.fontColor($r('app.color.color_222222'))
// .lineHeight('48lpx')
.lineHeight(48)
.lineHeight(25)
.maxLines(2)
.textOverflow({ overflow: TextOverflow.Ellipsis })
// .margin({ bottom: '23lpx' })
.margin({ bottom: 23 })
.margin({ bottom: 12 })
.textAlign(TextAlign.Start)
.width('100%')
Row() {
... ... @@ -106,144 +102,105 @@ export struct AppointmentListChildComponent {
Image($r('app.media.play_status_history_icon'))
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.High)
// .width('38lpx')
.width(38)
// .height('38lpx')
.height(38)
// .margin({ right: '12lpx' })
.margin({ right: 12 })
.width(20)
.height(20)
.margin({ right: 6 })
Text('已结束').fontColor($r('app.color.color_999999'))
// .fontWeight('500lpx')
.fontWeight(500)
// .fontSize('23lpx')
.fontSize(23)
.fontSize(12)
.lineHeight(16)
}else if(this.item.status == "running"){
Image($r('app.media.play_status_icon'))
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.High)
// .width('38lpx')
.width(38)
// .height('38lpx')
.height(38)
// .margin({ right: '12lpx' })
.margin({ right: 12 })
Text('已开始').fontColor($r('app.color.color_999999'))
// .fontWeight('500lpx')
.width(20)
.height(20)
.margin({ right: 6 })
Text('已开始').fontColor($r('app.color.color_ED2800'))
.fontWeight(500)
// .fontSize('23lpx')
.fontSize(23)
.fontSize(12)
.lineHeight(16)
} else {
Image($r('app.media.play_status_icon'))
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.High)
// .width('38lpx')
.width(38)
// .height('38lpx')
.height(38)
// .margin({ right: '12lpx' })
.margin({ right: 12 })
.width(20)
.height(20)
.margin({ right: 6 })
Text(this.item.timePre).fontColor($r('app.color.color_ED2800'))
// .fontWeight('500lpx')
.fontWeight(500)
// .fontSize('23lpx')
.fontSize(23)
.fontSize(12)
.lineHeight(16)
Image($r('app.media.point_icon'))
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.High)
// .width('12lpx')
.width(12)
// .height('31lpx')
.height(31)
// .margin({ right: '4lpx' })
.margin({ right: 4 })
.width(6)
.height(16)
.margin({ right: 2 })
Text(`${this.item.timeBack}开始`).fontColor($r('app.color.color_ED2800'))
// .fontWeight('500lpx')
.fontWeight(500)
// .fontSize('23lpx')
.fontSize(23)
// .lineHeight('31lpx')
.lineHeight(31)
.fontSize(12)
.lineHeight(16)
}
}
// .padding({ left: '19lpx', right: '19lpx' })
.padding({ left: 19, right: 19 })
// .height('46lpx')
.height(46)
.height(24)
.width(82)
.padding({ left: 10, right: 10})
.alignItems(VerticalAlign.Center)
.backgroundColor($r('app.color.color_F5F5F5'))
// .borderRadius('4lpx')
.borderRadius(4)
.borderRadius(2)
Blank()
.layoutWeight(1)
if (this.item.status === "wait") {
Text(this.item.isAppointment ? "已预约" : "预约")
.fontWeight(400)
// .fontSize('23lpx')
.fontSize(23)
.fontSize(12)
.backgroundColor(this.item.isAppointment ? $r('app.color.color_F5F5F5') : $r('app.color.color_ED2800'))
.fontColor(this.item.isAppointment ? $r('app.color.color_CCCCCC') : $r('app.color.white'))
// .lineHeight('31lpx')
.lineHeight(31)
.lineHeight(18)
.textAlign(TextAlign.Center)
// .width('100lpx')
.width(100)
// .height('46lpx')
.height(46)
// .borderRadius('6lpx')
.borderRadius(6)
.width(52)
.height(24)
.borderRadius(3)
.onClick(() => {
this.dialogController.open()
})
}else if(this.item.status == "running"){
Text("去观看" )
.fontWeight(400)
// .fontSize('23lpx')
.fontSize(23)
.fontSize(12)
.backgroundColor($r('app.color.color_ED2800'))
.fontColor($r('app.color.white'))
// .lineHeight('31lpx')
.lineHeight(31)
.lineHeight(18)
.textAlign(TextAlign.Center)
// .width('100lpx')
.width(100)
// .height('46lpx')
.height(46)
// .borderRadius('6lpx')
.borderRadius(6)
.width(52)
.height(24)
.borderRadius(3)
} else {
Text("看回放")
.fontWeight(400)
// .fontSize('23lpx')
.fontSize(23)
.fontSize(12)
.backgroundColor($r('app.color.color_ED2800'))
.fontColor($r('app.color.white'))
// .lineHeight('31lpx')
.lineHeight(31)
.lineHeight(18)
.textAlign(TextAlign.Center)
// .width('100lpx')
.width(100)
// .height('46lpx')
.height(46)
// .borderRadius('6lpx')
.borderRadius(6)
.width(52)
.height(24)
.borderRadius(3)
}
}
}
.padding({
// left: '23lpx',
left: 23,
// right: '23lpx',
right: 23,
// top: '15lpx',
top: 15,
// bottom: '23lpx'
bottom: 23
left: 12,
right: 12,
top: 8,
bottom: 12
})
}.margin({ left: 10, right: 10 })
}
.backgroundColor($r('app.color.white'))
// .borderRadius('8lpx')
.borderRadius(8)
.borderRadius(4)
.margin({top: 8})
// }
}
... ...
... ... @@ -140,8 +140,7 @@ export struct AppointmentListUI {
.cachedCount(4)
.scrollBar(BarState.Off)
.edgeEffect(EdgeEffect.None)
// .margin({ top: '23lpx', left: '23lpx', right: '23lpx'})
.margin({ top: 23, left: 23, right: 23})
.margin({ top: 4, left: 12, right: 12})
.layoutWeight(1)
}
... ...
... ... @@ -31,62 +31,45 @@ export struct FollowChildComponent{
Stack({alignContent: Alignment.Bottom}){
Image(StringUtils.isEmpty(this.data.headPhotoUrl)?$r('app.media.icon_default_head_mater'):this.data.headPhotoUrl)
.objectFit(ImageFit.Auto)
// .width('92lpx')
.width(92)
// .height('92lpx')
.height(92)
.width(48)
.height(48)
.borderRadius(50)
// .borderWidth('1lpx')
.borderWidth(1)
.borderColor($r('app.color.color_0D000000'))
Row(){
Image(this.data.authIcon)
// .width('32lpx')
.width(32)
// .height('32lpx')
.height(32)
.width(16.89)
.height(16.89)
.objectFit(ImageFit.Cover)
}
// .width('92lpx')
.width(92)
.width(48)
.justifyContent(FlexAlign.End)
}
// .width('92lpx')
.width(92)
// .height('92lpx')
.height(92)
// .margin({right:'15lpx'})
.margin({right: 15})
.width(48)
.height(48)
.margin({right: 11})
Column(){
Text(this.data.cnUserName)
// .fontWeight('400lpx')
.fontWeight(400)
// .fontSize('31lpx')
.fontSize(31)
// .lineHeight('38lpx')
.lineHeight(38)
.fontSize(18)
.lineHeight(22)
.fontColor($r('app.color.color_222222'))
.maxLines(1)
// .margin({bottom:'8lpx'})
.margin({bottom: 8})
.margin({bottom: 2})
Text(`粉丝${this.data.cnFansNum}`)
.fontColor($r('app.color.color_B0B0B0'))
// .fontSize('23lpx')
.fontSize(23)
// .fontWeight('400lpx')
.fontSize(12)
.fontWeight(400)
// .lineHeight('31lpx')
.lineHeight(31)
// .margin({bottom:'8lpx'})
.margin({bottom: 8})
.lineHeight(16)
.margin({bottom: 4})
Text(`${this.data.introduction}`)
.fontColor($r('app.color.color_B0B0B0'))
// .fontSize('23lpx')
.fontSize(23)
.fontSize(12)
.lineHeight(16)
.maxLines(2)
.textAlign(TextAlign.Start)
.textOverflow({ overflow: TextOverflow.Ellipsis })
... ... @@ -110,30 +93,23 @@ export struct FollowChildComponent{
}else {
Text(`已关注`)
.fontColor($r('app.color.color_CCCCCC'))
// .fontSize('23lpx')
.fontSize(23)
// .fontWeight('500lpx')
.fontSize(12)
.fontWeight(500)
// .lineHeight('35lpx')
.lineHeight(35)
.lineHeight(18)
}
}
.justifyContent(FlexAlign.Center)
// .width('100lpx')
.width(100)
.width(52)
.backgroundColor($r("app.color.color_F5F5F5"))
// .borderRadius("6lpx")
.borderRadius(6)
// .height('46lpx')
.height(46)
.borderRadius(3)
.height(24)
.onClick(()=>{
if (this.isLoadingAttention) return
this.isLoadingAttention = true
this.followOperation()
})
// .margin({top:'29lpx'})
.margin({top: 29})
.margin({top: 26})
}else{
Row(){
if(this.isLoadingAttention) {
... ... @@ -141,36 +117,25 @@ export struct FollowChildComponent{
.width(20)
.height(20)
.color($r('app.color.main_red'))
}else {
} else {
Image($r('app.media.follow_icon'))
// .margin({right:'4lpx'})
.margin({right: 4})
// .width('23lpx')
.width(23)
// .height('23lpx')
.height(23)
.margin({right: 2})
.width(12)
.height(12)
Text(`关注`)
.fontColor($r('app.color.color_ED2800'))
// .fontSize('23lpx')
.fontSize(23)
// .fontWeight('500lpx')
.fontSize(12)
.fontWeight(500)
// .lineHeight('35lpx')
.lineHeight(35)
.lineHeight(18)
}
}.borderColor($r('app.color.color_1AED2800'))
// .borderRadius('6lpx')
.borderRadius(6)
// .borderWidth('2lpx')
.borderWidth(2)
.borderRadius(3)
.borderWidth(1)
.justifyContent(FlexAlign.Center)
// .width('100lpx')
.width(100)
// .height('46lpx')
.height(46)
// .margin({top:'29lpx'})
.margin({top: 29})
.width(52)
.height(24)
.margin({top: 26})
.onClick(()=>{
if (this.isLoadingAttention) return
this.isLoadingAttention = true
... ... @@ -179,23 +144,19 @@ export struct FollowChildComponent{
})
}
}
// .padding({top:'27lpx'})
.padding({top: 27})
.padding({top: 14})
.width('100%')
.justifyContent(FlexAlign.SpaceBetween)
.alignItems(VerticalAlign.Top)
}
// .height(`${this.columnHeight}lpx`)
.height(`${this.columnHeight}`)
.height(105)
.justifyContent(FlexAlign.Start)
Divider()
.width('100%')
// .height('2lpx')
.height(2)
.height(1)
.color($r('app.color.color_F5F5F5'))
// .strokeWidth('1lpx')
.strokeWidth(1)
}.width('100%')
... ... @@ -208,65 +169,51 @@ export struct FollowChildComponent{
Stack({alignContent: Alignment.Bottom}){
Image(StringUtils.isEmpty(this.data.headPhotoUrl)?$r('app.media.icon_default_head_mater'):this.data.headPhotoUrl)
.objectFit(ImageFit.Auto)
// .width('92lpx')
.width(92)
// .height('92lpx')
.height(92)
.width(48)
.height(48)
.borderRadius(50)
// .borderWidth('1lpx')
.borderWidth(1)
.borderColor($r('app.color.color_0D000000'))
Row(){
Image(this.data.authIcon)
// .width('32lpx')
.width(32)
// .height('32lpx')
.height(32)
.width(16.89)
.height(16.89)
.objectFit(ImageFit.Cover)
}
// .width('92lpx')
.width(92)
.width(48)
.justifyContent(FlexAlign.End)
}
// .width('92lpx')
.width(92)
// .height('92lpx')
.height(92)
// .margin({right:'15lpx'})
.margin({right: 15})
.width(48)
.height(48)
.margin({right: 11})
Column(){
Text(this.data.cnUserName)
// .fontWeight('400lpx')
.fontWeight(400)
// .fontSize('31lpx')
.fontSize(31)
// .lineHeight('38lpx')
.lineHeight(38)
.fontSize(18)
.lineHeight(22)
.fontColor($r('app.color.color_222222'))
.maxLines(1)
// .margin({bottom:'12lpx'})
.margin({bottom: 12})
.margin({bottom: 2})
Row(){
if(this.data.cnFansNum!="0"){
Text(`粉丝${this.data.cnFansNum}`)
.fontColor($r('app.color.color_B0B0B0'))
// .fontSize('23lpx')
.fontSize(23)
.fontSize(12)
.fontWeight(400)
.lineHeight(16)
}
if(this.data.cnFansNum!="0" && StringUtils.isNotEmpty(this.data.introduction)){
Image($r("app.media.point"))
// .width('31lpx')
.width(31)
// .height('31lpx')
.height(31)
.width(16)
.height(16)
.objectFit(ImageFit.Auto)
}
Text(`${this.data.introduction}`)
.fontColor($r('app.color.color_B0B0B0'))
// .fontSize('23lpx')
.fontSize(23)
.fontSize(12)
.lineHeight(16)
.layoutWeight(1)
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
... ... @@ -292,22 +239,16 @@ export struct FollowChildComponent{
}else {
Text(`已关注`)
.fontColor($r('app.color.color_CCCCCC'))
// .fontSize('23lpx')
.fontSize(23)
// .fontWeight('500lpx')
.fontSize(12)
.fontWeight(500)
// .lineHeight('35lpx')
.lineHeight(35)
.lineHeight(18)
}
}
.backgroundColor($r("app.color.color_F5F5F5"))
.justifyContent(FlexAlign.Center)
// .borderRadius("6lpx")
.borderRadius(6)
// .width('100lpx')
.width(100)
// .height('46lpx')
.height(46)
.borderRadius(3)
.width(52)
.height(24)
.onClick(()=>{
if (this.isLoadingAttention) return
this.isLoadingAttention = true
... ... @@ -323,31 +264,21 @@ export struct FollowChildComponent{
.color($r('app.color.main_red'))
}else {
Image($r('app.media.follow_icon'))
// .margin({right:'4lpx'})
.margin({right: 4})
// .width('23lpx')
.width(23)
// .height('23lpx')
.height(23)
.margin({right: 2})
.width(12)
.height(12)
Text(`关注`)
.fontColor($r('app.color.color_ED2800'))
// .fontSize('23lpx')
.fontSize(23)
// .fontWeight('500lpx')
.fontSize(12)
.fontWeight(500)
// .lineHeight('35lpx')
.lineHeight(35)
.lineHeight(18)
}
}.borderColor($r('app.color.color_1AED2800'))
// .borderRadius('6lpx')
.borderRadius(6)
// .borderWidth('2lpx')
.borderWidth(2)
.borderRadius(3)
.borderWidth(1)
.justifyContent(FlexAlign.Center)
// .width('100lpx')
.width(100)
// .height('46lpx')
.height(46)
.width(52)
.height(24)
.onClick(()=>{
if (this.isLoadingAttention) return
this.isLoadingAttention = true
... ... @@ -358,21 +289,16 @@ export struct FollowChildComponent{
}
}
.width('100%')
// .height('92lpx')
.height(92)
.justifyContent(FlexAlign.SpaceBetween)
}
// .height('146lpx')
.height(146)
.height(76)
.justifyContent(FlexAlign.Center)
Divider()
.width('100%')
// .height('2lpx')
.height(2)
.height(1)
.color($r('app.color.color_F5F5F5'))
// .strokeWidth('1lpx')
.strokeWidth(1)
}.width('100%')
... ...
... ... @@ -54,26 +54,18 @@ export struct FollowFirstTabsComponent{
@Builder TabBuilder(index: number, item: FollowListItem) {
Stack(){
Text(item.directoryName)
// .height('38lpx')
.height(38)
// .fontSize('33lpx')
.fontSize(33)
.fontSize(18)
.fontWeight(this.currentIndex === index ? 600 : 400)
.fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
// .lineHeight('38lpx')
.lineHeight(38)
.lineHeight(20)
if(this.currentIndex === index){
Divider()
// .width('31lpx')
.width(31)
// .height('4lpx')
.height(4)
.width(16)
.height(2)
.color('#ED2800')
// .strokeWidth('4lpx')
.strokeWidth(4)
// .margin({top:'50lpx'})
.margin({top: 50})
.strokeWidth(2)
.margin({top: 35})
.id("divTag")
}
}.onClick(()=>{
... ... @@ -83,10 +75,7 @@ export struct FollowFirstTabsComponent{
trackTabFirstClick(item.directoryName)
})
.height('100%')
// .margin({right:'9lpx'})
.margin({right: 9})
// .padding({left:'31lpx',right:index === this.data.length-1?"31lpx":"0lpx"})
.padding({left: 31,right:index === this.data.length-1 ? 31 : 0})
.padding({left: 16,right:index === this.data.length-1 ? 16 : 0})
}
build() {
... ... @@ -111,8 +100,7 @@ export struct FollowFirstTabsComponent{
}.listDirection(Axis.Horizontal)
.backgroundColor($r('app.color.white'))
.width("100%")
.height(84)
// .height("84lpx")
.height(44)
.edgeEffect(EdgeEffect.None)
.scrollBar(BarState.Off)
... ...
... ... @@ -99,14 +99,12 @@ export struct FollowListDetailUI {
ListItem() {
ListHasNoMoreDataUI()
}
// .margin({bottom:"40lpx"})
.margin({bottom: 40})
.margin({bottom: 20})
}
}
.edgeEffect(EdgeEffect.None)
.cachedCount(5)
// .padding({ left: '31lpx', right: '31lpx' })
.padding({ left: 31, right: 31 })
.padding({ left: 16, right: 16 })
.layoutWeight(1)
.scrollBar(BarState.Off)
.onReachEnd(() => {
... ...
... ... @@ -18,7 +18,6 @@ export struct FollowSecondTabsComponent{
Column(){
Text().backgroundColor($r('app.color.color_EDEDED'))
.width('100%')
// .height('2lpx')
.height(2)
if(this.data != null){
... ... @@ -94,25 +93,19 @@ export struct FollowSecondTabsComponent{
Column(){
Text(item.directoryName)
.width('100%')
// .height('38lpx')
.height(38)
// .fontSize('30lpx')
.fontSize(30)
.fontSize(14)
.textAlign(TextAlign.Center)
.fontWeight(this.currentIndex === index ? 600 : 400)
.fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
// .lineHeight('38lpx')
.lineHeight(38)
.lineHeight(22)
}
.onClick(()=>{
this.currentIndex = index
this.swiperController.changeIndex(this.currentIndex)
})
.justifyContent(FlexAlign.Center)
// .height('84lpx')
.height(84)
// .width('140lpx')
.width(140)
.height(50)
.width(80)
.backgroundColor(this.currentIndex === index?$r('app.color.white'):$r('app.color.color_F9F9F9'))
}
... ...
... ... @@ -29,22 +29,22 @@ export struct FollowThirdTabsComponent{
Column(){
Row(){
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')))
.width(index === 0?"19lpx":"35lpx")
.height('61lpx')
.width(index === 0? 10 : 18)
.height(32)
.objectFit(ImageFit.Fill)
Text(item.directoryName)
.fontSize('27lpx')
.fontSize(14)
.fontWeight(this.currentIndex === index ? 600 : 400)
.fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
.lineHeight('35lpx')
.lineHeight(18)
.backgroundImage($r('app.media.ic_collect_mid'))
.backgroundImageSize(ImageSize.Cover)
.padding({top:"13lpx",bottom:"13lpx"})
.padding({top:7,bottom:7})
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')))
.width(index === this.data[this.firstIndex].children[this.secondIndex].children.length-1?"19lpx":"35lpx")
.height('61lpx')
.width(index === this.data[this.firstIndex].children[this.secondIndex].children.length-1 ? 10 : 18)
.height(32)
.objectFit(ImageFit.Fill)
}
}
... ... @@ -53,8 +53,8 @@ export struct FollowThirdTabsComponent{
this.swiperController.changeIndex(this.currentIndex)
this.listScroller.scrollToIndex(index, true, ScrollAlign.CENTER)
})
.offset({x:index === 0?"0lpx":"-5lpx"})
.height('80lpx')
.offset({x: -5})
.height(84)
.justifyContent(FlexAlign.End)
}
... ... @@ -76,10 +76,8 @@ export struct FollowThirdTabsComponent{
.scrollBar(BarState.Off)
.listDirection(Axis.Horizontal)
.width('100%')
// .height("84lpx")
.height(84)
// .padding({left:'31lpx',right:'48lpx'})
.padding({left: 31,right: 48})
.padding({left: 16,right: 25})
// Column() {
// // 页签
... ...
... ... @@ -24,45 +24,31 @@ export struct ChildCommentComponent {
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')))
.alt($r('app.media.default_head'))
.objectFit(ImageFit.Auto)
// .width('69lpx')
.width(69)
// .height('69lpx')
.height(69)
.width(35.47)
.height(35.47)
.borderRadius(50)
Image(this.levelHead)
// .width('89lpx')
.width(89)
// .height('89lpx')
.height(89)
.width(54)
.height(54)
.objectFit(ImageFit.Cover)
.borderRadius(50)
}
// .width('89lpx')
.width(89)
// .height('89lpx')
.height(89)
// .margin({ right: '3lpx' })
.margin({ right: 3 })
.width(54)
.height(54)
.margin({ right: 5 })
Column() {
Text(this.data.fromUserName)
// .fontSize('25lpx')
.fontSize(25)
// .lineHeight('35lpx')
.lineHeight(35)
// .fontWeight('600lpx')
.fontSize(15)
.lineHeight(21)
.fontWeight(600)
.fontColor($r('app.color.color_222222'))
// .margin({ bottom: '6lpx' })
.margin({ bottom: 6 })
.margin({ bottom: 1 })
.maxLines(1)
Text(`${this.data.createTime}`)
.fontColor($r('app.color.color_B0B0B0'))
// .fontSize('23lpx')
.fontSize(23)
// .lineHeight('31lpx')
.lineHeight(31)
// .fontWeight('400lpx')
.fontSize(12)
.lineHeight(16)
.fontWeight(400)
.maxLines(1)
}.layoutWeight(1)
... ... @@ -72,21 +58,15 @@ export struct ChildCommentComponent {
if (this.data.checkStatus != 3) {
Row() {
Text(this.data.likeNum.toString())
// .fontWeight("500lpx")
.fontWeight(500)
// .fontSize("27lpx")
.fontSize(27)
// .lineHeight("31lpx")
.lineHeight(31)
.fontSize(14)
.lineHeight(16)
.fontColor(this.data.like_status === 0 ? $r('app.color.color_666666') : $r('app.color.color_ED2800'))
// .margin({ right: '8lpx' })
.margin({ right: 8 })
.margin({ right: 4 })
.visibility(this.data.likeNum <= 0||StringUtils.isEmpty(this.data.likeNum.toString()) ? Visibility.Hidden : Visibility.Visible)
Image(this.data.like_status === 0 ? $r('app.media.like_default_status') : $r('app.media.liked_status'))
// .width('31lpx')
.width(31)
// .height('31lpx')
.height(31)
.width(16)
.height(16)
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.Medium)
.borderRadius(50)
... ... @@ -95,13 +75,10 @@ export struct ChildCommentComponent {
})
}
}
// .margin({ bottom: '5lpx' })
.margin({ bottom: 5 })
.width('100%')
// .height('108lpx')
.height(108)
// .padding({ left: '31lpx', right: '31lpx' })
.padding({ left: 31, right: 31 })
.height(56)
.padding({ left: 11, right: 15 })
Row() {
if (this.isExpand) {
... ... @@ -124,151 +101,119 @@ export struct ChildCommentComponent {
.textStyle()
}
}
// .padding({ left: '31lpx', right: '31lpx' })
.padding({ left: 31, right: 31 })
.padding({ left: 15, right: 15 })
.width('100%')
Column() {
if (StringUtils.isNotEmpty(this.data.parentCommentContent)) {
//父评论
Row() {
if (this.isExpandParent) {
Text() {
Span(`@${this.data.parentCommentUserName}:`)
.fontColor($r('app.color.color_000000'))
// .fontWeight('500lpx')
.fontWeight(500)
// .fontSize('27lpx')
.fontSize(27)
// .lineHeight('40lpx')
.lineHeight(40)
Span(this.data.parentCommentContent)
.fontColor($r('app.color.color_000000'))
// .fontWeight('400lpx')
.fontWeight(400)
// .fontSize('27lpx')
.fontSize(27)
// .lineHeight('40lpx')
.lineHeight(40)
Column(){
if (StringUtils.isNotEmpty(this.data.parentCommentContent)) {
//父评论
Row() {
if (this.isExpandParent) {
Text() {
Span(`@${this.data.parentCommentUserName}:`)
.fontColor($r('app.color.color_000000'))
.fontWeight(500)
.fontSize(14)
.lineHeight(21)
Span(this.data.parentCommentContent)
.fontColor($r('app.color.color_000000'))
.fontWeight(400)
.fontSize(14)
.lineHeight(21)
}
.width('100%')
.textAlign(TextAlign.Start)
} else {
Text() {
Span(`@${this.data.parentCommentUserName}:`)
.fontColor($r('app.color.color_000000'))
.fontWeight(400)
.fontSize(14)
.lineHeight(21)
Span(this.clipText(this.data.parentCommentContent, 31, 5, 630, 1))
.fontColor($r('app.color.color_000000'))
.fontWeight(400)
.fontSize(14)
.lineHeight(21)
if (this.isOverLinesParent) {
Span('... 展开')
.fontColor($r('app.color.color_999999'))
.fontWeight(400)
.fontSize(14)
.lineHeight(21)
.onClick(() => {
this.isExpandParent = true
})
}
}.maxLines(5)
.wordBreak(WordBreak.BREAK_ALL)
.textAlign(TextAlign.Start)
.width('100%')
}
.width('100%')
.textAlign(TextAlign.Start)
} else {
Text() {
Span(`@${this.data.parentCommentUserName}:`)
.fontColor($r('app.color.color_000000'))
// .fontWeight('500lpx')
.fontWeight(500)
// .fontSize('27lpx')
.fontSize(27)
// .lineHeight('40lpx')
.lineHeight(40)
}
.width('100%')
Span(this.clipText(this.data.parentCommentContent, 31, 5, 630, 1))
.fontColor($r('app.color.color_000000'))
// .fontWeight('400lpx')
.fontWeight(400)
// .fontSize('27lpx')
.fontSize(27)
// .lineHeight('40lpx')
.lineHeight(40)
if (this.isOverLinesParent) {
Span('...展开')
.fontColor($r('app.color.color_999999'))
.onClick(() => {
this.isExpandParent = true
})
}
}.maxLines(5)
.wordBreak(WordBreak.BREAK_ALL)
.textAlign(TextAlign.Start)
Divider()
.width('100%')
}
.height(0.5)
.strokeWidth(0.5)
.backgroundColor($r('app.color.color_EDEDED'))
.margin({ top: 10, bottom: 10 })
}
.width('100%')
// .padding({ top: '23lpx', bottom: '15lpx', right: '23lpx' })
.padding({ top: 23, bottom: 15, right: 23 })
Divider()
.width('100%')
// .height('1lpx')
.height(1)
// .strokeWidth('1lpx')
.strokeWidth(1)
.backgroundColor($r('app.color.color_EDEDED'))
// .margin({ top: '4lpx', bottom: '4lpx' })
.margin({ top: 4, bottom: 4 })
}
Column() {
Row() {
Column() {
Row() {
Image($r('app.media.comment_link_icon'))
.objectFit(ImageFit.Auto)
// .width('31lpx')
.width(31)
// .height('31lpx')
.height(31)
// .margin({ right: '10lpx' })
.margin({ right: 10 })
Row() {
Image($r('app.media.comment_link_icon'))
.objectFit(ImageFit.Auto)
.width(16)
.height(16)
.margin({ right: 5 })
Column() {
Row() {
Text(`${this.data.targetTitle}`)
// .fontWeight('400lpx')
.fontWeight(400)
.fontColor($r('app.color.color_666666'))
// .lineHeight('38lpx')
.lineHeight(38)
// .fontSize('27lpx')
.fontSize(27)
.layoutWeight(1)
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
}.width('100%')
}
.layoutWeight(1)
.alignItems(HorizontalAlign.Start)
}.layoutWeight(1)
Column() {
Row() {
Text(`${this.data.targetTitle}`)
.fontWeight(400)
.fontColor($r('app.color.color_666666'))
.lineHeight(20)
.fontSize(14)
.layoutWeight(1)
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
}.width('100%')
}
.layoutWeight(1)
.alignItems(HorizontalAlign.Start)
}.layoutWeight(1)
Image($r('app.media.arrow_icon_right'))
// .margin({ right: '4lpx' })
.margin({ right: 4 })
// .width('23lpx')
.width(23)
// .height('23lpx')
.height(23)
.margin({right: 23})
}
.width('100%')
// .height('69lpx')
.height(69)
.justifyContent(FlexAlign.SpaceBetween)
.onClick(()=>{
let content = getParams(this.data)
TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.PageName.Customer_Personal,TrackConstants.PageName.Customer_Personal,TrackParamConvert.program(content))
ProcessUtils.processPage(content)
})
Image($r('app.media.arrow_icon_right'))
.width(12)
.height(12)
}
.width('100%')
.justifyContent(FlexAlign.SpaceBetween)
.onClick(()=>{
let content = getParams(this.data)
TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.PageName.Customer_Personal,TrackConstants.PageName.Customer_Personal,TrackParamConvert.program(content))
ProcessUtils.processPage(content)
})
}
.justifyContent(FlexAlign.Center)
}
// .height('69lpx')
.height(69)
.justifyContent(FlexAlign.Center)
.backgroundColor($r('app.color.color_F5F5F5'))
.padding(12)
.width("100%")
}
// .margin({ top: '19lpx', bottom: '31lpx', left: '31lpx', right: '31lpx' })
.margin({ top: 19, bottom: 31, left: 31, right: 31 })
// .padding({ left: '23lpx' })
.padding({ left: 23 })
// .width('662lpx')
.width(662)
.backgroundColor($r('app.color.color_F5F5F5'))
.width("100%")
.padding({ top: 10, bottom: 16, left: 15, right: 15 })
if (!this.isLastItem) {
Divider().width('100%')
// .height('12lpx')
.height(12)
// .strokeWidth('12lpx')
.strokeWidth(12)
.height(6)
.strokeWidth(6)
.color($r('app.color.color_F5F5F5'))
}
}
... ... @@ -334,15 +279,10 @@ export struct ChildCommentComponent {
@Extend(Text)
function textStyle() {
// .width('630lpx')
.width(630)
// .fontSize('31lpx')
.fontSize(31)
// .fontWeight('400lpx')
.fontSize(16)
.fontWeight(400)
.fontColor($r('app.color.color_222222'))
// .lineHeight('46lpx')
.lineHeight(46)
.lineHeight(24)
}
function getParams(item: CommentListItem) : ContentDTO{
... ...
... ... @@ -37,7 +37,6 @@ export struct HomePageBottomCommentComponent {
if (this.isGetRequest == true) {
Text().backgroundColor($r('app.color.color_EDEDED'))
.width('100%')
// .height('2lpx')
.height(2)
}
if (this.count === 0) {
... ... @@ -45,7 +44,6 @@ export struct HomePageBottomCommentComponent {
EmptyComponent({ emptyType: 11 })
.layoutWeight(1)
.width('100%')
// .offset({ y: "-200lpx" })
.offset({ y: -200 })
}
} else {
... ... @@ -67,7 +65,7 @@ export struct HomePageBottomCommentComponent {
}
},
onLoadMore:(resolve)=> {
console.log(TAG, "触底了");
// console.log(TAG, "触底了");
if (!this.isLoading) {
this.isLoading = true
//加载分页数据
... ... @@ -138,7 +136,7 @@ export struct HomePageBottomCommentComponent {
this.getCommentListStatus(value)
}
}).catch((err: Error) => {
console.log(TAG, "请求失败")
// console.log(TAG, "请求失败")
this.isLoading = false
this.isGetRequest = true
})
... ... @@ -236,7 +234,7 @@ export struct HomePageBottomCommentComponent {
this.isLoading = false
this.isGetRequest = true
}).catch((err: Error) => {
console.log(TAG, "请求失败")
// console.log(TAG, "请求失败")
this.isLoading = false
this.isGetRequest = true
})
... ...
... ... @@ -71,7 +71,6 @@ export struct HomePageBottomFollowComponent {
if (this.isGetRequest == true) {
Text().backgroundColor($r('app.color.color_EDEDED'))
.width('100%')
// .height('2lpx')
.height(2)
}
... ... @@ -81,38 +80,30 @@ export struct HomePageBottomFollowComponent {
EmptyComponent({ emptyType: 14 })
.layoutWeight(1)
.width('100%')
// .offset({ y: "-200lpx" })
.offset({ y: -200 })
}
Row() {
Text("关注更多人民号")
// .fontWeight('400lpx')
.fontWeight(400)
.fontColor($r('app.color.color_222222'))
// .lineHeight('38lpx')
.lineHeight(38)
// .fontSize('27lpx')
.fontSize(27)
.textAlign(TextAlign.Center)
// .margin({ right: '4lpx' })
.margin({ right: 4 })
Image($r('app.media.arrow_icon_right'))
.objectFit(ImageFit.Auto)
// .width('27lpx')
.width(27)
// .height('27lpx')
.height(27)
Row(){
Text("关注更多人民号")
.fontWeight(400)
.fontColor($r('app.color.color_222222'))
.lineHeight(20)
.fontSize(14)
.textAlign(TextAlign.Center)
.margin({ right: 2 })
Image($r('app.media.arrow_icon_right'))
.objectFit(ImageFit.Auto)
.width(14)
.height(14)
}
.backgroundColor($r('app.color.color_F5F5F5'))
.height(36)
.width('100%')
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.Center)
}
// .height('69lpx')
.height(69)
// .width('659lpx')
.width(659)
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.Center)
.backgroundColor($r('app.color.color_F5F5F5'))
// .margin({ top: '31lpx', bottom: '4lpx' })
.margin({ top: 31, bottom: 4 })
.margin({ top: 10, bottom: 2, left: 16, right: 16})
.onClick(() => {
let params = { 'index': "1" } as Record<string, string>
WDRouterRule.jumpWithPage(WDRouterPage.followListPage, params)
... ... @@ -137,7 +128,7 @@ export struct HomePageBottomFollowComponent {
}
},
onLoadMore:(resolve)=> {
console.log(TAG, "触底了");
// console.log(TAG, "触底了");
if (!this.isLoading) {
this.isLoading = true
//加载分页数据
... ... @@ -157,32 +148,23 @@ export struct HomePageBottomFollowComponent {
ListItem() {
Row() {
Text("关注更多人民号")
// .fontWeight('400lpx')
.fontWeight(400)
.fontColor($r('app.color.color_222222'))
// .lineHeight('38lpx')
.lineHeight(38)
// .fontSize('27lpx')
.fontSize(27)
.lineHeight(20)
.fontSize(14)
.textAlign(TextAlign.Center)
// .margin({ right: '4lpx' })
.margin({ right: 4 })
.margin({ right: 2 })
Image($r('app.media.arrow_icon_right'))
.objectFit(ImageFit.Auto)
// .width('27lpx')
.width(27)
// .height('27lpx')
.height(27)
.width(14)
.height(14)
}
// .height('69lpx')
.height(69)
// .width('659lpx')
.width(659)
.height(36)
.width('100%')
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.Center)
.backgroundColor($r('app.color.color_F5F5F5'))
// .margin({ top: '31lpx', bottom: '4lpx' })
.margin({ top: 31, bottom: 4 })
.margin({ top: 10, bottom: 2})
}.onClick(() => {
let params = { 'index': "1" } as Record<string, string>
WDRouterRule.jumpWithPage(WDRouterPage.followListPage, params)
... ... @@ -202,8 +184,7 @@ export struct HomePageBottomFollowComponent {
}
}
.cachedCount(5)
// .padding({ left: '31lpx', right: '31lpx' })
.padding({ left: 31, right: 31 })
.padding({ left: 16, right: 16 })
.layoutWeight(1)
.scrollBar(BarState.Off)
.edgeEffect(EdgeEffect.None)
... ...
... ... @@ -15,91 +15,72 @@ export struct MessageListItemUI {
Row() {
Image(this.item.imgSrc)
.objectFit(ImageFit.Auto)
// .width('92lpx')
.width(92)
// .height('92lpx')
.height(92)
// .margin({ right: '15lpx' })
.margin({ right: 15 })
.width(48)
.height(48)
.margin({ right: 8 })
Column() {
Text(this.item.title)
.fontWeight(500)
// .fontSize('31lpx')
.fontSize(31)
// .lineHeight('42lpx')
.lineHeight(42)
.fontSize(16)
.lineHeight(22)
.fontColor($r('app.color.color_222222'))
.maxLines(1)
// .margin({ bottom: StringUtils.isNotEmpty(this.item.desc)?'8lpx':0 })
.margin({ bottom: StringUtils.isNotEmpty(this.item.desc) ? 8 : 0 })
.margin({ bottom: StringUtils.isNotEmpty(this.item.desc) ? 4 : 0 })
if(StringUtils.isNotEmpty(this.item.desc)){
Text(`${this.item.desc}`)
.fontColor($r('app.color.color_999999'))
// .fontSize('27lpx')
.fontSize(27)
// .lineHeight('38lpx')
.lineHeight(38)
.fontSize(14)
.lineHeight(20)
.fontWeight(400)
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
}
}
// .height('92lpx')
.height(92)
.layoutWeight(1)
.alignItems(HorizontalAlign.Start)
.justifyContent(StringUtils.isNotEmpty(this.item.desc)?FlexAlign.Start:FlexAlign.Center)
.height(46)
}.layoutWeight(1)
Column() {
Text(`${this.item.time}`)
.fontColor($r('app.color.color_999999'))
// .fontSize('23lpx')
.fontSize(23)
.fontWeight(500)
// .lineHeight('35lpx')
.lineHeight(35)
// .margin({ bottom: this.item.unReadCount > 0 ?'8lpx':0 })
.margin({ bottom: this.item.unReadCount > 0 ? 8 : 0 })
.fontSize(14)
.fontWeight(400)
.lineHeight(20)
.margin({ bottom: this.item.unReadCount > 0 ? 4 : 0 })
if(this.item.unReadCount > 0){
Button(){
Text(`${this.item.unReadCount}`)
.fontWeight(400)
// .fontSize("18lpx")
.fontSize(18)
.fontSize(14)
.fontColor($r('app.color.white'))
}
.type((this.item.unReadCount>0 && this.item.unReadCount < 10 ? ButtonType.Circle:ButtonType.Capsule))
.backgroundColor($r("app.color.color_ED2800"))
.stateEffect(false)
// .height("27lpx")
.height(27)
// .constraintSize({minWidth:"27lpx"})
.constraintSize({minWidth: 27})
.height(16)
.constraintSize({minWidth: 16})
}
}
.justifyContent(FlexAlign.Start)
.alignItems(HorizontalAlign.End)
// .height('92lpx')
.height(92)
.height(46)
}
.width('100%')
// .height('92lpx')
.height(92)
.height(46)
.justifyContent(FlexAlign.SpaceBetween)
}
// .height('154lpx')
.height(154)
.height(80)
.width("100%")
.justifyContent(FlexAlign.Center)
Text().backgroundColor($r('app.color.color_EDEDED'))
.width('100%')
// .height('1lpx')
.height(1)
.visibility(this.index != 3 ?Visibility.Visible:Visibility.None)
}
... ...
... ... @@ -180,7 +180,7 @@ export struct MessageListUI {
ListItem() {
MessageListItemUI({ item: item, index: index })
}
.padding({ left: "31lpx", right: "31lpx" })
.padding({ left: 16, right: 16 })
.onClick(() => {
this.messageCenterCommonButtonTracking(index)
switch (index) {
... ... @@ -202,7 +202,7 @@ export struct MessageListUI {
break;
}
})
.height('154lpx')
.height(80)
.width("100%")
})
}
... ...
... ... @@ -148,6 +148,10 @@ struct MyCollectionListPage {
.scrollBar(BarState.Off)
.height(CommonConstants.FULL_PARENT)
.edgeEffect(EdgeEffect.None) // 必须设置列表为滑动到边缘无效果
.margin({
left: 16,
right: 16
})
}
@Builder
... ... @@ -159,7 +163,7 @@ struct MyCollectionListPage {
selectCallback:(isOn)=>{
this.addCompDTO(isOn,compDTO)
}
}).margin({left:16})
}).margin({right: 16})
}
Column() {
BigPicCardComponent({compDTO:new CompDTO,contentDTO:compDTO,pageId:TrackConstants.PageName.My_Collect,pageName:TrackConstants.PageName.My_Collect})
... ...
... ... @@ -13,7 +13,8 @@ import {
ArticleTypeData,
ArticleListData,
PeopleShipUserDetailData,
CompDTO
CompDTO,
ContentDetailDTO
} from 'wdBean'
import { CardParser } from '../CardParser'
import { PageRepository } from '../../repository/PageRepository'
... ... @@ -28,6 +29,7 @@ const TAG = 'PeopleShipHomeArticleListComponent';
@Component
export struct PeopleShipHomeArticleListComponent {
@State arr: ContentDTO[] = []
//@State arrDetailList: ContentDetailDTO[] = []
// @State arr: LazyDataSource<ContentDTO> = new LazyDataSource();
@State typeModel: ArticleTypeData = new ArticleTypeData()
@State creatorId: string = ''
... ... @@ -125,12 +127,19 @@ export struct PeopleShipHomeArticleListComponent {
}
aboutToAppear() {
console.log(TAG, 'cj2024 aboutToAppear')
AppStorage.setOrCreate<string>('peopleShipHomeCreatorId', this.creatorId)
if (this.currentIndex == this.currentTopSelectedIndex) {
this.currentPage = 1
this.getPeopleShipPageArticleList()
}
}
aboutToDisappear(): void {
console.log(TAG, 'cj2024 aboutToDisappear')
AppStorage.setOrCreate<string>('peopleShipHomeCreatorId', '') //清空人民号动态等过来的数据
}
onChange() {
if (this.currentIndex == this.currentTopSelectedIndex && this.arr.length == 0) {
this.currentPage = 1
... ... @@ -223,6 +232,7 @@ export struct PeopleShipHomeArticleListComponent {
}
for (const element of listData.list) {
let contentDTO = new ContentDTO()
//let contentDetailDTO = new ContentDetailDTO()
console.info(TAG, 'element.appStyle'+`${element.appStyle}`)
contentDTO.appStyle = this.changeCommon(element.appStyle)
contentDTO.newsTitle = element.title;
... ...
... ... @@ -13,10 +13,8 @@ export struct CustomTitleAndEditUI {
//标题栏目
if(this.imgBack){
Image($r('app.media.back_icon'))
// .width('46lpx')
.width(46)
// .height('46lpx')
.height(46)
.width(24)
.height(24)
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.High)
.id("back_icon")
... ... @@ -24,24 +22,19 @@ export struct CustomTitleAndEditUI {
center: {anchor: "__container__", align: VerticalAlign.Center},
left: {anchor: "__container__", align: HorizontalAlign.Start}
})
// .margin({left:'31lpx'})
.margin({left: 31})
.margin({left: 16})
.onClick(()=>{
router.back()
})
}
Text(this.titleName)
// .height('42lpx')
.height(42)
.maxLines(1)
.id("title")
// .fontSize('35lpx')
.fontSize(35)
.fontWeight(400)
.fontSize(18)
.fontWeight(500)
.fontColor($r('app.color.color_222222'))
// .lineHeight('42lpx')
.lineHeight(42)
.lineHeight(26)
.alignRules({
center: {anchor: "__container__", align: VerticalAlign.Center},
middle: {anchor: "__container__", align: HorizontalAlign.Center}
... ... @@ -51,22 +44,22 @@ export struct CustomTitleAndEditUI {
Button(this.isEditState === true?'取消':'编辑')
.type(ButtonType.Normal)
.fontColor($r('app.color.color_222222'))
.fontSize(16)
.height(20)
.backgroundColor(Color.White)
.id("edit_Button")
.alignRules({
center: {anchor: "__container__", align: VerticalAlign.Center},
right: {anchor: "__container__", align: HorizontalAlign.End}
})
// .margin({right:'31lpx'})
.margin({right: 31})
.margin({right: 16})
.onClick(()=>{
this.isEditState = !this.isEditState
this.editCallback()
})
}
}
// .height('84lpx')
.height(84)
.height(44)
.width('100%')
.backgroundColor($r('app.color.white'))
... ...
... ... @@ -7,29 +7,27 @@ export struct ListHasNoMoreDataUI{
Row(){
Text("已显示全部内容")
.fontColor($r('app.color.color_999999'))
// .fontWeight('500lpx')
.fontWeight(500)
// .fontSize('23lpx')
.fontSize(23)
.fontWeight(400)
.fontSize(14)
.lineHeight(20)
}.justifyContent(FlexAlign.Center)
.width('100%')
// .margin({top:'20lpx',bottom:'20lpx'})
.margin({top: 20,bottom: 20})
.margin({top: 24,bottom: 24})
}else if (this.style === 2){
Column(){
Image($r('app.media.empty_icon'))
// .width('200lpx')
.width(200)
// .height('200lpx')
.height(200)
.width(160)
.height(112)
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.High)
Text("暂无内容")
.fontColor($r('app.color.color_999999'))
// .fontWeight('500lpx')
.fontWeight(500)
// .fontSize('23lpx')
.fontSize(23)
.fontWeight(400)
.fontSize(14)
.lineHeight(20)
.margin({
top: 6
})
}
.justifyContent(FlexAlign.Center)
.width('100%')
... ...
... ... @@ -149,7 +149,7 @@ export struct LiveLikeComponent {
.textAlign(TextAlign.Center)
.alignRules({
top: { anchor: "__container__", align: VerticalAlign.Top },
left: { anchor: "__container__", align: HorizontalAlign.Start }
right: { anchor: "__container__", align: HorizontalAlign.End }
})
/*动态计算文字宽度*/
.width(this.getMeasureText(NumberFormatterUtils.formatNumberWithWan(this.likeCount || '')) +
... ... @@ -158,10 +158,7 @@ export struct LiveLikeComponent {
.id("Text")
.visibility(this.likeCount > 0 ? Visibility.Visible : Visibility.Hidden)
}
.margin({left:10,top:3})
.offset({
x: 18
})
.margin({right:0,top:3})
}
}
.width(36)
... ...
... ... @@ -103,24 +103,20 @@ struct MineHomePage {
Stack(){
Image(this.headPhotoUrl&&this.headPhotoUrl.length>0?this.headPhotoUrl:(this.userType === "1"?$r('app.media.default_head_userPage'):$r('app.media.AccountOwner_DefaultIcon')))
.alt($r('app.media.default_head'))
.width(60)
.height(60)
.width(64)
.height(64)
.objectFit(ImageFit.Auto)
.clip(new Circle({ width: 60, height: 60 }))
.clip(new Circle({ width: 64, height: 64 }))
Image(this.levelHead)
// .width('165lpx')
.width(165)
// .height('165lpx')
.height(165)
.width(90)
.height(90)
.objectFit(ImageFit.Auto)
}.onClick(()=>{
let params = {'headPhotoUrl': this.headPhotoUrl} as Record<string, string>;
WDRouterRule.jumpWithPage(WDRouterPage.showUserHeaderPage,params)
})
// .width('165lpx')
.width(165)
// .height('165lpx')
.height(165)
.width(90)
.height(90)
Column() {
Row() {
... ... @@ -128,11 +124,8 @@ struct MineHomePage {
.fontColor($r('app.color.white'))
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
// .fontSize('38lpx')
.fontSize(38)
// .lineHeight('50lpx')
.lineHeight(50)
// .fontWeight('500lpx')
.fontSize(20)
.lineHeight(26)
.fontWeight(500)
.onClick(()=>{
let params: editModelParams = {
... ... @@ -144,24 +137,19 @@ struct MineHomePage {
if(this.levelId>0){
Text(`等级${this.levelId}`)
.fontColor($r('app.color.color_ED2800'))
// .fontSize('23lpx')
.fontSize(23)
.fontSize(12)
.lineHeight(18)
.fontWeight(500)
// .margin({ left: '10lpx' })
.margin({ left: 10 })
.margin({ left: 6 })
.backgroundImage($r("app.media.my_grade_bg"))
.backgroundImageSize(ImageSize.Cover)
// .padding({left:"17lpx",right:"8lpx"})
.padding({left: 17,right: 8})
// .height('35lpx')
.height(35)
.padding({left: 6,right: 6})
.height(18)
.borderRadius({topRight:2,bottomRight:2})
}
Blank()
}
// .width('507lpx')
.width(507)
Row() {
Row() {
... ... @@ -170,14 +158,11 @@ struct MineHomePage {
Text("阅读")
.textStyle2()
}
// .margin({ right: '15lpx' })
.margin({ right: 15 })
.margin({ right: 8 })
Divider()
// .height('19lpx')
.height(19)
// .width('2lpx')
.width(2)
.height(10)
.width(1)
.color($r('app.color.white'))
.vertical(true)
.opacity(0.4)
... ... @@ -187,14 +172,11 @@ struct MineHomePage {
Text("评论")
.textStyle2()
}
// .margin({ right: '15lpx', left: '15lpx' })
.margin({ right: 15, left: 15 })
.margin({ right: 8, left: 8 })
Divider()
// .height('19lpx')
.height(19)
// .width('2lpx')
.width(2)
.height(10)
.width(1)
.color($r('app.color.white'))
.vertical(true)
.opacity(0.4)
... ... @@ -204,14 +186,11 @@ struct MineHomePage {
Text("关注")
.textStyle2()
}
// .margin({ left: '15lpx' })
.margin({ left: 15 })
.margin({ left: 8 })
}
// .margin({ top: '23lpx' })
.margin({ top: 23 })
.margin({ top: 12 })
}.alignItems(HorizontalAlign.Start)
// .margin({ left: StringUtils.isEmpty(this.levelHead)?'32lpx':"3lpx" })
.margin({ left: StringUtils.isEmpty(this.levelHead) ? 32 : 3 })
.margin({ left: StringUtils.isEmpty(this.levelHead) ? 16 : 3 })
}
.onAreaChange((oldValue: Area, newValue: Area) => {
if (this.firstPositionY === 0) {
... ... @@ -225,36 +204,32 @@ struct MineHomePage {
}
})
.backgroundColor($r('app.color.color_transparent'))
// .height('184lpx')
.height(184)
.height(86)
.width('100%')
// .padding({ left: '6lpx' })
.padding({ left: 6 })
.padding({ left: 16 })
//用户简介区域
Column() {
Row() {
Text(this.isHasIntroduction?"简介:"+this.desc:this.desc)
// .fontSize('27lpx')
.fontSize(27)
.fontSize(14)
.maxLines(3)
.textOverflow({ overflow: TextOverflow.Ellipsis })
// .lineHeight('40lpx')
.lineHeight(40)
// .fontWeight('400lpx')
.lineHeight(21)
.fontWeight(400)
.fontColor(this.isHasIntroduction?$r('app.color.color_222222'):$r('app.color.color_999999'))
.textAlign(TextAlign.Start)
if(!this.isHasIntroduction){
Image($r('app.media.user_info_edit_icon'))
// .width('27lpx')
.width(27)
// .height('27lpx')
.height(27)
.width(14)
.height(14)
.interpolation(ImageInterpolation.High)
.objectFit(ImageFit.Auto)
.margin({
left: 6
})
}
}.onClick(()=>{
let params: editModelParams = {
... ... @@ -265,28 +240,22 @@ struct MineHomePage {
Text(`来到人民日报${this.registerTimeForDay}天`)
// .fontSize('23lpx')
.fontSize(23)
// .lineHeight('25lpx')
.lineHeight(25)
// .fontWeight('400lpx')
.fontSize(12)
.lineHeight(13)
.fontWeight(400)
.fontColor($r('app.color.color_999999'))
.textAlign(TextAlign.Start)
// .margin({ top: '15lpx' })
.margin({ top: 15 })
.margin({ top: 10 })
}
// .padding({ left: '31lpx',right:'31lpx',top:'19lpx',bottom:'31lpx'})
.padding({ left: 31,right: 31,top: 19,bottom: 31})
.padding({ left: 16,right: 16,top: 12,bottom: 12})
.alignItems(HorizontalAlign.Start)
.justifyContent(FlexAlign.Center)
.width('100%')
.backgroundColor($r('app.color.white'))
//间隔符
// Divider().width('100%').height('12lpx').color($r('app.color.color_F5F5F5')).strokeWidth('12lpx')
Divider().width('100%').height(12).color($r('app.color.color_F5F5F5')).strokeWidth(12)
Divider().width('100%').height(6).color($r('app.color.color_F5F5F5')).strokeWidth(6)
//tab 页面
Stack({ alignContent: Alignment.Top }){
... ... @@ -305,12 +274,11 @@ struct MineHomePage {
trackTabFirstClick(index === 0 ? "评论":"关注")
})
.vertical(false)
// .barHeight("77lpx")
.barHeight(77)
.barHeight(44)
Column() {
// 页签
Row({ space: 7 }) {
Row({ space: 30 }) {
Scroll() {
Row() {
this.TabBuilder(0,"评论")
... ... @@ -322,8 +290,7 @@ struct MineHomePage {
.scrollable(ScrollDirection.Horizontal)
.scrollBar(BarState.Off)
.width('100%')
// .padding({left:'31lpx'})
.padding({left: 31})
.padding({left: 16})
}
.alignItems(VerticalAlign.Bottom)
.width('100%')
... ... @@ -331,8 +298,7 @@ struct MineHomePage {
.backgroundColor($r('app.color.white'))
.alignItems(HorizontalAlign.Start)
.width('100%')
// .height('77lpx')
.height(77)
.height(44)
}
}.width("100%")
}
... ... @@ -343,7 +309,6 @@ struct MineHomePage {
}
.margin({top:px2vp(this.topSafeHeight)})
}.width('100%')
// .padding({bottom:px2vp(this.bottomSafeHeight)})
.layoutWeight(1)
} else {
Column(){
... ... @@ -477,26 +442,18 @@ struct MineHomePage {
@Builder TabBuilder(index: number, title: string) {
Stack(){
Text(title)
// .height('38lpx')
.height(38)
// .fontSize('33lpx')
.fontSize(33)
.fontSize(18)
.fontWeight(this.currentIndex === index ? 600 : 400)
.fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
// .lineHeight('38lpx')
.lineHeight(38)
.lineHeight(20)
if(this.currentIndex === index){
Divider()
// .width('31lpx')
.width(31)
// .height('4lpx')
.height(4)
.width(16)
.height(2)
.color('#ED2800')
// .strokeWidth('4lpx')
.strokeWidth(4)
// .margin({top:'50lpx'})
.margin({top: 50})
.strokeWidth(2)
.margin({top: 35})
.id("divTag")
}
}.onClick(()=>{
... ... @@ -504,12 +461,9 @@ struct MineHomePage {
this.controller.changeIndex(this.currentIndex)
trackTabFirstClick(index === 0 ? "评论":"关注")
})
// .height('77lpx')
.height(77)
// .width('70lpx')
.width(70)
// .margin({right:'29lpx'})
.margin({right: 29})
.height(35)
.width(36)
.margin({right: 30})
}
/**
... ... @@ -589,8 +543,7 @@ struct MineHomePage {
@Extend(Text) function textStyle() {
.fontColor($r('app.color.white'))
.textStyleDefault()
// .margin({ right: '10lpx' })
.margin({ right: 10 })
.margin({ right: 6 })
}
@Extend(Text) function textStyle2() {
... ... @@ -600,12 +553,9 @@ struct MineHomePage {
@Extend(Text) function textStyleDefault() {
.textAlign(TextAlign.Start)
// .fontSize('23lpx')
.fontSize(23)
// .fontWeight('400lpx')
.fontSize(12)
.fontWeight(400)
// .lineHeight('31lpx')
.lineHeight(31)
.lineHeight(16)
}
function trackTabFirstClick(firstLevelTabName: string){
... ...
import { PhotoListBean } from 'wdBean/Index';
import { display, router } from '@kit.ArkUI';
import { ImageDownloadComponent } from '../components/ImageDownloadComponent';
import { MultiPictureDetailItemComponent } from '../components/MultiPictureDetailItemComponent';
import { Action } from 'wdBean';
import { WindowModel } from 'wdKit/Index';
import { SaveNetWorkPictures } from '../components/SaveNetWorkPictures';
const TAG = 'MultiPictureListPage';
... ... @@ -28,10 +28,9 @@ export struct MultiPictureListPage {
pageTransition() {
// PageTransitionEnter({ duration: this.noAnimation ? 0 : 300 })
PageTransitionExit({ duration: !this.noAnimation ? 0 : 300 })
PageTransitionExit({ duration: !this.noAnimation ? 0 : 300 })
}
aboutToAppear(): void {
//获取宽高尺寸
this.screenWidth = this.displayTool.width
... ... @@ -47,17 +46,17 @@ export struct MultiPictureListPage {
onPageShow(): void {
console.log(TAG, 'onPageShow')
WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff'})
WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff' })
}
onPageHide(): void {
console.log(TAG, 'onPageHide')
WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000'})
WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000' })
}
build() {
RelativeContainer() {
Row(){
Row() {
Image($r('app.media.icon_arrow_left_white'))
.width(24)
.height(24)
... ... @@ -121,7 +120,9 @@ export struct MultiPictureListPage {
}
.alignSelf(ItemAlign.Center)
.fontColor(Color.White)
ImageDownloadComponent({ url: this.currentUrl })
// ImageDownloadComponent({ url: this.currentUrl })
SaveNetWorkPictures({ url: this.currentUrl })
}
.margin({
top: 14,
... ... @@ -129,6 +130,7 @@ export struct MultiPictureListPage {
bottom: 14,
right: 0
})
// .backgroundColor(Color.Blue)
.id('e_swiper_titles')
.alignRules({
bottom: { anchor: "__container__", align: VerticalAlign.Bottom },
... ...
import { Logger, ResourcesUtils, EmitterUtils, EmitterEventId } from 'wdKit';
import { HttpUrlUtils, ResponseDTO, WDHttp } from 'wdNetwork';
import { ContentDetailDTO, GetPullAddressBean, InteractDataDTO } from 'wdBean';
import { ContentDetailDTO, GetPullAddressBean, InteractDataDTO, PeopleShipNextListDTO } from 'wdBean';
import { HttpRequest } from 'wdNetwork/src/main/ets/http/HttpRequest';
const TAG = 'ContentDetailRequest';
const mock_switch = false;
export interface RmhPublishNextsParams {
creatorId: string
contentId: string
contentType: number
nextFlag: number
pageSize: number
refreshTime:number
}
export interface ContentDetailRequestParams {
contentId: string
relId: string
... ... @@ -209,6 +218,21 @@ export class ContentDetailRequest {
return url;
}
/**
* 获取号主发布的视频
* */
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
let url = HttpUrlUtils.getHost() + HttpUrlUtils.PUBLISH_NEXT_PATH
url = url + "?creatorId=" + creatorId
+ "&contentId=" + contentId
+ "&contentType=" + contentType
+ "&nextFlag=" + nextFlag
+ "&pageSize=" + pageSize
+ "&refreshTime=" + refreshTime;
console.info(`cj2024 getRmhPublishNextsUrl url = ${url}`)
return url;
}
static getLiveRoomPullStreamUrl(vliveId:string){
let url = HttpUrlUtils.getHost() + HttpUrlUtils.PULL_STREAM_PATH
... ... @@ -230,6 +254,14 @@ export class ContentDetailRequest {
return WDHttp.get<ResponseDTO<ContentDetailDTO[]>>(url)
}
static getRmhPublishNexts(params: RmhPublishNextsParams): Promise<ResponseDTO<PeopleShipNextListDTO>> {
// if (mock_switch) {
// return ContentDetailRequest.getContentDetailDataMock(getContext());
// }
let url = ContentDetailRequest.getRmhPublishNextsUrl(params.creatorId,params.contentId, params.contentType, params.nextFlag, params.pageSize, params.refreshTime)
return WDHttp.get<ResponseDTO<PeopleShipNextListDTO>>(url)
}
/**
... ...
... ... @@ -371,7 +371,7 @@ export struct PlayUIComponent {
left: this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? '40vp' : '16vp',
right: this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? '40vp' : '16vp',
top: 15,
bottom: 15
bottom: 15 + (this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? 15 : 0)
})
.visibility(this.isMenuVisible ? Visibility.Visible : Visibility.None)
}
... ...
import { Action, ContentDetailDTO, InteractDataDTO } from 'wdBean/Index';
import { Action, ContentDetailDTO, ContentDTO, InteractDataDTO, PeopleShipNextListDTO } from 'wdBean/Index';
import { NetworkUtil, WindowModel } from 'wdKit';
import { ContentDetailRequest } from 'wdDetailPlayApi/Index'
import { ResponseDTO } from 'wdNetwork/Index';
... ... @@ -11,7 +11,7 @@ import { EmptyComponent, LottieView } from 'wdComponent/Index';
import { DateTimeUtils } from 'wdKit/Index';
import { TrackConstants, TrackingPageBrowse } from 'wdTracking/Index';
import { AudioSuspensionModel } from 'wdComponent'
import { BusinessError } from '@kit.BasicServicesKit';
import { BusinessError, systemDateTime } from '@kit.BasicServicesKit';
const storage = LocalStorage.getShared();
const TAG = 'DetailVideoListPage'
... ... @@ -19,6 +19,7 @@ const TAG = 'DetailVideoListPage'
@Entry(storage)
@Component
export struct DetailVideoListPage {
@State peopleShipHomeCreatorId: string = '';
private contentId: string = ''
private relId: string = ''
private relType: string = ''
... ... @@ -48,6 +49,30 @@ export struct DetailVideoListPage {
@State isShowAudioCom: boolean = false
@StorageLink('GestureLoadStrategy') GestureLoadStrategy: number = 0
// async getRmhDetail() {
// // 注册监听网络连接
// this.netStatus = undefined
// let netStatus = NetworkUtil.isNetConnected()
// if (netStatus) {
// this.openFullScreen()
// const action: Action = router.getParams() as Action
// if (action) {
// this.contentId = action.params?.contentID || ''
// if (action.params && action.params.extra) {
// this.relId = action.params.extra.relId || ''
// this.relType = action.params.extra.relType || ''
// }
// await this.getContentDetail(this.contentId, this.relId, this.relType)
// }
// await this.queryVideoList()
// // console.log(TAG, 'aboutToAppear', JSON.stringify(action.params))
//
// } else {
// // 无网络
// this.netStatus = 1
// }
// }
async getDetail() {
// 注册监听网络连接
this.netStatus = undefined
... ... @@ -73,11 +98,37 @@ export struct DetailVideoListPage {
}
aboutToAppear() {
this.getDetail()
// 在视频详情页
this.peopleShipHomeCreatorId = AppStorage.get<string>('peopleShipHomeCreatorId') || '';
console.info(`cj2024 peopleShipHomeCreatorId = ${this.peopleShipHomeCreatorId}`)
if (this.peopleShipHomeCreatorId) {
// 从人民号号主传过来的
this.getPeopleShipHomeDetail(this.peopleShipHomeCreatorId);
} else {
// 根据ID重新获取列表
this.getDetail()
}
}
async getPeopleShipHomeDetail(peopleShipHomeCreatorId: string) {
this.openFullScreen();
const action: Action = router.getParams() as Action;
if (action) {
this.contentId = action.params?.contentID || '';
if (action.params && action.params.extra) {
this.relId = action.params.extra.relId || '';
this.relType = action.params.extra.relType || '';
}
console.info(`cj2024 getPeopleShipHomeDetail contentId = ${this.contentId}`)
await this.getContentDetail(this.contentId, this.relId, this.relType)
this.getRmhPublishNexts(peopleShipHomeCreatorId, this.contentId, 1, 1, 10, systemDateTime.getTime(false));
}
}
aboutToDisappear(): void {
// console.log(TAG, 'aboutToDisappear')
// AppStorage.setOrCreate<string>('peopleShipHomeCreatorId', '') //清空人民号动态等过来的数据
this.closeFullScreen()
}
... ... @@ -191,6 +242,76 @@ export struct DetailVideoListPage {
})
}
//获取号主关联视频
async getRmhContentDetail(contentId: string, relId: string, relType: string) {
await ContentDetailRequest.getContentDetail({
contentId: contentId,
relId: relId,
relType: relType
}).then(async (resDTO: ResponseDTO<ContentDetailDTO[]>) => {
console.log(TAG, 'getContentDetail:', JSON.stringify(resDTO.data))
this.isOffLine = resDTO.data == null ? true : false
if (resDTO.data) {
const params: contentListParams = {
contentList: [{
contentId: resDTO.data[0].newsId + '',
contentType: resDTO.data[0].newsType
}]
}
// 批量查询内容当前用户点赞、收藏状态
await ContentDetailRequest.getContentInteract(params).then(res => {
if (res.data) {
this.interactDataList = this.interactDataList.concat(res.data)
}
// console.log('获取互动点赞等数据===', JSON.stringify(res))
})
this.data.push(resDTO.data[0])
}
})
}
/**
* 获取号主相关视频
creatorId 创作者id
contentId 播放视频id
contentType 1-视频
nextFlag 0:上页,1:下页
pageSize 10 返回数量
refreshTime 1694073009294
* */
async getRmhPublishNexts(creatorId: string, contentId: string, contentType: number,nextFlag: number,pageSize: number,refreshTime:number) {
await ContentDetailRequest.getRmhPublishNexts({
creatorId: creatorId,
contentId: contentId,
contentType: contentType,
nextFlag: nextFlag,
pageSize: pageSize,
refreshTime: refreshTime
}).then(async (resDTO: ResponseDTO<PeopleShipNextListDTO>) => {
console.log(TAG, 'cj2024 getRmhPublishNexts:', JSON.stringify(resDTO.data))
this.isOffLine = resDTO.data == null ? true : false
if (resDTO.data && resDTO.data.list && resDTO.data.list.length > 0) {
const params: contentListParams = {
contentList: [{
contentId: resDTO.data.list[0].newsId + '',
contentType: resDTO.data.list[0].newsType
}]
}
// 批量查询内容当前用户点赞、收藏状态
await ContentDetailRequest.getContentInteract(params).then(res => {
if (res.data) {
this.interactDataList = this.interactDataList.concat(res.data)
}
// console.log('获取互动点赞等数据===', JSON.stringify(res))
})
resDTO.data.list.forEach(element => {
this.data.push(element)
});
}
})
}
/**
* 查询视频列表用于翻页
*/
... ... @@ -200,6 +321,7 @@ export struct DetailVideoListPage {
refreshCnt: 1
}).then(async res => {
if (res.data) {
console.log(TAG, 'cj2024 queryVideoList:', JSON.stringify(res.data))
await this.getContentInteract(res.data)
this.data = this.data.concat(res.data)
// console.log('视频列表===', JSON.stringify(res.data))
... ... @@ -279,7 +401,10 @@ export struct DetailVideoListPage {
this.currentIndex = index
if (this.currentIndex === this.data.length - 1) {
// TODO:下拉刷新“努力加载中”
this.queryVideoList()
if (!this.peopleShipHomeCreatorId) {
this.queryVideoList()
}
// this.getRmhPublishNexts(this.peopleShipHomeCreatorId, this.contentId, 1, 1, 10, systemDateTime.getTime(false));
}
})
// 作为手势动画的背景
... ...
... ... @@ -85,7 +85,7 @@ export struct PlayerFullScreenView {
headerBuilder() {
Row() {
Row() {
Image($r(`app.media.ic_back`)).height(24).width(24)
Image($r(`app.media.icon_arrow_left_white`)).height(24).width(24)
.onClick(() => {
this.displayDirection = this.displayDirection == DisplayDirection.VERTICAL ?
DisplayDirection.VIDEO_HORIZONTAL :
... ... @@ -144,12 +144,12 @@ export struct PlayerFullScreenView {
.visibility(this.isDragging ? Visibility.Visible : Visibility.None)
Row() {
Image($r(`app.media.ic_play`)).height(24).width(24)
Image($r(`app.media.ic_play_2`)).height(24).width(24)
.visibility(this.status === PlayerConstants.STATUS_START ? Visibility.None : Visibility.Visible)
.onClick(() => {
this.playerController?.switchPlayOrPause()
})
Image($r(`app.media.ic_pause`)).height(24).width(24)
Image($r(`app.media.ic_pause_2`)).height(24).width(24)
.visibility(this.status === PlayerConstants.STATUS_PAUSE ? Visibility.None : Visibility.Visible)
.onClick(() => {
this.playerController?.switchPlayOrPause()
... ... @@ -196,8 +196,8 @@ export struct PlayerFullScreenView {
.visibility(this.showOperator ? Visibility.Visible : Visibility.Hidden)
.linearGradient({
direction: GradientDirection.Bottom, // 渐变方向
colors: [['rgba(0,0,0,0.5)', 0],
['rgba(1,1,1,0)', 1.0]] // 数组末尾元素占比小于1时满足重复着色效果
colors: [['rgba(1,1,1,0)', 1.0],
['rgba(0,0,0,0.5)', 0]] // 数组末尾元素占比小于1时满足重复着色效果
})
}
... ...
... ... @@ -283,7 +283,7 @@ export struct PlayerTitleView {
@Builder
titleBuilder() {
Text() {
Span(this.clipTitleText(this.getTitle(), 16, 4, this.windowWidth - 234 - vp2px(50)))
Span(this.clipTitleText(this.getTitle(), 16, 4, this.windowWidth - 160 - vp2px(50)))
.fontSize(16)
.fontColor(Color.White)
.lineHeight(22)
... ...
... ... @@ -160,11 +160,14 @@ export struct WDPlayerRenderView {
if (info.size.width > 0 && info.size.height > 0) {
if (!this.liftVideo) {
let ratio = this.videoWidth / this.videoHeight
const height = info.size.width / ratio
Logger.debug(TAG, "ratio = " + ratio + " ==> new height = " + height)
if (this.videoHeight > 0 && this.videoWidth > 0) {
this.xComponentController.setXComponentSurfaceRect({
surfaceWidth: info.size.width,
surfaceHeight: info.size.width / this.videoRatio,
offsetY: this.isPad ? this.topSafeHeight : 0
// offsetY: this.isPad ? this.topSafeHeight : (info.size.height - height) / 2
});
return
}
... ...
import { NetworkUtil, Logger, SPHelper, StringUtils } from 'wdKit';
import { Logger, NetworkUtil, SPHelper, StringUtils } from 'wdKit';
import { ResponseDTO } from 'wdNetwork';
import {
ContentDetailDTO,
InteractDataDTO,
Params,
PhotoListBean,
postInteractBrowsOperateParams,
postBatchAttentionStatusParams,
postInteractAccentionOperateParams,
Params,
InteractDataDTO
postInteractBrowsOperateParams
} from 'wdBean';
import { DateTimeUtils } from 'wdKit/Index';
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
import { SpConstants } from 'wdConstant/Index';
import { common } from '@kit.AbilityKit';
import { CommentDialogView } from 'wdDetailPlayShortVideo/Index';
import { EmptyComponent,
ImageDownloadComponent,
import {
EmptyComponent,
MultiPictureDetailItemComponent,
MultiPictureDetailViewModel,
OperRowListView,
PageRepository,
publishCommentModel,
viewBlogItemInsightIntentShare} from 'wdComponent/Index';
import { ParamType, TrackConstants, TrackingButton, TrackingContent } from 'wdTracking/Index';
SaveNetWorkPictures,
viewBlogItemInsightIntentShare
} from 'wdComponent/Index';
import { ParamType, TrackConstants, TrackingContent } from 'wdTracking/Index';
const TAG = 'MultiPictureDetailPageComponent';
/**
* 多图(图集详情页)UI
*/
... ... @@ -96,7 +99,7 @@ export struct MultiPictureDetailPageComponent {
this.contentTrackingDict()
}
contentTrackingDict(){
contentTrackingDict() {
this.pageParam = {
'contentType': `${this.contentDetailData.newsType}`,
'contentId': `${this.contentDetailData.newsId}`,
... ... @@ -138,6 +141,7 @@ export struct MultiPictureDetailPageComponent {
bottom: { anchor: "__container__", align: VerticalAlign.Bottom },
middle: { anchor: "__container__", align: HorizontalAlign.Center }
})
CommentDialogView({
index: $index,
currentIndex: $currentIndex,
... ... @@ -156,7 +160,7 @@ export struct MultiPictureDetailPageComponent {
@Builder
rmh() {
if (!this.showDownload) {
Row(){
Row() {
Row() {
Row({ space: 8 }) {
if (this.getImgUrl()) {
... ... @@ -257,7 +261,7 @@ export struct MultiPictureDetailPageComponent {
Image($r('app.media.add'))
.width(12)
.height(12)
.margin({right: 3})
.margin({ right: 3 })
Text('关注').fontSize(12).fontColor(0xffffff)
}.alignItems(VerticalAlign.Center)
... ... @@ -268,7 +272,8 @@ export struct MultiPictureDetailPageComponent {
.height(24)
.onClick(() => {
this.handleAccention()
}).visibility(this.isShowButton ? Visibility.Visible : Visibility.None)
})
.visibility(this.isShowButton ? Visibility.Visible : Visibility.None)
} else {
Button({ type: ButtonType.Normal, stateEffect: true }) {
Row() {
... ... @@ -281,7 +286,8 @@ export struct MultiPictureDetailPageComponent {
.height(24)
.onClick(() => {
this.handleAccention()
}).visibility(this.isShowButton ? Visibility.Visible : Visibility.None)
})
.visibility(this.isShowButton ? Visibility.Visible : Visibility.None)
}
}
... ... @@ -429,6 +435,7 @@ export struct MultiPictureDetailPageComponent {
ListItem() {
this.ListItemTitle()
}
ListItem() {
this.ListItemDescription()
}
... ... @@ -499,11 +506,18 @@ export struct MultiPictureDetailPageComponent {
}
if (this.contentDetailData.photoList?.[this.swiperIndex].picPath) {
ImageDownloadComponent({ url: this.contentDetailData.photoList?.[this.swiperIndex].picPath })
// ImageDownloadComponent({ url: this.contentDetailData.photoList?.[this.swiperIndex].picPath })
// .parallelGesture(
// TapGesture()
// .onAction((event: GestureEvent) => {
// TrackingContent.download(1,TrackConstants.PageName.Atlas_Detail,TrackConstants.PageName.Atlas_Detail,this.pageParam)
// }))
SaveNetWorkPictures({ url: this.contentDetailData.photoList?.[this.swiperIndex].picPath })
.parallelGesture(
TapGesture()
.onAction((event: GestureEvent) => {
TrackingContent.download(1,TrackConstants.PageName.Atlas_Detail,TrackConstants.PageName.Atlas_Detail,this.pageParam)
TrackingContent.download(1, TrackConstants.PageName.Atlas_Detail, TrackConstants.PageName.Atlas_Detail,
this.pageParam)
}))
}
}
... ... @@ -521,7 +535,10 @@ export struct MultiPictureDetailPageComponent {
@Builder
noNet() {
EmptyComponent({
emptyType: 1, emptyButton: true, isBlack: true, retry: () => {
emptyType: 1,
emptyButton: true,
isBlack: true,
retry: () => {
this.getDetail()
}
})
... ... @@ -659,10 +676,12 @@ export struct MultiPictureDetailPageComponent {
// console.log(TAG, '关注号主==', JSON.stringify(res.data))
if (this.followStatus == '1') {
this.followStatus = '0'
TrackingContent.follow(true,this.followUserId,this.followUserName,TrackConstants.PageName.Atlas_Detail,TrackConstants.PageName.Atlas_Detail,this.pageParam)
TrackingContent.follow(true, this.followUserId, this.followUserName, TrackConstants.PageName.Atlas_Detail,
TrackConstants.PageName.Atlas_Detail, this.pageParam)
} else {
this.followStatus = '1'
TrackingContent.follow(false,this.followUserId,this.followUserName,TrackConstants.PageName.Atlas_Detail,TrackConstants.PageName.Atlas_Detail,this.pageParam)
TrackingContent.follow(false, this.followUserId, this.followUserName, TrackConstants.PageName.Atlas_Detail,
TrackConstants.PageName.Atlas_Detail, this.pageParam)
}
})
}
... ...
... ... @@ -48,6 +48,7 @@ export struct VideoChannelPage {
async aboutToAppear() {
// 背景图高度
this.backgroundImageH = px2vp(this.topSafeHeight) + 44
console.info(`cj2024 backgroundImageH = ${this.backgroundImageH} this.topSafeHeight = ${this.topSafeHeight}`)
this.setBarBackgroundColor()
}
... ... @@ -88,12 +89,13 @@ export struct VideoChannelPage {
* @returns
*/
tabSelectedColor(selected: boolean): string {
console.info(`cj2024 selected this.navItem.channelChooseColor=${this.navItem.channelChooseColor}`)
console.info(`cj2024 selected this.navItem.channelChooseColor=${this.navItem.channelChooseColor} selected = ${selected}`)
if (selected) {
return this.navItem.channelChooseColor ? this.navItem.channelChooseColor : '#222222'
} else {
let ccolor = this.navItem.channelChooseCColor.replace('#', '#B3')
return this.navItem.channelChooseCColor ? ccolor : '#666666'
let ccolor = this.navItem.channelChooseCColor.replace('#', '#99')
let defaultColor = this.isImmerseChannel() ? '#99FFFFFF' : '#222222'
return this.navItem.channelChooseCColor ? ccolor : defaultColor
}
}
... ... @@ -105,6 +107,7 @@ export struct VideoChannelPage {
this.topNavView()
}
.backgroundColor(this.isImmerseChannel()? Color.Black : Color.White)
.width('100%')
.height('100%')
}
... ... @@ -172,13 +175,13 @@ export struct VideoChannelPage {
// 搜索按钮
Row() {
Image($r(this.isImmerseChannel() ? 'app.media.icon_search' :
Image($r(this.isImmerseChannel() ? 'app.media.icon_search_gray_svg' :
'app.media.icon_search'))
.colorFilter(this.isImmerseChannel() ? undefined :
ColorUtils.getDrawingColorFilter(this.getBothColor("")))
.width('24vp')
.height('24vp')
.opacity(this.isImmerseChannel() ? 0.8 : 1.0)
// .opacity(this.isImmerseChannel() ? 0.8 : 1.0)
}
.width('40vp')
.margin({
... ... @@ -207,11 +210,12 @@ export struct VideoChannelPage {
top: px2vp(this.topSafeHeight)
})
.visibility(this.displayDirection === DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None)
.linearGradient({
colors: [
['rgba(18, 18, 18, 0.5)', 0.0], ['rgba(18, 18, 18, 0.0)', 1.0]
]
})
// .backgroundColor(Color.Blue)
// .linearGradient(this.isImmerseChannel() ? {
// colors: [
// ['rgba(18, 18, 18, 0.5)', 0.0], ['rgba(18, 18, 18, 0.0)', 1.0]
// ]
// } : undefined)
}
/**
... ... @@ -269,6 +273,7 @@ export struct VideoChannelPage {
}
}, (item: TopNavDTO) => item.channelId + '')
}
.position({y:3})//顶部遮罩会空出一点,临时解决
.indicator(false)
.loop(false)
.width('100%')
... ...