wangliang_wd

Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool into main

* 'main' of http://192.168.1.42/developOne/harmonyPool:
  fix |> 评论输入框无100字上限限制和提醒,评论输入框无法随着评论内容的输入自适应高度
  fix: 鸿蒙设备视频沉浸式视频色值与按钮接近的时候,整个顶部图标及tab按钮完全看不见
  fix: cms已下线视频稿件,用户访问显示获取内容失败,后台上线该视频稿件后,客户端点击重试按钮,视频起播,播放的非目标页面的稿件
  fix |> 17528 UI还原问题-【uat】详情页骨架图和android不一致
  ref |> 修复竖屏直播背景图不展示问题
  fix: 20364 人民号>推荐,推荐动态内容,号主简介较长时缺少省略,与关注按钮重叠。
  fix |> 19984 图文稿件详情页,播放稿件中的视频,进度滑块与已播放进度条重叠
  fix |> 20499 我的>点击账号进入账号主页,点击查看头像,鸿蒙与安卓展示不一致,见截图
  fix |> 20478 图文稿件详情页,播放稿件中的视频,播放按钮有点糊
  fix |> 20384 隐私政策和用户协议,左上角的返回按钮下方缺少分割线
  fix |> 20113 【uat】账号19066666666 Qa112233进入我的-消息-预约消息页,字体偏大,看图
