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
liyubing
2024-05-15 18:52:18 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
ec03bf3f165c188f1f1f71d9103581e3ed168ebf
ec03bf3f
2 parents
7cc07ab2
53e504b6
Merge remote-tracking branch 'origin/main'
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
97 additions
and
37 deletions
sight_harmony/commons/wdKit/src/main/ets/utils/DeviceUtil.ets
sight_harmony/features/wdComponent/src/main/ets/components/CompParser.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card10Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card5Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentTabComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhGridLayout02.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhGridLayout03.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/EditUserInfoPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/EditUserIntroductionPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/EditUserNikeNamePage.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/MyCollectionListPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/LikeComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/areaPickerDialog/AreaPickerDialog.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/areaPickerDialog/FirstLevelComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/areaPickerDialog/SecondLevelComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/areaPickerDialog/ThirdLevelComponent.ets
sight_harmony/features/wdComponent/src/main/ets/viewmodel/EditInfoViewModel.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailPlayShortVideoPage.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/VideoChannelDetail.ets
sight_harmony/products/phone/src/main/ets/entryability/EntryAbility.ets
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchInterestsHobbiesPage.ets
sight_harmony/commons/wdKit/src/main/ets/utils/DeviceUtil.ets
View file @
ec03bf3
...
...
@@ -82,4 +82,20 @@ export class DeviceUtil {
static getRandomUUIDForTraceID(): string {
return util.generateRandomUUID().toUpperCase().replace(/-/g, '')
}
/**
* 是否为phone设备(可折叠手机即便完全展开状态也返回true)
* @returns
*/
static isPhone(): boolean {
return deviceInfo.deviceType == 'phone' || deviceInfo.deviceType == 'default';
}
static isNotPhone(): boolean {
return !DeviceUtil.isPhone();
}
static isTablet(): boolean {
return deviceInfo.deviceType == 'tablet';
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/CompParser.ets
View file @
ec03bf3
...
...
@@ -105,8 +105,10 @@ export struct CompParser {
// ZhSingleColumn05({ compDTO: compDTO })
// Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_09) {
Divider().strokeWidth(3).color('#ffffff').padding({ left: 16, right: 16 }).margin({top: -3})
Divider().strokeWidth(6).color('#f5f5f5')
ZhSingleColumn09({ compDTO: this.compDTO })
Divider().strokeWidth(
1).color('#f5f5f5').padding({ left: 16, right: 16 }
)
Divider().strokeWidth(
6).color('#f5f5f5'
)
} else if (this.compDTO.compStyle === CompStyle.Card_Comp_Adv) { // 广告
AdvCardParser({ pageModel: this.pageModel, compDTO: this.compDTO })
//Text(`compIndex = ${compIndex}`).width('100%').fontSize('12fp').fontColor(Color.Red).padding({ left: 16, right: 16 })
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card10Component.ets
View file @
ec03bf3
import { Co
mpDTO, ContentDTO, slideShows, VideoInfo
DTO } from 'wdBean';
import { Co
ntentDTO, slideShows, VideoInfoDTO, Comp
DTO } from 'wdBean';
import { CommonConstants } from 'wdConstant';
import { ProcessUtils } from 'wdRouter';
import { CardSourceInfo } from '../cardCommon/CardSourceInfo';
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card5Component.ets
View file @
ec03bf3
...
...
@@ -71,7 +71,7 @@ export struct Card5Component {
}
.width(CommonConstants.FULL_WIDTH)
.fontColor(Color.White)
.fontSize($r('app.float.
normal_text_size
'))
.fontSize($r('app.float.
font_size_17
'))
.fontWeight(FontWeight.Bold)
.maxLines(2)
.align(Alignment.TopStart)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentTabComponent.ets
View file @
ec03bf3
...
...
@@ -190,6 +190,7 @@ export struct CommentIconComponent {
.width(this.getMeasureText(this.publishCommentModel.totalCommentNumer) +
12)// .backgroundColor(Color.Green)
.id("Text")
.visibility(this.publishCommentModel.totalCommentNumer ? Visibility.Visible : Visibility.Hidden)
// .offset({
// x: 3
// })
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhGridLayout02.ets
View file @
ec03bf3
...
...
@@ -55,7 +55,7 @@ export struct ZhGridLayout02 {
.width(CommonConstants.FULL_WIDTH)
GridRow({
gutter: { x: 12, y: 1
5
},
gutter: { x: 12, y: 1
3
},
columns: { sm: listSize, md: 2 },
breakpoints: { value: ['320vp', '520vp', '840vp'] }
}) {
...
...
@@ -120,7 +120,7 @@ export struct ZhGridLayout02 {
}
Text(item.newsTitle)
.margin({
top: '5'
})
.margin({
top:'6'
})
.fontSize(13)
.maxLines(2)
.textOverflow({ overflow: TextOverflow.Ellipsis })
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhGridLayout03.ets
View file @
ec03bf3
...
...
@@ -59,12 +59,16 @@ export struct ZhGridLayout03 {
.backgroundColor(0xf5f5f5)
.width(44)
.aspectRatio(1 / 1)
.margin({
bottom: 16
})
// .margin({
// bottom: 16
// })
Text(item.newsTitle)
.fontSize(13)
.maxLines(1)
.margin({
top: 8,
bottom:11
})
.textOverflow({ overflow: TextOverflow.Ellipsis })
}
.width('100%')
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/EditUserInfoPage.ets
View file @
ec03bf3
...
...
@@ -27,7 +27,7 @@ struct EditUserInfoPage {
}
}),
alignment: DialogAlignment.Bottom,
offset:{dx:0,dy:-20}
offset:{dx:0,dy:-20}
,
})
aboutToAppear() {
...
...
@@ -97,14 +97,14 @@ struct EditUserInfoPage {
Row(){
Text(r.title)
.fontSize(15)
.fontColor(
Color.Gray
)
.fontColor(
'#666666'
)
Blank()
Text(r.subTitle)
.textOverflow({overflow:TextOverflow.Ellipsis})
.maxLines(1)
.fontSize(14)
.fontColor(
Color.Gray
)
.fontColor(
r.subTitle === '待完善'?'#999999':'#666666'
)
.padding({right:10})
.width('70%')
.textAlign(TextAlign.End)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/EditUserIntroductionPage.ets
View file @
ec03bf3
...
...
@@ -45,7 +45,7 @@ struct EditUserIntroductionPage {
Divider()
.margin(20)
Text('1、账号中
(头像、昵称等)
不允许含有违禁违规内容;\n2、最多60个字,只能输入中文、数字、英文字母。')
Text('1、账号中
(头像、昵称等)
不允许含有违禁违规内容;\n2、最多60个字,只能输入中文、数字、英文字母。')
.fontSize(13)
.padding(12)
.fontColor(Color.Gray).lineHeight(25)
...
...
@@ -54,6 +54,8 @@ struct EditUserIntroductionPage {
.type(ButtonType.Normal)
.width('90%')
.backgroundColor('#ED2800')
.opacity(this.numCount === 0 ? 0.6 : 1)
.fontColor(this.numCount === 0 ? '#999999' : Color.White)
.borderRadius(5)
.margin(30)
.onClick(()=>{
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/EditUserNikeNamePage.ets
View file @
ec03bf3
...
...
@@ -47,7 +47,7 @@ struct EditUserNikeNamePage {
Divider()
.margin(20)
Text('1、账号中
(头像、昵称等)
不允许含有违禁违规内容;\n2、最多16个字,只能输入中文、数字、英文字母。')
Text('1、账号中
(头像、昵称等)
不允许含有违禁违规内容;\n2、最多16个字,只能输入中文、数字、英文字母。')
.fontSize(13)
.padding(12)
.fontColor(Color.Gray).lineHeight(25)
...
...
@@ -56,6 +56,8 @@ struct EditUserNikeNamePage {
.type(ButtonType.Normal)
.width('90%')
.backgroundColor('#ED2800')
.opacity(this.numCount === 0 ? 0.6 : 1)
.fontColor(this.numCount === 0 ? '#999999' : Color.White)
.borderRadius(5)
.margin(30)
.onClick(()=>{
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/MyCollectionListPage.ets
View file @
ec03bf3
...
...
@@ -11,6 +11,7 @@ import { CustomBottomFuctionUI } from '../view/CustomBottomFuctionUI';
import { BigPicCardComponent } from '../view/BigPicCardComponent';
import { contentListItemParams } from '../../model/MyCollectionModel';
import { CustomPullToRefresh } from '../reusable/CustomPullToRefresh';
import { MyCustomDialog } from '../reusable/MyCustomDialog'
@Entry
@Component
...
...
@@ -26,6 +27,19 @@ struct MyCollectionListPage {
@State currentPage: number = 1;
private scroller: Scroller = new Scroller();
dialogController: CustomDialogController = new CustomDialogController({
builder: MyCustomDialog({
confirm: () => {
this.deleteDatas()
},
titleShow:false,
tipValue: this.isAllSelect?'是否确认清空?':'确认删除'+this.deleteNum.toString()+'条收藏'
}),
autoCancel: true,
alignment: DialogAlignment.Center,
customStyle: true
})
aboutToAppear(){
this.getData()
}
...
...
@@ -73,7 +87,7 @@ struct MyCollectionListPage {
this.allSelectDatas(isAllSelect)
},
confirmCallback:()=>{
this.d
eleteDatas
()
this.d
ialogController.open
()
}
})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/LikeComponent.ets
View file @
ec03bf3
...
...
@@ -58,7 +58,7 @@ export struct LikeComponent {
} else if (this.componentType == 5) {
// 图集点赞,展示标识
this.likeCompStyle5()
}else {
}
else {
//1: 底部栏目样式 默认样式
this.likeCompStyle1()
}
...
...
@@ -188,7 +188,7 @@ export struct LikeComponent {
.alignItems(VerticalAlign.Center)
.position({ x: '100%', })
.markAnchor({ x: '100%' })
.backgroundImage(this.likeStatus
? $r('app.media.ic_like_back_Select'):
$r('app.media.ic_like_back'))
.backgroundImage(this.likeStatus
? $r('app.media.ic_like_back_Select') :
$r('app.media.ic_like_back'))
.backgroundImageSize(ImageSize.Auto)
.visibility(this.likeCount > 0 ? Visibility.Visible : Visibility.Hidden)
}.width(24).height(24)
...
...
@@ -209,7 +209,7 @@ export struct LikeComponent {
.width(36)
.height(36)
.borderRadius(18)
.backgroundColor(
this.pageComponentType === 4
? '#4D000000' : '#FFF5F5F5')
.backgroundColor(
(this.pageComponentType === 4 || this.pageComponentType === 2)
? '#4D000000' : '#FFF5F5F5')
Row() {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/areaPickerDialog/AreaPickerDialog.ets
View file @
ec03bf3
...
...
@@ -9,7 +9,7 @@ export struct AreaPickerDialog {
@Provide currentSecondBean: AreaListManageModel = new AreaListManageModel('','','',[])
@Provide currentThirdBean: AreaListManageModel = new AreaListManageModel('','','',[])
controller: CustomDialogController
title: string = '
地区选择
'
title: string = '
修改地区
'
@Provide dataSource: AreaListModel[] = []
result: JSON[] = [];
confirmCallback: (province:string,city:string,county:string,address:string) => void = () => {
...
...
@@ -33,7 +33,7 @@ export struct AreaPickerDialog {
Blank()
Button('
确定
',{type:ButtonType.Normal})
Button('
提交
',{type:ButtonType.Normal})
.onClick(()=> {
this.controller.close()
this.confirmCallback(this.currentFirst.label,this.currentSecondBean.label,this.currentThirdBean.label,this.currentFirst.label+this.currentSecondBean.label+this.currentThirdBean.label);
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/areaPickerDialog/FirstLevelComponent.ets
View file @
ec03bf3
...
...
@@ -28,9 +28,11 @@ export struct FirstLevelComponent {
this.currentFirst = EditInfoViewModel.getAreaListManageModel(this.dataSource[index as number])
})
.backgroundColor(Color.White)
.border({color:'#e2e2e2',width:{right:0.5}})
//
.border({color:'#e2e2e2',width:{right:0.5}})
.width('100%')
.layoutWeight(1)
.selectedTextStyle({color:'#666666'})
.textStyle({color:'#999999'})
}
}
.justifyContent(FlexAlign.Center)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/areaPickerDialog/SecondLevelComponent.ets
View file @
ec03bf3
...
...
@@ -21,9 +21,11 @@ export struct SecondLevelComponent {
this.currentSecondBean = EditInfoViewModel.getAreaListManageModel(this.currentFirst.children[index as number])
})
.backgroundColor(Color.White)
.border({color:'#e2e2e2',width:{right:0.5}})
//
.border({color:'#e2e2e2',width:{right:0.5}})
.width('100%')
.layoutWeight(1)
.selectedTextStyle({color:'#666666'})
.textStyle({color:'#999999'})
}
}
.justifyContent(FlexAlign.Center)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/areaPickerDialog/ThirdLevelComponent.ets
View file @
ec03bf3
...
...
@@ -22,9 +22,11 @@ export struct ThirdLevelComponent {
this.currentThirdBean = EditInfoViewModel.getAreaListManageModel(this.currentSecondBean.children[index as number])
})
.backgroundColor(Color.White)
.border({color:'#e2e2e2',width:{right:0.5}})
//
.border({color:'#e2e2e2',width:{right:0.5}})
.width('100%')
.layoutWeight(1)
.selectedTextStyle({color:'#666666'})
.textStyle({color:'#999999'})
}
}
.justifyContent(FlexAlign.Center)
...
...
sight_harmony/features/wdComponent/src/main/ets/viewmodel/EditInfoViewModel.ets
View file @
ec03bf3
...
...
@@ -125,7 +125,7 @@ class EditInfoViewModel {
this.BasePostRequest(item.editDataType == WDEditDataModelType.WDEditDataModelType_nickname?HttpUrlUtils.APPOINTMENT_editUserDetail1_PATH:HttpUrlUtils.APPOINTMENT_editUserDetail_PATH,this.params)
.then((navResDTO: ResponseDTO) => {
if (navResDTO.code == 0) {
promptAction.showToast({ message: '
修改成功
' })
promptAction.showToast({ message: '
您的资料已提交
' })
success(navResDTO)
}else {
promptAction.showToast({ message: navResDTO.message })
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailPlayShortVideoPage.ets
View file @
ec03bf3
...
...
@@ -199,6 +199,7 @@ export struct DetailPlayShortVideoPage {
})
}
.width('100%')
.layoutWeight(1)
.onClick(() => {
this.playerController?.switchPlayOrPause();
...
...
@@ -223,9 +224,10 @@ export struct DetailPlayShortVideoPage {
}
.height('100%')
.width('100%')
.padding({
top: this.displayDirection === DisplayDirection.VIDEO_HORIZONTAL ? 0 : this.topSafeHeight + 'px'
})
// .padding({
// top: this.displayDirection === DisplayDirection.VIDEO_HORIZONTAL ? 0 : this.topSafeHeight + 'px'
// })
if (this.showCommentList) {
CommentComponentPage({})
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/VideoChannelDetail.ets
View file @
ec03bf3
...
...
@@ -258,15 +258,12 @@ export struct VideoChannelDetail {
.visibility(this.isMouted ? Visibility.None : Visibility.Visible)
Swiper(this.swiperController) {
ForEach(this.data, (item: ContentDetailDTO, index: number) => {
Column() {
DetailPlayShortVideoPage({
contentDetailData: item,
currentIndex: this.currentIndex,
index: index,
interactData: this.interactDataList[index]
})
}.width('100%')
.height('100%')
}, (item: ContentDetailDTO) => item.newsId + '')
}
.displayCount(1, true)
...
...
sight_harmony/products/phone/src/main/ets/entryability/EntryAbility.ets
View file @
ec03bf3
...
...
@@ -5,7 +5,7 @@ import UIAbility from '@ohos.app.ability.UIAbility';
import Want from '@ohos.app.ability.Want';
import window from '@ohos.window';
import { BusinessError } from '@ohos.base';
import { EmitterEventId, EmitterUtils, WindowModel } from 'wdKit';
import {
DeviceUtil,
EmitterEventId, EmitterUtils, WindowModel } from 'wdKit';
import { ConfigurationConstant } from '@kit.AbilityKit';
import { WDPushNotificationManager } from 'wdHwAbility/Index';
import { StartupManager } from '../startupmanager/StartupManager';
...
...
@@ -58,8 +58,20 @@ export default class EntryAbility extends UIAbility {
console.info('floatWindowClass audioWidth' + audioWidth);
// let a = new WindowModel();
// 设置窗口的显示方向属性
// 在普通phone/折叠屏/tablet设备上以沉浸式(全屏)启动
if (DeviceUtil.isPhone() || DeviceUtil.isTablet()) {
// 设置窗口的布局是否为沉浸式布局
// 沉浸式布局是指布局不避让状态栏与导航栏,组件可能产生与其重叠的情况。
// 非沉浸式布局是指布局避让状态栏与导航栏,组件不会与其重叠。
// windowClass.setWindowLayoutFullScreen(true)
// 设置窗口全屏模式时窗口内导航栏、状态栏的属性
// windowClass.setWindowSystemBarProperties({
// statusBarContentColor: "#FFFFFF"
// })
// 设置启动时窗口的显示方向属性,
// 普通phone以PORTRAIT/竖屏显示模式启动
// 折叠屏和tablet是以AUTO_ROTATION_RESTRICTED/受开关控制的自动旋转模式启动
WindowModel.shared.setPreferredOrientation(window.Orientation.PORTRAIT)
.then(() => {
hilog.info(0x0000, 'testTag', 'setPreferredOrientation Succeeded');
...
...
@@ -68,6 +80,8 @@ export default class EntryAbility extends UIAbility {
hilog.error(0x0000, 'testTag',
`setPreferredOrientation catch, error error.name : ${err.name}, error.message:${err.message}`);
})
}
//../../../../../../features/wdLogin/src/main/ets/pages/launchPage/LaunchPage
windowStage.loadContent('pages/launchPage/LaunchPage', (err, data) => {
if (err.code) {
...
...
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchInterestsHobbiesPage.ets
View file @
ec03bf3
...
...
@@ -47,7 +47,7 @@ struct LaunchInterestsHobbiesPage {
.width('100%')
.height('61lpx')
.margin({top:'84lpx'})
Text('完善信息
,
将为您推荐个性化的内容')
Text('完善信息
,
将为您推荐个性化的内容')
.fontSize('27lpx')
.textAlign(TextAlign.Center)
.fontColor('#9E9E9E')
...
...
@@ -69,8 +69,8 @@ struct LaunchInterestsHobbiesPage {
Image('')
.width('100%')
.height('100%')
.backgroundColor(Color.Gray)
.opacity(item.choose?0.85:0)
.backgroundColor(Color.Black)
.opacity(item.choose?0.5:0)
.borderRadius(5)
}
...
...
@@ -134,14 +134,14 @@ struct LaunchInterestsHobbiesPage {
.width('662lpx')
.height('84lpx')
.backgroundColor(Color.White)
.opacity(this.selectCount == 0 ? 0.
3
: 0)
.opacity(this.selectCount == 0 ? 0.
6
: 0)
.borderRadius('10lpx')
.onClick(()=>{
if (this.selectCount == 0) {
promptAction.showToast({
message : '请先选择您感兴趣的内容哦',
duration: 2000,
bottom: '50%'
bottom: '50%'
,
})
return
}
...
...
Please
register
or
login
to post a comment