liyubing

Merge remote-tracking branch 'origin/main'

Showing 21 changed files with 97 additions and 37 deletions
@@ -82,4 +82,20 @@ export class DeviceUtil { @@ -82,4 +82,20 @@ export class DeviceUtil {
82 static getRandomUUIDForTraceID(): string { 82 static getRandomUUIDForTraceID(): string {
83 return util.generateRandomUUID().toUpperCase().replace(/-/g, '') 83 return util.generateRandomUUID().toUpperCase().replace(/-/g, '')
84 } 84 }
  85 +
  86 + /**
  87 + * 是否为phone设备(可折叠手机即便完全展开状态也返回true)
  88 + * @returns
  89 + */
  90 + static isPhone(): boolean {
  91 + return deviceInfo.deviceType == 'phone' || deviceInfo.deviceType == 'default';
  92 + }
  93 +
  94 + static isNotPhone(): boolean {
  95 + return !DeviceUtil.isPhone();
  96 + }
  97 +
  98 + static isTablet(): boolean {
  99 + return deviceInfo.deviceType == 'tablet';
  100 + }
85 } 101 }
@@ -105,8 +105,10 @@ export struct CompParser { @@ -105,8 +105,10 @@ export struct CompParser {
105 // ZhSingleColumn05({ compDTO: compDTO }) 105 // ZhSingleColumn05({ compDTO: compDTO })
106 // Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) 106 // Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
107 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_09) { 107 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_09) {
  108 + Divider().strokeWidth(3).color('#ffffff').padding({ left: 16, right: 16 }).margin({top: -3})
  109 + Divider().strokeWidth(6).color('#f5f5f5')
108 ZhSingleColumn09({ compDTO: this.compDTO }) 110 ZhSingleColumn09({ compDTO: this.compDTO })
109 - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) 111 + Divider().strokeWidth(6).color('#f5f5f5')
110 } else if (this.compDTO.compStyle === CompStyle.Card_Comp_Adv) { // 广告 112 } else if (this.compDTO.compStyle === CompStyle.Card_Comp_Adv) { // 广告
111 AdvCardParser({ pageModel: this.pageModel, compDTO: this.compDTO }) 113 AdvCardParser({ pageModel: this.pageModel, compDTO: this.compDTO })
112 //Text(`compIndex = ${compIndex}`).width('100%').fontSize('12fp').fontColor(Color.Red).padding({ left: 16, right: 16 }) 114 //Text(`compIndex = ${compIndex}`).width('100%').fontSize('12fp').fontColor(Color.Red).padding({ left: 16, right: 16 })
1 -import { CompDTO, ContentDTO, slideShows, VideoInfoDTO } from 'wdBean'; 1 +import { ContentDTO, slideShows, VideoInfoDTO, CompDTO } from 'wdBean';
2 import { CommonConstants } from 'wdConstant'; 2 import { CommonConstants } from 'wdConstant';
3 import { ProcessUtils } from 'wdRouter'; 3 import { ProcessUtils } from 'wdRouter';
4 import { CardSourceInfo } from '../cardCommon/CardSourceInfo'; 4 import { CardSourceInfo } from '../cardCommon/CardSourceInfo';
@@ -71,7 +71,7 @@ export struct Card5Component { @@ -71,7 +71,7 @@ export struct Card5Component {
71 } 71 }
72 .width(CommonConstants.FULL_WIDTH) 72 .width(CommonConstants.FULL_WIDTH)
73 .fontColor(Color.White) 73 .fontColor(Color.White)
74 - .fontSize($r('app.float.normal_text_size')) 74 + .fontSize($r('app.float.font_size_17'))
75 .fontWeight(FontWeight.Bold) 75 .fontWeight(FontWeight.Bold)
76 .maxLines(2) 76 .maxLines(2)
77 .align(Alignment.TopStart) 77 .align(Alignment.TopStart)
@@ -190,6 +190,7 @@ export struct CommentIconComponent { @@ -190,6 +190,7 @@ export struct CommentIconComponent {
190 .width(this.getMeasureText(this.publishCommentModel.totalCommentNumer) + 190 .width(this.getMeasureText(this.publishCommentModel.totalCommentNumer) +
191 12)// .backgroundColor(Color.Green) 191 12)// .backgroundColor(Color.Green)
192 .id("Text") 192 .id("Text")
  193 + .visibility(this.publishCommentModel.totalCommentNumer ? Visibility.Visible : Visibility.Hidden)
193 // .offset({ 194 // .offset({
194 // x: 3 195 // x: 3
195 // }) 196 // })
@@ -55,7 +55,7 @@ export struct ZhGridLayout02 { @@ -55,7 +55,7 @@ export struct ZhGridLayout02 {
55 .width(CommonConstants.FULL_WIDTH) 55 .width(CommonConstants.FULL_WIDTH)
56 56
57 GridRow({ 57 GridRow({
58 - gutter: { x: 12, y: 15 }, 58 + gutter: { x: 12, y: 13 },
59 columns: { sm: listSize, md: 2 }, 59 columns: { sm: listSize, md: 2 },
60 breakpoints: { value: ['320vp', '520vp', '840vp'] } 60 breakpoints: { value: ['320vp', '520vp', '840vp'] }
61 }) { 61 }) {
@@ -120,7 +120,7 @@ export struct ZhGridLayout02 { @@ -120,7 +120,7 @@ export struct ZhGridLayout02 {
120 } 120 }
121 121
122 Text(item.newsTitle) 122 Text(item.newsTitle)
123 - .margin({ top: '5' }) 123 + .margin({top:'6'})
124 .fontSize(13) 124 .fontSize(13)
125 .maxLines(2) 125 .maxLines(2)
126 .textOverflow({ overflow: TextOverflow.Ellipsis }) 126 .textOverflow({ overflow: TextOverflow.Ellipsis })
@@ -59,12 +59,16 @@ export struct ZhGridLayout03 { @@ -59,12 +59,16 @@ export struct ZhGridLayout03 {
59 .backgroundColor(0xf5f5f5) 59 .backgroundColor(0xf5f5f5)
60 .width(44) 60 .width(44)
61 .aspectRatio(1 / 1) 61 .aspectRatio(1 / 1)
62 - .margin({  
63 - bottom: 16  
64 - }) 62 + // .margin({
  63 + // bottom: 16
  64 + // })
65 Text(item.newsTitle) 65 Text(item.newsTitle)
66 .fontSize(13) 66 .fontSize(13)
67 .maxLines(1) 67 .maxLines(1)
  68 + .margin({
  69 + top: 8,
  70 + bottom:11
  71 + })
68 .textOverflow({ overflow: TextOverflow.Ellipsis }) 72 .textOverflow({ overflow: TextOverflow.Ellipsis })
69 } 73 }
70 .width('100%') 74 .width('100%')
@@ -27,7 +27,7 @@ struct EditUserInfoPage { @@ -27,7 +27,7 @@ struct EditUserInfoPage {
27 } 27 }
28 }), 28 }),
29 alignment: DialogAlignment.Bottom, 29 alignment: DialogAlignment.Bottom,
30 - offset:{dx:0,dy:-20} 30 + offset:{dx:0,dy:-20},
31 }) 31 })
32 32
33 aboutToAppear() { 33 aboutToAppear() {
@@ -97,14 +97,14 @@ struct EditUserInfoPage { @@ -97,14 +97,14 @@ struct EditUserInfoPage {
97 Row(){ 97 Row(){
98 Text(r.title) 98 Text(r.title)
99 .fontSize(15) 99 .fontSize(15)
100 - .fontColor(Color.Gray) 100 + .fontColor('#666666')
101 Blank() 101 Blank()
102 102
103 Text(r.subTitle) 103 Text(r.subTitle)
104 .textOverflow({overflow:TextOverflow.Ellipsis}) 104 .textOverflow({overflow:TextOverflow.Ellipsis})
105 .maxLines(1) 105 .maxLines(1)
106 .fontSize(14) 106 .fontSize(14)
107 - .fontColor(Color.Gray) 107 + .fontColor(r.subTitle === '待完善'?'#999999':'#666666')
108 .padding({right:10}) 108 .padding({right:10})
109 .width('70%') 109 .width('70%')
110 .textAlign(TextAlign.End) 110 .textAlign(TextAlign.End)
@@ -45,7 +45,7 @@ struct EditUserIntroductionPage { @@ -45,7 +45,7 @@ struct EditUserIntroductionPage {
45 Divider() 45 Divider()
46 .margin(20) 46 .margin(20)
47 47
48 - Text('1、账号中(头像、昵称等)不允许含有违禁违规内容;\n2、最多60个字,只能输入中文、数字、英文字母。') 48 + Text('1、账号中(头像、昵称等)不允许含有违禁违规内容;\n2、最多60个字,只能输入中文、数字、英文字母。')
49 .fontSize(13) 49 .fontSize(13)
50 .padding(12) 50 .padding(12)
51 .fontColor(Color.Gray).lineHeight(25) 51 .fontColor(Color.Gray).lineHeight(25)
@@ -54,6 +54,8 @@ struct EditUserIntroductionPage { @@ -54,6 +54,8 @@ struct EditUserIntroductionPage {
54 .type(ButtonType.Normal) 54 .type(ButtonType.Normal)
55 .width('90%') 55 .width('90%')
56 .backgroundColor('#ED2800') 56 .backgroundColor('#ED2800')
  57 + .opacity(this.numCount === 0 ? 0.6 : 1)
  58 + .fontColor(this.numCount === 0 ? '#999999' : Color.White)
57 .borderRadius(5) 59 .borderRadius(5)
58 .margin(30) 60 .margin(30)
59 .onClick(()=>{ 61 .onClick(()=>{
@@ -47,7 +47,7 @@ struct EditUserNikeNamePage { @@ -47,7 +47,7 @@ struct EditUserNikeNamePage {
47 Divider() 47 Divider()
48 .margin(20) 48 .margin(20)
49 49
50 - Text('1、账号中(头像、昵称等)不允许含有违禁违规内容;\n2、最多16个字,只能输入中文、数字、英文字母。') 50 + Text('1、账号中(头像、昵称等)不允许含有违禁违规内容;\n2、最多16个字,只能输入中文、数字、英文字母。')
51 .fontSize(13) 51 .fontSize(13)
52 .padding(12) 52 .padding(12)
53 .fontColor(Color.Gray).lineHeight(25) 53 .fontColor(Color.Gray).lineHeight(25)
@@ -56,6 +56,8 @@ struct EditUserNikeNamePage { @@ -56,6 +56,8 @@ struct EditUserNikeNamePage {
56 .type(ButtonType.Normal) 56 .type(ButtonType.Normal)
57 .width('90%') 57 .width('90%')
58 .backgroundColor('#ED2800') 58 .backgroundColor('#ED2800')
  59 + .opacity(this.numCount === 0 ? 0.6 : 1)
  60 + .fontColor(this.numCount === 0 ? '#999999' : Color.White)
59 .borderRadius(5) 61 .borderRadius(5)
60 .margin(30) 62 .margin(30)
61 .onClick(()=>{ 63 .onClick(()=>{
@@ -11,6 +11,7 @@ import { CustomBottomFuctionUI } from '../view/CustomBottomFuctionUI'; @@ -11,6 +11,7 @@ import { CustomBottomFuctionUI } from '../view/CustomBottomFuctionUI';
11 import { BigPicCardComponent } from '../view/BigPicCardComponent'; 11 import { BigPicCardComponent } from '../view/BigPicCardComponent';
12 import { contentListItemParams } from '../../model/MyCollectionModel'; 12 import { contentListItemParams } from '../../model/MyCollectionModel';
13 import { CustomPullToRefresh } from '../reusable/CustomPullToRefresh'; 13 import { CustomPullToRefresh } from '../reusable/CustomPullToRefresh';
  14 +import { MyCustomDialog } from '../reusable/MyCustomDialog'
14 15
15 @Entry 16 @Entry
16 @Component 17 @Component
@@ -26,6 +27,19 @@ struct MyCollectionListPage { @@ -26,6 +27,19 @@ struct MyCollectionListPage {
26 @State currentPage: number = 1; 27 @State currentPage: number = 1;
27 private scroller: Scroller = new Scroller(); 28 private scroller: Scroller = new Scroller();
28 29
  30 + dialogController: CustomDialogController = new CustomDialogController({
  31 + builder: MyCustomDialog({
  32 + confirm: () => {
  33 + this.deleteDatas()
  34 + },
  35 + titleShow:false,
  36 + tipValue: this.isAllSelect?'是否确认清空?':'确认删除'+this.deleteNum.toString()+'条收藏'
  37 + }),
  38 + autoCancel: true,
  39 + alignment: DialogAlignment.Center,
  40 + customStyle: true
  41 + })
  42 +
29 aboutToAppear(){ 43 aboutToAppear(){
30 this.getData() 44 this.getData()
31 } 45 }
@@ -73,7 +87,7 @@ struct MyCollectionListPage { @@ -73,7 +87,7 @@ struct MyCollectionListPage {
73 this.allSelectDatas(isAllSelect) 87 this.allSelectDatas(isAllSelect)
74 }, 88 },
75 confirmCallback:()=>{ 89 confirmCallback:()=>{
76 - this.deleteDatas() 90 + this.dialogController.open()
77 } 91 }
78 }) 92 })
79 } 93 }
@@ -58,7 +58,7 @@ export struct LikeComponent { @@ -58,7 +58,7 @@ export struct LikeComponent {
58 } else if (this.componentType == 5) { 58 } else if (this.componentType == 5) {
59 // 图集点赞,展示标识 59 // 图集点赞,展示标识
60 this.likeCompStyle5() 60 this.likeCompStyle5()
61 - }else { 61 + } else {
62 //1: 底部栏目样式 默认样式 62 //1: 底部栏目样式 默认样式
63 this.likeCompStyle1() 63 this.likeCompStyle1()
64 } 64 }
@@ -188,7 +188,7 @@ export struct LikeComponent { @@ -188,7 +188,7 @@ export struct LikeComponent {
188 .alignItems(VerticalAlign.Center) 188 .alignItems(VerticalAlign.Center)
189 .position({ x: '100%', }) 189 .position({ x: '100%', })
190 .markAnchor({ x: '100%' }) 190 .markAnchor({ x: '100%' })
191 - .backgroundImage(this.likeStatus? $r('app.media.ic_like_back_Select'):$r('app.media.ic_like_back')) 191 + .backgroundImage(this.likeStatus ? $r('app.media.ic_like_back_Select') : $r('app.media.ic_like_back'))
192 .backgroundImageSize(ImageSize.Auto) 192 .backgroundImageSize(ImageSize.Auto)
193 .visibility(this.likeCount > 0 ? Visibility.Visible : Visibility.Hidden) 193 .visibility(this.likeCount > 0 ? Visibility.Visible : Visibility.Hidden)
194 }.width(24).height(24) 194 }.width(24).height(24)
@@ -209,7 +209,7 @@ export struct LikeComponent { @@ -209,7 +209,7 @@ export struct LikeComponent {
209 .width(36) 209 .width(36)
210 .height(36) 210 .height(36)
211 .borderRadius(18) 211 .borderRadius(18)
212 - .backgroundColor(this.pageComponentType === 4 ? '#4D000000' : '#FFF5F5F5') 212 + .backgroundColor((this.pageComponentType === 4 || this.pageComponentType === 2) ? '#4D000000' : '#FFF5F5F5')
213 213
214 214
215 Row() { 215 Row() {
@@ -9,7 +9,7 @@ export struct AreaPickerDialog { @@ -9,7 +9,7 @@ export struct AreaPickerDialog {
9 @Provide currentSecondBean: AreaListManageModel = new AreaListManageModel('','','',[]) 9 @Provide currentSecondBean: AreaListManageModel = new AreaListManageModel('','','',[])
10 @Provide currentThirdBean: AreaListManageModel = new AreaListManageModel('','','',[]) 10 @Provide currentThirdBean: AreaListManageModel = new AreaListManageModel('','','',[])
11 controller: CustomDialogController 11 controller: CustomDialogController
12 - title: string = '地区选择' 12 + title: string = '修改地区'
13 @Provide dataSource: AreaListModel[] = [] 13 @Provide dataSource: AreaListModel[] = []
14 result: JSON[] = []; 14 result: JSON[] = [];
15 confirmCallback: (province:string,city:string,county:string,address:string) => void = () => { 15 confirmCallback: (province:string,city:string,county:string,address:string) => void = () => {
@@ -33,7 +33,7 @@ export struct AreaPickerDialog { @@ -33,7 +33,7 @@ export struct AreaPickerDialog {
33 33
34 Blank() 34 Blank()
35 35
36 - Button('确定',{type:ButtonType.Normal}) 36 + Button('提交',{type:ButtonType.Normal})
37 .onClick(()=> { 37 .onClick(()=> {
38 this.controller.close() 38 this.controller.close()
39 this.confirmCallback(this.currentFirst.label,this.currentSecondBean.label,this.currentThirdBean.label,this.currentFirst.label+this.currentSecondBean.label+this.currentThirdBean.label); 39 this.confirmCallback(this.currentFirst.label,this.currentSecondBean.label,this.currentThirdBean.label,this.currentFirst.label+this.currentSecondBean.label+this.currentThirdBean.label);
@@ -28,9 +28,11 @@ export struct FirstLevelComponent { @@ -28,9 +28,11 @@ export struct FirstLevelComponent {
28 this.currentFirst = EditInfoViewModel.getAreaListManageModel(this.dataSource[index as number]) 28 this.currentFirst = EditInfoViewModel.getAreaListManageModel(this.dataSource[index as number])
29 }) 29 })
30 .backgroundColor(Color.White) 30 .backgroundColor(Color.White)
31 - .border({color:'#e2e2e2',width:{right:0.5}}) 31 + // .border({color:'#e2e2e2',width:{right:0.5}})
32 .width('100%') 32 .width('100%')
33 .layoutWeight(1) 33 .layoutWeight(1)
  34 + .selectedTextStyle({color:'#666666'})
  35 + .textStyle({color:'#999999'})
34 } 36 }
35 } 37 }
36 .justifyContent(FlexAlign.Center) 38 .justifyContent(FlexAlign.Center)
@@ -21,9 +21,11 @@ export struct SecondLevelComponent { @@ -21,9 +21,11 @@ export struct SecondLevelComponent {
21 this.currentSecondBean = EditInfoViewModel.getAreaListManageModel(this.currentFirst.children[index as number]) 21 this.currentSecondBean = EditInfoViewModel.getAreaListManageModel(this.currentFirst.children[index as number])
22 }) 22 })
23 .backgroundColor(Color.White) 23 .backgroundColor(Color.White)
24 - .border({color:'#e2e2e2',width:{right:0.5}}) 24 + // .border({color:'#e2e2e2',width:{right:0.5}})
25 .width('100%') 25 .width('100%')
26 .layoutWeight(1) 26 .layoutWeight(1)
  27 + .selectedTextStyle({color:'#666666'})
  28 + .textStyle({color:'#999999'})
27 } 29 }
28 } 30 }
29 .justifyContent(FlexAlign.Center) 31 .justifyContent(FlexAlign.Center)
@@ -22,9 +22,11 @@ export struct ThirdLevelComponent { @@ -22,9 +22,11 @@ export struct ThirdLevelComponent {
22 this.currentThirdBean = EditInfoViewModel.getAreaListManageModel(this.currentSecondBean.children[index as number]) 22 this.currentThirdBean = EditInfoViewModel.getAreaListManageModel(this.currentSecondBean.children[index as number])
23 }) 23 })
24 .backgroundColor(Color.White) 24 .backgroundColor(Color.White)
25 - .border({color:'#e2e2e2',width:{right:0.5}}) 25 + // .border({color:'#e2e2e2',width:{right:0.5}})
26 .width('100%') 26 .width('100%')
27 .layoutWeight(1) 27 .layoutWeight(1)
  28 + .selectedTextStyle({color:'#666666'})
  29 + .textStyle({color:'#999999'})
28 } 30 }
29 } 31 }
30 .justifyContent(FlexAlign.Center) 32 .justifyContent(FlexAlign.Center)
@@ -125,7 +125,7 @@ class EditInfoViewModel { @@ -125,7 +125,7 @@ class EditInfoViewModel {
125 this.BasePostRequest(item.editDataType == WDEditDataModelType.WDEditDataModelType_nickname?HttpUrlUtils.APPOINTMENT_editUserDetail1_PATH:HttpUrlUtils.APPOINTMENT_editUserDetail_PATH,this.params) 125 this.BasePostRequest(item.editDataType == WDEditDataModelType.WDEditDataModelType_nickname?HttpUrlUtils.APPOINTMENT_editUserDetail1_PATH:HttpUrlUtils.APPOINTMENT_editUserDetail_PATH,this.params)
126 .then((navResDTO: ResponseDTO) => { 126 .then((navResDTO: ResponseDTO) => {
127 if (navResDTO.code == 0) { 127 if (navResDTO.code == 0) {
128 - promptAction.showToast({ message: '修改成功' }) 128 + promptAction.showToast({ message: '您的资料已提交' })
129 success(navResDTO) 129 success(navResDTO)
130 }else { 130 }else {
131 promptAction.showToast({ message: navResDTO.message }) 131 promptAction.showToast({ message: navResDTO.message })
@@ -199,6 +199,7 @@ export struct DetailPlayShortVideoPage { @@ -199,6 +199,7 @@ export struct DetailPlayShortVideoPage {
199 }) 199 })
200 200
201 } 201 }
  202 + .width('100%')
202 .layoutWeight(1) 203 .layoutWeight(1)
203 .onClick(() => { 204 .onClick(() => {
204 this.playerController?.switchPlayOrPause(); 205 this.playerController?.switchPlayOrPause();
@@ -223,9 +224,10 @@ export struct DetailPlayShortVideoPage { @@ -223,9 +224,10 @@ export struct DetailPlayShortVideoPage {
223 } 224 }
224 .height('100%') 225 .height('100%')
225 .width('100%') 226 .width('100%')
226 - .padding({  
227 - top: this.displayDirection === DisplayDirection.VIDEO_HORIZONTAL ? 0 : this.topSafeHeight + 'px'  
228 - }) 227 +
  228 + // .padding({
  229 + // top: this.displayDirection === DisplayDirection.VIDEO_HORIZONTAL ? 0 : this.topSafeHeight + 'px'
  230 + // })
229 231
230 if (this.showCommentList) { 232 if (this.showCommentList) {
231 CommentComponentPage({}) 233 CommentComponentPage({})
@@ -258,15 +258,12 @@ export struct VideoChannelDetail { @@ -258,15 +258,12 @@ export struct VideoChannelDetail {
258 .visibility(this.isMouted ? Visibility.None : Visibility.Visible) 258 .visibility(this.isMouted ? Visibility.None : Visibility.Visible)
259 Swiper(this.swiperController) { 259 Swiper(this.swiperController) {
260 ForEach(this.data, (item: ContentDetailDTO, index: number) => { 260 ForEach(this.data, (item: ContentDetailDTO, index: number) => {
261 - Column() {  
262 DetailPlayShortVideoPage({ 261 DetailPlayShortVideoPage({
263 contentDetailData: item, 262 contentDetailData: item,
264 currentIndex: this.currentIndex, 263 currentIndex: this.currentIndex,
265 index: index, 264 index: index,
266 interactData: this.interactDataList[index] 265 interactData: this.interactDataList[index]
267 }) 266 })
268 - }.width('100%')  
269 - .height('100%')  
270 }, (item: ContentDetailDTO) => item.newsId + '') 267 }, (item: ContentDetailDTO) => item.newsId + '')
271 } 268 }
272 .displayCount(1, true) 269 .displayCount(1, true)
@@ -5,7 +5,7 @@ import UIAbility from '@ohos.app.ability.UIAbility'; @@ -5,7 +5,7 @@ import UIAbility from '@ohos.app.ability.UIAbility';
5 import Want from '@ohos.app.ability.Want'; 5 import Want from '@ohos.app.ability.Want';
6 import window from '@ohos.window'; 6 import window from '@ohos.window';
7 import { BusinessError } from '@ohos.base'; 7 import { BusinessError } from '@ohos.base';
8 -import { EmitterEventId, EmitterUtils, WindowModel } from 'wdKit'; 8 +import { DeviceUtil, EmitterEventId, EmitterUtils, WindowModel } from 'wdKit';
9 import { ConfigurationConstant } from '@kit.AbilityKit'; 9 import { ConfigurationConstant } from '@kit.AbilityKit';
10 import { WDPushNotificationManager } from 'wdHwAbility/Index'; 10 import { WDPushNotificationManager } from 'wdHwAbility/Index';
11 import { StartupManager } from '../startupmanager/StartupManager'; 11 import { StartupManager } from '../startupmanager/StartupManager';
@@ -58,8 +58,20 @@ export default class EntryAbility extends UIAbility { @@ -58,8 +58,20 @@ export default class EntryAbility extends UIAbility {
58 console.info('floatWindowClass audioWidth' + audioWidth); 58 console.info('floatWindowClass audioWidth' + audioWidth);
59 59
60 60
61 - // let a = new WindowModel();  
62 - // 设置窗口的显示方向属性 61 + // 在普通phone/折叠屏/tablet设备上以沉浸式(全屏)启动
  62 + if (DeviceUtil.isPhone() || DeviceUtil.isTablet()) {
  63 + // 设置窗口的布局是否为沉浸式布局
  64 + // 沉浸式布局是指布局不避让状态栏与导航栏,组件可能产生与其重叠的情况。
  65 + // 非沉浸式布局是指布局避让状态栏与导航栏,组件不会与其重叠。
  66 + // windowClass.setWindowLayoutFullScreen(true)
  67 + // 设置窗口全屏模式时窗口内导航栏、状态栏的属性
  68 + // windowClass.setWindowSystemBarProperties({
  69 + // statusBarContentColor: "#FFFFFF"
  70 + // })
  71 +
  72 + // 设置启动时窗口的显示方向属性,
  73 + // 普通phone以PORTRAIT/竖屏显示模式启动
  74 + // 折叠屏和tablet是以AUTO_ROTATION_RESTRICTED/受开关控制的自动旋转模式启动
63 WindowModel.shared.setPreferredOrientation(window.Orientation.PORTRAIT) 75 WindowModel.shared.setPreferredOrientation(window.Orientation.PORTRAIT)
64 .then(() => { 76 .then(() => {
65 hilog.info(0x0000, 'testTag', 'setPreferredOrientation Succeeded'); 77 hilog.info(0x0000, 'testTag', 'setPreferredOrientation Succeeded');
@@ -68,6 +80,8 @@ export default class EntryAbility extends UIAbility { @@ -68,6 +80,8 @@ export default class EntryAbility extends UIAbility {
68 hilog.error(0x0000, 'testTag', 80 hilog.error(0x0000, 'testTag',
69 `setPreferredOrientation catch, error error.name : ${err.name}, error.message:${err.message}`); 81 `setPreferredOrientation catch, error error.name : ${err.name}, error.message:${err.message}`);
70 }) 82 })
  83 + }
  84 +
71 //../../../../../../features/wdLogin/src/main/ets/pages/launchPage/LaunchPage 85 //../../../../../../features/wdLogin/src/main/ets/pages/launchPage/LaunchPage
72 windowStage.loadContent('pages/launchPage/LaunchPage', (err, data) => { 86 windowStage.loadContent('pages/launchPage/LaunchPage', (err, data) => {
73 if (err.code) { 87 if (err.code) {
@@ -47,7 +47,7 @@ struct LaunchInterestsHobbiesPage { @@ -47,7 +47,7 @@ struct LaunchInterestsHobbiesPage {
47 .width('100%') 47 .width('100%')
48 .height('61lpx') 48 .height('61lpx')
49 .margin({top:'84lpx'}) 49 .margin({top:'84lpx'})
50 - Text('完善信息将为您推荐个性化的内容') 50 + Text('完善信息,将为您推荐个性化的内容')
51 .fontSize('27lpx') 51 .fontSize('27lpx')
52 .textAlign(TextAlign.Center) 52 .textAlign(TextAlign.Center)
53 .fontColor('#9E9E9E') 53 .fontColor('#9E9E9E')
@@ -69,8 +69,8 @@ struct LaunchInterestsHobbiesPage { @@ -69,8 +69,8 @@ struct LaunchInterestsHobbiesPage {
69 Image('') 69 Image('')
70 .width('100%') 70 .width('100%')
71 .height('100%') 71 .height('100%')
72 - .backgroundColor(Color.Gray)  
73 - .opacity(item.choose?0.85:0) 72 + .backgroundColor(Color.Black)
  73 + .opacity(item.choose?0.5:0)
74 .borderRadius(5) 74 .borderRadius(5)
75 } 75 }
76 76
@@ -134,14 +134,14 @@ struct LaunchInterestsHobbiesPage { @@ -134,14 +134,14 @@ struct LaunchInterestsHobbiesPage {
134 .width('662lpx') 134 .width('662lpx')
135 .height('84lpx') 135 .height('84lpx')
136 .backgroundColor(Color.White) 136 .backgroundColor(Color.White)
137 - .opacity(this.selectCount == 0 ? 0.3 : 0) 137 + .opacity(this.selectCount == 0 ? 0.6 : 0)
138 .borderRadius('10lpx') 138 .borderRadius('10lpx')
139 .onClick(()=>{ 139 .onClick(()=>{
140 if (this.selectCount == 0) { 140 if (this.selectCount == 0) {
141 promptAction.showToast({ 141 promptAction.showToast({
142 message : '请先选择您感兴趣的内容哦', 142 message : '请先选择您感兴趣的内容哦',
143 duration: 2000, 143 duration: 2000,
144 - bottom: '50%' 144 + bottom: '50%',
145 }) 145 })
146 return 146 return
147 } 147 }