Showing
3 changed files
with
13 additions
and
4 deletions
| @@ -220,7 +220,7 @@ struct ChildCommentItem { | @@ -220,7 +220,7 @@ struct ChildCommentItem { | ||
| 220 | Span(this.item.fromUserName) | 220 | Span(this.item.fromUserName) |
| 221 | if (this.item.toUserName) { | 221 | if (this.item.toUserName) { |
| 222 | Span(' ') | 222 | Span(' ') |
| 223 | - ImageSpan($r('app.media.comment_reply')).size({ width: 6, height: 9 }).offset({ y: -2.5 }) | 223 | + ImageSpan($r('app.media.comment_reply')).size({ width: 6, height: 9 }).offset({ y: -2.7 }) |
| 224 | Span(' ') | 224 | Span(' ') |
| 225 | Span(this.item.toUserName) | 225 | Span(this.item.toUserName) |
| 226 | } | 226 | } |
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/QualityCommentsComponent.ets
| @@ -7,6 +7,7 @@ import { CustomTitleUI } from '../../reusable/CustomTitleUI' | @@ -7,6 +7,7 @@ import { CustomTitleUI } from '../../reusable/CustomTitleUI' | ||
| 7 | import { MyCommentDataSource } from '../model/MyCommentDataSource' | 7 | import { MyCommentDataSource } from '../model/MyCommentDataSource' |
| 8 | import { HttpUtils } from 'wdNetwork/src/main/ets/utils/HttpUtils' | 8 | import { HttpUtils } from 'wdNetwork/src/main/ets/utils/HttpUtils' |
| 9 | import { HttpUrlUtils } from 'wdNetwork/Index' | 9 | import { HttpUrlUtils } from 'wdNetwork/Index' |
| 10 | +import PageModel from '../../../viewmodel/PageModel' | ||
| 10 | 11 | ||
| 11 | const TAG = 'QualityCommentsComponent'; | 12 | const TAG = 'QualityCommentsComponent'; |
| 12 | 13 | ||
| @@ -14,12 +15,14 @@ const TAG = 'QualityCommentsComponent'; | @@ -14,12 +15,14 @@ const TAG = 'QualityCommentsComponent'; | ||
| 14 | @Preview | 15 | @Preview |
| 15 | @Component | 16 | @Component |
| 16 | export struct QualityCommentsComponent { | 17 | export struct QualityCommentsComponent { |
| 18 | + | ||
| 19 | + @State private browSingModel: PageModel = new PageModel() | ||
| 20 | + isloading : boolean = false | ||
| 21 | + | ||
| 17 | @State tileOpacity: number = 0; | 22 | @State tileOpacity: number = 0; |
| 18 | firstPositionY: number = 0; | 23 | firstPositionY: number = 0; |
| 19 | bottomSafeHeight: string = AppStorage.get<number>('bottomSafeHeight') + 'px'; | 24 | bottomSafeHeight: string = AppStorage.get<number>('bottomSafeHeight') + 'px'; |
| 20 | topSafeHeight: number = AppStorage.get<number>('topSafeHeight') as number; | 25 | topSafeHeight: number = AppStorage.get<number>('topSafeHeight') as number; |
| 21 | - // @State private browSingModel: commentListModel = new commentListModel() | ||
| 22 | - isloading: boolean = false | ||
| 23 | lastWindowColor: string = '#ffffff' | 26 | lastWindowColor: string = '#ffffff' |
| 24 | currentWindowColor: string = '#FF4202' | 27 | currentWindowColor: string = '#FF4202' |
| 25 | @State allDatas: MyCommentDataSource = new MyCommentDataSource(); | 28 | @State allDatas: MyCommentDataSource = new MyCommentDataSource(); |
| @@ -5,6 +5,7 @@ import hilog from '@ohos.hilog'; | @@ -5,6 +5,7 @@ import hilog from '@ohos.hilog'; | ||
| 5 | import { PrivacySettingModel } from '../../model/PrivacySettingModel' | 5 | import { PrivacySettingModel } from '../../model/PrivacySettingModel' |
| 6 | import { Params } from 'wdBean'; | 6 | import { Params } from 'wdBean'; |
| 7 | import { WDRouterPage, WDRouterRule } from 'wdRouter'; | 7 | import { WDRouterPage, WDRouterRule } from 'wdRouter'; |
| 8 | +import { HttpUrlUtils } from 'wdNetwork/Index'; | ||
| 8 | 9 | ||
| 9 | const TAG = 'PrivacySettingPage'; | 10 | const TAG = 'PrivacySettingPage'; |
| 10 | const DiyString = '开启个性化推荐' | 11 | const DiyString = '开启个性化推荐' |
| @@ -23,6 +24,9 @@ export struct PrivacySettingPage { | @@ -23,6 +24,9 @@ export struct PrivacySettingPage { | ||
| 23 | } | 24 | } |
| 24 | 25 | ||
| 25 | aboutToAppear() { | 26 | aboutToAppear() { |
| 27 | + if (!HttpUrlUtils.getUserId()) { | ||
| 28 | + this.listData.splice(0, 1); | ||
| 29 | + } | ||
| 26 | // 获取权限= | 30 | // 获取权限= |
| 27 | // SPHelper.default.save('sdf','sdf'); | 31 | // SPHelper.default.save('sdf','sdf'); |
| 28 | // this.initListData(); | 32 | // this.initListData(); |
| @@ -60,7 +64,7 @@ export struct PrivacySettingPage { | @@ -60,7 +64,7 @@ export struct PrivacySettingPage { | ||
| 60 | List({ space: '23lpx' }) { | 64 | List({ space: '23lpx' }) { |
| 61 | ForEach(this.listData, (item: PrivacySettingModel, index:number) => { | 65 | ForEach(this.listData, (item: PrivacySettingModel, index:number) => { |
| 62 | ListItem() { | 66 | ListItem() { |
| 63 | - if (index == 0) { | 67 | + if (item.privacyName == DiyString) { |
| 64 | getTuiJianCell({ item:item, index:index }); | 68 | getTuiJianCell({ item:item, index:index }); |
| 65 | } else { | 69 | } else { |
| 66 | getArrowCell({ item:item, index:index }); | 70 | getArrowCell({ item:item, index:index }); |
| @@ -73,6 +77,8 @@ export struct PrivacySettingPage { | @@ -73,6 +77,8 @@ export struct PrivacySettingPage { | ||
| 73 | PermissionUtil.reqPermissionsFromUser([item.permissionKey], this).then((res)=>{ | 77 | PermissionUtil.reqPermissionsFromUser([item.permissionKey], this).then((res)=>{ |
| 74 | item.permission = res; | 78 | item.permission = res; |
| 75 | }); | 79 | }); |
| 80 | + }else{ | ||
| 81 | + PermissionUtil.openPermissionsInSystemSettings(this); | ||
| 76 | } | 82 | } |
| 77 | } | 83 | } |
| 78 | }) | 84 | }) |
-
Please register or login to post a comment