... ... @@ -323,6 +323,7 @@ export struct WdWebLocalComponent {
}else {
Row() {
Image(this.isPause ? $r('app.media.icon_play') : $r('app.media.icon_pause'))
.interpolation(ImageInterpolation.Medium)
.width(24)
.height(24)
.onClick(() => {
... ...
... ... @@ -121,7 +121,11 @@ export struct RmhTitle {
const time1 = new Date().getTime(); // 今天日期的时间戳
const time2 = new Date(date).getTime(); // 要比较日期的时间戳
const diffDays = Math.round(Math.abs((time1 - time2) / oneDay)); // 两个日期时间戳差值除以一天的毫秒数得到天数,取绝对值并四舍五入
return Math.ceil(diffDays);
return diffDays;
}
showTime() {
return !(this.hideTime && this.getDaysBetweenDates(Number(this.publishTime)) > 2)
}
build() {
... ... @@ -158,7 +162,7 @@ export struct RmhTitle {
// Flex({alignContent: FlexAlign.Start, wrap: FlexWrap.NoWrap}) {
Row() {
if (!(this.hideTime && this.getDaysBetweenDates(Number(this.publishTime)) > 2)) {
if (this.showTime()) {
if (this.publishTime) {
Text(DateTimeUtils.getCommentTime(Number.parseFloat(this.publishTime)))
.fontSize($r("app.float.font_size_12"))
... ... @@ -182,16 +186,19 @@ export struct RmhTitle {
.textAlign(TextAlign.Start)
.height(14)
.lineHeight(14)
.constraintSize({maxWidth:(DisplayUtils.getDeviceWidth() - 32 - 36 - 18 - this.getTextWidth(DateTimeUtils.getCommentTime(Number.parseFloat(this.publishTime))))})
.width('calc(100% - 54vp)')
// .constraintSize({maxWidth:(DisplayUtils.getDeviceWidth() - 32 - 36 - 18 - this.getTextWidth(DateTimeUtils.getCommentTime(Number.parseFloat(this.publishTime))))})
}
}
.height(14)
.align(Alignment.Start)
.width('100%')
// }
// .width('calc(100% - 36vp - 8vp)')
}
.justifyContent(FlexAlign.SpaceBetween)
.width('100%')
Blank()
if (this.rmhInfo?.cnIsAttention) {
... ... @@ -207,14 +214,17 @@ export struct RmhTitle {
.fontSize($r('app.float.font_size_13'))
.fontColor(Number(this.followStatus) === 0 ? $r('app.color.color_ED2800') : 0xc6c6c6)
}.margin({top:4})
.height(36)
}
.flexShrink(0)
.onClick(() => {
this.handleAccention();
})
.height(36)
}
}
.width(CommonConstants.FULL_WIDTH)
.height(36)
.margin({ bottom: 10 })
.onClick(()=>{
///个人主页 动态头像不能跳转
... ...
... ... @@ -36,6 +36,8 @@ export struct CommentCustomDialog {
textInputController: TextAreaController = new TextAreaController()
@State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 }
@State publishButtonOpacity: number = 0.5
@State inputViewHeight: number = 80
@Provide maxInputLength: number = 100
aboutToAppear(): void {
}
... ... @@ -98,15 +100,32 @@ export struct CommentCustomDialog {
.width('100%')
.backgroundColor($r('app.color.color_transparent'))
.caretColor("#ED2800")
.maxLength(this.maxInputLength)
.onWillInsert(data => {
if (this.publishCommentModel.commentContent.length + data.insertValue.length > this.maxInputLength) {
ToastUtils.showToast("已达到输入上限", 3000)
return false
}
return true
})
.onChange(value => {
this.publishCommentModel.commentContent = value;
if ((this.textInputController.getTextContentLineCount() - 3) > 0) {
this.inputViewHeight = 80 + (this.textInputController.getTextContentLineCount() - 3) * 18
}
if (value.length > 0) {
this.publishButtonOpacity = 1.0
} else {
this.publishButtonOpacity = 0.5
}
})
.onPaste(value => {
if (this.publishCommentModel.commentContent.length + value.length > this.maxInputLength) {
ToastUtils.showToast("已达到输入上限", 3000)
}
})
.onFocus(() => {
if (this.emojiSwitch) {
this.emojiSwitch = false
... ... @@ -119,7 +138,7 @@ export struct CommentCustomDialog {
.backgroundColor('#F9F9F9')
// .width('100%')
.margin({ top: 12, right: 12, left: 12, bottom:10})
.height(80)
.height(this.inputViewHeight)
.borderRadius(4)
Row() {
... ... @@ -198,7 +217,24 @@ export struct CommentCustomDialog {
}
if (this.voiceSwitch) {
VoiceInputView({voiceRecoginizerResult:(result: string) => {
this.publishCommentModel.commentContent = result;
let beforeStr = ""
let afterStr = ""
const offset = this.textInputController.getCaretOffset().index
if (offset > 0) {
beforeStr = this.publishCommentModel.commentContent.slice(0, offset)
}
if (offset < this.publishCommentModel.commentContent.length) {
afterStr = this.publishCommentModel.commentContent.slice(offset)
}
if (this.publishCommentModel.commentContent.length + result.length > this.maxInputLength) {
let length = this.maxInputLength - this.publishCommentModel.commentContent.length
if (length < result.length) {
result.substring(0, length)
}
ToastUtils.showToast("已达到输入上限", 3000)
}
this.publishCommentModel.commentContent = beforeStr + result + afterStr
}}).height(150)
}
... ... @@ -213,6 +249,7 @@ export struct CommentCustomDialog {
@Component
struct emojiView {
@Consume maxInputLength: number
@ObjectLink publishCommentModel: publishCommentModel
/*没找到获取系统emoji的方案*/
private emojiArray = ["😀","😁","😂","😃","😄","😅","😆","😇","😈","😉","😊","😋","😌","😍","😎","😏","😐","😑","😒","😓","😔","😕","😖","😗","😘","😙","😚","😛","😜","😝","😞","😟","😠","😡","😢","😣","😤","😥","😦","😧","😨","😩","😪","😫","😬","😭","😮","😯","😰","😱","😲","😳","😴","😵","😶","😷","😸","😹","😺","😻","😼","😽","😾","😿","🙀","🙅","🙆","🙇","🙈","🙉","🙊","🙋","🙌","🙍","🙎","🙏"]
... ... @@ -284,6 +321,10 @@ struct emojiView {
} else {
Logger.debug(TAG, "charCode: " + emoji.charCodeAt(0) + " ==> " + emoji)
if (this.publishCommentModel.commentContent.length + emoji.length > this.maxInputLength) {
ToastUtils.showToast("已达到输入上限", 3000)
return
}
this.publishCommentModel.commentContent = this.publishCommentModel.commentContent + emoji
}
... ...
... ... @@ -9,9 +9,8 @@ export struct SubscribeListChildComponent{
Row(){
Text(`${this.item.dealTime}`)
.margin({top:16,bottom:12})
.fontWeight(400)
.fontSize(12)
.lineHeight(17)
.lineHeight(16)
.fontColor($r('app.color.color_999999'))
}.width('100%')
.backgroundColor($r('app.color.color_F5F5F5'))
... ... @@ -45,7 +44,6 @@ export struct SubscribeListChildComponent{
Text(`${this.item.desc}`)
.fontSize(14)
.lineHeight(20)
.fontWeight(400)
.fontColor($r('app.color.color_222222'))
.layoutWeight(1)
}.alignItems(VerticalAlign.Center)
... ...
... ... @@ -5,8 +5,10 @@ export struct CustomTitleUI {
imgBack:boolean = true
titleName:ResourceStr = "默认标题"
@Prop percent:number = 1
isShowBottomLine:boolean = false
build() {
Column(){
RelativeContainer() {
//标题栏目
if(this.imgBack){
... ... @@ -43,6 +45,13 @@ export struct CustomTitleUI {
.height(44)
.width('100%')
.backgroundColor($r('app.color.white'))
if(this.isShowBottomLine){
Text().backgroundColor($r('app.color.color_EDEDED'))
.width('100%')
.height(1)
}
}
}
calcHeight(value:number): number{
... ...
... ... @@ -12,14 +12,14 @@ export struct detailedSkeleton {
Column() {
Column() {
textArea('100%', 20)
textArea('50%', 20)
textArea('52.5%', 20)
}
.SkeletonStyle()
.alignItems(HorizontalAlign.Start)
Column() {
textArea('30%', 12)
textArea('30%', 12)
textArea('23%', 12)
textArea('23%', 12)
}
.SkeletonStyle()
.alignItems(HorizontalAlign.Start)
... ...
... ... @@ -14,10 +14,9 @@ struct ShowUserHeaderPage {
Row() {
Image(this.headPhotoUrl)
.alt($r('app.media.default_head'))
.width('720lpx')
.height('720lpx')
.width('100%')
.objectFit(ImageFit.Auto)
.clip(new Circle({ width: '720lpx', height: '720lpx' }))
// .clip(new Circle({ width: '720lpx', height: '720lpx' }))
}
.width('100%')
.height('100%')
... ...
... ... @@ -143,7 +143,7 @@ export struct DetailPlayVLivePage {
Stack({ alignContent: Alignment.Top }) {
// 直播背景图,模糊处理
Image(this.liveDetailPageLogic.imgUrl)
Image(this.liveDetailPageLogic.getLiveCoverUrl())
.height('100%')
.width('100%')
.blur(100)
... ...
... ... @@ -84,4 +84,11 @@ export class LiveDetailPageLogic {
}
}
getLiveCoverUrl() {
if (this.contentDetailData.fullColumnImgUrls.length > 0) {
return this.contentDetailData.fullColumnImgUrls[0].url
}
return ''
}
}
\ No newline at end of file
... ...
... ... @@ -88,7 +88,6 @@ export struct DetailVideoListPage {
}
await this.getContentDetail(this.contentId, this.relId, this.relType)
}
await this.queryVideoList()
// console.log(TAG, 'aboutToAppear', JSON.stringify(action.params))
} else {
... ... @@ -100,7 +99,7 @@ export struct DetailVideoListPage {
aboutToAppear() {
// 在视频详情页
this.peopleShipHomeCreatorId = AppStorage.get<string>('peopleShipHomeCreatorId') || '';
// console.info(`cj2024 peopleShipHomeCreatorId = ${this.peopleShipHomeCreatorId}`)
// console.info(TAG, `cj2024 peopleShipHomeCreatorId = ${this.peopleShipHomeCreatorId}`)
if (this.peopleShipHomeCreatorId) {
// 从人民号号主传过来的
this.getPeopleShipHomeDetail(this.peopleShipHomeCreatorId);
... ... @@ -246,6 +245,8 @@ export struct DetailVideoListPage {
// console.log('获取互动点赞等数据===', JSON.stringify(res))
})
this.data.push(resDTO.data[0])
// console.log(TAG, 'getContentDetail 视频列表===', JSON.stringify(this.data))
await this.queryVideoList()
}
})
}
... ... @@ -332,7 +333,7 @@ export struct DetailVideoListPage {
// 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))
// console.log(TAG, 'queryVideoList 视频列表===', JSON.stringify(this.data))
}
})
}
... ...
... ... @@ -70,7 +70,12 @@ struct LoginProtocolWebview {
}
.alignItems(VerticalAlign.Center)
.width('100%')
.height(44)
.height(43)
Text().backgroundColor("#EDEDED")
.width('100%')
.height(1)
if(this.isConnectNetwork){
Web({ src: this.webUrl, controller: this.webviewController })
.backgroundColor(Color.White)
... ...
... ... @@ -232,15 +232,15 @@ export struct VideoChannelPage {
.backgroundColor(Color.Transparent)
}
//顶部渐变遮罩
// .linearGradient({
// colors: [
// ['rgba(0, 0, 0, 0.0)', 0.0], ['rgba(0, 0, 0, 0.3)', 1.0]
// ]
// })
.zIndex(20)
.height($r('app.float.top_tab_bar_height_common'))
.margin({
.height(44 + px2vp(this.topSafeHeight))
//顶部渐变遮罩
.linearGradient({
direction: GradientDirection.Top, // 渐变方向
colors: this.currentTopNavSelectedIndex === 0 ? [['rgba(18, 18, 18, 0)', 0],
['rgba(18, 18, 18, 0.5)', 1.0]] : []// 数组末尾元素占比小于1时满足重复着色效果
})
.padding({
top: px2vp(this.topSafeHeight)
})
.visibility(this.displayDirection === DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None)
... ...