Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
陈剑华
2024-09-05 15:49:09 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
0ba9405fd9258cfb5dd9dfcc5092e532960ed0f5
0ba9405f
2 parents
cec56a0c
c737a51e
Merge remote-tracking branch 'origin/main'
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
233 additions
and
116 deletions
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card19Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentCustomDialog.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/HomePageBottomCommentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/EditUserInfoPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/reusable/ListHasNoMoreDataUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/EmptyComponent.ets
sight_harmony/features/wdComponent/src/main/ets/model/EditInfoModel.ets
sight_harmony/features/wdComponent/src/main/ets/pages/MineHomePage.ets
sight_harmony/features/wdComponent/src/main/ets/repository/PageRepository.ets
sight_harmony/features/wdComponent/src/main/ets/viewmodel/EditInfoViewModel.ets
sight_harmony/features/wdComponent/src/main/ets/viewmodel/MineUserDetailItem.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/TabChatItemComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerUIComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerVideoControlComponent.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerTitleView.ets
sight_harmony/features/wdHwAbility/src/main/ets/aliOSS/OSSUploadManager.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card19Component.ets
View file @
0ba9405
...
...
@@ -191,7 +191,7 @@ struct createImg {
}) {
ForEach(this.fullColumnImgUrls, (item: FullColumnImgUrlDTO, index: number) => {
if (this.fullColumnImgUrls.length === 1) {
if (this.getPicType(item.weight, item.height)
!==
3) {
if (this.getPicType(item.weight, item.height)
<
3) {
GridCol({
span: this.getPicType(item.weight, item.height) === 1 ? 12 : 8
}){
...
...
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentCustomDialog.ets
View file @
0ba9405
import { inputMethodEngine } from '@kit.IMEKit'
import { commentInfo } from 'wdBean/Index'
import { VoiceRecoginizer } from 'wdHwAbility'
import { ToastUtils } from 'wdKit/Index'
import {
Logger,
ToastUtils } from 'wdKit/Index'
import { HttpUtils } from 'wdNetwork/Index'
import { commentItemModel } from '../model/CommentModel'
import { publishCommentModel } from '../model/PublishCommentModel'
...
...
@@ -9,6 +9,8 @@ import commentViewModel from '../viewmodel/CommentViewModel'
import { VoiceInputView } from './VoiceInputView'
import { common, UIAbility } from '@kit.AbilityKit'
const TAG = "CommentInputDialog"
export interface CommentDialogInputContent {
comment?: string
imageUrl?: string
...
...
@@ -213,15 +215,16 @@ export struct CommentCustomDialog {
struct emojiView {
@ObjectLink publishCommentModel: publishCommentModel
/*没找到获取系统emoji的方案*/
private emojiString = '😀,😁,😂,😃,😄,😅,😆,😇,😈,😉,😊,😋,😌,😍,😎,😏,😐,😑,😒,😓,😔,😕,😖,😗,😘,😙,😚,😛,😜,😝,😞,😟,😠,😡,😢,😣,😤,😥,😦,😧,😨,😩,😪,😫,😬,😭,😮,😯,😰,😱,😲,😳,😴,😵,😶,😷,😸,😹,😺,😻,😼,😽,😾,😿,🙀,🙅,🙆,🙇,🙈,🙉,🙊,🙋,🙌,🙍,🙎,🙏'
private displayArray: string[][] = []
private emojiArray = ["😀","😁","😂","😃","😄","😅","😆","😇","😈","😉","😊","😋","😌","😍","😎","😏","😐","😑","😒","😓","😔","😕","😖","😗","😘","😙","😚","😛","😜","😝","😞","😟","😠","😡","😢","😣","😤","😥","😦","😧","😨","😩","😪","😫","😬","😭","😮","😯","😰","😱","😲","😳","😴","😵","😶","😷","😸","😹","😺","😻","😼","😽","😾","😿","🙀","🙅","🙆","🙇","🙈","🙉","🙊","🙋","🙌","🙍","🙎","🙏"]
// private emojiCharCodeArray: number[] = []
private displayArray: string[][] = []
private swiperController: SwiperController = new SwiperController()
aboutToAppear(): void {
this.displayArray = chunk(this.emojiString.split(','), 20)
// this.emojiCharCodeArray = this.emojiArray.map((a) => { return a.charCodeAt(0) })
this.displayArray = chunk(this.emojiArray, 20)
//补上删除按钮以及空白占位
let lastElement = this.displayArray.slice(-1)[0];
...
...
@@ -260,10 +263,27 @@ struct emojiView {
// .backgroundColor(Color.Orange)
}.onClick(() => {
if (emoji == '删除') {
this.publishCommentModel.commentContent = this.publishCommentModel.commentContent.substring(0, this.publishCommentModel.commentContent.length -1)
let content = this.publishCommentModel.commentContent
// if (content.length > 3) {
// if (isEmojiCharacter(content.substring(content.length-4))) {
// content = content.substring(0, content.length -4)
// this.publishCommentModel.commentContent = content
// return
// }
// }
if (content.length > 1) {
if (isEmojiCharacter(content.substring(content.length-2))) {
content = content.substring(0, content.length -2)
this.publishCommentModel.commentContent = content
return
}
}
content = content.substring(0, content.length -1)
this.publishCommentModel.commentContent = content
} else if (emoji == '') {
} else {
Logger.debug(TAG, "charCode: " + emoji.charCodeAt(0) + " ==> " + emoji)
this.publishCommentModel.commentContent = this.publishCommentModel.commentContent + emoji
}
...
...
@@ -295,6 +315,45 @@ function chunk<T>(array: T[], size: number): T[][] {
return result;
}
// https://blog.csdn.net/liaowenfeng/article/details/120484855
function isEmojiCharacter(substring: string): boolean {
for (let i = 0; i < substring.length; i++) {
let hs = substring.charCodeAt(i);
if (0xd800 <= hs && hs <= 0xdbff) {
if (substring.length > 1) {
let ls = substring.charCodeAt(i + 1);
let uc = ((hs - 0xd800) * 0x400) + (ls - 0xdc00) + 0x10000;
if (0x1d000 <= uc && uc <= 0x1f77f) {
return true;
}
if (0x1f900 <= uc && uc <= 0x1f9ff) {
// SupplementalSymBolsAndPictographs 字符串含有表情字符[U+1F900,U+1F90F]
// https://www.fileformat.info/info/unicode/block/supplemental_symbols_and_pictographs/index.htm
// https://www.fileformat.info/info/unicode/char/1f964/index.htm
return true;
}
}
}
else if (substring.length > 1) {
let ls = substring.charCodeAt(i + 1);
if (ls == 0x20e3) {
return true;
}
} else {
if (0x2100 <= hs && hs <= 0x27ff) {
return true;
} else if (0x2B05 <= hs && hs <= 0x2b07) {
return true;
} else if (0x2934 <= hs && hs <= 0x2935) {
return true;
} else if (0x3297 <= hs && hs <= 0x3299) {
return true;
} else if (hs == 0xa9 || hs == 0xae || hs == 0x303d || hs == 0x3030 ||
hs == 0x2b55 || hs == 0x2b1c || hs == 0x2b1b ||
hs == 0x2b50) {
return true;
}
}
}
return false;
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/HomePageBottomCommentComponent.ets
View file @
0ba9405
import { DateTimeUtils, LazyDataSource, UserDataLocal } from 'wdKit';
import { DateTimeUtils,
DisplayUtils,
LazyDataSource, UserDataLocal } from 'wdKit';
import MinePageDatasModel from '../../../model/MinePageDatasModel';
import { CommentListItem } from '../../../viewmodel/CommentListItem';
import { FollowListDetailRequestItem } from '../../../viewmodel/FollowListDetailRequestItem';
...
...
@@ -27,7 +27,7 @@ export struct HomePageBottomCommentComponent {
@Link commentNum: number
@State isGetRequest: boolean = false
private scroller: Scroller = new Scroller();
@State bottomCompH:number = 200
aboutToAppear() {
this.getNewPageData()
}
...
...
@@ -107,7 +107,7 @@ export struct HomePageBottomCommentComponent {
//没有更多数据 显示提示
if (!this.hasMore) {
ListItem() {
ListHasNoMoreDataUI()
ListHasNoMoreDataUI()
.height(this.bottomCompH > 100 ? this.bottomCompH :100)
}
}
}
...
...
@@ -172,6 +172,7 @@ export struct HomePageBottomCommentComponent {
parentCommentUserName))
})
this.bottomCompH = DisplayUtils.getDeviceHeight() - data.length*180
if (status.commentIdList.length === 0) {
if (this.curPageNum === 1) this.data_comment.clear()
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/EditUserInfoPage.ets
View file @
0ba9405
...
...
@@ -16,6 +16,7 @@ import { SPHelper } from 'wdKit/Index';
import { SpConstants } from 'wdConstant/Index';
import { photoPickerUtils} from '../../utils/PhotoPickerUtils';
import { cameraPickerUtils } from '../../utils/CameraPickerUtils';
import { OSSConfigSceneType, OSSFileType, OSSUploadManager, UploadResourceParams } from 'wdHwAbility';
@Entry
@Component
...
...
@@ -102,18 +103,37 @@ struct EditUserInfoPage {
photoPickerUtils.getPhotoPicker(1).then(value => {
if (value['photoUris'].length > 0) {
this.headerImg = value['photoUris'][0]
this.photoCommit()
}
})
}else {
cameraPickerUtils.getCamera().then(value => {
if (value.length > 0) {
this.headerImg = value
this.photoCommit()
}
})
}
}
async photoCommit(){
if (this.headerImg.length > 0) {
try {
let results = await OSSUploadManager.sharedManager().uploadFile(this.headerImg,OSSConfigSceneType.userPhone,OSSFileType.image)
let photoUrl = results.ossFile??''
if (photoUrl.length > 0) {
this.currentUserInfo.headPhotoUrl = photoUrl
this.currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_head
this.updateEditModel()
}
} catch (exception) {
console.log('请求失败',JSON.stringify(exception))
}
}
}
aboutToAppear() {
let userType = SPHelper.default.getSync(SpConstants.USER_Type,"") as string
if (userType && userType.length > 0) {
...
...
@@ -145,30 +165,30 @@ struct EditUserInfoPage {
.height(84)
.borderRadius(42)
// if (this.headerImg.length === 0){
// Image('')
// .width('84')
// .height('84')
// .backgroundColor(Color.Gray)
// .opacity(0.7)
// .borderRadius(5)
// .borderRadius(42)
//
// Image($r('app.media.seletct_photo'))
// .width('30')
// .height('30')
// }
if (this.headerImg.length === 0){
Image('')
.width('84')
.height('84')
.backgroundColor(Color.Gray)
.opacity(0.7)
.borderRadius(5)
.borderRadius(42)
Image($r('app.media.seletct_photo'))
.width('30')
.height('30')
}
}.margin({top:20})
.onClick(()=>{
//
this.photoDialogController.open()
this.photoDialogController.open()
})
///目前不支持头像上传,暂时屏蔽
// Button('点击更换头像')
// .fontColor(Color.Gray)
// .fontSize(15)
// .backgroundColor(Color.White)
// .margin({top:10,bottom:20})
Button('点击更换头像')
.fontColor(Color.Gray)
.fontSize(15)
.backgroundColor(Color.White)
.margin({top:10,bottom:20})
List({}){
ForEach(this.listData,(item:EditListInfo,index:number) =>{
...
...
@@ -283,7 +303,9 @@ struct EditUserInfoPage {
EditInfoViewModel.queryAccountOwnerInfo(getContext(this)).then((editModel) => {
this.listData = []
if (editModel.userExtend?.headPhotoUrl) {
this.headerImg = editModel.userExtend.headPhotoUrl
if (this.headerImg.length === 0) {
this.headerImg = editModel.userExtend.headPhotoUrl
}
}
this.currentUserInfo = editModel as editModel;
this.listData.push(...EditInfoViewModel.getEditListInfo(editModel))
...
...
@@ -295,7 +317,9 @@ struct EditUserInfoPage {
this.currentUserInfo.userExtend.introduction = peopleItem.introduction
this.currentUserInfo.userExtend.creatorId = peopleItem.creatorId
this.currentUserInfo.userName = peopleItem.userName
this.headerImg = peopleItem.headPhotoUrl
if (this.headerImg.length === 0) {
this.headerImg = peopleItem.headPhotoUrl
}
this.currentUserInfo.userType = Number(this.userType)
this.currentUserInfo.userExtend.districtCode = peopleItem.district
this.currentUserInfo.userExtend.cityCode = peopleItem.city
...
...
@@ -307,6 +331,7 @@ struct EditUserInfoPage {
}
getAreaList(){
if (this.dataSource.length > 0) return
EditInfoViewModel.getAreaList(getContext(this)).then((value) =>{
this.dataSource.push(...value)
this.getAreaIndex()
...
...
sight_harmony/features/wdComponent/src/main/ets/components/reusable/ListHasNoMoreDataUI.ets
View file @
0ba9405
...
...
@@ -12,7 +12,7 @@ export struct ListHasNoMoreDataUI{
.lineHeight(20)
}.justifyContent(FlexAlign.Center)
.width('100%')
.margin({top:
24,bottom: 24
})
.margin({top:
15
})
}else if (this.style === 2){
Column(){
Image($r('app.media.empty_icon'))
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/EmptyComponent.ets
View file @
0ba9405
import { CommonConstants } from 'wdConstant';
import { Logger } from 'wdKit';
import { router } from '@kit.ArkUI';
const TAG = 'EmptyComponent';
...
...
@@ -108,7 +109,19 @@ export struct EmptyComponent {
}
build() {
this.noProgrammeData();
Stack({alignContent:Alignment.Bottom}) {
this.noProgrammeData();
Image($r("app.media.icon_arrow_left_white"))
.width(24)
.height(24)
.onClick(() => {
router.back();
})
.position({
bottom: 15,
left: 16
})
}
}
/**
...
...
sight_harmony/features/wdComponent/src/main/ets/model/EditInfoModel.ets
View file @
0ba9405
...
...
@@ -74,6 +74,8 @@ export class editModel{
}
export interface editModelParams {
headPhotoUrl?: string;
editContent?: string;
userName?: string;
...
...
sight_harmony/features/wdComponent/src/main/ets/pages/MineHomePage.ets
View file @
0ba9405
...
...
@@ -209,53 +209,55 @@ struct MineHomePage {
.padding({ left: 16 })
//用户简介区域
Column() {
Row() {
Text(this.isHasIntroduction?"简介:"+this.desc:this.desc)
.fontSize(14)
.maxLines(3)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.lineHeight(21)
.fontWeight(400)
.fontColor(this.isHasIntroduction?$r('app.color.color_222222'):$r('app.color.color_999999'))
.textAlign(TextAlign.Start)
Column(){
//用户简介区域
Column() {
Row() {
Text(this.isHasIntroduction?"简介:"+this.desc:this.desc)
.fontSize(14)
.maxLines(3)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.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(14)
.height(14)
.interpolation(ImageInterpolation.High)
.objectFit(ImageFit.Auto)
.margin({
left: 6
})
}
}.onClick(()=>{
let params: editModelParams = {
editContent: this.isHasIntroduction?this.desc:''
}
WDRouterRule.jumpWithPage(WDRouterPage.editUserIntroductionPage,params)
})
if(!this.isHasIntroduction){
Image($r('app.media.user_info_edit_icon'))
.width(14)
.height(14)
.interpolation(ImageInterpolation.High)
.objectFit(ImageFit.Auto)
.margin({
left: 6
})
}
}.onClick(()=>{
let params: editModelParams = {
editContent: this.isHasIntroduction?this.desc:''
}
WDRouterRule.jumpWithPage(WDRouterPage.editUserIntroductionPage,params)
})
Text(`来到人民日报${this.registerTimeForDay}天`)
.fontSize(12)
.lineHeight(13)
.fontWeight(400)
.fontColor($r('app.color.color_999999'))
.textAlign(TextAlign.Start)
.margin({ top: 10 })
}
.padding({ left: 16,right: 16,top: 12,bottom: 12})
.alignItems(HorizontalAlign.Start)
Text(`来到人民日报${this.registerTimeForDay}天`)
.fontSize(12)
.lineHeight(13)
.fontWeight(400)
.fontColor($r('app.color.color_999999'))
.textAlign(TextAlign.Start)
.margin({ top: 10 })
//间隔符
Divider().width('100%').height(6).color($r('app.color.color_F5F5F5')).strokeWidth(6)
}
.padding({ left: 16,right: 16,top: 12,bottom: 12})
}.width('100%')
.backgroundColor($r('app.color.white'))
.alignItems(HorizontalAlign.Start)
.justifyContent(FlexAlign.Center)
.width('100%')
.backgroundColor($r('app.color.white'))
//间隔符
Divider().width('100%').height(6).color($r('app.color.color_F5F5F5')).strokeWidth(6)
//tab 页面
Stack({ alignContent: Alignment.Top }){
...
...
@@ -446,6 +448,7 @@ struct MineHomePage {
.fontWeight(this.currentIndex === index ? 600 : 400)
.fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
.lineHeight(20)
.height(40)
if(this.currentIndex === index){
Divider()
...
...
@@ -453,7 +456,7 @@ struct MineHomePage {
.height(2)
.color('#ED2800')
.strokeWidth(2)
.margin({top:
35
})
.margin({top:
40
})
.id("divTag")
}
}.onClick(()=>{
...
...
@@ -461,7 +464,7 @@ struct MineHomePage {
this.controller.changeIndex(this.currentIndex)
trackTabFirstClick(index === 0 ? "评论":"关注")
})
.height(
35
)
.height(
42
)
.width(36)
.margin({right: 30})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/repository/PageRepository.ets
View file @
0ba9405
...
...
@@ -148,7 +148,10 @@ export class PageRepository {
}
static getInteractDataUrl(params: contentInteractParams) {
let url = HttpUrlUtils.getHost() + HttpUrlUtils.INTERACT_DATA_PATH;
let url = HttpUrlUtils.getHost() + HttpUrlUtils.INTERACT_V2_DATA_PATH;
if (params.contentType == 8 && params.readFlag != 1) {
url = HttpUrlUtils.getHost() + HttpUrlUtils.INTERACT_DATA_PATH;
}
url = url + "?contentId=" + params.contentId
+ "&contentType=" + params.contentType
if (!StringUtils.isEmpty(params.contentRelId)) {
...
...
sight_harmony/features/wdComponent/src/main/ets/viewmodel/EditInfoViewModel.ets
View file @
0ba9405
...
...
@@ -142,6 +142,7 @@ class EditInfoViewModel {
if (item.userType === 1){
if (item.editDataType == WDEditDataModelType.WDEditDataModelType_head) {
this.params = { headPhotoUrl: item.headPhotoUrl }
} else if (item.editDataType == WDEditDataModelType.WDEditDataModelType_nickname) {
this.params = { userName: item.userName }
}
...
...
@@ -176,6 +177,7 @@ class EditInfoViewModel {
}else {
let url = ''
if (item.editDataType == WDEditDataModelType.WDEditDataModelType_head) {
this.params = { headPhotoUrl: item.headPhotoUrl}
url = '/api/rmrb-creator-user/c/rmrb-creator-user/creator/updateIcon'
} else if (item.editDataType == WDEditDataModelType.WDEditDataModelType_nickname) {
this.params = { name: item.userName}
...
...
sight_harmony/features/wdComponent/src/main/ets/viewmodel/MineUserDetailItem.ets
View file @
0ba9405
...
...
@@ -13,6 +13,8 @@ export class MineUserDetailItem{
honoraryIcon = ""//荣誉称号 (优先)
avatarFrame:string = ""//最佳评论员头像框地址
province:string = ""
region:string = ""
}
\ No newline at end of file
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/TabChatItemComponent.ets
View file @
0ba9405
...
...
@@ -4,6 +4,7 @@ import { Logger, StringUtils } from 'wdKit/Index'
import { WDRouterRule } from 'wdRouter'
import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO'
import { LiveMessageOptType, LiveMessageRole } from 'wdBean/src/main/ets/bean/live/LiveRoomBean'
import { LengthMetrics, LengthUnit } from '@kit.ArkUI'
const TAG = "TabChatItemComponent"
...
...
@@ -68,14 +69,20 @@ export struct TabChatItemComponent {
Span(' 主持人 ')
.fontSize(11)
.lineHeight(20)
.textBackgroundStyle({ color: "#70FFC63F", radius: 2 })
.textBackgroundStyle({ color: "#F1EFEB"})
.baselineOffset(new LengthMetrics(5,LengthUnit.PX))
.fontColor('#968562')
.borderRadius(2)
Span(' ')
}
if (this.item.role == LiveMessageRole.guest) {
Span(' 嘉宾 ')
.fontSize(11)
.lineHeight(20)
.textBackgroundStyle({ color: "#70FFC63F", radius: 2 })
.textBackgroundStyle({ color: "#F1EFEB"})
.baselineOffset(new LengthMetrics(5,LengthUnit.PX))
.fontColor('#968562')
.borderRadius(2)
Span(' ')
}
Span("回复了 ").fontColor('#222222')
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerUIComponent.ets
View file @
0ba9405
...
...
@@ -59,7 +59,7 @@ export struct PlayerUIComponent {
}
this.isFullScreen = true
})
.visibility(!this.isFullScreen ? Visibility.Visible : Visibility.Hidden)
.visibility(!this.isFullScreen
&& this.isSmall
? Visibility.Visible : Visibility.Hidden)
.margin({ top: 301}) // 195 + 211 - 105
.position({ x: '96.8%' })
.markAnchor({ x: '96.8%' })
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerVideoControlComponent.ets
View file @
0ba9405
...
...
@@ -62,36 +62,36 @@ export struct PlayerVideoControlComponent {
})
}
//全屏按钮
if(!this.isSmall) {
Image($r('app.media.icon_live_player_full_screen'))
.height(32)
.width(32)
.padding(5)
.borderRadius($r('app.float.vp_16'))
.border({width:0.5})
.borderColor(0x4DFFFFFF)
.backgroundColor(0x4D222222)
.margin({right:10})
.onClick(() => {
WindowModel.shared.setSpecificSystemBarEnabled(false)
this.displayDirection = DisplayDirection.VIDEO_HORIZONTAL
WindowModel.shared.setPreferredOrientation(
window.Orientation.LANDSCAPE)
if(this.playerController){
// if(this.playerController.onVideoSizePlayerUIComponentMethod){
// this.playerController.onVideoSizePlayerUIComponentMethod(1,2)
// }
if(this.playerController.onVideoSizePlayerComponentBack){
this.playerController.onVideoSizePlayerComponentBack(1,2)
}
if(this.playerController.onVideoSizePlayerTitleComponentBack){
this.playerController.onVideoSizePlayerTitleComponentBack(1,2)
}
}
this.isFullScreen = true
})
}
// if(!this.isSmall) {
// Image($r('app.media.icon_live_player_full_screen'))
// .height(32)
// .width(32)
// .padding(5)
// .borderRadius($r('app.float.vp_16'))
// .border({width:0.5})
// .borderColor(0x4DFFFFFF)
// .backgroundColor(0x4D222222)
// .margin({right:10})
// .onClick(() => {
// WindowModel.shared.setSpecificSystemBarEnabled(false)
// this.displayDirection = DisplayDirection.VIDEO_HORIZONTAL
// WindowModel.shared.setPreferredOrientation(
// window.Orientation.LANDSCAPE)
// if(this.playerController){
// // if(this.playerController.onVideoSizePlayerUIComponentMethod){
// // this.playerController.onVideoSizePlayerUIComponentMethod(1,2)
// // }
// if(this.playerController.onVideoSizePlayerComponentBack){
// this.playerController.onVideoSizePlayerComponentBack(1,2)
// }
//
// if(this.playerController.onVideoSizePlayerTitleComponentBack){
// this.playerController.onVideoSizePlayerTitleComponentBack(1,2)
// }
// }
// this.isFullScreen = true
// })
// }
}
.alignItems(VerticalAlign.Center)
// .linearGradient({ angle: 0, colors: [['#99000000', 0], ['#00000000', 1]] })
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerTitleView.ets
View file @
0ba9405
...
...
@@ -71,7 +71,7 @@ export struct PlayerTitleView {
* @returns {string} clipStr 截断后的文本 '啊啊'
*/
clipText(str: string, fontSize: number, maxLines: number, textWidth: number): string {
let strArr: string[] = str.split("")
let strArr: string[] = str.
replace(/\n/g, '').
split("")
let truncateContent: string = '啊啊啊啊啊啊' // ...比正常文字宽度更小,这里使用啊啊啊(任意三个文字)代替计算
let measureTruncateWidth: number = measure.measureText({
textContent: truncateContent,
...
...
@@ -219,7 +219,7 @@ export struct PlayerTitleView {
// } else {
if (this.summary && this.titleLines < 4) {
Text() {
Span(this.clipText(this.summary, 14, this.summaryLines, this.windowWidth - 1
5
0 - vp2px(50)))
Span(this.clipText(this.summary, 14, this.summaryLines, this.windowWidth - 1
6
0 - vp2px(50)))
.fontSize(14)
.fontColor(Color.White)
.lineHeight(21)
...
...
sight_harmony/features/wdHwAbility/src/main/ets/aliOSS/OSSUploadManager.ets
View file @
0ba9405
...
...
@@ -11,7 +11,7 @@ import { putObject } from './upload'
export enum OSSConfigSceneType {
feedback = "feedback",
userPhone = 'userPhone'
}
export enum OSSFileType {
...
...
Please
register
or
login
to post a comment