Showing
3 changed files
with
23 additions
and
21 deletions
| @@ -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 |
| @@ -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 | } |
| @@ -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) |
-
Please register or login to post a comment