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-08-29 15:04:24 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
20c78265299797a494fd8b7b16f303f1aaec1f0a
20c78265
1 parent
11c886ab
fix: '我的'模块ui调整
Hide whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
1293 additions
and
828 deletions
sight_harmony/commons/wdKit/src/main/ets/reusable/CustomToast.ets
sight_harmony/features/wdComponent/src/main/ets/components/FeedBackActivity.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePageMoreFunctionUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePagePersonFunctionUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePageUserSimpleInfoUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/PagePersonFunction.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/appointment/AppointmentListChildComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/appointment/AppointmentListUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/follow/FollowChildComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/follow/FollowFirstTabsComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/follow/FollowListDetailUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/follow/FollowSecondTabsComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/follow/FollowThirdTabsComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/ChildCommentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/HomePageBottomCommentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/HomePageBottomFollowComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/message/MessageListItemUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/message/MessageListUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/MinePageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/PrivacySettingPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/reusable/CustomTitleAndEditUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/reusable/CustomTitleUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/reusable/ListHasNoMoreDataUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/reusable/MyCustomDialog.ets
sight_harmony/features/wdComponent/src/main/ets/components/setting/AboutPageUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/setting/AccountAndSecurityLayout.ets
sight_harmony/features/wdComponent/src/main/ets/components/setting/ConfirmLogoutDialog.ets
sight_harmony/features/wdComponent/src/main/ets/components/setting/MineSettingComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/CustomBottomFuctionUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/CustomSelectUI.ets
sight_harmony/features/wdComponent/src/main/ets/pages/MineHomePage.ets
sight_harmony/features/wdLogin/src/main/ets/pages/login/ChangeBindPhonePage.ets
sight_harmony/features/wdLogin/src/main/ets/pages/login/ForgetPasswordPage.ets
sight_harmony/features/wdLogin/src/main/ets/pages/login/LoginPage.ets
sight_harmony/features/wdLogin/src/main/ets/pages/login/ModifyPasswordPage.ets
sight_harmony/features/wdLogin/src/main/ets/pages/login/SettingPasswordPage.ets
sight_harmony/features/wdLogin/src/main/ets/pages/login/VerifyPhoneNumberPage.ets
sight_harmony/commons/wdKit/src/main/ets/reusable/CustomToast.ets
View file @
20c7826
...
...
@@ -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 = "27lpx"
lineHeightValue :number | string | Resource = "38lpx"
fontSizeValue :number | string | Resource = 27
lineHeightValue :number | string | Resource = 38
controller: CustomDialogController
marginTop :number | string | Resource = 0
...
...
@@ -34,9 +34,9 @@ export struct CustomToast {
.fontSize(this.fontSizeValue)
.lineHeight(this.lineHeightValue)
.textAlign(TextAlign.Center)
}.borderRadius(`${this.bgBorderRadius}
lpx
`)
}.borderRadius(`${this.bgBorderRadius}`)
.constraintSize({maxWidth:"86%"})
.padding({top:
"23lpx",bottom:'23lpx',left:"35lpx",right:"35lpx"
})
.padding({top:
23,bottom:23,left:35,right:35
})
.backgroundColor(this.bgColor)
.opacity(this.opacityValue)
.margin({top:this.marginTop})
...
...
sight_harmony/features/wdComponent/src/main/ets/components/FeedBackActivity.ets
View file @
20c7826
...
...
@@ -49,8 +49,8 @@ export struct FeedBackActivity {
builder: CustomToast({
bgColor:$r("app.color.color_B3000000"),
opacityValue:1,
fontSizeValue:"25lpx",
lineHeightValue:"36lpx",
fontSizeValue:12,
lineHeightValue:18,
msg: this.toastText,
}),
autoCancel: false,
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePageMoreFunctionUI.ets
View file @
20c7826
...
...
@@ -12,67 +12,73 @@ export default struct MinePageMoreFunctionUI {
Column() {
Column() {
Text("更多功能")
.fontFamily('PingFang SC-Semibold')
.fontColor($r('app.color.color_222222'))
.fontSize(`${this.calcHeight(29)}lpx`)
.margin({ left: `${this.calcHeight(31)}lpx` })
.lineHeight(`${this.calcHeight(46)}lpx`)
.fontSize(15)
.margin({ left: 16 })
// .lineHeight(`${this.calcHeight(46)}lpx`)
.lineHeight(24)
.fontWeight(FontWeight.Bold)
}.height(`${this.calcHeight(92)}lpx`)
}
.height(48)
.width('100%')
.justifyContent(FlexAlign.Center)
.alignItems(HorizontalAlign.Start)
Text().backgroundColor($r('app.color.color_F5F5F5'))
.width('100%')
.height(
`${this.calcHeight(1)}lpx`
)
.height(
1
)
List() {
ForEach(this.moreData, (item: MinePageMoreFunctionModel, index: number) => {
ListItem() {
Column()
{
Column(){
Column() {
Row() {
Row(){
if (item.imgSrc) {
Image(item.imgSrc)
.width(`${this.calcHeight(38)}lpx`)
.height(`${this.calcHeight(38)}lpx`)
.margin({ right: `${this.calcHeight(15)}lpx` })
.width(20)
.height(20)
.margin({ right: 14 })
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.High)
}
Text(`${item.msg}`)
.height(`${this.calcHeight(38)}lpx`)
.fontFamily('PingFang SC-Regular')
.lineHeight(20)
.fontColor($r('app.color.color_666666'))
.fontSize(
`${this.calcHeight(29)}lpx`
)
.fontSize(
15
)
.fontWeight(400)
}.alignItems(VerticalAlign.Center)
}
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.Start)
Image($r('app.media.mine_user_arrow_2'))
.width(`${this.calcHeight(27)}lpx`)
.height(`${this.calcHeight(27)}lpx`)
.width(14)
.height(14)
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.High)
.margin({ left:
`${this.calcHeight(81)}lpx`, right: `${this.calcHeight(29)}lpx`
})
.margin({ left:
42, right: 15
})
}.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.SpaceBetween)
.width("100%")
}.height(`${this.calcHeight(108)}lpx`)
}
.height(55)
.justifyContent(FlexAlign.Center)
.padding({ left:
`${this.calcHeight(27)}lpx`
})
.padding({ left:
14
})
.width("100%")
if (index != this.moreData.length - 1) {
Text().backgroundColor($r('app.color.color_F5F5F5'))
.width(`612lpx`)
.height(`${this.calcHeight(1)}lpx`)
.width('100%')
.height(1)
}
}
}
.onClick(() => {
console.log(index + "")
//
console.log(index + "")
if (item.msg == "设置") { //设置
trackButtonClick("myPageUserSetting")
let params: Params = {
...
...
@@ -82,12 +88,12 @@ export default struct MinePageMoreFunctionUI {
}else if (item.msg == "关于") { // 关于
trackButtonClick("myPageUserAbout")
WDRouterRule.jumpWithPage(WDRouterPage.aboutPage)
}else if (item.msg == "意见反馈") { //
关于
}else if (item.msg == "意见反馈") { //
意见反馈
trackButtonClick("myPageUserFeedBack")
ProcessUtils.gotoFeedBackActivity()
}
})
.height(
`${this.calcHeight(117)}lpx`
)
.height(
56
)
.width("100%")
})
}.onScrollFrameBegin((offset, state) => {
...
...
@@ -96,8 +102,8 @@ export default struct MinePageMoreFunctionUI {
.width("100%")
}
.backgroundColor($r('app.color.white'))
.borderRadius(8)
.margin({ left: `${this.calcHeight(23)}lpx`, right: `${this.calcHeight(23)}lpx`, top: `${this.calcHeight(19)}lpx` })
.borderRadius(4)
.margin({ left: 11, right: 13, top: 10 })
}
calcHeight(value:number): number{
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePagePersonFunctionUI.ets
View file @
20c7826
...
...
@@ -21,7 +21,7 @@ export default struct MinePagePersonFunctionUI {
GridItem(){
PagePersonFunction({ item: item, noDivider : (index % 5 < 4 && index != this.personalData.length-1) ? false : true,percent:$percent,navItem:this.navItem})
}.onClick(()=>{
console.log(index+"")
//
console.log(index+"")
switch (item.msg){
case "评论":{
if(!this.isLogin){
...
...
@@ -80,22 +80,18 @@ export default struct MinePagePersonFunctionUI {
break;
}
}
})/*.width(`${this.calcHeight(142)}lpx`)*/
.height(`${this.calcHeight(117)}lpx`)
})
.height(61)
})
}
.rowsTemplate('1fr')
.columnsTemplate('1fr 1fr 1fr 1fr 1fr')
.height(`${this.calcHeight(117)}lpx`)
.margin({top:`${this.calcHeight(31)}lpx`})
.height(61)
.margin({top: 10})
}
messageClick(){
MinePageDatasModel.sendClickMessageData().then((value) => {
console.log(TAG, "进入消息页面")
}).catch((err: Error) => {
console.log(TAG, JSON.stringify(err))
})
MinePageDatasModel.sendClickMessageData()
}
calcHeight(value:number): number{
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePageUserSimpleInfoUI.ets
View file @
20c7826
...
...
@@ -46,20 +46,21 @@ export default struct MinePageUserSimpleInfoUI {
Image(this.isLogin?(this.headPhotoUrl?this.headPhotoUrl:this.userType === "1"?$r('app.media.default_head_userPage'):$r('app.media.AccountOwner_DefaultIcon')):$r('app.media.default_head_userPage'))
.alt(this.userType === "1"?$r('app.media.default_head_userPage'):$r('app.media.AccountOwner_DefaultIcon'))
.width(`${this.calcHeight(120)}lpx`)
.height(`${this.calcHeight(120)}lpx`)
.width(63.21)
.height(63.21)
.objectFit(ImageFit.Cover)
.borderRadius(50)
if(StringUtils.isNotEmpty(this.levelHead)){
Image(this.levelHead)
.width(`${this.calcHeight(155)}lpx`)
.height(`${this.calcHeight(155)}lpx`)
.width(72.86)
.height(72.86)
.objectFit(ImageFit.Cover)
.borderRadius(50)
}
}.width(`${this.calcHeight(140)}lpx`)
.height(`${this.calcHeight(140)}lpx`)
}
.width(86)
.height(86)
.alignContent(Alignment.Center)
.onClick(()=>{
this.jumpLogin()
...
...
@@ -75,17 +76,18 @@ export default struct MinePageUserSimpleInfoUI {
.maxLines(1)
.fontWeight(FontWeight.Medium)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.fontSize(`${this.calcHeight(33)}lpx`)
.lineHeight(`${this.calcHeight(46)}lpx`)
.fontSize(20)
.lineHeight(24)
Image($r('app.media.mine_user_edit'))
.width(`${this.calcHeight(27)}lpx`)
.height(`${this.calcHeight(27)}lpx`)
.width(14)
.height(14)
.colorFilter(ColorUtils.getDrawingColorFilter(this.navItem?.homePageColor.length > 0?this.navItem?.homePageColor:''))
.margin({left:
`${this.calcHeight(15)}lpx`
})
.margin({left:
11
})
.objectFit(ImageFit.Cover)
Blank()
}.width('100%')
}
.width('100%')
.onClick(()=>{
this.jumpLogin()
trackButtonClick("myPageUserName")
...
...
@@ -94,40 +96,42 @@ export default struct MinePageUserSimpleInfoUI {
if (this.levelId !== 0){
Stack(){
Image($r('app.media.mine_grade_bg'))
.width(`${this.calcHeight(84)}lpx`)
.height(`${this.calcHeight(29)}lpx`)
.width(44)
.height(15)
.objectFit(ImageFit.Auto)
Text(`等级${this.levelId}`)
.fontFamily('PingFang SC-Semibold')
.fontWeight(600)
.textAlign(TextAlign.Center)
.fontColor($r('app.color.white'))
.fontSize(`${this.calcHeight(19)}lpx`)
.width(this.levelId>9?`${this.calcHeight(69)}lpx`:`${this.calcHeight(50)}lpx`)
.height(`${this.calcHeight(29)}lpx`)
}.margin({top:`${this.calcHeight(15)}lpx`})
.fontSize(10)
.width(this.levelId > 9 ? 35: 26)
.lineHeight(15)
}
.margin({top: 10})
}
}.alignItems(HorizontalAlign.Start)
.margin({top:`${this.calcHeight(5)}lpx`,left:`${this.calcHeight(4)}lpx`})
.width(`${this.calcHeight(352)}lpx`)
}
.alignItems(HorizontalAlign.Start)
.width(180)
}else{
Row(){
Text("登录注册")
.fontColor($r('app.color.color_222222'))
.fontSize(`${this.calcHeight(38)}lpx`)
.lineHeight(`${this.calcHeight(46)}lpx`)
.fontSize(20)
.lineHeight(24)
.fontWeight(600)
Image($r('app.media.mine_user_edit'))
.width(`${this.calcHeight(11)}lpx`)
.height(`${this.calcHeight(20)}lpx`)
.margin({left:`${this.calcHeight(15)}lpx`})
.width(14)
.height(14)
.margin({left: 11})
.objectFit(ImageFit.Cover)
Blank()
}.onClick(()=>{
this.jumpLogin()
trackButtonClick("myPageUserLogin")
})
.margin({top:`${this.calcHeight(11)}lpx`,left:`${this.calcHeight(4)}lpx`})
.width(`${this.calcHeight(352)}lpx`)
.width(180)
}
Blank()
...
...
@@ -135,21 +139,22 @@ export default struct MinePageUserSimpleInfoUI {
Stack({alignContent:Alignment.Start}){
Text("签到")
.textAlign(TextAlign.Start)
.width('108lpx')
.height(`${this.calcHeight(46)}lpx`)
.width(56)
.height(24)
.fontColor($r('app.color.color_AD6000'))
.backgroundColor($r('app.color.color_FFC460'))
.fontWeight(500)
.position({x:'23lpx'})
.padding({left:'35lpx'})
.position({x: 16})
.padding({left: 12})
Image($r("app.media.mine_sign_icon"))
.width(`${this.calcHeight(50)}lpx`)
.height(`${this.calcHeight(50)}lpx`)
}.width('131lpx')
.width(26)
.height(26)
}
.width(68)
.visibility(Visibility.Hidden)
}
.setFullWidth()
.padding({top:
'31lpx',left:'46lpx'
})
.padding({top:
11,left: 11
})
}
@Styles setFullWidthAndHeight(){
...
...
@@ -186,8 +191,6 @@ export default struct MinePageUserSimpleInfoUI {
}
}
this.getUserLevel()
}).catch((err:Error)=>{
console.log(TAG,JSON.stringify(err))
})
}
getUserLevel(){
...
...
@@ -211,8 +214,6 @@ export default struct MinePageUserSimpleInfoUI {
UserDataLocal.setUserLevelHeaderUrl("")
}
}
}).catch((err:Error)=>{
console.log(TAG,JSON.stringify(err))
})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/PagePersonFunction.ets
View file @
20c7826
...
...
@@ -19,18 +19,19 @@ export struct PagePersonFunction{
if (this.item.isShowRedPoint) {
Button()
.type(ButtonType.Circle)
.width(`${this.calcHeight(12)}lpx`)
.height(`${this.calcHeight(12)}lpx`)
.width(6)
.height(6)
.backgroundColor(this.navItem?.noticeColor.length > 0?this.navItem?.noticeColor:$r('app.color.color_ED2800'))
}
}.width(`${this.calcHeight(46)}lpx`)
.height(`${this.calcHeight(46)}lpx`)
}
.width(24)
.height(24)
Text(`${this.item.msg}`)
.margin({top:`${this.calcHeight(8)}lpx`})
.height(`${this.calcHeight(23)}lpx`)
.margin({top:4})
.lineHeight(12)
.fontColor(this.navItem?.homePageColor.length > 0?this.navItem.homePageColor:$r('app.color.color_222222'))
.fontSize(
`${this.calcHeight(23)}lpx`
)
.fontSize(
12
)
}
.alignItems(HorizontalAlign.Center)
.width('100%')
...
...
@@ -39,8 +40,8 @@ export struct PagePersonFunction{
if(!this.noDivider){
Text().backgroundColor($r('app.color.color_222222'))
.opacity(0.1)
.width(`${this.calcHeight(2)}lpx`)
.height(`${this.calcHeight(29)}lpx`)
.width(1)
.height(15)
}
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/appointment/AppointmentListChildComponent.ets
View file @
20c7826
...
...
@@ -46,15 +46,19 @@ export struct AppointmentListChildComponent {
Row() {
Row() {
Image($r('app.media.reserve_icon'))
.width('27lpx')
.height('27lpx')
// .width('27lpx')
.width(27)
// .height('27lpx')
.height(27)
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.High)
.margin({right:"6lpx"})
// .margin({right:"6lpx"})
.margin({right: 6})
Text("预约")
.fontWeight(400)
.fontSize('23lpx')
// .fontSize('23lpx')
.fontSize(23)
.textShadow({
radius: 2,
color: `rgba(0,0,0,0.3)`,
...
...
@@ -62,11 +66,15 @@ export struct AppointmentListChildComponent {
offsetX:0
})
.fontColor($r('app.color.white'))
.lineHeight('31lpx')
// .lineHeight('31lpx')
.lineHeight(31)
.layoutWeight(1)
.textAlign(TextAlign.Start)
}.width('94lpx')
.margin({ bottom: '15lpx', right: '15lpx' })
}
// .width('94lpx')
.width(94)
// .margin({ bottom: '15lpx', right: '15lpx' })
.margin({ bottom: 15, right: 15 })
.alignItems(VerticalAlign.Center)
}.width('100%')
.height('100%')
...
...
@@ -74,17 +82,22 @@ export struct AppointmentListChildComponent {
.justifyContent(FlexAlign.End)
}
}.width('100%')
.height('376lpx')
// .height('376lpx')
.height(376)
Column() {
Text(this.item.title)
.fontWeight('400lpx')
.fontSize('33lpx')
// .fontWeight('400lpx')
.fontWeight(400)
// .fontSize('33lpx')
.fontSize(33)
.fontColor($r('app.color.color_222222'))
.lineHeight('48lpx')
// .lineHeight('48lpx')
.lineHeight(48)
.maxLines(2)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.margin({ bottom: '23lpx' })
// .margin({ bottom: '23lpx' })
.margin({ bottom: 23 })
.textAlign(TextAlign.Start)
.width('100%')
Row() {
...
...
@@ -93,109 +106,153 @@ export struct AppointmentListChildComponent {
Image($r('app.media.play_status_history_icon'))
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.High)
.width('38lpx')
.height('38lpx')
.margin({ right: '12lpx' })
// .width('38lpx')
.width(38)
// .height('38lpx')
.height(38)
// .margin({ right: '12lpx' })
.margin({ right: 12 })
Text('已结束').fontColor($r('app.color.color_999999'))
.fontWeight('500lpx')
.fontSize('23lpx')
// .fontWeight('500lpx')
.fontWeight(500)
// .fontSize('23lpx')
.fontSize(23)
}else if(this.item.status == "running"){
Image($r('app.media.play_status_icon'))
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.High)
.width('38lpx')
.height('38lpx')
.margin({ right: '12lpx' })
// .width('38lpx')
.width(38)
// .height('38lpx')
.height(38)
// .margin({ right: '12lpx' })
.margin({ right: 12 })
Text('已开始').fontColor($r('app.color.color_999999'))
.fontWeight('500lpx')
.fontSize('23lpx')
// .fontWeight('500lpx')
.fontWeight(500)
// .fontSize('23lpx')
.fontSize(23)
} else {
Image($r('app.media.play_status_icon'))
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.High)
.width('38lpx')
.height('38lpx')
.margin({ right: '12lpx' })
// .width('38lpx')
.width(38)
// .height('38lpx')
.height(38)
// .margin({ right: '12lpx' })
.margin({ right: 12 })
Text(this.item.timePre).fontColor($r('app.color.color_ED2800'))
.fontWeight('500lpx')
.fontSize('23lpx')
// .fontWeight('500lpx')
.fontWeight(500)
// .fontSize('23lpx')
.fontSize(23)
Image($r('app.media.point_icon'))
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.High)
.width('12lpx')
.height('31lpx')
.margin({ right: '4lpx' })
// .width('12lpx')
.width(12)
// .height('31lpx')
.height(31)
// .margin({ right: '4lpx' })
.margin({ right: 4 })
Text(`${this.item.timeBack}开始`).fontColor($r('app.color.color_ED2800'))
.fontWeight('500lpx')
.fontSize('23lpx')
.lineHeight('31lpx')
// .fontWeight('500lpx')
.fontWeight(500)
// .fontSize('23lpx')
.fontSize(23)
// .lineHeight('31lpx')
.lineHeight(31)
}
}
.padding({ left: '19lpx', right: '19lpx' })
.height('46lpx')
// .padding({ left: '19lpx', right: '19lpx' })
.padding({ left: 19, right: 19 })
// .height('46lpx')
.height(46)
.alignItems(VerticalAlign.Center)
.backgroundColor($r('app.color.color_F5F5F5'))
.borderRadius('4lpx')
// .borderRadius('4lpx')
.borderRadius(4)
Blank()
.layoutWeight(1)
if (this.item.status === "wait") {
Text(this.item.isAppointment ? "已预约" : "预约")
.fontWeight(400)
.fontSize('23lpx')
// .fontSize('23lpx')
.fontSize(23)
.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('31lpx')
.lineHeight(31)
.textAlign(TextAlign.Center)
.width('100lpx')
.height('46lpx')
.borderRadius('6lpx')
// .width('100lpx')
.width(100)
// .height('46lpx')
.height(46)
// .borderRadius('6lpx')
.borderRadius(6)
.onClick(() => {
this.dialogController.open()
})
}else if(this.item.status == "running"){
Text("去观看" )
.fontWeight(400)
.fontSize('23lpx')
// .fontSize('23lpx')
.fontSize(23)
.backgroundColor($r('app.color.color_ED2800'))
.fontColor($r('app.color.white'))
.lineHeight('31lpx')
// .lineHeight('31lpx')
.lineHeight(31)
.textAlign(TextAlign.Center)
.width('100lpx')
.height('46lpx')
.borderRadius('6lpx')
// .width('100lpx')
.width(100)
// .height('46lpx')
.height(46)
// .borderRadius('6lpx')
.borderRadius(6)
} else {
Text("看回放")
.fontWeight(400)
.fontSize('23lpx')
// .fontSize('23lpx')
.fontSize(23)
.backgroundColor($r('app.color.color_ED2800'))
.fontColor($r('app.color.white'))
.lineHeight('31lpx')
// .lineHeight('31lpx')
.lineHeight(31)
.textAlign(TextAlign.Center)
.width('100lpx')
.height('46lpx')
.borderRadius('6lpx')
// .width('100lpx')
.width(100)
// .height('46lpx')
.height(46)
// .borderRadius('6lpx')
.borderRadius(6)
}
}
}
.padding({
left: '23lpx',
right: '23lpx',
top: '15lpx',
bottom: '23lpx'
// left: '23lpx',
left: 23,
// right: '23lpx',
right: 23,
// top: '15lpx',
top: 15,
// bottom: '23lpx'
bottom: 23
})
}.margin({ left: 10, right: 10 })
.backgroundColor($r('app.color.white'))
.borderRadius('8lpx')
// .borderRadius('8lpx')
.borderRadius(8)
// }
}
onCancel() {
console.info('Callback when the first button is clicked')
//
console.info('Callback when the first button is clicked')
}
onAccept() {
console.info('Callback when the second button is clicked')
//
console.info('Callback when the second button is clicked')
this.appointmentOperation()
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/appointment/AppointmentListUI.ets
View file @
20c7826
...
...
@@ -140,7 +140,8 @@ export struct AppointmentListUI {
.cachedCount(4)
.scrollBar(BarState.Off)
.edgeEffect(EdgeEffect.None)
.margin({ top: '23lpx', left: '23lpx', right: '23lpx'})
// .margin({ top: '23lpx', left: '23lpx', right: '23lpx'})
.margin({ top: 23, left: 23, right: 23})
.layoutWeight(1)
}
...
...
@@ -176,7 +177,7 @@ export struct AppointmentListUI {
this.isGetRequest = true
this.isLoading = false
}).catch((err: Error) => {
console.log(TAG, JSON.stringify(err))
//
console.log(TAG, JSON.stringify(err))
this.isGetRequest = true
this.isLoading = false
})
...
...
@@ -187,12 +188,12 @@ export struct AppointmentListUI {
let dealData: string[] = []
if (!StringUtils.isNotEmpty(planStartTime)) {
console.log(TAG, "格式有误")
//
console.log(TAG, "格式有误")
return dealData
}
if (planStartTime.indexOf(" ") === -1) {
console.log(TAG, "格式有误")
//
console.log(TAG, "格式有误")
return dealData
}
let arr = planStartTime.split(" ")
...
...
@@ -217,7 +218,7 @@ export struct AppointmentListUI {
dealData[1] = `${time[0]}:${time[1]}`
}
}
console.log(TAG, JSON.stringify(dealData))
//
console.log(TAG, JSON.stringify(dealData))
return dealData
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/follow/FollowChildComponent.ets
View file @
20c7826
...
...
@@ -31,42 +31,62 @@ 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')
.height('92lpx')
// .width('92lpx')
.width(92)
// .height('92lpx')
.height(92)
.borderRadius(50)
.borderWidth('1lpx')
// .borderWidth('1lpx')
.borderWidth(1)
.borderColor($r('app.color.color_0D000000'))
Row(){
Image(this.data.authIcon)
.width('32lpx')
.height('32lpx')
// .width('32lpx')
.width(32)
// .height('32lpx')
.height(32)
.objectFit(ImageFit.Cover)
}.width('92lpx')
}
// .width('92lpx')
.width(92)
.justifyContent(FlexAlign.End)
}.width('92lpx')
.height('92lpx')
.margin({right:'15lpx'})
}
// .width('92lpx')
.width(92)
// .height('92lpx')
.height(92)
// .margin({right:'15lpx'})
.margin({right: 15})
Column(){
Text(this.data.cnUserName)
.fontWeight('400lpx')
.fontSize('31lpx')
.lineHeight('38lpx')
// .fontWeight('400lpx')
.fontWeight(400)
// .fontSize('31lpx')
.fontSize(31)
// .lineHeight('38lpx')
.lineHeight(38)
.fontColor($r('app.color.color_222222'))
.maxLines(1)
.margin({bottom:'8lpx'})
// .margin({bottom:'8lpx'})
.margin({bottom: 8})
Text(`粉丝${this.data.cnFansNum}`)
.fontColor($r('app.color.color_B0B0B0'))
.fontSize('23lpx')
.fontWeight('400lpx')
.lineHeight('31lpx')
.margin({bottom:'8lpx'})
// .fontSize('23lpx')
.fontSize(23)
// .fontWeight('400lpx')
.fontWeight(400)
// .lineHeight('31lpx')
.lineHeight(31)
// .margin({bottom:'8lpx'})
.margin({bottom: 8})
Text(`${this.data.introduction}`)
.fontColor($r('app.color.color_B0B0B0'))
.fontSize('23lpx')
// .fontSize('23lpx')
.fontSize(23)
.maxLines(2)
.textAlign(TextAlign.Start)
.textOverflow({ overflow: TextOverflow.Ellipsis })
...
...
@@ -90,22 +110,30 @@ export struct FollowChildComponent{
}else {
Text(`已关注`)
.fontColor($r('app.color.color_CCCCCC'))
.fontSize('23lpx')
.fontWeight('500lpx')
.lineHeight('35lpx')
// .fontSize('23lpx')
.fontSize(23)
// .fontWeight('500lpx')
.fontWeight(500)
// .lineHeight('35lpx')
.lineHeight(35)
}
}
.justifyContent(FlexAlign.Center)
.width('100lpx')
// .width('100lpx')
.width(100)
.backgroundColor($r("app.color.color_F5F5F5"))
.borderRadius("6lpx")
.height('46lpx')
// .borderRadius("6lpx")
.borderRadius(6)
// .height('46lpx')
.height(46)
.onClick(()=>{
if (this.isLoadingAttention) return
this.isLoadingAttention = true
this.followOperation()
}).margin({top:'29lpx'})
})
// .margin({top:'29lpx'})
.margin({top: 29})
}else{
Row(){
if(this.isLoadingAttention) {
...
...
@@ -115,23 +143,34 @@ export struct FollowChildComponent{
.color($r('app.color.main_red'))
}else {
Image($r('app.media.follow_icon'))
.margin({right:'4lpx'})
.width('23lpx')
.height('23lpx')
// .margin({right:'4lpx'})
.margin({right: 4})
// .width('23lpx')
.width(23)
// .height('23lpx')
.height(23)
Text(`关注`)
.fontColor($r('app.color.color_ED2800'))
.fontSize('23lpx')
.fontWeight('500lpx')
.lineHeight('35lpx')
// .fontSize('23lpx')
.fontSize(23)
// .fontWeight('500lpx')
.fontWeight(500)
// .lineHeight('35lpx')
.lineHeight(35)
}
}.borderColor($r('app.color.color_1AED2800'))
.borderRadius('6lpx')
.borderWidth('2lpx')
// .borderRadius('6lpx')
.borderRadius(6)
// .borderWidth('2lpx')
.borderWidth(2)
.justifyContent(FlexAlign.Center)
.width('100lpx')
.height('46lpx')
.margin({top:'29lpx'})
// .width('100lpx')
.width(100)
// .height('46lpx')
.height(46)
// .margin({top:'29lpx'})
.margin({top: 29})
.onClick(()=>{
if (this.isLoadingAttention) return
this.isLoadingAttention = true
...
...
@@ -140,19 +179,24 @@ export struct FollowChildComponent{
})
}
}
.padding({top:'27lpx'})
// .padding({top:'27lpx'})
.padding({top: 27})
.width('100%')
.justifyContent(FlexAlign.SpaceBetween)
.alignItems(VerticalAlign.Top)
}.height(`${this.columnHeight}lpx`)
}
// .height(`${this.columnHeight}lpx`)
.height(`${this.columnHeight}`)
.justifyContent(FlexAlign.Start)
Divider()
.width('100%')
.height('2lpx')
// .height('2lpx')
.height(2)
.color($r('app.color.color_F5F5F5'))
.strokeWidth('1lpx')
// .strokeWidth('1lpx')
.strokeWidth(1)
}.width('100%')
}else {
...
...
@@ -164,46 +208,65 @@ 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')
.height('92lpx')
// .width('92lpx')
.width(92)
// .height('92lpx')
.height(92)
.borderRadius(50)
.borderWidth('1lpx')
// .borderWidth('1lpx')
.borderWidth(1)
.borderColor($r('app.color.color_0D000000'))
Row(){
Image(this.data.authIcon)
.width('32lpx')
.height('32lpx')
// .width('32lpx')
.width(32)
// .height('32lpx')
.height(32)
.objectFit(ImageFit.Cover)
}.width('92lpx')
}
// .width('92lpx')
.width(92)
.justifyContent(FlexAlign.End)
}.width('92lpx')
.height('92lpx')
.margin({right:'15lpx'})
}
// .width('92lpx')
.width(92)
// .height('92lpx')
.height(92)
// .margin({right:'15lpx'})
.margin({right: 15})
Column(){
Text(this.data.cnUserName)
.fontWeight('400lpx')
.fontSize('31lpx')
.lineHeight('38lpx')
// .fontWeight('400lpx')
.fontWeight(400)
// .fontSize('31lpx')
.fontSize(31)
// .lineHeight('38lpx')
.lineHeight(38)
.fontColor($r('app.color.color_222222'))
.maxLines(1)
.margin({bottom:'12lpx'})
// .margin({bottom:'12lpx'})
.margin({bottom: 12})
Row(){
if(this.data.cnFansNum!="0"){
Text(`粉丝${this.data.cnFansNum}`)
.fontColor($r('app.color.color_B0B0B0'))
.fontSize('23lpx')
// .fontSize('23lpx')
.fontSize(23)
}
if(this.data.cnFansNum!="0" && StringUtils.isNotEmpty(this.data.introduction)){
Image($r("app.media.point"))
.width('31lpx')
.height('31lpx')
// .width('31lpx')
.width(31)
// .height('31lpx')
.height(31)
.objectFit(ImageFit.Auto)
}
Text(`${this.data.introduction}`)
.fontColor($r('app.color.color_B0B0B0'))
.fontSize('23lpx')
// .fontSize('23lpx')
.fontSize(23)
.layoutWeight(1)
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
...
...
@@ -229,16 +292,22 @@ export struct FollowChildComponent{
}else {
Text(`已关注`)
.fontColor($r('app.color.color_CCCCCC'))
.fontSize('23lpx')
.fontWeight('500lpx')
.lineHeight('35lpx')
// .fontSize('23lpx')
.fontSize(23)
// .fontWeight('500lpx')
.fontWeight(500)
// .lineHeight('35lpx')
.lineHeight(35)
}
}
.backgroundColor($r("app.color.color_F5F5F5"))
.justifyContent(FlexAlign.Center)
.borderRadius("6lpx")
.width('100lpx')
.height('46lpx')
// .borderRadius("6lpx")
.borderRadius(6)
// .width('100lpx')
.width(100)
// .height('46lpx')
.height(46)
.onClick(()=>{
if (this.isLoadingAttention) return
this.isLoadingAttention = true
...
...
@@ -254,21 +323,31 @@ export struct FollowChildComponent{
.color($r('app.color.main_red'))
}else {
Image($r('app.media.follow_icon'))
.margin({right:'4lpx'})
.width('23lpx')
.height('23lpx')
// .margin({right:'4lpx'})
.margin({right: 4})
// .width('23lpx')
.width(23)
// .height('23lpx')
.height(23)
Text(`关注`)
.fontColor($r('app.color.color_ED2800'))
.fontSize('23lpx')
.fontWeight('500lpx')
.lineHeight('35lpx')
// .fontSize('23lpx')
.fontSize(23)
// .fontWeight('500lpx')
.fontWeight(500)
// .lineHeight('35lpx')
.lineHeight(35)
}
}.borderColor($r('app.color.color_1AED2800'))
.borderRadius('6lpx')
.borderWidth('2lpx')
// .borderRadius('6lpx')
.borderRadius(6)
// .borderWidth('2lpx')
.borderWidth(2)
.justifyContent(FlexAlign.Center)
.width('100lpx')
.height('46lpx')
// .width('100lpx')
.width(100)
// .height('46lpx')
.height(46)
.onClick(()=>{
if (this.isLoadingAttention) return
this.isLoadingAttention = true
...
...
@@ -279,17 +358,22 @@ export struct FollowChildComponent{
}
}
.width('100%')
.height('92lpx')
// .height('92lpx')
.height(92)
.justifyContent(FlexAlign.SpaceBetween)
}.height('146lpx')
}
// .height('146lpx')
.height(146)
.justifyContent(FlexAlign.Center)
Divider()
.width('100%')
.height('2lpx')
// .height('2lpx')
.height(2)
.color($r('app.color.color_F5F5F5'))
.strokeWidth('1lpx')
// .strokeWidth('1lpx')
.strokeWidth(1)
}.width('100%')
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/follow/FollowFirstTabsComponent.ets
View file @
20c7826
...
...
@@ -39,8 +39,6 @@ export struct FollowFirstTabsComponent{
if(this.swiperController != null && this.data.length>1 && this.changeIndex === 1){
this.jumpFollowNextPage()
}
}).catch((err:Error)=>{
console.log(TAG,JSON.stringify(err))
})
}
...
...
@@ -56,19 +54,26 @@ export struct FollowFirstTabsComponent{
@Builder TabBuilder(index: number, item: FollowListItem) {
Stack(){
Text(item.directoryName)
.height('38lpx')
.fontSize('33lpx')
// .height('38lpx')
.height(38)
// .fontSize('33lpx')
.fontSize(33)
.fontWeight(this.currentIndex === index ? 600 : 400)
.fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
.lineHeight('38lpx')
// .lineHeight('38lpx')
.lineHeight(38)
if(this.currentIndex === index){
Divider()
.width('31lpx')
.height('4lpx')
// .width('31lpx')
.width(31)
// .height('4lpx')
.height(4)
.color('#ED2800')
.strokeWidth('4lpx')
.margin({top:'50lpx'})
// .strokeWidth('4lpx')
.strokeWidth(4)
// .margin({top:'50lpx'})
.margin({top: 50})
.id("divTag")
}
}.onClick(()=>{
...
...
@@ -78,8 +83,10 @@ export struct FollowFirstTabsComponent{
trackTabFirstClick(item.directoryName)
})
.height('100%')
.margin({right:'9lpx'})
.padding({left:'31lpx',right:index === this.data.length-1?"31lpx":"0lpx"})
// .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})
}
build() {
...
...
@@ -104,7 +111,8 @@ export struct FollowFirstTabsComponent{
}.listDirection(Axis.Horizontal)
.backgroundColor($r('app.color.white'))
.width("100%")
.height("84lpx")
.height(84)
// .height("84lpx")
.edgeEffect(EdgeEffect.None)
.scrollBar(BarState.Off)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/follow/FollowListDetailUI.ets
View file @
20c7826
...
...
@@ -99,16 +99,18 @@ export struct FollowListDetailUI {
ListItem() {
ListHasNoMoreDataUI()
}
.margin({bottom:"40lpx"})
// .margin({bottom:"40lpx"})
.margin({bottom: 40})
}
}
.edgeEffect(EdgeEffect.None)
.cachedCount(5)
.padding({ left: '31lpx', right: '31lpx' })
// .padding({ left: '31lpx', right: '31lpx' })
.padding({ left: 31, right: 31 })
.layoutWeight(1)
.scrollBar(BarState.Off)
.onReachEnd(() => {
console.log(TAG, "触底了");
//
console.log(TAG, "触底了");
if (!this.isLoading) {
this.isLoading = true
//加载分页数据
...
...
@@ -173,7 +175,7 @@ export struct FollowListDetailUI {
this.isGetRequest = true
this.sendFollowMessage()
}).catch((err: Error) => {
console.log(TAG, "请求失败")
//
console.log(TAG, "请求失败")
this.isGetRequest = true
this.isLoading = false
this.sendFollowMessage()
...
...
@@ -207,7 +209,7 @@ export struct FollowListDetailUI {
this.getFollowListStatus(value)
}
}).catch((err: Error) => {
console.log(TAG, "请求失败")
//
console.log(TAG, "请求失败")
this.isLoading = false
this.isGetRequest = true
})
...
...
@@ -276,7 +278,7 @@ export struct FollowListDetailUI {
this.isGetRequest = true
}
}).catch((err: Error) => {
console.log(TAG, JSON.stringify(err))
//
console.log(TAG, JSON.stringify(err))
this.isLoading = false
this.count = this.count === -1 ? 0 : this.count
this.isGetRequest = true
...
...
@@ -319,7 +321,7 @@ export struct FollowListDetailUI {
this.isLoading = false
this.isGetRequest = true
}).catch((err: Error) => {
console.log(TAG, "请求失败")
//
console.log(TAG, "请求失败")
this.isLoading = false
this.isGetRequest = true
})
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/follow/FollowSecondTabsComponent.ets
View file @
20c7826
...
...
@@ -18,7 +18,8 @@ export struct FollowSecondTabsComponent{
Column(){
Text().backgroundColor($r('app.color.color_EDEDED'))
.width('100%')
.height('2lpx')
// .height('2lpx')
.height(2)
if(this.data != null){
if(this.data[this.firstIndex].children == null || this.data[this.firstIndex].children.length == 0){
...
...
@@ -93,20 +94,25 @@ export struct FollowSecondTabsComponent{
Column(){
Text(item.directoryName)
.width('100%')
.height('38lpx')
.fontSize('30lpx')
// .height('38lpx')
.height(38)
// .fontSize('30lpx')
.fontSize(30)
.textAlign(TextAlign.Center)
.fontWeight(this.currentIndex === index ? 600 : 400)
.fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
.lineHeight('38lpx')
// .lineHeight('38lpx')
.lineHeight(38)
}
.onClick(()=>{
this.currentIndex = index
this.swiperController.changeIndex(this.currentIndex)
})
.justifyContent(FlexAlign.Center)
.height('84lpx')
.width('140lpx')
// .height('84lpx')
.height(84)
// .width('140lpx')
.width(140)
.backgroundColor(this.currentIndex === index?$r('app.color.white'):$r('app.color.color_F9F9F9'))
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/follow/FollowThirdTabsComponent.ets
View file @
20c7826
...
...
@@ -76,8 +76,10 @@ export struct FollowThirdTabsComponent{
.scrollBar(BarState.Off)
.listDirection(Axis.Horizontal)
.width('100%')
.height("84lpx")
.padding({left:'31lpx',right:'48lpx'})
// .height("84lpx")
.height(84)
// .padding({left:'31lpx',right:'48lpx'})
.padding({left: 31,right: 48})
// Column() {
// // 页签
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/ChildCommentComponent.ets
View file @
20c7826
...
...
@@ -24,31 +24,46 @@ 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')
.height('69lpx')
// .width('69lpx')
.width(69)
// .height('69lpx')
.height(69)
.borderRadius(50)
Image(this.levelHead)
.width('89lpx')
.height('89lpx')
// .width('89lpx')
.width(89)
// .height('89lpx')
.height(89)
.objectFit(ImageFit.Cover)
.borderRadius(50)
}.width('89lpx')
.height('89lpx')
.margin({ right: '3lpx' })
}
// .width('89lpx')
.width(89)
// .height('89lpx')
.height(89)
// .margin({ right: '3lpx' })
.margin({ right: 3 })
Column() {
Text(this.data.fromUserName)
.fontSize('25lpx')
.lineHeight('35lpx')
.fontWeight('600lpx')
// .fontSize('25lpx')
.fontSize(25)
// .lineHeight('35lpx')
.lineHeight(35)
// .fontWeight('600lpx')
.fontWeight(600)
.fontColor($r('app.color.color_222222'))
.margin({ bottom: '6lpx' })
// .margin({ bottom: '6lpx' })
.margin({ bottom: 6 })
.maxLines(1)
Text(`${this.data.createTime}`)
.fontColor($r('app.color.color_B0B0B0'))
.fontSize('23lpx')
.lineHeight('31lpx')
.fontWeight('400lpx')
// .fontSize('23lpx')
.fontSize(23)
// .lineHeight('31lpx')
.lineHeight(31)
// .fontWeight('400lpx')
.fontWeight(400)
.maxLines(1)
}.layoutWeight(1)
.alignItems(HorizontalAlign.Start)
...
...
@@ -57,15 +72,21 @@ export struct ChildCommentComponent {
if (this.data.checkStatus != 3) {
Row() {
Text(this.data.likeNum.toString())
.fontWeight("500lpx")
.fontSize("27lpx")
.lineHeight("31lpx")
// .fontWeight("500lpx")
.fontWeight(500)
// .fontSize("27lpx")
.fontSize(27)
// .lineHeight("31lpx")
.lineHeight(31)
.fontColor(this.data.like_status === 0 ? $r('app.color.color_666666') : $r('app.color.color_ED2800'))
.margin({ right: '8lpx' })
// .margin({ right: '8lpx' })
.margin({ right: 8 })
.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')
.height('31lpx')
// .width('31lpx')
.width(31)
// .height('31lpx')
.height(31)
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.Medium)
.borderRadius(50)
...
...
@@ -74,10 +95,13 @@ export struct ChildCommentComponent {
})
}
}
.margin({ bottom: '5lpx' })
// .margin({ bottom: '5lpx' })
.margin({ bottom: 5 })
.width('100%')
.height('108lpx')
.padding({ left: '31lpx', right: '31lpx' })
// .height('108lpx')
.height(108)
// .padding({ left: '31lpx', right: '31lpx' })
.padding({ left: 31, right: 31 })
Row() {
if (this.isExpand) {
...
...
@@ -99,7 +123,9 @@ export struct ChildCommentComponent {
.wordBreak(WordBreak.BREAK_ALL)
.textStyle()
}
}.padding({ left: '31lpx', right: '31lpx' })
}
// .padding({ left: '31lpx', right: '31lpx' })
.padding({ left: 31, right: 31 })
.width('100%')
Column() {
...
...
@@ -110,14 +136,20 @@ export struct ChildCommentComponent {
Text() {
Span(`@${this.data.parentCommentUserName}:`)
.fontColor($r('app.color.color_000000'))
.fontWeight('500lpx')
.fontSize('27lpx')
.lineHeight('40lpx')
// .fontWeight('500lpx')
.fontWeight(500)
// .fontSize('27lpx')
.fontSize(27)
// .lineHeight('40lpx')
.lineHeight(40)
Span(this.data.parentCommentContent)
.fontColor($r('app.color.color_000000'))
.fontWeight('400lpx')
.fontSize('27lpx')
.lineHeight('40lpx')
// .fontWeight('400lpx')
.fontWeight(400)
// .fontSize('27lpx')
.fontSize(27)
// .lineHeight('40lpx')
.lineHeight(40)
}
.width('100%')
.textAlign(TextAlign.Start)
...
...
@@ -125,15 +157,21 @@ export struct ChildCommentComponent {
Text() {
Span(`@${this.data.parentCommentUserName}:`)
.fontColor($r('app.color.color_000000'))
.fontWeight('500lpx')
.fontSize('27lpx')
.lineHeight('40lpx')
// .fontWeight('500lpx')
.fontWeight(500)
// .fontSize('27lpx')
.fontSize(27)
// .lineHeight('40lpx')
.lineHeight(40)
Span(this.clipText(this.data.parentCommentContent, 31, 5, 630, 1))
.fontColor($r('app.color.color_000000'))
.fontWeight('400lpx')
.fontSize('27lpx')
.lineHeight('40lpx')
// .fontWeight('400lpx')
.fontWeight(400)
// .fontSize('27lpx')
.fontSize(27)
// .lineHeight('40lpx')
.lineHeight(40)
if (this.isOverLinesParent) {
Span('...展开')
.fontColor($r('app.color.color_999999'))
...
...
@@ -148,14 +186,18 @@ export struct ChildCommentComponent {
}
}
.width('100%')
.padding({ top: '23lpx', bottom: '15lpx', right: '23lpx' })
// .padding({ top: '23lpx', bottom: '15lpx', right: '23lpx' })
.padding({ top: 23, bottom: 15, right: 23 })
Divider()
.width('100%')
.height('1lpx')
.strokeWidth('1lpx')
// .height('1lpx')
.height(1)
// .strokeWidth('1lpx')
.strokeWidth(1)
.backgroundColor($r('app.color.color_EDEDED'))
.margin({ top: '4lpx', bottom: '4lpx' })
// .margin({ top: '4lpx', bottom: '4lpx' })
.margin({ top: 4, bottom: 4 })
}
Column() {
...
...
@@ -163,17 +205,23 @@ export struct ChildCommentComponent {
Row() {
Image($r('app.media.comment_link_icon'))
.objectFit(ImageFit.Auto)
.width('31lpx')
.height('31lpx')
.margin({ right: '10lpx' })
// .width('31lpx')
.width(31)
// .height('31lpx')
.height(31)
// .margin({ right: '10lpx' })
.margin({ right: 10 })
Column() {
Row() {
Text(`${this.data.targetTitle}`)
.fontWeight('400lpx')
// .fontWeight('400lpx')
.fontWeight(400)
.fontColor($r('app.color.color_666666'))
.lineHeight('38lpx')
.fontSize('27lpx')
// .lineHeight('38lpx')
.lineHeight(38)
// .fontSize('27lpx')
.fontSize(27)
.layoutWeight(1)
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
...
...
@@ -184,13 +232,17 @@ export struct ChildCommentComponent {
}.layoutWeight(1)
Image($r('app.media.arrow_icon_right'))
.margin({ right: '4lpx' })
.width('23lpx')
.height('23lpx')
.margin({right:'23lpx'})
// .margin({ right: '4lpx' })
.margin({ right: 4 })
// .width('23lpx')
.width(23)
// .height('23lpx')
.height(23)
.margin({right: 23})
}
.width('100%')
.height('69lpx')
// .height('69lpx')
.height(69)
.justifyContent(FlexAlign.SpaceBetween)
.onClick(()=>{
let content = getParams(this.data)
...
...
@@ -198,18 +250,25 @@ export struct ChildCommentComponent {
ProcessUtils.processPage(content)
})
}.height('69lpx')
}
// .height('69lpx')
.height(69)
.justifyContent(FlexAlign.Center)
}
.margin({ top: '19lpx', bottom: '31lpx', left: '31lpx', right: '31lpx' })
.padding({ left: '23lpx' })
.width('662lpx')
// .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'))
if (!this.isLastItem) {
Divider().width('100%')
.height('12lpx')
.strokeWidth('12lpx')
// .height('12lpx')
.height(12)
// .strokeWidth('12lpx')
.strokeWidth(12)
.color($r('app.color.color_F5F5F5'))
}
}
...
...
@@ -275,11 +334,15 @@ export struct ChildCommentComponent {
@Extend(Text)
function textStyle() {
.width('630lpx')
.fontSize('31lpx')
.fontWeight('400lpx')
// .width('630lpx')
.width(630)
// .fontSize('31lpx')
.fontSize(31)
// .fontWeight('400lpx')
.fontWeight(400)
.fontColor($r('app.color.color_222222'))
.lineHeight('46lpx')
// .lineHeight('46lpx')
.lineHeight(46)
}
function getParams(item: CommentListItem) : ContentDTO{
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/HomePageBottomCommentComponent.ets
View file @
20c7826
...
...
@@ -37,14 +37,16 @@ export struct HomePageBottomCommentComponent {
if (this.isGetRequest == true) {
Text().backgroundColor($r('app.color.color_EDEDED'))
.width('100%')
.height('2lpx')
// .height('2lpx')
.height(2)
}
if (this.count === 0) {
if (this.isGetRequest == true) {
EmptyComponent({ emptyType: 11 })
.layoutWeight(1)
.width('100%')
.offset({ y: "-200lpx" })
// .offset({ y: "-200lpx" })
.offset({ y: -200 })
}
} else {
CustomPullToRefresh({
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/HomePageBottomFollowComponent.ets
View file @
20c7826
...
...
@@ -71,7 +71,8 @@ export struct HomePageBottomFollowComponent {
if (this.isGetRequest == true) {
Text().backgroundColor($r('app.color.color_EDEDED'))
.width('100%')
.height('2lpx')
// .height('2lpx')
.height(2)
}
if (this.count === 0) {
...
...
@@ -80,28 +81,38 @@ export struct HomePageBottomFollowComponent {
EmptyComponent({ emptyType: 14 })
.layoutWeight(1)
.width('100%')
.offset({ y: "-200lpx" })
// .offset({ y: "-200lpx" })
.offset({ y: -200 })
}
Row() {
Text("关注更多人民号")
.fontWeight('400lpx')
// .fontWeight('400lpx')
.fontWeight(400)
.fontColor($r('app.color.color_222222'))
.lineHeight('38lpx')
.fontSize('27lpx')
// .lineHeight('38lpx')
.lineHeight(38)
// .fontSize('27lpx')
.fontSize(27)
.textAlign(TextAlign.Center)
.margin({ right: '4lpx' })
// .margin({ right: '4lpx' })
.margin({ right: 4 })
Image($r('app.media.arrow_icon_right'))
.objectFit(ImageFit.Auto)
.width('27lpx')
.height('27lpx')
// .width('27lpx')
.width(27)
// .height('27lpx')
.height(27)
}
.height('69lpx')
.width('659lpx')
// .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: '31lpx', bottom: '4lpx' })
.margin({ top: 31, bottom: 4 })
.onClick(() => {
let params = { 'index': "1" } as Record<string, string>
WDRouterRule.jumpWithPage(WDRouterPage.followListPage, params)
...
...
@@ -146,23 +157,32 @@ export struct HomePageBottomFollowComponent {
ListItem() {
Row() {
Text("关注更多人民号")
.fontWeight('400lpx')
// .fontWeight('400lpx')
.fontWeight(400)
.fontColor($r('app.color.color_222222'))
.lineHeight('38lpx')
.fontSize('27lpx')
// .lineHeight('38lpx')
.lineHeight(38)
// .fontSize('27lpx')
.fontSize(27)
.textAlign(TextAlign.Center)
.margin({ right: '4lpx' })
// .margin({ right: '4lpx' })
.margin({ right: 4 })
Image($r('app.media.arrow_icon_right'))
.objectFit(ImageFit.Auto)
.width('27lpx')
.height('27lpx')
// .width('27lpx')
.width(27)
// .height('27lpx')
.height(27)
}
.height('69lpx')
.width('659lpx')
// .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: '31lpx', bottom: '4lpx' })
.margin({ top: 31, bottom: 4 })
}.onClick(() => {
let params = { 'index': "1" } as Record<string, string>
WDRouterRule.jumpWithPage(WDRouterPage.followListPage, params)
...
...
@@ -177,12 +197,13 @@ export struct HomePageBottomFollowComponent {
if (!this.hasMore) {
ListItem() {
///ToDo 数据过少时,达不到滑动条件 后续优化
ListHasNoMoreDataUI().height(this.bottomCompH > 150
?this.bottomCompH
:150)
ListHasNoMoreDataUI().height(this.bottomCompH > 150
? this.bottomCompH
:150)
}
}
}
.cachedCount(5)
.padding({ left: '31lpx', right: '31lpx' })
// .padding({ left: '31lpx', right: '31lpx' })
.padding({ left: 31, right: 31 })
.layoutWeight(1)
.scrollBar(BarState.Off)
.edgeEffect(EdgeEffect.None)
...
...
@@ -234,11 +255,11 @@ export struct HomePageBottomFollowComponent {
}
}
this.bottomCompH = DisplayUtils.getDeviceHeight() - this.data_follow.totalCount()*100
console.log(TAG, `${this.bottomCompH}`);
//
console.log(TAG, `${this.bottomCompH}`);
this.isLoading = false
this.isGetRequest = true
}).catch((err: Error) => {
console.log(TAG, "请求失败")
//
console.log(TAG, "请求失败")
this.isLoading = false
this.isGetRequest = true
})
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/message/MessageListItemUI.ets
View file @
20c7826
...
...
@@ -15,30 +15,39 @@ export struct MessageListItemUI {
Row() {
Image(this.item.imgSrc)
.objectFit(ImageFit.Auto)
.width('92lpx')
.height('92lpx')
.margin({ right: '15lpx' })
// .width('92lpx')
.width(92)
// .height('92lpx')
.height(92)
// .margin({ right: '15lpx' })
.margin({ right: 15 })
Column() {
Text(this.item.title)
.fontWeight(500)
.fontSize('31lpx')
.lineHeight('42lpx')
// .fontSize('31lpx')
.fontSize(31)
// .lineHeight('42lpx')
.lineHeight(42)
.fontColor($r('app.color.color_222222'))
.maxLines(1)
.margin({ bottom: StringUtils.isNotEmpty(this.item.desc)?'8lpx':0 })
// .margin({ bottom: StringUtils.isNotEmpty(this.item.desc)?'8lpx':0 })
.margin({ bottom: StringUtils.isNotEmpty(this.item.desc) ? 8 : 0 })
if(StringUtils.isNotEmpty(this.item.desc)){
Text(`${this.item.desc}`)
.fontColor($r('app.color.color_999999'))
.fontSize('27lpx')
.lineHeight('38lpx')
// .fontSize('27lpx')
.fontSize(27)
// .lineHeight('38lpx')
.lineHeight(38)
.fontWeight(400)
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
}
}
.height('92lpx')
// .height('92lpx')
.height(92)
.layoutWeight(1)
.alignItems(HorizontalAlign.Start)
.justifyContent(StringUtils.isNotEmpty(this.item.desc)?FlexAlign.Start:FlexAlign.Center)
...
...
@@ -47,40 +56,51 @@ export struct MessageListItemUI {
Column() {
Text(`${this.item.time}`)
.fontColor($r('app.color.color_999999'))
.fontSize('23lpx')
// .fontSize('23lpx')
.fontSize(23)
.fontWeight(500)
.lineHeight('35lpx')
.margin({ bottom: this.item.unReadCount > 0 ?'8lpx':0 })
// .lineHeight('35lpx')
.lineHeight(35)
// .margin({ bottom: this.item.unReadCount > 0 ?'8lpx':0 })
.margin({ bottom: this.item.unReadCount > 0 ? 8 : 0 })
if(this.item.unReadCount > 0){
Button(){
Text(`${this.item.unReadCount}`)
.fontWeight(400)
.fontSize("18lpx")
// .fontSize("18lpx")
.fontSize(18)
.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")
.constraintSize({minWidth:"27lpx"})
// .height("27lpx")
.height(27)
// .constraintSize({minWidth:"27lpx"})
.constraintSize({minWidth: 27})
}
}
.justifyContent(FlexAlign.Start)
.alignItems(HorizontalAlign.End)
.height('92lpx')
// .height('92lpx')
.height(92)
}
.width('100%')
.height('92lpx')
// .height('92lpx')
.height(92)
.justifyContent(FlexAlign.SpaceBetween)
}.height('154lpx')
}
// .height('154lpx')
.height(154)
.width("100%")
.justifyContent(FlexAlign.Center)
Text().backgroundColor($r('app.color.color_EDEDED'))
.width('100%')
.height('1lpx')
// .height('1lpx')
.height(1)
.visibility(this.index != 3 ?Visibility.Visible:Visibility.None)
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/message/MessageListUI.ets
View file @
20c7826
...
...
@@ -38,8 +38,6 @@ export struct MessageListUI {
}
})
}
}).catch((err: Error) => {
console.log(TAG, JSON.stringify(err))
})
}
...
...
@@ -103,8 +101,6 @@ export struct MessageListUI {
}
}*/
})
}).catch((err: Error) => {
console.log(TAG, JSON.stringify(err))
})
}
...
...
@@ -150,7 +146,7 @@ export struct MessageListUI {
}
}
console.log(result);
//
console.log(result);
return result
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/MinePageComponent.ets
View file @
20c7826
...
...
@@ -78,7 +78,7 @@ export struct MinePageComponent {
}else {
this.percent = 1
}
console.log(TAG,"currentBreakpoint==>"+this.percent)
//
console.log(TAG,"currentBreakpoint==>"+this.percent)
}
...
...
@@ -140,7 +140,7 @@ export struct MinePageComponent {
this.getFunctionData()
this.getUserLogin()
this.addLoginStatusObserver()
console.log(TAG,"currentBreakpoint==>"+this.currentBreakpoint)
//
console.log(TAG,"currentBreakpoint==>"+this.currentBreakpoint)
this.currentChanged()
this.changeTopStatusBarColor(this.navItem.statusBarColor)
...
...
@@ -161,8 +161,6 @@ export struct MinePageComponent {
})
}
}
}).catch((err: Error) => {
console.log(TAG, JSON.stringify(err))
})
}
...
...
@@ -195,7 +193,8 @@ export struct MinePageComponent {
Stack(){
Image(this.navItem?.backgroundUrl??'')
.width('100%')
.height(`${657 * this.percent}lpx`)
// .height(`${657 * this.percent}lpx`)
.height(657)
.objectFit(ImageFit.Cover)
this.MinePageUI()
}.height('100%')
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/PrivacySettingPage.ets
View file @
20c7826
...
...
@@ -95,7 +95,7 @@ export struct PrivacySettingPage {
@Builder PrivacySettingComponentsUI() {
Column() {
List({ space:
`${this.calcHeight(23)}lpx`
}) {
List({ space:
12
}) {
ForEach(this.listData, (item: PrivacySettingModel, index:number) => {
ListItem() {
if (item.privacyName == DiyString) {
...
...
@@ -130,32 +130,38 @@ export struct PrivacySettingPage {
})
})
}.width('100%')
.padding({ left: `${this.calcHeight(29)}lpx`, right: `${this.calcHeight(29)}lpx` })
.margin({ top: `${this.calcHeight(38)}lpx` })
.padding({ left: 15, right: 15 })
.margin({ top: 20 })
Row() {
Text(this.tips)
.fontSize(`${this.calcHeight(25)}lpx`)
.fontSize(14)
.lineHeight(20)
.fontWeight(400)
.textAlign(TextAlign.Start)
.fontColor($r("app.color.color_666666"))
.margin({ left:
`${this.calcHeight(29)}lpx`, top: `${this.calcHeight(46)}lpx`
})
.margin({ left:
15, top: 24
})
// .backgroundColor(Color.Orange)
Text(this.privacyTips)
.fontSize(`${this.calcHeight(25)}lpx`)
.fontSize(14)
.lineHeight(20)
.fontWeight(400)
.textAlign(TextAlign.Start)
.fontColor('#ED2800')
.margin({ top:
`${this.calcHeight(46)}lpx`
})
.margin({ top:
24
})
.onClick(() => {
//跳转隐私政策
let bean={contentID:"2",pageID:""} as Params
WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage,bean)
})
Text(this.tipsEnd)
.fontSize(`${this.calcHeight(25)}lpx`)
.fontSize(14)
.lineHeight(20)
.fontWeight(400)
.textAlign(TextAlign.Start)
.fontColor($r("app.color.color_666666"))
.margin({ top:
`${this.calcHeight(46)}lpx`
})
.margin({ top:
24
})
}
}
...
...
@@ -183,28 +189,32 @@ struct getArrowCell {
// 左侧标题
Text(this.item.privacyName)
.fontColor('#666666')
.fontSize(`${this.calcHeight(31)}lpx`)
.fontSize(16)
.lineHeight(23)
.fontWeight(400)
Row() {
Text(this.item.permission ? '已开启' : '去设置')
.fontColor(this.item.permission ? '#666666' : '#CCCCCC')
.fontSize(`${this.calcHeight(31)}lpx`)
.margin({ right: `${this.calcHeight(8)}lpx` })
.fontSize(14)
.lineHeight(20)
.fontWeight(400)
.margin({ right: 4 })
Image($r('app.media.mine_user_arrow'))
.width(`${this.calcHeight(27)}lpx`)
.height(`${this.calcHeight(27)}lpx`)
.width(18)
.height(18)
.objectFit(ImageFit.Auto)
}
}
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.SpaceBetween)
.height(
`${this.calcHeight(97)}lpx`
)
.height(
50
)
.width('100%')
.padding({ left:
`${this.calcHeight(29)}lpx`, right: `${this.calcHeight(29)}lpx`
})
.padding({ left:
15, right: 15
})
.backgroundColor('#FFFFFF')
.borderRadius(
`${this.calcHeight(8)}lpx`
)
.borderRadius(
4
)
}
calcHeight(value:number): number{
...
...
@@ -224,12 +234,14 @@ struct getTuiJianCell {
// 左侧标题
Text(this.item.privacyName)
.fontColor('#666666')
.fontSize(`${this.calcHeight(31)}lpx`)
.fontSize(16)
.lineHeight(23)
.fontWeight(400)
Row() {
Toggle({ type: ToggleType.Switch, isOn: this.item.permission })
.height(`${this.calcHeight(58)}lpx`)
.width(`${this.calcHeight(96)}lpx`)
.height(30)
.width(50)
.selectedColor('#ED2700')
.onChange((isOn: boolean) => {
// this.privacySwitch = isOn;
...
...
@@ -240,25 +252,26 @@ struct getTuiJianCell {
}
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.SpaceBetween)
.height(
`${this.calcHeight(97)}lpx`
)
.height(
50
)
.width('100%')
Blank()
.backgroundColor('#EDEDED')
.height(
`${this.calcHeight(1)}lpx`
)
.height(
0.5
)
Text(DiyCloseTipsString)
.fontColor('#999999')
.fontSize(`${this.calcHeight(23)}lpx`)
.margin({ right: `${this.calcHeight(8)}lpx` })
.height(`${this.calcHeight(69)}lpx`)
.fontSize(12)
.lineHeight(20)
.fontWeight(400)
.height(36)
}.width('100%')
.alignItems(HorizontalAlign.Start)
.backgroundColor('#FFFFFF')
.borderRadius(`${this.calcHeight(8)}lpx`)
.padding({ left: `${this.calcHeight(29)}lpx`, right: `${this.calcHeight(29)}lpx` })
.borderRadius(4)
.padding({ left: 15, right: 15 })
}
calcHeight(value:number): number{
...
...
sight_harmony/features/wdComponent/src/main/ets/components/reusable/CustomTitleAndEditUI.ets
View file @
20c7826
...
...
@@ -13,8 +13,10 @@ export struct CustomTitleAndEditUI {
//标题栏目
if(this.imgBack){
Image($r('app.media.back_icon'))
.width('46lpx')
.height('46lpx')
// .width('46lpx')
.width(46)
// .height('46lpx')
.height(46)
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.High)
.id("back_icon")
...
...
@@ -22,20 +24,24 @@ export struct CustomTitleAndEditUI {
center: {anchor: "__container__", align: VerticalAlign.Center},
left: {anchor: "__container__", align: HorizontalAlign.Start}
})
.margin({left:'31lpx'})
// .margin({left:'31lpx'})
.margin({left: 31})
.onClick(()=>{
router.back()
})
}
Text(this.titleName)
.height('42lpx')
// .height('42lpx')
.height(42)
.maxLines(1)
.id("title")
.fontSize('35lpx')
// .fontSize('35lpx')
.fontSize(35)
.fontWeight(400)
.fontColor($r('app.color.color_222222'))
.lineHeight('42lpx')
// .lineHeight('42lpx')
.lineHeight(42)
.alignRules({
center: {anchor: "__container__", align: VerticalAlign.Center},
middle: {anchor: "__container__", align: HorizontalAlign.Center}
...
...
@@ -51,14 +57,16 @@ export struct CustomTitleAndEditUI {
center: {anchor: "__container__", align: VerticalAlign.Center},
right: {anchor: "__container__", align: HorizontalAlign.End}
})
.margin({right:'31lpx'})
// .margin({right:'31lpx'})
.margin({right: 31})
.onClick(()=>{
this.isEditState = !this.isEditState
this.editCallback()
})
}
}
.height('84lpx')
// .height('84lpx')
.height(84)
.width('100%')
.backgroundColor($r('app.color.white'))
...
...
sight_harmony/features/wdComponent/src/main/ets/components/reusable/CustomTitleUI.ets
View file @
20c7826
...
...
@@ -11,8 +11,8 @@ export struct CustomTitleUI {
//标题栏目
if(this.imgBack){
Image($r('app.media.back_icon'))
.width(`${this.calcHeight(46)}lpx`)
.height(`${this.calcHeight(46)}lpx`)
.width(24)
.height(24)
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.High)
.id("back_icon")
...
...
@@ -20,7 +20,7 @@ export struct CustomTitleUI {
center: {anchor: "__container__", align: VerticalAlign.Center},
left: {anchor: "__container__", align: HorizontalAlign.Start}
})
.margin({left:
`${this.calcHeight(31)}lpx`
})
.margin({left:
16
})
.onClick(()=>{
router.back()
})
...
...
@@ -29,17 +29,18 @@ export struct CustomTitleUI {
Text(this.titleName)
.maxLines(1)
.id("title")
.fontSize(`${this.calcHeight(35)}lpx`)
.fontFamily('PingFang SC-Regular')
.fontSize(18)
.fontWeight(400)
.fontColor($r('app.color.color_222222'))
.lineHeight(
`${this.calcHeight(50)}lpx`
)
.lineHeight(
26
)
.alignRules({
center: {anchor: "__container__", align: VerticalAlign.Center},
middle: {anchor: "__container__", align: HorizontalAlign.Center}
})
}
.height(
`${this.calcHeight(84)}lpx`
)
.height(
44
)
.width('100%')
.backgroundColor($r('app.color.white'))
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/reusable/ListHasNoMoreDataUI.ets
View file @
20c7826
...
...
@@ -7,22 +7,29 @@ export struct ListHasNoMoreDataUI{
Row(){
Text("已显示全部内容")
.fontColor($r('app.color.color_999999'))
.fontWeight('500lpx')
.fontSize('23lpx')
// .fontWeight('500lpx')
.fontWeight(500)
// .fontSize('23lpx')
.fontSize(23)
}.justifyContent(FlexAlign.Center)
.width('100%')
.margin({top:'20lpx',bottom:'20lpx'})
// .margin({top:'20lpx',bottom:'20lpx'})
.margin({top: 20,bottom: 20})
}else if (this.style === 2){
Column(){
Image($r('app.media.empty_icon'))
.width('200lpx')
.height('200lpx')
// .width('200lpx')
.width(200)
// .height('200lpx')
.height(200)
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.High)
Text("暂无内容")
.fontColor($r('app.color.color_999999'))
.fontWeight('500lpx')
.fontSize('23lpx')
// .fontWeight('500lpx')
.fontWeight(500)
// .fontSize('23lpx')
.fontSize(23)
}
.justifyContent(FlexAlign.Center)
.width('100%')
...
...
sight_harmony/features/wdComponent/src/main/ets/components/reusable/MyCustomDialog.ets
View file @
20c7826
...
...
@@ -22,33 +22,35 @@ export struct MyCustomDialog {
Column(){
if(this.titleShow){
Text(this.title)
.fontSize(
"32lpx"
)
.fontSize(
18
)
.fontColor($r('app.color.color_333333'))
.lineHeight(
'50lpx'
)
.lineHeight(
26
)
.fontWeight(600)
}
if(this.tipShow){
Text(this.tipValue)
.margin({ top:this.titleShow?"10lpx":"0lpx" })
.fontSize("27lpx")
.margin({ top:this.titleShow ? 5 : 0 })
.fontSize(14)
.fontWeight(400)
.lineHeight(
'38lpx'
)
.lineHeight(
20
)
.fontColor($r('app.color.color_999999'))
}
}.padding({top:
"48lpx",bottom:"48lpx"
})
}.padding({top:
25,bottom:25
})
.alignItems(HorizontalAlign.Center)
Divider()
.width("100%")
.strokeWidth('1lpx')
.height('1lpx')
.color($r('app.color.color_EEEEEE'))
// Divider()
// .width("100%")
// .strokeWidth(0.5)
// .height(0.5)
// .color($r('app.color.color_EEEEEE'))
Row(){
Text(this.leftText)
.fontSize(
'35lpx'
)
.fontSize(
18
)
.fontWeight(400)
.lineHeight(26)
.fontColor('#333333')
.fontColor(this.leftTextColor)
.onClick(() => {
if (this.controller != undefined){
...
...
@@ -64,14 +66,15 @@ export struct MyCustomDialog {
.textAlign(TextAlign.Center)
Divider()
.width("1lpx")
.strokeWidth('1lpx')
.width(0.5)
.strokeWidth(0.5)
.vertical(true)
.height(
'92lpx'
)
.height(
50
)
.color($r('app.color.color_EEEEEE'))
Text(this.rightText)
.fontSize('35lpx')
.fontSize(18)
.lineHeight(26)
.textAlign(TextAlign.Center)
.fontWeight(400)
.fontColor(this.rightTextColor)
...
...
@@ -88,9 +91,9 @@ export struct MyCustomDialog {
}).layoutWeight(1)
}
.alignItems(VerticalAlign.Center)
.height(
'96lpx'
)
.height(
50
)
}.borderRadius(10)
.width(
"518lpx"
)
.width(
270
)
.backgroundColor("#FFF")
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/setting/AboutPageUI.ets
View file @
20c7826
...
...
@@ -61,9 +61,9 @@ export struct AboutPageUI {
CustomTitleUI({titleName:'关于',percent:this.percent})
Image($r('app.media.setting_about_logo'))
.width(`${this.calcHeight(376)}lpx`)
.height(`${this.calcHeight(160)}lpx`)
.margin({ top: `${this.calcHeight2(180)}lpx`, bottom: `${this.calcHeight2(160)}lpx` })
.width(145)
.height(80)
.margin({ top: 46, bottom: 94 })
.gesture(
TapGesture({ count: 2 })
.onAction((event: GestureEvent) => {
...
...
@@ -95,28 +95,32 @@ export struct AboutPageUI {
})
}.divider({
strokeWidth: 1,
startMargin: `${this.calcHeight(29)}lpx`,
endMargin: `${this.calcHeight(29)}lpx`,
startMargin: 15,
endMargin: 15,
color: '#EDEDED'
})
Blank()
Image($r('app.media.about_us_code'))
.width(`${this.calcHeight(192)}lpx`)
.height(`${this.calcHeight(192)}lpx`)
.width(100)
.height(100)
Text(this.version)
.fontSize(`${this.calcHeight(25)}lpx`)
.fontSize(13)
.lineHeight(16)
.fontWeight(400)
.textAlign(TextAlign.Center)
.fontColor($r("app.color.color_666666"))
.margin({ bottom: `${this.calcHeight(31)}lpx` })
.fontColor('#000000')
.margin({ top: 16, bottom: 16 })
Text(this.message)
.fontSize(`${this.calcHeight(19)}lpx`)
.fontSize(10)
.fontWeight(400)
.lineHeight(14)
.textAlign(TextAlign.Center)
.fontColor($r("app.color.color_999999"))
.margin({ bottom:
`${this.calcHeight(35)}lpx`
})
.margin({ bottom:
18
})
}
.width('100%')
.height('100%')
...
...
@@ -130,18 +134,20 @@ export struct AboutPageUI {
// 左侧标题
Text(`${item}`)
.fontColor('#666666')
.fontSize(`${this.calcHeight(31)}lpx`)
.fontSize(16)
.fontWeight(400)
.lineHeight(23)
Image($r('app.media.mine_user_arrow'))
.width(`${this.calcHeight(27)}lpx`)
.height(`${this.calcHeight(27)}lpx`)
.width(14)
.height(14)
.objectFit(ImageFit.Auto)
}
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.SpaceBetween)
.height(
`${this.calcHeight(97)}lpx`
)
.height(
50
)
.width('100%')
.padding({ left:
`${this.calcHeight(29)}lpx`, right: `${this.calcHeight(29)}lpx`
})
.padding({ left:
15, right: 15
})
}
calcHeight(value:number): number{
...
...
sight_harmony/features/wdComponent/src/main/ets/components/setting/AccountAndSecurityLayout.ets
View file @
20c7826
...
...
@@ -12,6 +12,8 @@ import { CustomLogoutDialog } from './CustomLogoutDialog';
import { emitter } from '@kit.BasicServicesKit';
import { ConfirmLogoutDialog } from './ConfirmLogoutDialog';
import { TrackingButton, TrackConstants, TrackingPageBrowse } from 'wdTracking/Index';
import { TitleBackComponent } from './TitleBackComponent';
export { SettingPasswordParams } from "wdLogin"
@Component
...
...
@@ -116,7 +118,6 @@ export struct AccountAndSecurityLayout {
this.ifSetPassword = false
}
}
}).catch((err: Error) => {
})
}
...
...
@@ -141,7 +142,7 @@ export struct AccountAndSecurityLayout {
if(eventData&&eventData.data){
this.listData[0].subTitle = eventData.data['content']
}
Logger.debug( 'event callback:' + JSON.stringify(eventData));
//
Logger.debug( 'event callback:' + JSON.stringify(eventData));
};
// 订阅eventId为1的事件
...
...
@@ -152,6 +153,7 @@ export struct AccountAndSecurityLayout {
build() {
Column(){
if(this.isAccountPage){
TitleBackComponent({title:"账户管理"})
this.settingList()
}else {
this.logoutLayout()
...
...
@@ -163,55 +165,39 @@ export struct AccountAndSecurityLayout {
@Builder settingList() {
Stack({ alignContent: Alignment.Bottom }) {
Column() {
RelativeContainer() {
Text('账户管理')
.fontColor('#FF333333')
.fontSize(18)
.textAlign(TextAlign.Center)
.height(44)
.alignRules({
top: { anchor: "__container__", align: VerticalAlign.Top },
left: { anchor: "__container__", align: HorizontalAlign.Start },
right: { anchor: "__container__", align: HorizontalAlign.End },
})
.id('titleContent')
Image($r('app.media.back_icon'))
.objectFit(ImageFit.Auto)
.height(24)
.width(24)
.margin({
left: 16, top: 8
})
.alignRules({
top: { anchor: "__container__", align: VerticalAlign.Top },
left: { anchor: "__container__", align: HorizontalAlign.Start },
})
.onClick(() => {
router.back()
})
.id('backImage')
}.height(44)
List() {
ForEach(this.listData, (item: MineMainSettingFunctionItem, index: number) => {
ListItem() {
if (item.type == 0) {
Column() {
// this.getArrowCell(item)
AccountArrowCell({ item:item})
}.padding({ left: '27lpx' }).height('117lpx').justifyContent(FlexAlign.Center)
} else if (item.type == 1) {
Column() {
this.getSwitchCell(item)
}.padding({ left: '27lpx' }).height('117lpx').justifyContent(FlexAlign.Center)
} else {
// Column().width('100%').height('15lpx').backgroundColor(0xf0f0f0)
Column(){
Column(){
if (item.type == 0) {
AccountArrowCell({ item:item})
} else if (item.type == 1) {
this.getSwitchCell(item)
}
}
.margin({
left: 16,
right: 16
})
if(index === this.listData.length - 2) {
Divider()
.color('#f0f0f0')
.strokeWidth(5)
} else if(index !== this.listData.length - 1){
Divider()
.color('#f0f0f0')
.strokeWidth(1)
.margin({
left: 16,
right: 16
})
}
}
}
.onClick(() => {
console.log(index + "")
//
console.log(index + "")
if (index == 0){
WDRouterRule.jumpWithPage(WDRouterPage.changeBindPhonePage)
}else if (index == 1) {
...
...
@@ -225,28 +211,34 @@ export struct AccountAndSecurityLayout {
}
}else if (index == 3) {
trackButtonClick("accountManagementPageAccountCancellation")
this.isAccountPage
=
false
this.isAccountPage
=
false
this.logoutLayoutShowTime = DateTimeUtils.getTimeStamp()
}
})
})
}
.divider({
strokeWidth: 1,
startMargin: 15,
endMargin: 10,
color: '#f0f0f0'
})
.onScrollFrameBegin((offset, state) => {
return { offsetRemain: 0 }
})
}.height("100%")
}
.height('90%')
.backgroundColor(Color.White)
Column() {
Button('退出登录',{ stateEffect: true ,type: ButtonType.Normal}).width('90%').height('80lpx').backgroundColor('#da3e22').fontColor('#fff').margin('20lpx').borderRadius('8lpx').onClick(()=>{
trackButtonClick("accountManagementPageLogout")
this.confirmDialogController.open()
Button('退出登录',{ stateEffect: true ,type: ButtonType.Normal})
.width('90%')
.height(44)
.backgroundColor('#ED2800')
.fontColor('#FFFFFF')
.fontWeight(400)
.fontFamily('PingFang SC-Regular')
.fontSize(18)
.margin(15)
.borderRadius(5)
.onClick(()=>{
trackButtonClick("accountManagementPageLogout")
this.confirmDialogController.open()
})
}
}
...
...
@@ -255,7 +247,7 @@ export struct AccountAndSecurityLayout {
@Builder itemHead(text: string) {
// 列表分组的头部组件,对应联系人分组A、B等位置的组件
if (text.length > 0) {
Row().width('100%').height(
'20lpx'
).backgroundColor(0xf0f0f0)
Row().width('100%').height(
10
).backgroundColor(0xf0f0f0)
}
}
...
...
@@ -264,10 +256,10 @@ export struct AccountAndSecurityLayout {
Column() {
RelativeContainer() {
Text('注销账号')
.fontColor('#FF333333')
.fontSize("35lpx")
.fontColor('#333333')
.fontSize(18)
.fontWeight(400)
.lineHeight(
"50lpx"
)
.lineHeight(
26
)
.textAlign(TextAlign.Center)
.height(44)
.alignRules({
...
...
@@ -289,63 +281,69 @@ export struct AccountAndSecurityLayout {
left: { anchor: "__container__", align: HorizontalAlign.Start },
})
.onClick(() => {
this.isAccountPage
=
true
this.isAccountPage
=
true
this.pageShowAccountTime = DateTimeUtils.getTimeStamp()
this.logoutLayoutHide()
this.protocolState
=
false
this.protocolState
=
false
})
.id('backImage')
}.height(44)
Text('为保证您的账号安全,在您提交的注销申请生效前,需同时满足以下几个条件:')
.fontColor('#
FF
222222')
.fontColor('#222222')
.fontWeight(600)
.lineHeight("42lpx")
.fontSize("31lpx")
.padding({ top:17,left: "31lpx", right: "31lpx" })
.lineHeight(22)
.fontSize(16)
.padding({ top:17,left: 16, right: 16 })
.width('100%')
Text('1. 账号处于安全状态')
.fontColor('#
FF
222222')
.fontColor('#222222')
.fontSize(16)
.lineHeight(22)
.fontWeight(600)
.padding({ top: 24, left:
"62lpx"
})
.padding({ top: 24, left:
16
})
.width('100%')
Text('账号处于正常使用状态,无被盗风险。')
.fontColor('#
FF
666666')
.fontColor('#666666')
.fontSize(14)
.fontWeight(400)
.padding({ top: 8, left: "62lpx" })
.lineHeight(18)
.padding({ top: 8, left: 16 })
.width('100%')
Text('2. 账号权限解除')
.fontColor('#
FF
222222')
.fontColor('#222222')
.fontSize(16)
.lineHeight(22)
.fontWeight(600)
.padding({ top: 24, left:
"62lpx"
})
.padding({ top: 24, left:
16
})
.width('100%')
Text('账号已解除与其他产品的授权登录或绑定关系。')
.fontColor('#
FF
666666')
.fontColor('#666666')
.fontSize(14)
.fontWeight(400)
.padding({ top: 8, left: "62lpx" })
.lineHeight(18)
.padding({ top: 8, left: 16 })
.width('100%')
Text('3. 账号无任何纠纷,包括举报投诉')
.fontColor('#
FF
222222')
.fontColor('#222222')
.fontSize(16)
.lineHeight(22)
.fontWeight(600)
.padding({ top: 24, left:
"62lpx"
})
.padding({ top: 24, left:
16
})
.width('100%')
Text('请注意:注销后7天内不能再次注册人民日报客户端,需要等到账号冷静期结束才能再次登录注册')
.fontColor('#
FF
ED2800')
.fontColor('#ED2800')
.fontSize(14)
.fontWeight(400)
.padding({ top: 32, left: "31lpx", right: "31lpx" })
.lineHeight(20)
.padding({ top: 32, left: 16, right: 16 })
.width('100%')
}.alignRules({
...
...
@@ -359,16 +357,16 @@ export struct AccountAndSecurityLayout {
Column() {
Row() {
Image(this.protocolState ? $r("app.media.logout_checkbox_select") : $r("app.media.logout_checkbox_unselected"))
.width(15)
.height(15)
.width(18)
.height(18)
.onClick(() => {
this.protocolState = !this.protocolState
})
Text() {
Span("我已阅读并同意").fontColor("#999999").fontSize(12)
Span("《用户注销协议》").fontColor("#ED2800").fontSize(12).onClick(() => {
Span("我已阅读并同意").fontColor("#999999").fontSize(12).lineHeight(18)
Span("《用户注销协议》").fontColor("#ED2800").fontSize(12).lineHeight(18).onClick(() => {
TrackingButton.click("cancelAccountPageUserLogoffAgreement",TrackConstants.PageName.Cancel_Account,TrackConstants.PageName.Cancel_Account)
let bean = { contentID: "3", pageID: "" } as Params
WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage, bean)
...
...
@@ -381,8 +379,9 @@ export struct AccountAndSecurityLayout {
.borderRadius(4)
.fontColor(this.protocolState ? "#FFFFFFFF" : "#66FFFFFF")
.fontSize(18)
.lineHeight(26)
.fontWeight(FontWeight.Medium)
.margin({ top: 2
0
})
.margin({ top: 2
4
})
.height(44)
.textAlign(TextAlign.Center)
.width("100%")
...
...
@@ -395,7 +394,7 @@ export struct AccountAndSecurityLayout {
this.dialogController.open()
})
}.padding({ left: 25, right: 25 }).width('100%')
}.padding({ left: 25, right: 25 }).
height(44).
width('100%')
}.alignRules({
bottom: { anchor: "__container__", align: VerticalAlign.Bottom },
left: { anchor: "__container__", align: HorizontalAlign.Start },
...
...
@@ -415,71 +414,46 @@ export struct AccountAndSecurityLayout {
Row() {
// 判断有没有图片
if (item.imgSrc) {
Image(item.imgSrc).height('38lpx').margin({ right: '5lpx' })
Text(`${item.title}`).margin({ top: '8lpx' }).height('38lpx').fontColor('#333333').fontSize('29lpx')
Image(item.imgSrc)
.height(20)
.width(20)
.margin({ right: 16 })
Text(`${item.title}`)
.lineHeight(20)
.fontColor('#222222')
.fontSize(15)
.fontWeight(400)
.fontFamily('PingFang SC-Regular')
} else {
Text(`${item.title}`).margin({ top: '8lpx' }).height('38lpx').fontColor('#333333').fontSize('29lpx')
Text(`${item.title}`)
.lineHeight(20)
.fontColor('#222222')
.fontSize(15)
.fontWeight(400)
.fontFamily('PingFang SC-Regular')
}
}.width('60%')
// 右侧文案和右箭头
Row() {
Toggle({ type: ToggleType.Switch, isOn: item.switchState })
.height('50lpx')
.margin({ left: '81lpx', right: '29lpx' })
.selectedColor(Color.Pink)
.height(30)
.width(50)
.selectedColor("#ED2800")
.onChange((isOn: boolean) => {
this.privacySwitch = isOn;
})
}.width('40%')
.margin({ right: '29lpx' })
.justifyContent(FlexAlign.End)
}
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.SpaceBetween)
}.height('54lpx')
}
// 右文字+箭头cell
@Builder getArrowCell(item: MineMainSettingFunctionItem) {
Column() {
Row() {
// 左侧logo和标题
Row() {
// 判断有没有图片
if (item.imgSrc) {
Image(item.imgSrc)
.height('38lpx')
.margin({ right: '5lpx' })
}
Text(`${item.title}`)
.margin({ top: '8lpx' })
.height('38lpx')
.fontColor('#333333')
.fontSize('29lpx')
}.width('60%')
// 右侧文案和右箭头
Row() {
Text(item.subTitle ? item.subTitle : '')
.fontColor('#999999')
.maxLines(1)
Image($r('app.media.mine_user_arrow'))
.width('27lpx')
.height('27lpx')
.objectFit(ImageFit.Auto)
Column().width('29lpx')
}.width('40%')
.margin({ right: '29lpx' })
}
.width('40%')
.justifyContent(FlexAlign.End)
}
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.SpaceBetween)
}
.height('54lpx')
.height(56)
.justifyContent(FlexAlign.Center)
.alignItems(HorizontalAlign.Center)
}
logout(){
...
...
@@ -529,14 +503,16 @@ export struct AccountArrowCell{
// 判断有没有图片
if (this.item.imgSrc) {
Image(this.item.imgSrc)
.height('38lpx')
.margin({ right: '5lpx' })
.height(20)
.width(20)
.margin({ right: 16 })
}
Text(`${this.item.title}`)
.margin({ top: '8lpx' })
.height('38lpx')
.fontColor('#333333')
.fontSize('29lpx')
.lineHeight(20)
.fontColor('#222222')
.fontSize(15)
.fontWeight(400)
.fontFamily('PingFang SC-Regular')
}.width('60%')
// 右侧文案和右箭头
...
...
@@ -544,20 +520,24 @@ export struct AccountArrowCell{
Text(this.item.subTitle ? this.item.subTitle : '')
.fontColor('#999999')
.maxLines(1)
.lineHeight(18)
.fontSize(14)
.fontWeight(400)
.fontFamily('PingFang SC-Regular')
Image($r('app.media.mine_user_arrow'))
.width('27lpx')
.height('27lpx')
.width(14)
.height(14)
.objectFit(ImageFit.Auto)
Column().width('29lpx')
}.width('40%')
.margin({ right: '29lpx' })
.justifyContent(FlexAlign.End)
}
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.SpaceBetween)
}
.height('54lpx')
.height(56)
.justifyContent(FlexAlign.Center)
.alignItems(HorizontalAlign.Center)
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/setting/ConfirmLogoutDialog.ets
View file @
20c7826
...
...
@@ -24,21 +24,21 @@ export struct ConfirmLogoutDialog {
Column(){
if(this.titleShow){
Text(this.title)
.fontSize(
"32lpx"
)
.fontSize(
18
)
.fontColor($r('app.color.color_333333'))
.lineHeight(
'50lpx'
)
.lineHeight(
26
)
.fontWeight(600)
}
if(this.tipShow){
Text(this.tipValue)
.margin({ top:this.titleShow?"10lpx":"0lpx" })
.fontSize("27lpx")
.margin({ top:this.titleShow ? 5 : 0 })
.fontSize(14)
.fontWeight(400)
.lineHeight(
'38lpx'
)
.lineHeight(
20
)
.fontColor($r('app.color.color_999999'))
}
}.padding(
{top:"48lpx",bottom:"48lpx"}
)
}.padding(
25
)
.alignItems(HorizontalAlign.Center)
Divider()
...
...
@@ -49,8 +49,9 @@ export struct ConfirmLogoutDialog {
Row(){
Text(this.leftText)
.fontSize(
'35lpx'
)
.fontSize(
18
)
.fontWeight(400)
.lineHeight(26)
.fontColor(this.leftTextColor)
.onClick(() => {
if (this.controller != undefined){
...
...
@@ -66,14 +67,15 @@ export struct ConfirmLogoutDialog {
.textAlign(TextAlign.Center)
Divider()
.width("1lpx")
.strokeWidth('1lpx')
.width(0.5)
.strokeWidth(0.5)
.vertical(true)
.height(
'92lpx'
)
.height(
50
)
.color($r('app.color.color_EEEEEE'))
Text(this.rightText)
.fontSize('35lpx')
.fontSize(18)
.lineHeight(26)
.textAlign(TextAlign.Center)
.fontWeight(400)
.fontColor(this.rightTextColor)
...
...
@@ -90,9 +92,9 @@ export struct ConfirmLogoutDialog {
}).layoutWeight(1)
}
.alignItems(VerticalAlign.Center)
.height(
'96lpx'
)
.height(
50
)
}.borderRadius(10)
.width("518lpx")
.backgroundColor("#FFF")
.width(270)
.backgroundColor('#FFFFFF')
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/setting/MineSettingComponent.ets
View file @
20c7826
...
...
@@ -106,31 +106,48 @@ export struct MineSettingComponent {
// 循环渲染ListItemGroup,contactsGroups为多个分组联系人contacts和标题title的数据集合
ForEach(this.listData, (item: MineMainSettingFunctionItem, index: number) => {
ListItem() {
if (item.type == 0) {
Column() {
this.getArrowCell(item,index)
}.padding({ left: `${this.calcHeight(27)}lpx` }).height(`${this.calcHeight(117)}lpx`).justifyContent(FlexAlign.Center)
} else if (item.type == 1) {
Column() {
this.getSwitchCell(item,index)
}.padding({ left: `${this.calcHeight(27)}lpx` }).height(`${this.calcHeight(117)}lpx`).justifyContent(FlexAlign.Center)
} else {
Column().width('100%').height(`${this.calcHeight(15)}lpx`).backgroundColor(0xf0f0f0)
Column(){
Column(){
if (item.type == 0) {
this.getArrowCell(item,index)
} else if (item.type == 1) {
this.getSwitchCell(item,index)
}
}
.margin({
left: 16,
right: 16
})
if(index === this.listData.length - 2) {
Divider()
.color('#f0f0f0')
.strokeWidth(5)
} else if(index !== this.listData.length - 1) {
Divider()
.color('#f0f0f0')
.strokeWidth(1)
.margin({
left: 16,
right: 16
})
}
}
}
})
}.onScrollFrameBegin((offset, state) => {
return { offsetRemain: 0 }
})
.divider({strokeWidth:1,color:"#f0f0f0",startMargin: 15,endMargin: 10})
})
}
.backgroundColor(Color.White)
.borderRadius(8)
}
@Builder itemHead(text: string) {
// 列表分组的头部组件,对应联系人分组A、B等位置的组件
if (text.length > 0) {
Row().width('100%').height(`${this.calcHeight(20)}lpx`).backgroundColor(0xf0f0f0)
Row()
.width('100%')
.height(10)
.backgroundColor(0xf0f0f0)
}
}
...
...
@@ -143,32 +160,34 @@ export struct MineSettingComponent {
// 判断有没有图片
if (0) {
Image('https://pic.rmb.bdstatic.com/e182cf67c341d1128d2a6cc05886bf62.jpeg@s_0,h_2000')
.height(`${this.calcHeight(38)}lpx`)
.margin({ right: `${this.calcHeight(5)}lpx` })
.height(20)
.width(20)
.margin({ right: 16 })
Text(`${item.title}`)
.margin({ top: `${this.calcHeight(8)}lpx` })
.height(`${this.calcHeight(38)}lpx`)
.fontColor('#333333')
.fontSize(`${this.calcHeight(29)}lpx`)
.lineHeight(20)
.fontColor('#222222')
.fontSize(15)
.fontWeight(400)
.fontFamily('PingFang SC-Regular')
} else {
Text(`${item.title}`)
.margin({ top: `${this.calcHeight(8)}lpx` })
.height(`${this.calcHeight(38)}lpx`)
.fontColor('#333333')
.fontSize(`${this.calcHeight(29)}lpx`)
.lineHeight(20)
.fontColor('#222222')
.fontSize(15)
.fontWeight(400)
.fontFamily('PingFang SC-Regular')
}
}.width('60%')
// 右侧文案和右箭头
Row() {
Toggle({ type: ToggleType.Switch, isOn: item.switchState })
.height(`${this.calcHeight(50)}lpx`)
.width(`${this.calcHeight(96)}lpx`)
.margin({ left: `${this.calcHeight(81)}lpx`, right: `${this.calcHeight(29)}lpx` })
.height(30)
.width(50)
.selectedColor("#ED2800")
.onChange((isOn: boolean) => {
Logger.debug("SPHelper", "数据 : " + JSON.stringify(item))
//
Logger.debug("SPHelper", "数据 : " + JSON.stringify(item))
if(item.itemType=='push_switch'){
trackButtonClick("settingPagePushSwitch")
//推送
...
...
@@ -187,43 +206,53 @@ export struct MineSettingComponent {
SPHelper.default.save(SpConstants.SETTING_SUSPENSION_SWITCH,isOn)
}
})
}.width('40%')
.margin({ right: `${this.calcHeight(29)}lpx` })
}
.width('40%')
.justifyContent(FlexAlign.End)
}
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.SpaceBetween)
}.height(`${this.calcHeight(54)}lpx`)
}
.height(56)
.justifyContent(FlexAlign.Center)
.alignItems(HorizontalAlign.Center)
}
// 右文字+箭头cell
@Builder getArrowCell(item:MineMainSettingFunctionItem, index:number) {
Column() {
Row() {
// 左侧logo和标题
Row() {
Text(`${item.title}`)
.margin({ top: `${this.calcHeight(8)}lpx` })
.height(`${this.calcHeight(38)}lpx`)
.fontColor('#333333')
.fontSize(`${this.calcHeight(29)}lpx`)
}.width('60%')
.lineHeight(20)
.fontColor('#222222')
.fontSize(15)
.fontWeight(400)
.fontFamily('PingFang SC-Regular')
}
.width('60%')
// 右侧文案和右箭头
Row() {
Text((item.itemType=='clear_cache') ? this.cacheSize.toFixed(2) + 'M' : '')
Text((item.itemType=='clear_cache') ? this.cacheSize.toFixed(2) + 'M
B
' : '')
.fontColor('#999999')
.maxLines(1)
.lineHeight(18)
.fontSize(14)
.fontWeight(400)
.fontFamily('PingFang SC-Regular')
Image($r('app.media.mine_user_arrow_2'))
.width(`${this.calcHeight(27)}lpx`)
.height(`${this.calcHeight(27)}lpx`)
.width(14)
.height(14)
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.High)
Column().width(`${this.calcHeight(29)}lpx`)
}.width('40%')
.margin({ right: `${this.calcHeight(29)}lpx` })
.margin({
left: 5
})
}
.width('40%')
.justifyContent(FlexAlign.End)
}
...
...
@@ -231,7 +260,9 @@ export struct MineSettingComponent {
.justifyContent(FlexAlign.SpaceBetween)
}
.height(`${this.calcHeight(54)}lpx`)
.height(56)
.justifyContent(FlexAlign.Center)
.alignItems(HorizontalAlign.Center)
.onClick(() => {
if (item.itemType == 'account') {
trackButtonClick("settingPageAccountManagement")
...
...
@@ -255,12 +286,12 @@ export struct MineSettingComponent {
let context = getContext(this) as common.UIAbilityContext
let application = context.getApplicationContext();
let appPath = application.cacheDir
Logger.debug("MineSettingComponent", appPath)
//
Logger.debug("MineSettingComponent", appPath)
fs.rmdir(appPath).then(() => {
this.getCacheSize()
})
let path = context.cacheDir
Logger.debug("MineSettingComponent", path)
//
Logger.debug("MineSettingComponent", path)
fs.rmdir(path).then(() => {
this.getCacheSize()
})
...
...
@@ -270,7 +301,7 @@ export struct MineSettingComponent {
// 获取缓存数据
storageStatistics.getCurrentBundleStats((err: BusinessError, bundleStats: storageStatistics.BundleStats) => {
if (err) {
console.error(`Invoke getCurrentBundleStats failed, code is ${err.code}, message is ${err.message}`);
//
console.error(`Invoke getCurrentBundleStats failed, code is ${err.code}, message is ${err.message}`);
} else {
this.cacheSize = bundleStats.cacheSize / 1024.00 / 1024.00;
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/CustomBottomFuctionUI.ets
View file @
20c7826
...
...
@@ -11,16 +11,18 @@ export struct CustomBottomFuctionUI {
RelativeContainer(){
Row(){
Image(this.isAllSelect?$r("app.media.MyCollection_selected_icon"):$r("app.media.MyCollection_unselected_icon"))
.width('20')
.height('20')
.margin({right:'31lpx' })
.width(20)
.height(20)
// .margin({right:'31lpx' })
.margin({right: 31 })
Text(this.isAllSelect?'取消全选':'全选')
.fontColor($r('app.color.color_222222'))
.backgroundColor(Color.White)
}
.id("allSelect_Button")
.margin({left:'31lpx'})
// .margin({left:'31lpx'})
.margin({left: 31})
.alignRules({
center: {anchor: "__container__", align: VerticalAlign.Center},
left: {anchor: "__container__", align: HorizontalAlign.Start}
...
...
@@ -40,7 +42,8 @@ export struct CustomBottomFuctionUI {
center: {anchor: "__container__", align: VerticalAlign.Center},
right: {anchor: "__container__", align: HorizontalAlign.End}
})
.margin({right:'31lpx'})
// .margin({right:'31lpx'})
.margin({right: 31})
.onClick(()=>{
this.confirmCallback()
})
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/CustomSelectUI.ets
View file @
20c7826
...
...
@@ -10,8 +10,8 @@ export struct CustomSelectUI {
}
.backgroundColor(Color.White)
.type(ButtonType.Normal)
.width('20')
.height('20')
.width(20)
.height(20)
.onClick(() => {
this.isOn = !this.isOn;
this.selectCallback(this.isOn)
...
...
sight_harmony/features/wdComponent/src/main/ets/pages/MineHomePage.ets
View file @
20c7826
...
...
@@ -79,7 +79,7 @@ struct MineHomePage {
Stack({ alignContent: Alignment.Top }){
Image($r('app.media.title_bg'))
.width('100%')
.height(
'355lpx'
)
.height(
182
)
.objectFit(ImageFit.Cover)
Row()
...
...
@@ -103,19 +103,24 @@ 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('115lpx')
.height('115lpx')
.width(60)
.height(60)
.objectFit(ImageFit.Auto)
.clip(new Circle({ width:
'115lpx', height: '115lpx'
}))
.clip(new Circle({ width:
60, height: 60
}))
Image(this.levelHead)
.width('165lpx')
.height('165lpx')
// .width('165lpx')
.width(165)
// .height('165lpx')
.height(165)
.objectFit(ImageFit.Auto)
}.onClick(()=>{
let params = {'headPhotoUrl': this.headPhotoUrl} as Record<string, string>;
WDRouterRule.jumpWithPage(WDRouterPage.showUserHeaderPage,params)
}).width('165lpx')
.height('165lpx')
})
// .width('165lpx')
.width(165)
// .height('165lpx')
.height(165)
Column() {
Row() {
...
...
@@ -123,9 +128,12 @@ struct MineHomePage {
.fontColor($r('app.color.white'))
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.fontSize('38lpx')
.lineHeight('50lpx')
.fontWeight('500lpx')
// .fontSize('38lpx')
.fontSize(38)
// .lineHeight('50lpx')
.lineHeight(50)
// .fontWeight('500lpx')
.fontWeight(500)
.onClick(()=>{
let params: editModelParams = {
editContent: this.userName
...
...
@@ -136,18 +144,24 @@ struct MineHomePage {
if(this.levelId>0){
Text(`等级${this.levelId}`)
.fontColor($r('app.color.color_ED2800'))
.fontSize('23lpx')
// .fontSize('23lpx')
.fontSize(23)
.fontWeight(500)
.margin({ left: '10lpx' })
// .margin({ left: '10lpx' })
.margin({ left: 10 })
.backgroundImage($r("app.media.my_grade_bg"))
.backgroundImageSize(ImageSize.Cover)
.padding({left:"17lpx",right:"8lpx"})
.height('35lpx')
// .padding({left:"17lpx",right:"8lpx"})
.padding({left: 17,right: 8})
// .height('35lpx')
.height(35)
.borderRadius({topRight:2,bottomRight:2})
}
Blank()
}.width('507lpx')
}
// .width('507lpx')
.width(507)
Row() {
Row() {
...
...
@@ -156,11 +170,14 @@ struct MineHomePage {
Text("阅读")
.textStyle2()
}
.margin({ right: '15lpx' })
// .margin({ right: '15lpx' })
.margin({ right: 15 })
Divider()
.height('19lpx')
.width('2lpx')
// .height('19lpx')
.height(19)
// .width('2lpx')
.width(2)
.color($r('app.color.white'))
.vertical(true)
.opacity(0.4)
...
...
@@ -169,11 +186,15 @@ struct MineHomePage {
.textStyle()
Text("评论")
.textStyle2()
}.margin({ right: '15lpx', left: '15lpx' })
}
// .margin({ right: '15lpx', left: '15lpx' })
.margin({ right: 15, left: 15 })
Divider()
.height('19lpx')
.width('2lpx')
// .height('19lpx')
.height(19)
// .width('2lpx')
.width(2)
.color($r('app.color.white'))
.vertical(true)
.opacity(0.4)
...
...
@@ -182,10 +203,15 @@ struct MineHomePage {
.textStyle()
Text("关注")
.textStyle2()
}.margin({ left: '15lpx' })
}.margin({ top: '23lpx' })
}
// .margin({ left: '15lpx' })
.margin({ left: 15 })
}
// .margin({ top: '23lpx' })
.margin({ top: 23 })
}.alignItems(HorizontalAlign.Start)
.margin({ left: StringUtils.isEmpty(this.levelHead)?'32lpx':"3lpx" })
// .margin({ left: StringUtils.isEmpty(this.levelHead)?'32lpx':"3lpx" })
.margin({ left: StringUtils.isEmpty(this.levelHead) ? 32 : 3 })
}
.onAreaChange((oldValue: Area, newValue: Area) => {
if (this.firstPositionY === 0) {
...
...
@@ -199,27 +225,34 @@ struct MineHomePage {
}
})
.backgroundColor($r('app.color.color_transparent'))
.height('184lpx')
// .height('184lpx')
.height(184)
.width('100%')
.padding({ left: '6lpx' })
// .padding({ left: '6lpx' })
.padding({ left: 6 })
//用户简介区域
Column() {
Row() {
Text(this.isHasIntroduction?"简介:"+this.desc:this.desc)
.fontSize('27lpx')
// .fontSize('27lpx')
.fontSize(27)
.maxLines(3)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.lineHeight('40lpx')
.fontWeight('400lpx')
// .lineHeight('40lpx')
.lineHeight(40)
// .fontWeight('400lpx')
.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')
.height('27lpx')
// .width('27lpx')
.width(27)
// .height('27lpx')
.height(27)
.interpolation(ImageInterpolation.High)
.objectFit(ImageFit.Auto)
}
...
...
@@ -232,21 +265,28 @@ struct MineHomePage {
Text(`来到人民日报${this.registerTimeForDay}天`)
.fontSize('23lpx')
.lineHeight('25lpx')
.fontWeight('400lpx')
// .fontSize('23lpx')
.fontSize(23)
// .lineHeight('25lpx')
.lineHeight(25)
// .fontWeight('400lpx')
.fontWeight(400)
.fontColor($r('app.color.color_999999'))
.textAlign(TextAlign.Start)
.margin({ top: '15lpx' })
// .margin({ top: '15lpx' })
.margin({ top: 15 })
}.padding({ left: '31lpx',right:'31lpx',top:'19lpx',bottom:'31lpx'})
}
// .padding({ left: '31lpx',right:'31lpx',top:'19lpx',bottom:'31lpx'})
.padding({ left: 31,right: 31,top: 19,bottom: 31})
.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('12lpx').color($r('app.color.color_F5F5F5')).strokeWidth('12lpx')
Divider().width('100%').height(12).color($r('app.color.color_F5F5F5')).strokeWidth(12)
//tab 页面
Stack({ alignContent: Alignment.Top }){
...
...
@@ -265,7 +305,8 @@ struct MineHomePage {
trackTabFirstClick(index === 0 ? "评论":"关注")
})
.vertical(false)
.barHeight("77lpx")
// .barHeight("77lpx")
.barHeight(77)
Column() {
// 页签
...
...
@@ -281,7 +322,8 @@ struct MineHomePage {
.scrollable(ScrollDirection.Horizontal)
.scrollBar(BarState.Off)
.width('100%')
.padding({left:'31lpx'})
// .padding({left:'31lpx'})
.padding({left: 31})
}
.alignItems(VerticalAlign.Bottom)
.width('100%')
...
...
@@ -289,7 +331,8 @@ struct MineHomePage {
.backgroundColor($r('app.color.white'))
.alignItems(HorizontalAlign.Start)
.width('100%')
.height('77lpx')
// .height('77lpx')
.height(77)
}
}.width("100%")
}
...
...
@@ -302,7 +345,7 @@ struct MineHomePage {
}.width('100%')
// .padding({bottom:px2vp(this.bottomSafeHeight)})
.layoutWeight(1)
}
else
{
}
else
{
Column(){
CustomTitleUI({ titleName: "" })
...
...
@@ -324,38 +367,38 @@ struct MineHomePage {
RelativeContainer() {
//标题栏目
Image($r('app.media.icon_arrow_left_white') )
.width('46lpx')
.height('46lpx')
.width(24)
.height(24)
.objectFit(ImageFit.Auto)
.id("back_icon")
.alignRules({
center: { anchor: "__container__", align: VerticalAlign.Center },
left: { anchor: "__container__", align: HorizontalAlign.Start }
})
.margin({ left:
'31lpx'
})
.margin({ left:
18
})
.onClick(() => {
router.back()
})
Text("编辑资料")
.height(
'42lpx'
)
.height(
22
)
.maxLines(1)
.id("rightText")
.fontSize(
'31lpx'
)
.fontSize(
16
)
.fontWeight(400)
.fontColor($r('app.color.white') )
.lineHeight(
'42lpx'
)
.lineHeight(
22
)
.alignRules({
center: { anchor: "__container__", align: VerticalAlign.Center },
right: { anchor: "__container__", align: HorizontalAlign.End }
})
.margin({ right:
'31lpx'
})
.margin({ right:
16
})
.onClick(()=>{
this.editUserInfo()
})
}
.visibility(this.tileOpacity > 0 ? 1 : 0)
.height(
'84lpx'
)
.height(
44
)
.width('100%')
.backgroundColor($r('app.color.color_transparent'))
}
...
...
@@ -365,22 +408,22 @@ struct MineHomePage {
RelativeContainer() {
//标题栏目
Image($r('app.media.back_icon'))
.width('46lpx')
.height('46lpx')
.width(24)
.height(24)
.objectFit(ImageFit.Auto)
.id("back_icon")
.alignRules({
center: { anchor: "__container__", align: VerticalAlign.Center },
left: { anchor: "__container__", align: HorizontalAlign.Start }
})
.margin({ left:
'31lpx'
})
.margin({ left:
18
})
.onClick(() => {
router.back()
})
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('60lpx')
.height('60lpx')
.width(32)
.height(32)
.objectFit(ImageFit.Auto)
.id("head_icon")
.borderRadius(50)
...
...
@@ -388,43 +431,42 @@ struct MineHomePage {
center: { anchor: "__container__", align: VerticalAlign.Center },
left: { anchor: "back_icon", align: HorizontalAlign.End }
})
.margin({ left:
'31lpx'
})
.margin({ left:
10
})
.onClick(() => {
router.back()
})
Text(`${this.userName}`)
.height('42lpx')
.maxLines(1)
.id("title")
.fontSize(
'27lpx'
)
.fontSize(
14
)
.fontWeight(400)
.fontColor($r('app.color.color_222222'))
.lineHeight(
'31lpx'
)
.lineHeight(
16
)
.alignRules({
center: { anchor: "__container__", align: VerticalAlign.Center },
left: { anchor: "head_icon", align: HorizontalAlign.End }
})
.margin({ left:
'12lpx'
})
.margin({ left:
6
})
Text("编辑资料")
.height(
'42lpx'
)
.height(
22
)
.maxLines(1)
.id("rightText")
.fontSize(
'31lpx'
)
.fontSize(
16
)
.fontWeight(400)
.fontColor($r('app.color.color_222222'))
.lineHeight(
'42lpx'
)
.lineHeight(
22
)
.alignRules({
center: { anchor: "__container__", align: VerticalAlign.Center },
right: { anchor: "__container__", align: HorizontalAlign.End }
})
.margin({ right:
'31lpx'
})
.margin({ right:
16
})
.onClick(()=>{
this.editUserInfo()
})
}
.height(
'84lpx'
)
.height(
44
)
.width('100%')
.backgroundColor($r('app.color.white'))
.visibility(this.tileOpacity > 0 ? 0 : 1)
...
...
@@ -435,19 +477,26 @@ struct MineHomePage {
@Builder TabBuilder(index: number, title: string) {
Stack(){
Text(title)
.height('38lpx')
.fontSize('33lpx')
// .height('38lpx')
.height(38)
// .fontSize('33lpx')
.fontSize(33)
.fontWeight(this.currentIndex === index ? 600 : 400)
.fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
.lineHeight('38lpx')
// .lineHeight('38lpx')
.lineHeight(38)
if(this.currentIndex === index){
Divider()
.width('31lpx')
.height('4lpx')
// .width('31lpx')
.width(31)
// .height('4lpx')
.height(4)
.color('#ED2800')
.strokeWidth('4lpx')
.margin({top:'50lpx'})
// .strokeWidth('4lpx')
.strokeWidth(4)
// .margin({top:'50lpx'})
.margin({top: 50})
.id("divTag")
}
}.onClick(()=>{
...
...
@@ -455,9 +504,12 @@ struct MineHomePage {
this.controller.changeIndex(this.currentIndex)
trackTabFirstClick(index === 0 ? "评论":"关注")
})
.height('77lpx')
.width('70lpx')
.margin({right:'29lpx'})
// .height('77lpx')
.height(77)
// .width('70lpx')
.width(70)
// .margin({right:'29lpx'})
.margin({right: 29})
}
/**
...
...
@@ -537,7 +589,8 @@ struct MineHomePage {
@Extend(Text) function textStyle() {
.fontColor($r('app.color.white'))
.textStyleDefault()
.margin({ right: '10lpx' })
// .margin({ right: '10lpx' })
.margin({ right: 10 })
}
@Extend(Text) function textStyle2() {
...
...
@@ -547,9 +600,12 @@ struct MineHomePage {
@Extend(Text) function textStyleDefault() {
.textAlign(TextAlign.Start)
.fontSize('23lpx')
.fontWeight('400lpx')
.lineHeight('31lpx')
// .fontSize('23lpx')
.fontSize(23)
// .fontWeight('400lpx')
.fontWeight(400)
// .lineHeight('31lpx')
.lineHeight(31)
}
function trackTabFirstClick(firstLevelTabName: string){
...
...
sight_harmony/features/wdLogin/src/main/ets/pages/login/ChangeBindPhonePage.ets
View file @
20c7826
...
...
@@ -62,19 +62,29 @@ struct ChangeBindPhonePage {
build() {
Column(){
Column() {
Image($r('app.media.login_back_icon')).width(24).height(24).margin({ left: 15, top: 10 }).onClick(() => {
Image($r('app.media.login_back_icon'))
.width(24)
.height(24)
.margin({ left: 16, top: 8 })
.onClick(() => {
router.back()
})
Text(this.pageTitle).fontSize(22).fontColor('#333333').fontWeight(FontWeight.Bold).margin({ left: 25, top: 112 })
Text(this.pageTitle)
.fontSize(22)
.lineHeight(32)
.fontColor('#222222')
.fontWeight(600)
.margin({ left: 25, top: 112 })
Column(){
TextInput({text: this.phoneContent, placeholder: "请输入手机号" })
.fontSize(16)
.lineHeight(24)
.height(48)
.placeholderColor("#CCCCCC")
.maxLength(11)
.margin({ top:
36
})
.margin({ top:
40
})
.backgroundColor("#F5F5F5")
.borderRadius(4)
.type(InputType.Number)
...
...
@@ -95,6 +105,7 @@ struct ChangeBindPhonePage {
.placeholderColor("#CCCCCC")
.layoutWeight(1)
.fontSize(16)
.lineHeight(24)
.height(48)
.type(InputType.Number)
.fontColor("#222222")
...
...
@@ -109,6 +120,7 @@ struct ChangeBindPhonePage {
.fontColor(this.codeBtnState?'#ED2800':'#80ED2800')
.width(110)
.fontSize(14)
.lineHeight(24)
.fontWeight( FontWeight.Bold)
.height(48)
.textAlign(TextAlign.Center)
...
...
@@ -144,9 +156,10 @@ struct ChangeBindPhonePage {
.fontColor("#FFFFFF")
.borderRadius(4)
.fontSize(18)
.lineHeight(26)
.textAlign(TextAlign.Center)
.fontWeight(FontWeight.Medium)
.margin({ top:
2
6 })
.margin({ top:
3
6 })
.height(44)
.backgroundColor("#ED2800")
.enabled(this.isSubmit ? true : false)
...
...
sight_harmony/features/wdLogin/src/main/ets/pages/login/ForgetPasswordPage.ets
View file @
20c7826
...
...
@@ -68,7 +68,7 @@ struct ForgetPasswordPage {
.fontSize(18)
.textAlign(TextAlign.Center)
.fontWeight(FontWeight.Medium)
.margin({ top:
2
6 })
.margin({ top:
3
6 })
.height(44)
.backgroundColor("#ED2800")
.enabled(this.isSubmit ? true : false)
...
...
@@ -76,7 +76,9 @@ struct ForgetPasswordPage {
.onClick(() => {
this.checkVerifyCode()
})
}.padding({ left: 25, right: 25 }).width('100%')
}
.height(44)
.padding({ left: 25, right: 25 }).width('100%')
}.width('100%')
.height('100%')
...
...
sight_harmony/features/wdLogin/src/main/ets/pages/login/LoginPage.ets
View file @
20c7826
...
...
@@ -91,24 +91,20 @@ struct LoginPage {
disableScreenCapture(){
let windowClass: window.Window|undefined = undefined;
let context = getContext(this) as common.UIAbilityContext
try {
window.getLastWindow(context, (err, data) => {
if (err.code) {
return
window.getLastWindow(context, (err, data) => {
if (err.code) {
return
}
windowClass = data
windowClass.setWindowPrivacyMode(this.isPrivacyMode, (err: BusinessError) => {
const errCode: number = err.code;
if (errCode) {
// console.error('Failed to set the window to privacy mode. Cause:' + JSON.stringify(err));
return;
}
windowClass = data
windowClass.setWindowPrivacyMode(this.isPrivacyMode, (err: BusinessError) => {
const errCode: number = err.code;
if (errCode) {
console.error('Failed to set the window to privacy mode. Cause:' + JSON.stringify(err));
return;
}
console.info('Succeeded in setting the window to privacy mode.');
});
})
} catch (exception) {
console.error('Failed to set the window to privacy mode. Cause:' + JSON.stringify(exception));
}
// console.info('Succeeded in setting the window to privacy mode.');
});
})
}
aboutToDisappear(): void {
...
...
sight_harmony/features/wdLogin/src/main/ets/pages/login/ModifyPasswordPage.ets
View file @
20c7826
...
...
@@ -79,8 +79,10 @@ struct ModifyPasswordPage {
@Builder TitleBackComponent(title:string){
RelativeContainer() {
Text(title)
.fontColor('#
FF
333333')
.fontColor('#333333')
.fontSize(18)
.fontWeight(400)
.lineHeight(26)
.textAlign(TextAlign.Center)
.height(44)
.alignRules({
...
...
@@ -113,17 +115,26 @@ struct ModifyPasswordPage {
@Builder ModifyPasswordLayout(){
Column(){
Column() {
Text("修改密码").fontWeight(FontWeight.Bold).fontSize(20).maxLines(1)
Text("修改密码")
.fontWeight(600)
.fontSize(22)
.maxLines(1)
.fontColor('#222222')
.lineHeight(32)
}
.width('100%')
.height(`${this.calcHeight(75)}lpx`)
.alignItems(HorizontalAlign.Start)
.margin({
bottom: 40
})
Row() {
Row() {
TextInput({ placeholder: "请输入原密码" })
.passwordIcon({onIconSrc:$r("app.media.login_password_on"),offIconSrc:$r("app.media.login_password_off")})
.placeholderColor("#CCCCCC")
.fontSize(16)
.lineHeight(24)
.type(InputType.Password)
.showPasswordIcon(true)
.backgroundColor('#00000000')
...
...
@@ -133,12 +144,11 @@ struct ModifyPasswordPage {
})
}
.alignItems(VerticalAlign.Center)
.height(
`${this.calcHeight(80)}lpx`
)
.height(
48
)
.backgroundColor('#f5f5f5')
.borderRadius(
'4vp'
)
.borderRadius(
4
)
}
.width('100%')
.height(`${this.calcHeight(110)}lpx`)
.backgroundColor(0xffffff0)
.alignItems(VerticalAlign.Center)
...
...
@@ -147,6 +157,8 @@ struct ModifyPasswordPage {
TextInput({ placeholder: "请输入新密码" })
.passwordIcon({onIconSrc:$r("app.media.login_password_on"),offIconSrc:$r("app.media.login_password_off")})
.placeholderColor("#CCCCCC")
.fontSize(16)
.lineHeight(24)
.type(InputType.Password)
.showPasswordIcon(true)
.backgroundColor('#00000000')
...
...
@@ -156,12 +168,12 @@ struct ModifyPasswordPage {
})
}
.alignItems(VerticalAlign.Center)
.height(
`${this.calcHeight(80)}lpx`
)
.height(
48
)
.backgroundColor('#f5f5f5')
.borderRadius(
'4vp'
)
.borderRadius(
4
)
}
.width('100%')
.
height(`${this.calcHeight(110)}lpx`
)
.
margin({top: 12}
)
.backgroundColor(0xffffff0)
.alignItems(VerticalAlign.Center)
...
...
@@ -169,6 +181,8 @@ struct ModifyPasswordPage {
Row() {
TextInput({ placeholder: "再次输入新密码" })
.placeholderColor("#CCCCCC")
.fontSize(16)
.lineHeight(24)
.type(InputType.Password)
.passwordIcon({onIconSrc:$r("app.media.login_password_on"),offIconSrc:$r("app.media.login_password_off")})
.showPasswordIcon(true)
...
...
@@ -179,20 +193,26 @@ struct ModifyPasswordPage {
})
}
.alignItems(VerticalAlign.Center)
.height(
`${this.calcHeight(80)}lpx`
)
.height(
48
)
.backgroundColor('#f5f5f5')
.borderRadius(
'4vp'
)
.borderRadius(
4
)
}
.width('100%')
.
height(`${this.calcHeight(110)}lpx`
)
.
margin({top: 12}
)
.backgroundColor(0xffffff0)
.alignItems(VerticalAlign.Center)
Column() {
Text("提示:密码长度8~20位,使用大写字母、小写字母、数字、特殊字符中三种或三种以上").fontSize(12).maxLines(3).fontColor(0x999999).padding({top:`${this.calcHeight(10)}lpx`})
Text("提示:密码长度8~20位,使用大写字母、小写字母、数字、特殊字符中三种或三种以上")
.fontSize(12)
.lineHeight(17)
.maxLines(3)
.fontColor('#999999')
.fontWeight(400)
.padding({top: 12})
}
.width('100%')
.height(
`${this.calcHeight(85)}lpx`
)
.height(
34
)
.alignItems(HorizontalAlign.Start)
...
...
@@ -202,10 +222,10 @@ struct ModifyPasswordPage {
.fontColor("#FFFFFF")
.borderRadius(4)
.fontSize(18)
.textAlign(TextAlign.Center)
.fontWeight(FontWeight.Medium)
.margin({ top: 26 })
.lineHeight(26)
.height(44)
.textAlign(TextAlign.Center)
.fontWeight(400)
.backgroundColor("#ED2800")
.enabled(this.btnStatus ? true : false)
.opacity(this.btnStatus ? 1: 0.6)
...
...
@@ -215,22 +235,32 @@ struct ModifyPasswordPage {
this.submit()
}
})
}.width('100%')
.padding({top:`${this.calcHeight(25)}lpx`})
.alignItems(VerticalAlign.Center)
}
.height(44)
.width('100%')
.margin({top:36})
.alignItems(VerticalAlign.Center)
Column() {
Text("忘记密码").fontSize(14).maxLines(3).fontColor(0x999999).padding({top:`${this.calcHeight(10)}lpx`})
Text("忘记密码")
.fontSize(14)
.maxLines(3)
.lineHeight(20)
.fontColor('#666666')
.onClick(()=>{
WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage)
})
}
.margin({top:1
5
})
.margin({top:1
2
})
.width('100%')
.height(`${this.calcHeight(85)}lpx`)
.alignItems(HorizontalAlign.Center)
}.padding({top:`${this.calcHeight(92)}lpx`,left:`${this.calcHeight(48)}lpx`,right:`${this.calcHeight(48)}lpx`})
}
.padding(
{
top:40,
left:25,
right:25
})
}
...
...
sight_harmony/features/wdLogin/src/main/ets/pages/login/SettingPasswordPage.ets
View file @
20c7826
...
...
@@ -185,9 +185,9 @@ export struct SettingPasswordPage {
RelativeContainer() {
Text(title)
.fontColor('#FF333333')
.fontSize(
`${this.calcHeight(18)}`
)
.fontSize(
18
)
.textAlign(TextAlign.Center)
.height(
`${this.calcHeight(44)}`
)
.height(
44
)
.alignRules({
top: { anchor: "__container__", align: VerticalAlign.Top },
left: { anchor: "__container__", align: HorizontalAlign.Start },
...
...
@@ -197,10 +197,10 @@ export struct SettingPasswordPage {
.id('titleContent')
Image($r("app.media.login_back_icon"))
.objectFit(ImageFit.Auto)
.height(`${this.calcHeight(24)}`)
.width(`${this.calcHeight(24)}`)
.height(24)
.width(24)
.margin({
left:
`${this.calcHeight(16)}`, top: `${this.calcHeight(8)}`
left:
16, top: 8
})
.alignRules({
top: { anchor: "__container__", align: VerticalAlign.Top },
...
...
@@ -211,7 +211,7 @@ export struct SettingPasswordPage {
})
.id('backImage')
}.height(
`${this.calcHeight(44)}`
)
}.height(
44
)
}
// 页面布局
...
...
@@ -236,9 +236,15 @@ export struct SettingPasswordPage {
}
})
}
}.width('100%')
.padding({ left:`${this.calcHeight(31)}lpx`,right:`${this.calcHeight(31)}lpx`,top:`${this.calcHeight(131)}lpx` })
.width('100%').height('100%')
}
.width('100%')
.height('100%')
.padding(
{
left: 25,
right: 25
})
}
/***************************** UI元素 ******************************************/
...
...
@@ -246,11 +252,18 @@ export struct SettingPasswordPage {
// 标题
@Builder getTitleCell(item: AccoutPageDataModel, alignTitle: HorizontalAlign) {
Column() {
Text(item.compTitle).fontWeight(FontWeight.Bold).fontSize(`${this.calcHeight(20)}`).maxLines(1)
Text(item.compTitle)
.fontWeight(600)
.fontSize(22)
.maxLines(1)
.fontColor('#222222')
.lineHeight(32)
}
.width('100%')
.height(`${this.calcHeight(75)}lpx`)
.alignItems(alignTitle)
.margin({
bottom: 40
})
}
// 密码输入框
...
...
@@ -259,6 +272,8 @@ export struct SettingPasswordPage {
Row() {
TextInput({ placeholder: item.inputPlacholder })
.placeholderColor("#CCCCCC")
.fontSize(16)
.lineHeight(24)
.passwordIcon({onIconSrc:$r("app.media.login_password_on"),offIconSrc:$r("app.media.login_password_off")})
.type(InputType.Password)
.showPasswordIcon(true)
...
...
@@ -271,14 +286,16 @@ export struct SettingPasswordPage {
})
}
.alignItems(VerticalAlign.Center)
.height(
`${this.calcHeight(80)}lpx`
)
.height(
48
)
.backgroundColor('#f5f5f5')
.borderRadius(
`${this.calcHeight(4)}`
)
.borderRadius(
4
)
}
.width('100%')
.height(`${this.calcHeight(110)}lpx`)
.backgroundColor(0xffffff0)
.alignItems(VerticalAlign.Center)
.margin({
top: 12
})
}
// 手机号输入框
...
...
@@ -287,6 +304,8 @@ export struct SettingPasswordPage {
Row() {
TextInput({ placeholder: item.inputPlacholder })
.placeholderColor("#CCCCCC")
.fontSize(16)
.lineHeight(24)
.backgroundColor('#00000000')
.onChange((value: string) => {
this.inputTextChange(value, item.inputTag)
...
...
@@ -296,24 +315,28 @@ export struct SettingPasswordPage {
})
}
.alignItems(VerticalAlign.Center)
.height(
`${this.calcHeight(80)}lpx`
)
.height(
48
)
.backgroundColor('#f5f5f5')
.borderRadius(
`${this.calcHeight(4)}`
)
.borderRadius(
4
)
}
.width('100%')
.height(`${this.calcHeight(110)}lpx`)
.backgroundColor(0xffffff0)
.alignItems(VerticalAlign.Center)
.margin({
top: 12
})
}
// 验证码码输入框
@Builder getCodeCell(item: AccoutPageDataModel) {
Row() {
Stack() {
Image($r('app.media.get_code_bg')).width('100%').borderRadius(
`${this.calcHeight(4)}`
)
Image($r('app.media.get_code_bg')).width('100%').borderRadius(
4
)
Row() {
TextInput({ placeholder: item.inputPlacholder })
.placeholderColor("#CCCCCC")
.fontSize(16)
.lineHeight(24)
.backgroundColor('#00000000')
.width('67.28%')
.onChange((value: string) => {
...
...
@@ -325,26 +348,32 @@ export struct SettingPasswordPage {
.fontColor('#da3e22')
}
.width('100%')
}.height(
`${this.calcHeight(80)}lpx`
)
}.height(
48
)
}
.width('100%')
.height(`${this.calcHeight(110)}lpx`)
.backgroundColor(0xffffff0)
.alignItems(VerticalAlign.Center)
.margin({
top: 12
})
}
// desc
@Builder getDescCell(item: AccoutPageDataModel, alignTitle: HorizontalAlign) {
Column() {
Text(item.compDesc).fontSize(`${this.calcHeight(12)}`).maxLines(3).fontColor(0x999999).padding({top:`${this.calcHeight(10)}lpx`})
Text(item.compDesc)
.fontSize(14)
.maxLines(3)
.lineHeight(20)
.fontColor('#666666')
.onClick(()=>{
if (item.compDesc == '忘记密码') {
this.showToastTip('密码不符合密码规范'
)
WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage
)
}
})
}
.width('100%')
.
height(`${this.calcHeight(85)}lpx`
)
.
margin({top:12}
)
.alignItems(alignTitle)
}
...
...
@@ -354,29 +383,32 @@ export struct SettingPasswordPage {
Text(item.compButtonTitle)
.layoutWeight(1)
.fontColor("#FFFFFF")
.borderRadius(`${this.calcHeight(4)}`)
.fontSize(`${this.calcHeight(18)}`)
.borderRadius(4)
.fontSize(18)
.lineHeight(26)
.textAlign(TextAlign.Center)
.fontWeight(FontWeight.Medium)
.margin({ top: `${this.calcHeight(26)}` })
.height(`${this.calcHeight(44)}`)
.margin({ top: 36 })
.height(44)
.backgroundColor("#ED2800")
.enabled(this.btnStatus ? true : false)
.opacity(this.btnStatus ? 1: 0.6)
.onClick(() => {
this.buttonClick()
})
}.padding({top:`${this.calcHeight(25)}lpx`})
}
.height(44)
.padding({left: 25, right: 25})
.width('100%')
}
// 标题
@Builder getLogoCell(item: AccoutPageDataModel) {
Column() {
Image(item.compLogo).height(
`${this.calcHeight(150)}lpx`).width(`${this.calcHeight(150)}lpx`
)
Image(item.compLogo).height(
150).width(150
)
}
.width('100%')
.height(
`${this.calcHeight(200)}lpx`
)
.height(
200
)
}
/***************************** 事件处理 ******************************************/
...
...
@@ -421,7 +453,7 @@ export struct SettingPasswordPage {
});
}).catch((err: string) => {
this.showToastTip(err)
Logger.error(TAG, 'catch err:' + JSON.stringify(err));
//
Logger.error(TAG, 'catch err:' + JSON.stringify(err));
});
}
}
...
...
sight_harmony/features/wdLogin/src/main/ets/pages/login/VerifyPhoneNumberPage.ets
View file @
20c7826
...
...
@@ -64,19 +64,29 @@ struct VerifyPhoneNumberPage {
build() {
Column(){
Column() {
Image($r('app.media.login_back_icon')).width(24).height(24).margin({ left: 15, top: 10 }).onClick(() => {
Image($r('app.media.login_back_icon'))
.width(24)
.height(24)
.margin({ left: 16, top: 8 })
.onClick(() => {
router.back()
})
Text(this.pageTitle).fontSize(22).fontColor('#333333').fontWeight(FontWeight.Bold).margin({ left: 25, top: 112 })
Text(this.pageTitle)
.fontSize(22)
.lineHeight(32)
.fontColor('#222222')
.fontWeight(600)
.margin({ left: 25, top: 112 })
Column() {
TextInput({ text: this.securityPhone(this.phoneContent) })
.placeholderColor("#CCCCCC")
.fontSize(16)
.lineHeight(24)
.height(48)
.maxLength(11)
.margin({ top:
36
})
.margin({ top:
40
})
.backgroundColor("#F5F5F5")
.borderRadius(4)
.enabled(false)
...
...
@@ -96,6 +106,7 @@ struct VerifyPhoneNumberPage {
.placeholderColor("#CCCCCC")
.layoutWeight(1)
.fontSize(16)
.lineHeight(24)
.height(48)
.type(InputType.Number)
.fontColor("#222222")
...
...
@@ -110,6 +121,7 @@ struct VerifyPhoneNumberPage {
.fontColor(this.codeBtnState?'#ED2800':'#80ED2800')
.width(110)
.fontSize(14)
.lineHeight(24)
.fontWeight( FontWeight.Bold)
.height(48)
.textAlign(TextAlign.Center)
...
...
@@ -129,7 +141,8 @@ struct VerifyPhoneNumberPage {
})
}.margin({ top: 12 })
}
.margin({ top: 12 })
.height(48)
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.Start)
...
...
@@ -146,16 +159,20 @@ struct VerifyPhoneNumberPage {
.fontColor(this.isSubmit ?"#FFFFFFFF":"#66FFFFFF")
.borderRadius(4)
.fontSize(18)
.lineHeight(26)
.textAlign(TextAlign.Center)
.fontWeight(FontWeight.Medium)
.margin({ top:
2
6 })
.margin({ top:
3
6 })
.height(44)
.backgroundColor(this.isSubmit ?"#ED2800":"#99ED2800")
.enabled(this.isSubmit ? true : false)
.onClick(() => {
this.checkVerifyCode()
})
}.padding({ left: 25, right: 25 }).width('100%')
}
.height(44)
.padding({ left: 25, right: 25 })
.width('100%')
}.width('100%').height('100%').alignItems(HorizontalAlign.Start)
}.width("100%")
...
...
Please
register
or
login
to post a comment