Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool
Showing
21 changed files
with
850 additions
and
81 deletions
| @@ -6,7 +6,7 @@ export const enum CompStyle { | @@ -6,7 +6,7 @@ export const enum CompStyle { | ||
| 6 | Carousel_Layout_01 = 'Zh_Carousel_Layout-01', // 通用轮播卡:视频、直播、活动、专题、榜单、外链 | 6 | Carousel_Layout_01 = 'Zh_Carousel_Layout-01', // 通用轮播卡:视频、直播、活动、专题、榜单、外链 |
| 7 | Carousel_Layout_02 = 'Carousel_Layout-02', // 直播轮播卡:直播 | 7 | Carousel_Layout_02 = 'Carousel_Layout-02', // 直播轮播卡:直播 |
| 8 | Single_Row_01 = 'Zh_Single_Row-01', // 三格方形小卡(排名):专题、活动 | 8 | Single_Row_01 = 'Zh_Single_Row-01', // 三格方形小卡(排名):专题、活动 |
| 9 | - Zh_Single_Row_01 = 'Zh_Single_Row-01', // 横划卡 | 9 | + Zh_Single_Row_01 = 'Zh_Single_Row-01', // 横划卡 imageScale-封面图比例 1-4:3, 2-16:9, 3-3:2 |
| 10 | Single_Row_02 = 'Zh_Single_Row-02', // 通用横划卡:视频、直播、专题 | 10 | Single_Row_02 = 'Zh_Single_Row-02', // 通用横划卡:视频、直播、专题 |
| 11 | Single_Row_03 = 'Single_Row-03', // 直播横划卡:直播 | 11 | Single_Row_03 = 'Single_Row-03', // 直播横划卡:直播 |
| 12 | Single_Row_04 = 'Single_Row-04', // 三格方形小卡:专题、活动 | 12 | Single_Row_04 = 'Single_Row-04', // 三格方形小卡:专题、活动 |
| @@ -26,5 +26,8 @@ export const enum CompStyle { | @@ -26,5 +26,8 @@ export const enum CompStyle { | ||
| 26 | Single_ImageCard_03 = '13',//单图卡:3行标题 | 26 | Single_ImageCard_03 = '13',//单图卡:3行标题 |
| 27 | Single_ImageCard_01 = '6',//单图卡,竖图 | 27 | Single_ImageCard_01 = '6',//单图卡,竖图 |
| 28 | ZhGrid_Layout_03 = 'Zh_Grid_Layout-03', //金刚位卡 | 28 | ZhGrid_Layout_03 = 'Zh_Grid_Layout-03', //金刚位卡 |
| 29 | - Album_Card_01 = '17' //图卡集 | 29 | + Album_Card_01 = '17', //图卡集 |
| 30 | + Zh_Single_Row_04 = 'Zh_Single_Row-04', // 地方精选卡 | ||
| 31 | + CompStyle_09 = 9, // 时间链卡 | ||
| 32 | + CompStyle_10 = 10, // 大专题卡 | ||
| 30 | } | 33 | } |
| @@ -309,8 +309,19 @@ export class HttpUrlUtils { | @@ -309,8 +309,19 @@ export class HttpUrlUtils { | ||
| 309 | return url; | 309 | return url; |
| 310 | } | 310 | } |
| 311 | 311 | ||
| 312 | + static getVerifyCodeByTokenUrl() { | ||
| 313 | + let url = HttpUrlUtils.hostUrl + "/api/rmrb-user-center/auth/zh/c/sendVerifyCodeByToken"; | ||
| 314 | + return url; | ||
| 315 | + } | ||
| 316 | + | ||
| 317 | + | ||
| 312 | static getForgetPasswordUrl() { | 318 | static getForgetPasswordUrl() { |
| 313 | - let url = HttpUrlUtils.hostUrl + "/api/rmrb-user-center/auth/zh/c/forgotPassword"; | 319 | + let url = HttpUrlUtils.hostUrl + "/api/rmrb-user-center/user/zh/c/forgotPassword"; |
| 320 | + return url; | ||
| 321 | + } | ||
| 322 | + | ||
| 323 | + static getResetPassworddUrl() { | ||
| 324 | + let url = HttpUrlUtils.hostUrl + "/api/rmrb-user-center/user/zh/c/resetPassword"; | ||
| 314 | return url; | 325 | return url; |
| 315 | } | 326 | } |
| 316 | 327 | ||
| @@ -334,6 +345,11 @@ export class HttpUrlUtils { | @@ -334,6 +345,11 @@ export class HttpUrlUtils { | ||
| 334 | return url; | 345 | return url; |
| 335 | } | 346 | } |
| 336 | 347 | ||
| 348 | + static getCheckVerifyByTokenCodeUrl() { | ||
| 349 | + let url = HttpUrlUtils.hostUrl + "/api/rmrb-user-center/auth/zh/c/checkVerifyCodeByToken"; | ||
| 350 | + return url; | ||
| 351 | + } | ||
| 352 | + | ||
| 337 | static getAppointmentListDataUrl() { | 353 | static getAppointmentListDataUrl() { |
| 338 | let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.APPOINTMENT_LIST_DATA_PATH | 354 | let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.APPOINTMENT_LIST_DATA_PATH |
| 339 | return url | 355 | return url |
| 1 | +import { LazyDataSource, StringUtils } from 'wdKit'; | ||
| 2 | +import { CommentListItem } from '../../../viewmodel/CommentListItem'; | ||
| 3 | +import { OtherUserCommentListRequestItem } from '../../../viewmodel/OtherUserCommentListRequestItem'; | ||
| 4 | +import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI'; | ||
| 5 | + | ||
| 6 | +const TAG = "HomePageBottomComponent" | ||
| 7 | +@Component | ||
| 8 | +export struct OtherHomePageBottomCommentComponent{ | ||
| 9 | + @Prop curUserId: string | ||
| 10 | + @State data_comment: LazyDataSource<CommentListItem> = new LazyDataSource(); | ||
| 11 | + @State isLoading:boolean = false | ||
| 12 | + @State hasMore:boolean = true | ||
| 13 | + curPageNum:number = 1; | ||
| 14 | + @State count:number = 0; | ||
| 15 | + | ||
| 16 | + aboutToAppear(){ | ||
| 17 | + this.getNewPageData() | ||
| 18 | + } | ||
| 19 | + | ||
| 20 | + build(){ | ||
| 21 | + Column(){ | ||
| 22 | + Divider().width('100%') | ||
| 23 | + .height('2lpx') | ||
| 24 | + .strokeWidth('1lpx') | ||
| 25 | + .backgroundColor($r('app.color.color_EDEDED')) | ||
| 26 | + | ||
| 27 | + if(this.count === 0){ | ||
| 28 | + ListHasNoMoreDataUI({style:2}) | ||
| 29 | + .height('100%') | ||
| 30 | + }else{ | ||
| 31 | + List({ space: 3 }) { | ||
| 32 | + LazyForEach(this.data_comment, (item: CommentListItem, index: number = 0) => { | ||
| 33 | + ListItem() { | ||
| 34 | + ChildCommentComponent({data: item}) | ||
| 35 | + } | ||
| 36 | + .onClick(() => { | ||
| 37 | + }) | ||
| 38 | + }, (item: CommentListItem, index: number) => index.toString()) | ||
| 39 | + | ||
| 40 | + //没有更多数据 显示提示 | ||
| 41 | + if(!this.hasMore){ | ||
| 42 | + ListItem(){ | ||
| 43 | + ListHasNoMoreDataUI() | ||
| 44 | + } | ||
| 45 | + } | ||
| 46 | + }.cachedCount(15) | ||
| 47 | + .layoutWeight(1) | ||
| 48 | + .scrollBar(BarState.Off) | ||
| 49 | + .edgeEffect(EdgeEffect.None) | ||
| 50 | + // .nestedScroll({ | ||
| 51 | + // scrollForward: NestedScrollMode.PARENT_FIRST, | ||
| 52 | + // scrollBackward: NestedScrollMode.SELF_FIRST | ||
| 53 | + // }) | ||
| 54 | + .onReachEnd(()=>{ | ||
| 55 | + console.log(TAG,"触底了"); | ||
| 56 | + if(!this.isLoading){ | ||
| 57 | + this.isLoading = true | ||
| 58 | + //加载分页数据 | ||
| 59 | + this.getNewPageData() | ||
| 60 | + } | ||
| 61 | + }) | ||
| 62 | + } | ||
| 63 | + } | ||
| 64 | + .width('100%') | ||
| 65 | + } | ||
| 66 | + | ||
| 67 | + | ||
| 68 | + @Styles | ||
| 69 | + listStyle() { | ||
| 70 | + .backgroundColor(Color.White) | ||
| 71 | + .height(72) | ||
| 72 | + .width("100%") | ||
| 73 | + .borderRadius(12) | ||
| 74 | + } | ||
| 75 | + | ||
| 76 | + getNewPageData(){ | ||
| 77 | + this.isLoading = true | ||
| 78 | + if(this.hasMore){ | ||
| 79 | + | ||
| 80 | + let object = new OtherUserCommentListRequestItem("",20,this.curPageNum,"","1",this.curUserId) | ||
| 81 | + | ||
| 82 | + // MinePageDatasModel.getMineCommentListData(object,getContext(this)).then((value)=>{ | ||
| 83 | + // if (!this.data_comment || value.list.length == 0){ | ||
| 84 | + // this.hasMore = false | ||
| 85 | + // }else{ | ||
| 86 | + // value.list.forEach((value)=>{ | ||
| 87 | + // this.data_comment.push(new CommentListItem(value.fromUserHeader,value.fromUserName,value.targetTitle,value.createTime,value.commentContent)) | ||
| 88 | + // }) | ||
| 89 | + // this.data_comment.notifyDataReload() | ||
| 90 | + // this.count = this.data_comment.totalCount() | ||
| 91 | + // if (this.data_comment.totalCount() < value.totalCount) { | ||
| 92 | + // this.curPageNum++ | ||
| 93 | + // }else { | ||
| 94 | + // this.hasMore = false | ||
| 95 | + // } | ||
| 96 | + // } | ||
| 97 | + // this.isLoading = false | ||
| 98 | + // }).catch((err:Error)=>{ | ||
| 99 | + // console.log(TAG,"请求失败") | ||
| 100 | + // this.isLoading = false | ||
| 101 | + // }) | ||
| 102 | + } | ||
| 103 | + } | ||
| 104 | +} | ||
| 105 | + | ||
| 106 | +@Component | ||
| 107 | +struct ChildCommentComponent { | ||
| 108 | + @ObjectLink data: CommentListItem | ||
| 109 | + | ||
| 110 | + build() { | ||
| 111 | + Column(){ | ||
| 112 | + Row() { | ||
| 113 | + Image(StringUtils.isEmpty(this.data.fromUserHeader)?$r('app.media.default_head'):this.data.fromUserHeader) | ||
| 114 | + .objectFit(ImageFit.Auto) | ||
| 115 | + .width('69lpx') | ||
| 116 | + .height('69lpx') | ||
| 117 | + .margin({right:'15lpx'}) | ||
| 118 | + | ||
| 119 | + Column(){ | ||
| 120 | + Text(this.data.fromUserName) | ||
| 121 | + .fontSize('25lpx') | ||
| 122 | + .lineHeight('35lpx') | ||
| 123 | + .fontWeight('600lpx') | ||
| 124 | + .fontColor($r('app.color.color_222222')) | ||
| 125 | + .margin({bottom:'6lpx'}) | ||
| 126 | + .maxLines(1) | ||
| 127 | + Text(`${this.data.createTime}`) | ||
| 128 | + .fontColor($r('app.color.color_B0B0B0')) | ||
| 129 | + .fontSize('23lpx') | ||
| 130 | + .lineHeight('31lpx') | ||
| 131 | + .fontWeight('400lpx') | ||
| 132 | + .maxLines(1) | ||
| 133 | + }.layoutWeight(1) | ||
| 134 | + .alignItems(HorizontalAlign.Start) | ||
| 135 | + } | ||
| 136 | + .margin({bottom:'10lpx'}) | ||
| 137 | + .width('100%') | ||
| 138 | + .height('108lpx') | ||
| 139 | + .padding({left:'31lpx',right:'31lpx'}) | ||
| 140 | + | ||
| 141 | + Row(){ | ||
| 142 | + Text(this.data.commentContent) | ||
| 143 | + .maxLines(3) | ||
| 144 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 145 | + .fontWeight('400lpx') | ||
| 146 | + .fontSize('31lpx') | ||
| 147 | + .lineHeight('46lpx') | ||
| 148 | + .fontColor($r('app.color.color_222222')) | ||
| 149 | + .margin({bottom:'10lpx'}) | ||
| 150 | + }.padding({left:'31lpx',right:'31lpx'}) | ||
| 151 | + .width('100%') | ||
| 152 | + | ||
| 153 | + Row(){ | ||
| 154 | + Text(this.data.targetTitle) | ||
| 155 | + .fontWeight('400lpx') | ||
| 156 | + .fontColor($r('app.color.color_222222')) | ||
| 157 | + .lineHeight('38lpx') | ||
| 158 | + .fontSize('27lpx') | ||
| 159 | + .textAlign(TextAlign.Center) | ||
| 160 | + .margin({right:'4lpx'}) | ||
| 161 | + .maxLines(3) | ||
| 162 | + .width('616lpx') | ||
| 163 | + Image($r('app.media.arrow_icon_right')) | ||
| 164 | + .objectFit(ImageFit.Auto) | ||
| 165 | + .width('27lpx') | ||
| 166 | + .height('27lpx') | ||
| 167 | + } | ||
| 168 | + .padding({top:'17lpx',bottom:'17lpx',left:'23lpx',right:'23lpx'}) | ||
| 169 | + .width('662lpx') | ||
| 170 | + .backgroundColor($r('app.color.color_F5F5F5')) | ||
| 171 | + .margin({top:'19lpx',bottom:'31lpx'}) | ||
| 172 | + | ||
| 173 | + Divider().width('100%') | ||
| 174 | + .height('12lpx') | ||
| 175 | + .strokeWidth('12lpx') | ||
| 176 | + .backgroundColor($r('app.color.color_F5F5F5')) | ||
| 177 | + | ||
| 178 | + } | ||
| 179 | + .justifyContent(FlexAlign.Center) | ||
| 180 | + } | ||
| 181 | +} |
| 1 | +import { Params } from 'wdBean'; | ||
| 2 | +import { LazyDataSource, StringUtils } from 'wdKit'; | ||
| 3 | +import { WDRouterRule, WDRouterPage } from 'wdRouter'; | ||
| 4 | +import MinePageDatasModel from '../../../model/MinePageDatasModel'; | ||
| 5 | +import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem'; | ||
| 6 | +import { FollowListDetailRequestItem } from '../../../viewmodel/FollowListDetailRequestItem'; | ||
| 7 | +import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI'; | ||
| 8 | + | ||
| 9 | +const TAG = "HomePageBottomComponent" | ||
| 10 | +@Component | ||
| 11 | +export struct OtherHomePageBottomFollowComponent{ | ||
| 12 | + @State data_follow: LazyDataSource<FollowListDetailItem> = new LazyDataSource(); | ||
| 13 | + @State isLoading:boolean = false | ||
| 14 | + @State hasMore:boolean = true | ||
| 15 | + curPageNum:number = 1; | ||
| 16 | + @State count:number = 0; | ||
| 17 | + | ||
| 18 | + aboutToAppear(){ | ||
| 19 | + this.getNewPageData() | ||
| 20 | + } | ||
| 21 | + | ||
| 22 | + build(){ | ||
| 23 | + Column(){ | ||
| 24 | + Divider().width('100%') | ||
| 25 | + .height('2lpx') | ||
| 26 | + .strokeWidth('1lpx') | ||
| 27 | + .backgroundColor($r('app.color.color_EDEDED')) | ||
| 28 | + | ||
| 29 | + if(this.count === 0){ | ||
| 30 | + ListHasNoMoreDataUI({style:2}) | ||
| 31 | + .height('100%') | ||
| 32 | + }else{ | ||
| 33 | + List({ space: 3 }) { | ||
| 34 | + | ||
| 35 | + ListItem() { | ||
| 36 | + Row(){ | ||
| 37 | + Text("关注更多人民号") | ||
| 38 | + .fontWeight('400lpx') | ||
| 39 | + .fontColor($r('app.color.color_222222')) | ||
| 40 | + .lineHeight('38lpx') | ||
| 41 | + .fontSize('27lpx') | ||
| 42 | + .textAlign(TextAlign.Center) | ||
| 43 | + .margin({right:'4lpx'}) | ||
| 44 | + Image($r('app.media.arrow_icon_right')) | ||
| 45 | + .objectFit(ImageFit.Auto) | ||
| 46 | + .width('27lpx') | ||
| 47 | + .height('27lpx') | ||
| 48 | + }.height('69lpx') | ||
| 49 | + .width('659lpx') | ||
| 50 | + .alignItems(VerticalAlign.Center) | ||
| 51 | + .justifyContent(FlexAlign.Center) | ||
| 52 | + .backgroundColor($r('app.color.color_F5F5F5')) | ||
| 53 | + .margin({top:'31lpx',bottom:'4lpx'}) | ||
| 54 | + }.onClick(()=>{ | ||
| 55 | + let params: Params = { | ||
| 56 | + pageID: "1" | ||
| 57 | + } | ||
| 58 | + WDRouterRule.jumpWithPage(WDRouterPage.followListPage,params) | ||
| 59 | + }) | ||
| 60 | + | ||
| 61 | + LazyForEach(this.data_follow, (item: FollowListDetailItem, index: number = 0) => { | ||
| 62 | + ListItem() { | ||
| 63 | + ChildFollowComponent({data: item}) | ||
| 64 | + } | ||
| 65 | + .onClick(() => { | ||
| 66 | + }) | ||
| 67 | + }, (item: FollowListDetailItem, index: number) => index.toString()) | ||
| 68 | + | ||
| 69 | + //没有更多数据 显示提示 | ||
| 70 | + if(!this.hasMore){ | ||
| 71 | + ListItem(){ | ||
| 72 | + ListHasNoMoreDataUI() | ||
| 73 | + } | ||
| 74 | + } | ||
| 75 | + }.cachedCount(15) | ||
| 76 | + .padding({left:'31lpx',right:'31lpx'}) | ||
| 77 | + .layoutWeight(1) | ||
| 78 | + .scrollBar(BarState.Off) | ||
| 79 | + .edgeEffect(EdgeEffect.None) | ||
| 80 | + // .nestedScroll({ | ||
| 81 | + // scrollForward: NestedScrollMode.PARENT_FIRST, | ||
| 82 | + // scrollBackward: NestedScrollMode.SELF_FIRST | ||
| 83 | + // }) | ||
| 84 | + .onReachEnd(()=>{ | ||
| 85 | + console.log(TAG,"触底了"); | ||
| 86 | + if(!this.isLoading){ | ||
| 87 | + this.isLoading = true | ||
| 88 | + //加载分页数据 | ||
| 89 | + this.getNewPageData() | ||
| 90 | + } | ||
| 91 | + }) | ||
| 92 | + } | ||
| 93 | + } | ||
| 94 | + .width('100%') | ||
| 95 | + } | ||
| 96 | + | ||
| 97 | + | ||
| 98 | + @Styles | ||
| 99 | + listStyle() { | ||
| 100 | + .backgroundColor(Color.White) | ||
| 101 | + .height(72) | ||
| 102 | + .width("100%") | ||
| 103 | + .borderRadius(12) | ||
| 104 | + } | ||
| 105 | + | ||
| 106 | + getNewPageData(){ | ||
| 107 | + this.isLoading = true | ||
| 108 | + //我的关注列表 | ||
| 109 | + if(this.hasMore){ | ||
| 110 | + let object = new FollowListDetailRequestItem(20,this.curPageNum) | ||
| 111 | + | ||
| 112 | + MinePageDatasModel.getMineFollowListData(object,getContext(this)).then((value)=>{ | ||
| 113 | + if (!this.data_follow || value.list.length == 0){ | ||
| 114 | + this.hasMore = false | ||
| 115 | + }else{ | ||
| 116 | + value.list.forEach((value)=>{ | ||
| 117 | + this.data_follow.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1")) | ||
| 118 | + }) | ||
| 119 | + this.data_follow.notifyDataReload() | ||
| 120 | + this.count = this.data_follow.totalCount() | ||
| 121 | + if (this.data_follow.totalCount() < value.totalCount) { | ||
| 122 | + this.curPageNum++ | ||
| 123 | + }else { | ||
| 124 | + this.hasMore = false | ||
| 125 | + } | ||
| 126 | + } | ||
| 127 | + this.isLoading = false | ||
| 128 | + }).catch((err:Error)=>{ | ||
| 129 | + console.log(TAG,"请求失败") | ||
| 130 | + this.isLoading = false | ||
| 131 | + }) | ||
| 132 | + } | ||
| 133 | + } | ||
| 134 | +} | ||
| 135 | + | ||
| 136 | +@Component | ||
| 137 | +struct ChildFollowComponent { | ||
| 138 | + @ObjectLink data: FollowListDetailItem | ||
| 139 | + | ||
| 140 | + build() { | ||
| 141 | + Column(){ | ||
| 142 | + Blank().height('27lpx') | ||
| 143 | + | ||
| 144 | + Row() { | ||
| 145 | + Image(StringUtils.isEmpty(this.data.headPhotoUrl)?$r('app.media.default_head'):this.data.headPhotoUrl) | ||
| 146 | + .objectFit(ImageFit.Auto) | ||
| 147 | + .width('92lpx') | ||
| 148 | + .height('92lpx') | ||
| 149 | + .margin({right:'15lpx'}) | ||
| 150 | + | ||
| 151 | + Column(){ | ||
| 152 | + Text(this.data.cnUserName) | ||
| 153 | + .fontWeight('400lpx') | ||
| 154 | + .fontSize('31lpx') | ||
| 155 | + .lineHeight('38lpx') | ||
| 156 | + .fontColor($r('app.color.color_222222')) | ||
| 157 | + Text(`粉丝${this.data.cnFansNum}`) | ||
| 158 | + .fontColor($r('app.color.color_B0B0B0')) | ||
| 159 | + .fontSize('23lpx') | ||
| 160 | + .maxLines(1) | ||
| 161 | + Text(`${this.data.introduction}`) | ||
| 162 | + .fontColor($r('app.color.color_B0B0B0')) | ||
| 163 | + .fontSize('23lpx') | ||
| 164 | + .maxLines(2) | ||
| 165 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 166 | + }.layoutWeight(1) | ||
| 167 | + .alignItems(HorizontalAlign.Start) | ||
| 168 | + | ||
| 169 | + if(this.data.status == "1"){ | ||
| 170 | + Row(){ | ||
| 171 | + Text(`已关注`) | ||
| 172 | + .fontColor($r('app.color.color_CCCCCC')) | ||
| 173 | + .fontSize('23lpx') | ||
| 174 | + .fontWeight('500lpx') | ||
| 175 | + .lineHeight('35lpx') | ||
| 176 | + }.backgroundColor($r('app.color.color_F5F5F5')) | ||
| 177 | + .borderRadius('6lpx') | ||
| 178 | + .borderColor($r('app.color.color_F5F5F5')) | ||
| 179 | + .borderWidth('2lpx') | ||
| 180 | + .justifyContent(FlexAlign.Center) | ||
| 181 | + .width('100lpx') | ||
| 182 | + .height('46lpx') | ||
| 183 | + .margin({left:'4lpx',top:'23lpx'}) | ||
| 184 | + .onClick(()=>{ | ||
| 185 | + this.data.status = "0" | ||
| 186 | + }) | ||
| 187 | + }else{ | ||
| 188 | + Row(){ | ||
| 189 | + Image($r('app.media.follow_icon')) | ||
| 190 | + .margin({right:'4lpx'}) | ||
| 191 | + .width('23lpx') | ||
| 192 | + .height('23lpx') | ||
| 193 | + Text(`关注`) | ||
| 194 | + .fontColor($r('app.color.color_ED2800')) | ||
| 195 | + .fontSize('23lpx') | ||
| 196 | + .fontWeight('500lpx') | ||
| 197 | + .lineHeight('35lpx') | ||
| 198 | + }.borderColor($r('app.color.color_1AED2800')) | ||
| 199 | + .borderRadius('6lpx') | ||
| 200 | + .borderWidth('2lpx') | ||
| 201 | + .justifyContent(FlexAlign.Center) | ||
| 202 | + .width('100lpx') | ||
| 203 | + .height('46lpx') | ||
| 204 | + .margin({left:'4lpx',top:'23lpx'}) | ||
| 205 | + .onClick(()=>{ | ||
| 206 | + this.data.status = "1" | ||
| 207 | + }) | ||
| 208 | + } | ||
| 209 | + }.alignItems(VerticalAlign.Top) | ||
| 210 | + .width('100%') | ||
| 211 | + .layoutWeight(1) | ||
| 212 | + | ||
| 213 | + Divider().width('100%') | ||
| 214 | + .height('2lpx') | ||
| 215 | + .strokeWidth('1lpx') | ||
| 216 | + .backgroundColor($r('app.color.color_EDEDED')) | ||
| 217 | + | ||
| 218 | + }.height('146lpx') | ||
| 219 | + .justifyContent(FlexAlign.Center) | ||
| 220 | + } | ||
| 221 | +} |
| @@ -9,10 +9,10 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter'; | @@ -9,10 +9,10 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter'; | ||
| 9 | @Component | 9 | @Component |
| 10 | struct EditUserInfoPage { | 10 | struct EditUserInfoPage { |
| 11 | private listData: EditListInfo[] = [] | 11 | private listData: EditListInfo[] = [] |
| 12 | - editM: editModel = new editModel | 12 | + // editM: editModel |
| 13 | 13 | ||
| 14 | aboutToAppear() { | 14 | aboutToAppear() { |
| 15 | - this.listData = EditInfoViewModel.getEditListInfo(this.editM) | 15 | + // this.listData = EditInfoViewModel.getEditListInfo(this.editM) |
| 16 | this.getAccountOwnerInfo() | 16 | this.getAccountOwnerInfo() |
| 17 | } | 17 | } |
| 18 | 18 | ||
| @@ -20,7 +20,7 @@ struct EditUserInfoPage { | @@ -20,7 +20,7 @@ struct EditUserInfoPage { | ||
| 20 | Row() { | 20 | Row() { |
| 21 | Column() { | 21 | Column() { |
| 22 | CustomTitleUI({titleName:'资料编辑'}) | 22 | CustomTitleUI({titleName:'资料编辑'}) |
| 23 | - Image(this.editM.userExtend.headPhotoUrl?this.editM.userExtend.headPhotoUrl:'') | 23 | + Image('') |
| 24 | .backgroundColor(Color.Gray) | 24 | .backgroundColor(Color.Gray) |
| 25 | .width(100) | 25 | .width(100) |
| 26 | .height(100) | 26 | .height(100) |
| @@ -111,7 +111,7 @@ struct EditUserInfoPage { | @@ -111,7 +111,7 @@ struct EditUserInfoPage { | ||
| 111 | 111 | ||
| 112 | getAccountOwnerInfo(){ | 112 | getAccountOwnerInfo(){ |
| 113 | EditInfoViewModel.queryAccountOwnerInfo(1,getContext(this)).then((result) => { | 113 | EditInfoViewModel.queryAccountOwnerInfo(1,getContext(this)).then((result) => { |
| 114 | - this.editM = result | 114 | + // this.editM = result |
| 115 | }); | 115 | }); |
| 116 | } | 116 | } |
| 117 | 117 |
| @@ -59,13 +59,12 @@ export struct AccountAndSecurityLayout { | @@ -59,13 +59,12 @@ export struct AccountAndSecurityLayout { | ||
| 59 | .onClick(() => { | 59 | .onClick(() => { |
| 60 | console.log(index + "") | 60 | console.log(index + "") |
| 61 | if (index == 0){ | 61 | if (index == 0){ |
| 62 | - | 62 | + let pageType = {'pageType': 2} as Record<string, number>; |
| 63 | + WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage, pageType) | ||
| 63 | }else if (index == 1) { | 64 | }else if (index == 1) { |
| 64 | 65 | ||
| 65 | - let params: SettingPasswordParams = { | ||
| 66 | - pageID:'1', | ||
| 67 | - } | ||
| 68 | - WDRouterRule.jumpWithPage(WDRouterPage.settingPasswordPage, params) | 66 | + let pageType = {'pageType': 1} as Record<string, number>; |
| 67 | + WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage, pageType) | ||
| 69 | } | 68 | } |
| 70 | }) | 69 | }) |
| 71 | 70 | ||
| @@ -83,7 +82,7 @@ export struct AccountAndSecurityLayout { | @@ -83,7 +82,7 @@ export struct AccountAndSecurityLayout { | ||
| 83 | }.height("100%") | 82 | }.height("100%") |
| 84 | 83 | ||
| 85 | Column() { | 84 | Column() { |
| 86 | - Button('退出登录',{ stateEffect: true }).width('90%').height('80lpx').backgroundColor('#da3e22').fontColor('#fff').margin('20lpx').onClick(()=>{ | 85 | + Button('退出登录',{ stateEffect: true ,type: ButtonType.Normal}).width('90%').height('80lpx').backgroundColor('#da3e22').fontColor('#fff').margin('20lpx').borderRadius('8lpx').onClick(()=>{ |
| 87 | AlertDialog.show({ | 86 | AlertDialog.show({ |
| 88 | title: '🥟id : ' + "button", | 87 | title: '🥟id : ' + "button", |
| 89 | message: '标题:' + '退出登录', | 88 | message: '标题:' + '退出登录', |
| 1 | import { CompDTO } from 'wdBean'; | 1 | import { CompDTO } from 'wdBean'; |
| 2 | import { CommonConstants } from 'wdConstant'; | 2 | import { CommonConstants } from 'wdConstant'; |
| 3 | -import { CompUtils } from '../../utils/CompUtils'; | ||
| 4 | 3 | ||
| 5 | @Component | 4 | @Component |
| 6 | export struct HeadPictureCardComponent { | 5 | export struct HeadPictureCardComponent { |
| @@ -16,7 +15,6 @@ export struct HeadPictureCardComponent { | @@ -16,7 +15,6 @@ export struct HeadPictureCardComponent { | ||
| 16 | Row() | 15 | Row() |
| 17 | .width(CommonConstants.FULL_WIDTH) | 16 | .width(CommonConstants.FULL_WIDTH) |
| 18 | .height(59) | 17 | .height(59) |
| 19 | - .backgroundColor(Color.Red) | ||
| 20 | .linearGradient({ | 18 | .linearGradient({ |
| 21 | colors: [ | 19 | colors: [ |
| 22 | ['rgba(0, 0, 0, 0.0)', 0.0], ['rgba(0, 0, 0, 0.3)', 1.0] | 20 | ['rgba(0, 0, 0, 0.0)', 0.0], ['rgba(0, 0, 0, 0.3)', 1.0] |
| 1 | +import { CompDTO, ContentDTO } from 'wdBean'; | ||
| 2 | +import { CommonConstants } from 'wdConstant'; | ||
| 3 | +import { DateTimeUtils } from 'wdKit'; | ||
| 4 | +import { ProcessUtils } from '../../utils/ProcessUtils'; | ||
| 5 | + | ||
| 6 | +/** | ||
| 7 | + * 本地精选卡 | ||
| 8 | + * ZhSingleRow04 | ||
| 9 | + */ | ||
| 10 | + | ||
| 11 | +@Component | ||
| 12 | +export struct ZhSingleRow04 { | ||
| 13 | + @State compDTO: CompDTO = {} as CompDTO | ||
| 14 | + | ||
| 15 | + aboutToAppear() {} | ||
| 16 | + | ||
| 17 | + build() { | ||
| 18 | + Column(){ | ||
| 19 | + //顶部 | ||
| 20 | + Row(){ | ||
| 21 | + Row() { | ||
| 22 | + Image($r("app.media.local_selection")) | ||
| 23 | + .width(24) | ||
| 24 | + .height(24) | ||
| 25 | + .margin({ right: 4 }) | ||
| 26 | + Text(this.compDTO.objectTitle) | ||
| 27 | + .fontSize($r("app.float.font_size_17")) | ||
| 28 | + .fontColor($r("app.color.color_222222")) | ||
| 29 | + .fontWeight(600) | ||
| 30 | + } | ||
| 31 | + Row() { | ||
| 32 | + Text("更多") | ||
| 33 | + .fontSize($r("app.float.font_size_14")) | ||
| 34 | + .fontColor($r("app.color.color_999999")) | ||
| 35 | + .margin({ right: 1 }) | ||
| 36 | + Image($r("app.media.more")) | ||
| 37 | + .width(14) | ||
| 38 | + .height(14) | ||
| 39 | + } | ||
| 40 | + } | ||
| 41 | + .justifyContent(FlexAlign.SpaceBetween) | ||
| 42 | + .margin({ top: 8, bottom: 8 }) | ||
| 43 | + .width('100%') | ||
| 44 | + // 列表内容 | ||
| 45 | + List({ space: 12 }) { | ||
| 46 | + ForEach(this.compDTO.operDataList, (item: ContentDTO) => { | ||
| 47 | + ListItem() { | ||
| 48 | + Row(){ | ||
| 49 | + if(item.coverUrl) { | ||
| 50 | + Image(item.coverUrl) | ||
| 51 | + .width(84) | ||
| 52 | + .height(56) | ||
| 53 | + .borderRadius(3) | ||
| 54 | + .objectFit(ImageFit.Cover) | ||
| 55 | + .padding({right: 6}) | ||
| 56 | + } | ||
| 57 | + Column(){ | ||
| 58 | + Text(item.newsTitle) | ||
| 59 | + .fontSize($r("app.float.font_size_16")) | ||
| 60 | + .fontColor($r("app.color.color_212228")) | ||
| 61 | + .fontWeight(400) | ||
| 62 | + .maxLines(2) | ||
| 63 | + .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。 | ||
| 64 | + .margin({ top: 8 }) | ||
| 65 | + | ||
| 66 | + Row(){ | ||
| 67 | + Text(item.source) | ||
| 68 | + .fontSize($r('app.float.font_size_12')) | ||
| 69 | + .fontColor($r('app.color.color_B0B0B0')) | ||
| 70 | + Image($r("app.media.point")) | ||
| 71 | + .width(16) | ||
| 72 | + .height(16) | ||
| 73 | + Text(DateTimeUtils.getCommentTime(Number.parseFloat(this.compDTO.operDataList[0].publishTime))) | ||
| 74 | + .fontSize($r("app.float.font_size_12")) | ||
| 75 | + .fontColor($r("app.color.color_B0B0B0")) | ||
| 76 | + } | ||
| 77 | + .width('100%') | ||
| 78 | + } | ||
| 79 | + .width(200) | ||
| 80 | + } | ||
| 81 | + // .margin({right: 18}) | ||
| 82 | + .onClick(() =>{ | ||
| 83 | + ProcessUtils.processPage(item) | ||
| 84 | + }) | ||
| 85 | + } | ||
| 86 | + }) | ||
| 87 | + } | ||
| 88 | + .listDirection(Axis.Horizontal) | ||
| 89 | + .width('100%') | ||
| 90 | + } | ||
| 91 | + .width(CommonConstants.FULL_WIDTH) | ||
| 92 | + .padding({ | ||
| 93 | + top: 14, | ||
| 94 | + left: 16, | ||
| 95 | + right: 16, | ||
| 96 | + bottom: 14 | ||
| 97 | + }) | ||
| 98 | + .backgroundColor($r("app.color.white")) | ||
| 99 | + .margin({ bottom: 8 }) | ||
| 100 | + } | ||
| 101 | +} |
| @@ -11,29 +11,29 @@ export class EditListInfo{ | @@ -11,29 +11,29 @@ export class EditListInfo{ | ||
| 11 | } | 11 | } |
| 12 | } | 12 | } |
| 13 | 13 | ||
| 14 | -export class EditInfoModel{ | 14 | +export interface EditInfoModel{ |
| 15 | //头像 | 15 | //头像 |
| 16 | - headPhotoUrl:string = '' | 16 | + headPhotoUrl:string |
| 17 | //简介 | 17 | //简介 |
| 18 | - introduction:string = '' | 18 | + introduction:string |
| 19 | //城市 | 19 | //城市 |
| 20 | - city:string = '' | 20 | + city:string |
| 21 | //地区 | 21 | //地区 |
| 22 | - county:string = '' | 22 | + county:string |
| 23 | //生日 | 23 | //生日 |
| 24 | - birthday:string = '' | 24 | + birthday:string |
| 25 | //性别 | 25 | //性别 |
| 26 | - sex:string = '' | 26 | + sex:string |
| 27 | } | 27 | } |
| 28 | 28 | ||
| 29 | -export class editModel{ | ||
| 30 | - userName:string = '' | 29 | +export interface editModel{ |
| 30 | + userName:string | ||
| 31 | 31 | ||
| 32 | - userNameStatus:string = '' | 32 | + userNameStatus:string |
| 33 | 33 | ||
| 34 | - phone:string = '' | 34 | + phone:string |
| 35 | 35 | ||
| 36 | - headPhotoStatus:string = '' | 36 | + headPhotoStatus:string |
| 37 | 37 | ||
| 38 | userExtend:EditInfoModel | 38 | userExtend:EditInfoModel |
| 39 | } | 39 | } |
| 1 | import router from '@ohos.router' | 1 | import router from '@ohos.router' |
| 2 | import { Params } from 'wdBean'; | 2 | import { Params } from 'wdBean'; |
| 3 | import { StringUtils } from 'wdKit'; | 3 | import { StringUtils } from 'wdKit'; |
| 4 | -import { HomePageBottomComponent } from '../components/mine/home/HomePageBottomComponent'; | 4 | +import { OtherHomePageBottomCommentComponent } from '../components/mine/home/OtherHomePageBottomCommentComponent'; |
| 5 | +import { OtherHomePageBottomFollowComponent } from '../components/mine/home/OtherHomePageBottomFollowComponent'; | ||
| 5 | import MinePageDatasModel from '../model/MinePageDatasModel'; | 6 | import MinePageDatasModel from '../model/MinePageDatasModel'; |
| 6 | import { OtherUserDetailRequestItem } from '../viewmodel/OtherUserDetailRequestItem'; | 7 | import { OtherUserDetailRequestItem } from '../viewmodel/OtherUserDetailRequestItem'; |
| 7 | 8 | ||
| @@ -152,10 +153,10 @@ struct OtherNormalUserHomePage { | @@ -152,10 +153,10 @@ struct OtherNormalUserHomePage { | ||
| 152 | //tab 页面 | 153 | //tab 页面 |
| 153 | Tabs({controller: this.controller}) { | 154 | Tabs({controller: this.controller}) { |
| 154 | TabContent() { | 155 | TabContent() { |
| 155 | - HomePageBottomComponent({style:0}) | 156 | + OtherHomePageBottomCommentComponent({curUserId:this.curUserId}) |
| 156 | }.tabBar(this.TabBuilder(0,"评论")) | 157 | }.tabBar(this.TabBuilder(0,"评论")) |
| 157 | TabContent() { | 158 | TabContent() { |
| 158 | - HomePageBottomComponent({style:1}) | 159 | + OtherHomePageBottomFollowComponent() |
| 159 | }.tabBar(this.TabBuilder(1,"关注")) | 160 | }.tabBar(this.TabBuilder(1,"关注")) |
| 160 | } | 161 | } |
| 161 | .backgroundColor($r('app.color.white')) | 162 | .backgroundColor($r('app.color.white')) |
| @@ -29,11 +29,12 @@ class EditInfoViewModel { | @@ -29,11 +29,12 @@ class EditInfoViewModel { | ||
| 29 | 29 | ||
| 30 | getEditListInfo(item:editModel):EditListInfo[]{ | 30 | getEditListInfo(item:editModel):EditListInfo[]{ |
| 31 | this.editListData = [ | 31 | this.editListData = [ |
| 32 | - new EditListInfo('昵称',item&&item.userName?item.userName:'待完善'), | ||
| 33 | - new EditListInfo('简介',item&&item.userExtend.introduction?item.userExtend.introduction:'待完善'), | ||
| 34 | - new EditListInfo('地区',item&&item.userExtend.city?item.userExtend.city:'待完善'), | ||
| 35 | - new EditListInfo('生日',item&&item.userExtend.birthday?item.userExtend.birthday:'待完善'), | ||
| 36 | - new EditListInfo('性别',item&&item.userExtend.sex?item.userExtend.sex:'待完善'),] | 32 | + // new EditListInfo('昵称',item&&item.userName?item.userName:'待完善'), |
| 33 | + // new EditListInfo('简介',item&&item.userExtend.introduction?item.userExtend.introduction:'待完善'), | ||
| 34 | + // new EditListInfo('地区',item&&item.userExtend.city?item.userExtend.city:'待完善'), | ||
| 35 | + // new EditListInfo('生日',item&&item.userExtend.birthday?item.userExtend.birthday:'待完善'), | ||
| 36 | + // new EditListInfo('性别',item&&item.userExtend.sex?item.userExtend.sex:'待完善'), | ||
| 37 | + ] | ||
| 37 | return this.editListData | 38 | return this.editListData |
| 38 | } | 39 | } |
| 39 | 40 | ||
| @@ -45,6 +46,7 @@ class EditInfoViewModel { | @@ -45,6 +46,7 @@ class EditInfoViewModel { | ||
| 45 | // let editM = navResDTO.data as EditInfoModel | 46 | // let editM = navResDTO.data as EditInfoModel |
| 46 | // success(JSON.parse(navResDTO.data) | 47 | // success(JSON.parse(navResDTO.data) |
| 47 | } | 48 | } |
| 49 | + return this.GetqueryAccountOwnerLocal(context) | ||
| 48 | }).catch((error: Error) => { | 50 | }).catch((error: Error) => { |
| 49 | Logger.info('EditInfoViewModel','EditInfoViewModel','EditInfoViewModel') | 51 | Logger.info('EditInfoViewModel','EditInfoViewModel','EditInfoViewModel') |
| 50 | return this.GetqueryAccountOwnerLocal(context) | 52 | return this.GetqueryAccountOwnerLocal(context) |
sight_harmony/features/wdComponent/src/main/ets/viewmodel/OtherUserCommentListRequestItem.ets
0 → 100644
| 1 | +export class OtherUserCommentListRequestItem { | ||
| 2 | + creatorId: string = "" | ||
| 3 | + pageSize: number = 20 | ||
| 4 | + pageNum: number = 1 | ||
| 5 | + time: string = "" | ||
| 6 | + userType: string = "1" | ||
| 7 | + userId: string = "" | ||
| 8 | + | ||
| 9 | + constructor(creatorId: string, pageSize: number, | ||
| 10 | + pageNum: number, | ||
| 11 | + time: string, | ||
| 12 | + userType: string, | ||
| 13 | + userId: string) { | ||
| 14 | + this.creatorId = creatorId | ||
| 15 | + this.pageSize = pageSize | ||
| 16 | + this.pageNum = pageNum | ||
| 17 | + this.time = time | ||
| 18 | + this.userType = userType | ||
| 19 | + this.userId = userId | ||
| 20 | + } | ||
| 21 | +} |
16.3 KB
| @@ -6,6 +6,7 @@ import promptAction from '@ohos.promptAction' | @@ -6,6 +6,7 @@ import promptAction from '@ohos.promptAction' | ||
| 6 | import { Params } from '../../../../../../../commons/wdRouter/oh_modules/wdBean/Index' | 6 | import { Params } from '../../../../../../../commons/wdRouter/oh_modules/wdBean/Index' |
| 7 | import { WDRouterRule, WDRouterPage } from 'wdRouter'; | 7 | import { WDRouterRule, WDRouterPage } from 'wdRouter'; |
| 8 | import { SettingPasswordParams } from './SettingPasswordLayout' | 8 | import { SettingPasswordParams } from './SettingPasswordLayout' |
| 9 | +import { Router } from '@ohos.arkui.UIContext' | ||
| 9 | 10 | ||
| 10 | 11 | ||
| 11 | const TAG = 'ForgetPasswordPage' | 12 | const TAG = 'ForgetPasswordPage' |
| @@ -20,23 +21,30 @@ struct ForgetPasswordPage { | @@ -20,23 +21,30 @@ struct ForgetPasswordPage { | ||
| 20 | @State isSubmit: boolean = false //是否可以提交 默认不可以 | 21 | @State isSubmit: boolean = false //是否可以提交 默认不可以 |
| 21 | loginViewModel: LoginViewModel = new LoginViewModel() | 22 | loginViewModel: LoginViewModel = new LoginViewModel() |
| 22 | @State @Watch('onCodeSend') isCodeSend: boolean = false //验证码点击发送事件 | 23 | @State @Watch('onCodeSend') isCodeSend: boolean = false //验证码点击发送事件 |
| 24 | + pageType:number = (router.getParams() as Record<string, number>)['pageType']; //0、登录->忘记密码 1、设置->重置密码 2、设置->更换手机号页面1 3、设置->更换手机号页面2 | ||
| 25 | + pageTitle = '找回密码'; | ||
| 23 | onCodeSend() { | 26 | onCodeSend() { |
| 24 | if (this.isCodeSend) { | 27 | if (this.isCodeSend) { |
| 25 | this.sendVerifyCode() | 28 | this.sendVerifyCode() |
| 26 | } | 29 | } |
| 27 | } | 30 | } |
| 28 | 31 | ||
| 32 | + | ||
| 33 | + | ||
| 29 | build() { | 34 | build() { |
| 30 | Column() { | 35 | Column() { |
| 31 | Image($r('app.media.login_back_icon')).width(24).height(24).margin({ left: 15, top: 10 }).onClick(() => { | 36 | Image($r('app.media.login_back_icon')).width(24).height(24).margin({ left: 15, top: 10 }).onClick(() => { |
| 32 | router.back() | 37 | router.back() |
| 33 | }) | 38 | }) |
| 34 | - Text('找回密码').fontSize(22).fontColor('#333333').fontWeight(FontWeight.Bold).margin({ left: 25, top: 112 }) | 39 | + |
| 40 | + | ||
| 41 | + Text(this.pageTitle).fontSize(22).fontColor('#333333').fontWeight(FontWeight.Bold).margin({ left: 25, top: 112 }) | ||
| 35 | LoginInputComponent({ | 42 | LoginInputComponent({ |
| 36 | phoneContent: $phoneContent, | 43 | phoneContent: $phoneContent, |
| 37 | codeContent: $codeContent, | 44 | codeContent: $codeContent, |
| 38 | isSubmit: $isSubmit, | 45 | isSubmit: $isSubmit, |
| 39 | - isCodeSend: $isCodeSend | 46 | + isCodeSend: $isCodeSend, |
| 47 | + pageType:this.pageType | ||
| 40 | }) | 48 | }) |
| 41 | Row() { | 49 | Row() { |
| 42 | Text("确认") | 50 | Text("确认") |
| @@ -60,6 +68,15 @@ struct ForgetPasswordPage { | @@ -60,6 +68,15 @@ struct ForgetPasswordPage { | ||
| 60 | } | 68 | } |
| 61 | 69 | ||
| 62 | aboutToAppear() { | 70 | aboutToAppear() { |
| 71 | + if (this.pageType == 0){ | ||
| 72 | + this.pageTitle = '找回密码' | ||
| 73 | + }else if (this.pageType == 1){ | ||
| 74 | + this.pageTitle = '验证当前手机号' | ||
| 75 | + }else if (this.pageType == 2){ | ||
| 76 | + this.pageTitle = '验证当前手机号' | ||
| 77 | + }else if (this.pageType == 2){ | ||
| 78 | + this.pageTitle = '更换手机号' | ||
| 79 | + } | ||
| 63 | if (this.isCodeSend) { | 80 | if (this.isCodeSend) { |
| 64 | this.sendVerifyCode() | 81 | this.sendVerifyCode() |
| 65 | } | 82 | } |
| @@ -95,6 +112,7 @@ struct ForgetPasswordPage { | @@ -95,6 +112,7 @@ struct ForgetPasswordPage { | ||
| 95 | pageID:'1', | 112 | pageID:'1', |
| 96 | phoneContent:this.phoneContent, | 113 | phoneContent:this.phoneContent, |
| 97 | codeContent:this.codeContent, | 114 | codeContent:this.codeContent, |
| 115 | + pageType:this.pageType | ||
| 98 | } | 116 | } |
| 99 | WDRouterRule.jumpWithPage(WDRouterPage.settingPasswordPage, params) | 117 | WDRouterRule.jumpWithPage(WDRouterPage.settingPasswordPage, params) |
| 100 | 118 |
| @@ -9,32 +9,59 @@ export struct LoginInputComponent { | @@ -9,32 +9,59 @@ export struct LoginInputComponent { | ||
| 9 | @Link isCodeSend: boolean //验证码控件是否点击 默认没有 发送接口 | 9 | @Link isCodeSend: boolean //验证码控件是否点击 默认没有 发送接口 |
| 10 | @Link isSubmit: boolean //是否可以提交 | 10 | @Link isSubmit: boolean //是否可以提交 |
| 11 | isFirst:boolean=true//是否第一次获取验证码 | 11 | isFirst:boolean=true//是否第一次获取验证码 |
| 12 | - | 12 | + pageType?:number; //0、登录->忘记密码 1、设置->重置密码 2、设置->更换手机号页面1 3、设置->更换手机号页面2 |
| 13 | build() { | 13 | build() { |
| 14 | Column() { | 14 | Column() { |
| 15 | this.addCodeLayout() | 15 | this.addCodeLayout() |
| 16 | }.width('100%').padding({ left: 25, right: 25 }) | 16 | }.width('100%').padding({ left: 25, right: 25 }) |
| 17 | } | 17 | } |
| 18 | 18 | ||
| 19 | + aboutToAppear(){ | ||
| 20 | + if (this.pageType == 1) { | ||
| 21 | + this.phoneContent = '18655957611'; | ||
| 22 | + } | ||
| 23 | + } | ||
| 19 | @Builder | 24 | @Builder |
| 20 | addCodeLayout() { | 25 | addCodeLayout() { |
| 21 | - TextInput({ placeholder: "请输入手机号" }) | ||
| 22 | - .fontSize(16) | ||
| 23 | - .height(48) | ||
| 24 | - .maxLength(11) | ||
| 25 | - .margin({ top: 36 }) | ||
| 26 | - .backgroundColor("#F5F5F5") | ||
| 27 | - .borderRadius(4) | ||
| 28 | - .type(InputType.PhoneNumber) | ||
| 29 | - .onChange((content) => { | ||
| 30 | - this.phoneContent = content | ||
| 31 | - this.isSubmit = (this.phoneContent.length >= 11 && this.codeContent.length >= 6) | ||
| 32 | - if (content.length >= 11) { | ||
| 33 | - this.codeBtnState = true | ||
| 34 | - } else { | ||
| 35 | - this.codeBtnState = false | ||
| 36 | - } | ||
| 37 | - }) | 26 | + if (this.pageType == 1){ |
| 27 | + TextInput({ placeholder: this.securityPhone('18655957611') }) | ||
| 28 | + .fontSize(16) | ||
| 29 | + .height(48) | ||
| 30 | + .maxLength(11) | ||
| 31 | + .margin({ top: 36 }) | ||
| 32 | + .backgroundColor("#F5F5F5") | ||
| 33 | + .borderRadius(4) | ||
| 34 | + .enabled(false) | ||
| 35 | + .type(InputType.PhoneNumber) | ||
| 36 | + .onChange((content) => { | ||
| 37 | + this.phoneContent = content | ||
| 38 | + this.isSubmit = (this.phoneContent.length >= 11 && this.codeContent.length >= 6) | ||
| 39 | + if (content.length >= 11) { | ||
| 40 | + this.codeBtnState = true | ||
| 41 | + } else { | ||
| 42 | + this.codeBtnState = false | ||
| 43 | + } | ||
| 44 | + }) | ||
| 45 | + }else{ | ||
| 46 | + TextInput({ placeholder: "请输入手机号" }) | ||
| 47 | + .fontSize(16) | ||
| 48 | + .height(48) | ||
| 49 | + .maxLength(11) | ||
| 50 | + .margin({ top: 36 }) | ||
| 51 | + .backgroundColor("#F5F5F5") | ||
| 52 | + .borderRadius(4) | ||
| 53 | + .type(InputType.PhoneNumber) | ||
| 54 | + .onChange((content) => { | ||
| 55 | + this.phoneContent = content | ||
| 56 | + this.isSubmit = (this.phoneContent.length >= 11 && this.codeContent.length >= 6) | ||
| 57 | + if (content.length >= 11) { | ||
| 58 | + this.codeBtnState = true | ||
| 59 | + } else { | ||
| 60 | + this.codeBtnState = false | ||
| 61 | + } | ||
| 62 | + }) | ||
| 63 | + } | ||
| 64 | + | ||
| 38 | 65 | ||
| 39 | Row() { | 66 | Row() { |
| 40 | TextInput({ placeholder: "验证码" }) | 67 | TextInput({ placeholder: "验证码" }) |
| @@ -86,4 +113,11 @@ export struct LoginInputComponent { | @@ -86,4 +113,11 @@ export struct LoginInputComponent { | ||
| 86 | .backgroundImageSize({width:'100%',height:48}) | 113 | .backgroundImageSize({width:'100%',height:48}) |
| 87 | 114 | ||
| 88 | } | 115 | } |
| 116 | + | ||
| 117 | + securityPhone(phoneNum:string):string{ | ||
| 118 | + let securityNum:string; | ||
| 119 | + let needSecurityString = phoneNum.substring(3, phoneNum.length - 4); | ||
| 120 | + securityNum = phoneNum.replace(needSecurityString,'****') | ||
| 121 | + return securityNum; | ||
| 122 | + } | ||
| 89 | } | 123 | } |
| 1 | import HashMap from '@ohos.util.HashMap'; | 1 | import HashMap from '@ohos.util.HashMap'; |
| 2 | import { HttpUrlUtils, ResponseDTO } from 'wdNetwork'; | 2 | import { HttpUrlUtils, ResponseDTO } from 'wdNetwork'; |
| 3 | -import { Logger } from 'wdKit'; | 3 | +import { Logger, SPHelper } from 'wdKit'; |
| 4 | import { HttpRequest } from 'wdNetwork/src/main/ets/http/HttpRequest'; | 4 | import { HttpRequest } from 'wdNetwork/src/main/ets/http/HttpRequest'; |
| 5 | import { LoginBean } from './LoginBean'; | 5 | import { LoginBean } from './LoginBean'; |
| 6 | import { CheckVerifyBean } from './CheckVerifyBean'; | 6 | import { CheckVerifyBean } from './CheckVerifyBean'; |
| 7 | +import { | ||
| 8 | + SpConstants | ||
| 9 | +} from '../../../../../../../commons/wdNetwork/oh_modules/wdConstant/src/main/ets/constants/SpConstants' | ||
| 10 | + | ||
| 7 | 11 | ||
| 8 | const TAG = 'LoginModel' | 12 | const TAG = 'LoginModel' |
| 9 | 13 | ||
| @@ -32,6 +36,29 @@ export class LoginModel { | @@ -32,6 +36,29 @@ export class LoginModel { | ||
| 32 | 36 | ||
| 33 | } | 37 | } |
| 34 | 38 | ||
| 39 | + sendVerifyCodeByToken() { | ||
| 40 | + let bean: Record<string, string> = {}; | ||
| 41 | + // bean['phoneNum'] = number | ||
| 42 | + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); | ||
| 43 | + return new Promise<string>((success, fail) => { | ||
| 44 | + HttpRequest.post<ResponseDTO<string>>(HttpUrlUtils.getVerifyCodeByTokenUrl(), bean, headers).then((data: ResponseDTO<string>) => { | ||
| 45 | + if (!data || !data.data) { | ||
| 46 | + fail("数据为空") | ||
| 47 | + return | ||
| 48 | + } | ||
| 49 | + if (data.code != 0) { | ||
| 50 | + fail(data.message) | ||
| 51 | + return | ||
| 52 | + } | ||
| 53 | + success(data.data) | ||
| 54 | + }, (error: Error) => { | ||
| 55 | + fail(error.message) | ||
| 56 | + Logger.debug("LoginViewModel:error ", error.toString()) | ||
| 57 | + }) | ||
| 58 | + }) | ||
| 59 | + | ||
| 60 | + } | ||
| 61 | + | ||
| 35 | 62 | ||
| 36 | //{"phone":"13625644528","loginType":2,"deviceId":"60da5af6-9c59-3566-8622-8c6c00710994","verificationCode":"644528"} | 63 | //{"phone":"13625644528","loginType":2,"deviceId":"60da5af6-9c59-3566-8622-8c6c00710994","verificationCode":"644528"} |
| 37 | appLogin(phone: string, loginType: number, verificationCode: string) { | 64 | appLogin(phone: string, loginType: number, verificationCode: string) { |
| @@ -113,13 +140,68 @@ export class LoginModel { | @@ -113,13 +140,68 @@ export class LoginModel { | ||
| 113 | }) | 140 | }) |
| 114 | } | 141 | } |
| 115 | 142 | ||
| 116 | - //忘记密码 设置新密码 | 143 | + checkVerifyCodeByToken(verifyCode: string) { |
| 144 | + let bean: Record<string, Object> = {}; | ||
| 145 | + bean['verifyCode'] = verifyCode | ||
| 146 | + // bean['phone'] = phone | ||
| 147 | + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); | ||
| 148 | + return new Promise<CheckVerifyBean>((success, fail) => { | ||
| 149 | + HttpRequest.post<ResponseDTO<CheckVerifyBean>>(HttpUrlUtils.getCheckVerifyByTokenCodeUrl(), bean, headers).then((data: ResponseDTO<CheckVerifyBean>) => { | ||
| 150 | + Logger.debug("LoginViewModel:success2 ", data.message) | ||
| 151 | + if (!data || !data.data) { | ||
| 152 | + fail("数据为空") | ||
| 153 | + return | ||
| 154 | + } | ||
| 155 | + if (data.code != 0) { | ||
| 156 | + fail(data.message) | ||
| 157 | + return | ||
| 158 | + } | ||
| 159 | + success(data.data) | ||
| 160 | + }, (error: Error) => { | ||
| 161 | + Logger.debug("LoginViewModel:error2 ", error.toString()) | ||
| 162 | + fail(error.message) | ||
| 163 | + }) | ||
| 164 | + }) | ||
| 165 | + } | ||
| 166 | + | ||
| 167 | + //修改密码 //需要老密码 | ||
| 117 | resetPassword(password: string, tempToken: string) { | 168 | resetPassword(password: string, tempToken: string) { |
| 118 | let bean: Record<string, string> = {}; | 169 | let bean: Record<string, string> = {}; |
| 170 | + // bean['password'] = password; | ||
| 171 | + // bean['tempToken'] = tempToken; | ||
| 172 | + | ||
| 173 | + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); | ||
| 174 | + | ||
| 175 | + return new Promise<string>((success, fail) => { | ||
| 176 | + HttpRequest.post<ResponseDTO<string>>(HttpUrlUtils.getForgetPasswordUrl(), bean, headers).then((data: ResponseDTO<string>) => { | ||
| 177 | + if (!data || !data.data) { | ||
| 178 | + fail("数据为空") | ||
| 179 | + return | ||
| 180 | + } | ||
| 181 | + if (data.code != 0) { | ||
| 182 | + fail(data.message) | ||
| 183 | + return | ||
| 184 | + } | ||
| 185 | + success(data.data) | ||
| 186 | + }, (error: Error) => { | ||
| 187 | + fail(error.message) | ||
| 188 | + Logger.debug("LoginViewModel:error ", error.toString()) | ||
| 189 | + }) | ||
| 190 | + }) | ||
| 191 | + } | ||
| 192 | + | ||
| 193 | + | ||
| 194 | + | ||
| 195 | + //忘记密码 //不需要老密码 | ||
| 196 | + forgotPassword(password: string, tempToken: string) { | ||
| 197 | + let bean: Record<string, string> = {}; | ||
| 119 | bean['password'] = password; | 198 | bean['password'] = password; |
| 120 | bean['tempToken'] = tempToken; | 199 | bean['tempToken'] = tempToken; |
| 121 | 200 | ||
| 122 | let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); | 201 | let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); |
| 202 | + let JwtToken = SPHelper.default.getSync(SpConstants.USER_JWT_TOKEN, '') as string; | ||
| 203 | + | ||
| 204 | + headers.set('JwtToken',(JwtToken)); | ||
| 123 | return new Promise<string>((success, fail) => { | 205 | return new Promise<string>((success, fail) => { |
| 124 | HttpRequest.post<ResponseDTO<string>>(HttpUrlUtils.getForgetPasswordUrl(), bean, headers).then((data: ResponseDTO<string>) => { | 206 | HttpRequest.post<ResponseDTO<string>>(HttpUrlUtils.getForgetPasswordUrl(), bean, headers).then((data: ResponseDTO<string>) => { |
| 125 | if (!data || !data.data) { | 207 | if (!data || !data.data) { |
| @@ -137,5 +219,6 @@ export class LoginModel { | @@ -137,5 +219,6 @@ export class LoginModel { | ||
| 137 | }) | 219 | }) |
| 138 | }) | 220 | }) |
| 139 | } | 221 | } |
| 222 | + | ||
| 140 | } | 223 | } |
| 141 | 224 |
| @@ -141,7 +141,8 @@ struct LoginPage { | @@ -141,7 +141,8 @@ struct LoginPage { | ||
| 141 | Text('忘记密码').fontColor('#666666').fontSize(14).margin({ top: 16 }) | 141 | Text('忘记密码').fontColor('#666666').fontSize(14).margin({ top: 16 }) |
| 142 | .onClick(() => { | 142 | .onClick(() => { |
| 143 | // router.pushUrl({ url: 'pages/login/ForgetPasswordPage' }) | 143 | // router.pushUrl({ url: 'pages/login/ForgetPasswordPage' }) |
| 144 | - WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage) | 144 | + let pageType = {'pageType': 0} as Record<string, number>; |
| 145 | + WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage, pageType) | ||
| 145 | }) | 146 | }) |
| 146 | } | 147 | } |
| 147 | 148 |
| @@ -31,6 +31,17 @@ export class LoginViewModel { | @@ -31,6 +31,17 @@ export class LoginViewModel { | ||
| 31 | 31 | ||
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | + sendVerifyCodeByToken() { | ||
| 35 | + return new Promise<string>((success, fail) => { | ||
| 36 | + this.loginModel.sendVerifyCodeByToken().then((data) => { | ||
| 37 | + success(data) | ||
| 38 | + }).catch((message: string) => { | ||
| 39 | + fail(message) | ||
| 40 | + }) | ||
| 41 | + }) | ||
| 42 | + | ||
| 43 | + } | ||
| 44 | + | ||
| 34 | appLogin(phone: string, loginType: number, verificationCode: string) { | 45 | appLogin(phone: string, loginType: number, verificationCode: string) { |
| 35 | 46 | ||
| 36 | return new Promise<LoginBean>((success, fail) => { | 47 | return new Promise<LoginBean>((success, fail) => { |
| @@ -91,8 +102,21 @@ export class LoginViewModel { | @@ -91,8 +102,21 @@ export class LoginViewModel { | ||
| 91 | }) | 102 | }) |
| 92 | }) | 103 | }) |
| 93 | } | 104 | } |
| 105 | + checkVerifyCodeByToken(verifyCode: string) { | ||
| 106 | + return new Promise<CheckVerifyBean>((success, reject) => { | ||
| 107 | + this.loginModel.checkVerifyCodeByToken(verifyCode).then((data: CheckVerifyBean) => { | ||
| 108 | + //todo 保存数据 | ||
| 109 | + SPHelper.default.save(SpConstants.USER_TEMP_TOKEN, data.temToken) | ||
| 110 | + SPHelper.default.save(SpConstants.USER_JWT_TOKEN, data.jwtToken) | ||
| 111 | + success(data) | ||
| 94 | 112 | ||
| 95 | - //重置密码 | 113 | + }, (value: string) => { |
| 114 | + reject(value) | ||
| 115 | + }) | ||
| 116 | + }) | ||
| 117 | + } | ||
| 118 | + | ||
| 119 | + //重置密码 需要老密码 | ||
| 96 | resetPassword(password: string, tempToken: string) { | 120 | resetPassword(password: string, tempToken: string) { |
| 97 | return new Promise<string>(async (success, fail) => { | 121 | return new Promise<string>(async (success, fail) => { |
| 98 | let passwordNew = await this.doMd(password) | 122 | let passwordNew = await this.doMd(password) |
| @@ -105,6 +129,18 @@ export class LoginViewModel { | @@ -105,6 +129,18 @@ export class LoginViewModel { | ||
| 105 | 129 | ||
| 106 | } | 130 | } |
| 107 | 131 | ||
| 132 | + //忘记密码 | ||
| 133 | + forgotPassword(password: string, tempToken: string) { | ||
| 134 | + return new Promise<string>(async (success, fail) => { | ||
| 135 | + let passwordNew = await this.doMd(password) | ||
| 136 | + this.loginModel.forgotPassword(passwordNew, tempToken).then((data) => { | ||
| 137 | + success(data) | ||
| 138 | + }).catch((message: string) => { | ||
| 139 | + fail(message) | ||
| 140 | + }) | ||
| 141 | + }) | ||
| 142 | + | ||
| 143 | + } | ||
| 108 | 144 | ||
| 109 | 145 | ||
| 110 | async doMd(content: string): Promise<string> { | 146 | async doMd(content: string): Promise<string> { |
| @@ -8,6 +8,8 @@ import { | @@ -8,6 +8,8 @@ import { | ||
| 8 | SpConstants | 8 | SpConstants |
| 9 | } from '../../../../../../../commons/wdNetwork/oh_modules/wdConstant/src/main/ets/constants/SpConstants' | 9 | } from '../../../../../../../commons/wdNetwork/oh_modules/wdConstant/src/main/ets/constants/SpConstants' |
| 10 | import data_preferences from '@ohos.data.preferences'; | 10 | import data_preferences from '@ohos.data.preferences'; |
| 11 | +import { WDRouterPage, WDRouterRule } from 'wdRouter'; | ||
| 12 | + | ||
| 11 | const TAG = "SettingPasswordLayout" | 13 | const TAG = "SettingPasswordLayout" |
| 12 | 14 | ||
| 13 | export interface SettingPasswordParams { | 15 | export interface SettingPasswordParams { |
| @@ -15,6 +17,7 @@ export interface SettingPasswordParams { | @@ -15,6 +17,7 @@ export interface SettingPasswordParams { | ||
| 15 | phoneContent?: string; | 17 | phoneContent?: string; |
| 16 | codeContent?: string; | 18 | codeContent?: string; |
| 17 | tempToken?:string; | 19 | tempToken?:string; |
| 20 | + pageType?:number; //0、登录->忘记密码 1、设置->重置密码 2、设置->更换手机号页面1 3、设置->更换手机号页面2 | ||
| 18 | } | 21 | } |
| 19 | 22 | ||
| 20 | export default class AccoutPageDataModel { | 23 | export default class AccoutPageDataModel { |
| @@ -53,6 +56,7 @@ export struct SettingPasswordLayout { | @@ -53,6 +56,7 @@ export struct SettingPasswordLayout { | ||
| 53 | password02: string = ''; | 56 | password02: string = ''; |
| 54 | passwordOri: string = ''; | 57 | passwordOri: string = ''; |
| 55 | loginViewModel = new LoginViewModel() | 58 | loginViewModel = new LoginViewModel() |
| 59 | + pageType?:number; //0、登录->忘记密码 1、设置->重置密码 2、设置->更换手机 | ||
| 56 | 60 | ||
| 57 | aboutToAppear() { | 61 | aboutToAppear() { |
| 58 | let params:SettingPasswordParams = router.getParams() as SettingPasswordParams; | 62 | let params:SettingPasswordParams = router.getParams() as SettingPasswordParams; |
| @@ -61,6 +65,7 @@ export struct SettingPasswordLayout { | @@ -61,6 +65,7 @@ export struct SettingPasswordLayout { | ||
| 61 | 65 | ||
| 62 | this.phoneContent = params.phoneContent!; | 66 | this.phoneContent = params.phoneContent!; |
| 63 | this.codeContent = params.codeContent!; | 67 | this.codeContent = params.codeContent!; |
| 68 | + this.pageType = params.pageType; | ||
| 64 | } | 69 | } |
| 65 | 70 | ||
| 66 | getPageListData(pageId:number) { | 71 | getPageListData(pageId:number) { |
| @@ -304,22 +309,30 @@ export struct SettingPasswordLayout { | @@ -304,22 +309,30 @@ export struct SettingPasswordLayout { | ||
| 304 | promptAction.showToast({ message: '密码不符合密码规范' }) | 309 | promptAction.showToast({ message: '密码不符合密码规范' }) |
| 305 | return | 310 | return |
| 306 | } | 311 | } |
| 307 | - | ||
| 308 | - | ||
| 309 | - promptAction.showToast({ message: '请求接口' }) | ||
| 310 | - } | ||
| 311 | - | ||
| 312 | - if(this.pageId == 1){ //设置密码 | ||
| 313 | - if (this.password01.length < 6 || this.password01.length > 20) { | ||
| 314 | - promptAction.showToast({ message: '密码不符合密码规范' }) | ||
| 315 | - return | ||
| 316 | - } | ||
| 317 | if (this.password01 != this.password02) { | 312 | if (this.password01 != this.password02) { |
| 318 | promptAction.showToast({ message: '密码不一致' }) | 313 | promptAction.showToast({ message: '密码不一致' }) |
| 319 | return | 314 | return |
| 320 | } | 315 | } |
| 321 | - | 316 | + if(this.pageId == 1){ //设置密码 |
| 317 | + SPHelper.default.get(SpConstants.USER_JWT_TOKEN, '').then((str) => { | ||
| 318 | + this.loginViewModel.forgotPassword(this.password01, str.toString()).then((data =>{ | ||
| 319 | + if (this.pageType == 0) {//登录页 | ||
| 320 | + WDRouterRule.jumpWithPage(WDRouterPage.loginPage); | ||
| 321 | + }else if(this.pageType == 1){//设置 | ||
| 322 | + let params: Params = { | ||
| 323 | + pageID: 'AccountAndSecurityLayout' | ||
| 324 | + } | ||
| 325 | + WDRouterRule.jumpWithPage(WDRouterPage.settingPage, params) | ||
| 326 | + } | ||
| 327 | + })) | ||
| 328 | + }).catch((err: Error) => { | ||
| 329 | + Logger.error(TAG, 'catch err:' + JSON.stringify(err)); | ||
| 330 | + }); | ||
| 331 | + } | ||
| 332 | + // promptAction.showToast({ message: '请求接口' }) | ||
| 322 | } | 333 | } |
| 334 | + | ||
| 335 | + | ||
| 323 | } | 336 | } |
| 324 | 337 | ||
| 325 | // 输入框数据变动:输入数据处理 | 338 | // 输入框数据变动:输入数据处理 |
| @@ -338,15 +351,6 @@ export struct SettingPasswordLayout { | @@ -338,15 +351,6 @@ export struct SettingPasswordLayout { | ||
| 338 | } else { | 351 | } else { |
| 339 | this.btnStatus = false; | 352 | this.btnStatus = false; |
| 340 | } | 353 | } |
| 341 | - | ||
| 342 | - SPHelper.default.get(SpConstants.USER_JWT_TOKEN, '').then((str) => { | ||
| 343 | - this.loginViewModel.resetPassword(this.password01, str.toString()).then((data =>{ | ||
| 344 | - | ||
| 345 | - })) | ||
| 346 | - }).catch((err: Error) => { | ||
| 347 | - Logger.error(TAG, 'catch err:' + JSON.stringify(err)); | ||
| 348 | - }); | ||
| 349 | - | ||
| 350 | } | 354 | } |
| 351 | } | 355 | } |
| 352 | } | 356 | } |
| @@ -36,8 +36,58 @@ | @@ -36,8 +36,58 @@ | ||
| 36 | ], | 36 | ], |
| 37 | "requestPermissions": [ | 37 | "requestPermissions": [ |
| 38 | { | 38 | { |
| 39 | + "name": "ohos.permission.CAMERA", | ||
| 40 | + "reason": "$string:EntryAbility_desc", | ||
| 41 | + "usedScene": { | ||
| 42 | + "abilities": [ | ||
| 43 | + "FormAbility" | ||
| 44 | + ], | ||
| 45 | + "when": "inuse" | ||
| 46 | + } | ||
| 47 | + }, | ||
| 48 | + { | ||
| 49 | + "name": "ohos.permission.READ_MEDIA", | ||
| 50 | + "reason": "$string:EntryAbility_desc", | ||
| 51 | + "usedScene": { | ||
| 52 | + "abilities": [ | ||
| 53 | + "FormAbility" | ||
| 54 | + ], | ||
| 55 | + "when": "inuse" | ||
| 56 | + } | ||
| 57 | + }, | ||
| 58 | + { | ||
| 59 | + "name": "ohos.permission.WRITE_MEDIA", | ||
| 60 | + "reason": "$string:EntryAbility_desc", | ||
| 61 | + "usedScene": { | ||
| 62 | + "abilities": [ | ||
| 63 | + "FormAbility" | ||
| 64 | + ], | ||
| 65 | + "when": "inuse" | ||
| 66 | + } | ||
| 67 | + }, | ||
| 68 | + { | ||
| 69 | + "name": "ohos.permission.LOCATION", | ||
| 70 | + "reason": "$string:EntryAbility_desc", | ||
| 71 | + "usedScene": { | ||
| 72 | + "abilities": [ | ||
| 73 | + "FormAbility" | ||
| 74 | + ], | ||
| 75 | + "when": "inuse" | ||
| 76 | + } | ||
| 77 | + }, | ||
| 78 | + { | ||
| 79 | + "name": "ohos.permission.MICROPHONE", | ||
| 80 | + "reason": "$string:EntryAbility_desc", | ||
| 81 | + "usedScene": { | ||
| 82 | + "abilities": [ | ||
| 83 | + "FormAbility" | ||
| 84 | + ], | ||
| 85 | + "when": "inuse" | ||
| 86 | + } | ||
| 87 | + }, | ||
| 88 | + { | ||
| 39 | "name": "ohos.permission.INTERNET" | 89 | "name": "ohos.permission.INTERNET" |
| 40 | } | 90 | } |
| 41 | - ] | 91 | + ], |
| 42 | } | 92 | } |
| 43 | } | 93 | } |
-
Please register or login to post a comment