Showing
13 changed files
with
694 additions
and
2 deletions
| @@ -57,8 +57,16 @@ export class HttpUrlUtils { | @@ -57,8 +57,16 @@ export class HttpUrlUtils { | ||
| 57 | * 个人中心 我的预约列表 | 57 | * 个人中心 我的预约列表 |
| 58 | */ | 58 | */ |
| 59 | static readonly APPOINTMENT_LIST_DATA_PATH: string = "/api/live-center-message/zh/c/live/subscribe"; | 59 | static readonly APPOINTMENT_LIST_DATA_PATH: string = "/api/live-center-message/zh/c/live/subscribe"; |
| 60 | + /** | ||
| 61 | + * 资料编辑 获取用户信息 | ||
| 62 | + */ | ||
| 63 | + static readonly APPOINTMENT_AccountOwner_PATH: string = "/api/rmrb-contact/contact/zh/c/my/detail"; | ||
| 60 | 64 | ||
| 61 | /** | 65 | /** |
| 66 | + * 我的收藏 | ||
| 67 | + */ | ||
| 68 | + static readonly APPOINTMENT_MyCollectionList_PATH: string = "/api/rmrb-interact/content/zh/c/interact"; | ||
| 69 | + /** | ||
| 62 | * 早晚报列表 | 70 | * 早晚报列表 |
| 63 | * 根据页面id获取页面楼层列表 | 71 | * 根据页面id获取页面楼层列表 |
| 64 | * https://pdapis.pdnews.cn/api/rmrb-bff-display-zh/display/zh/c/pageInfo?pageId=28927 | 72 | * https://pdapis.pdnews.cn/api/rmrb-bff-display-zh/display/zh/c/pageInfo?pageId=28927 |
| @@ -257,6 +265,11 @@ export class HttpUrlUtils { | @@ -257,6 +265,11 @@ export class HttpUrlUtils { | ||
| 257 | return url | 265 | return url |
| 258 | } | 266 | } |
| 259 | 267 | ||
| 268 | + static getMyCollectionListDataUrl() { | ||
| 269 | + let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.APPOINTMENT_MyCollectionList_PATH | ||
| 270 | + return url | ||
| 271 | + } | ||
| 272 | + | ||
| 260 | static getYcgCommonHeaders(): HashMap<string, string> { | 273 | static getYcgCommonHeaders(): HashMap<string, string> { |
| 261 | let headers: HashMap<string, string> = new HashMap<string, string>() | 274 | let headers: HashMap<string, string> = new HashMap<string, string>() |
| 262 | 275 |
| @@ -40,4 +40,10 @@ export class WDRouterPage { | @@ -40,4 +40,10 @@ export class WDRouterPage { | ||
| 40 | static appointmentListPage = new WDRouterPage("wdComponent", "ets/components/page/AppointmentListPage"); | 40 | static appointmentListPage = new WDRouterPage("wdComponent", "ets/components/page/AppointmentListPage"); |
| 41 | //我的 关注 | 41 | //我的 关注 |
| 42 | static followListPage = new WDRouterPage("wdComponent", "ets/components/page/FollowListPage"); | 42 | static followListPage = new WDRouterPage("wdComponent", "ets/components/page/FollowListPage"); |
| 43 | + //资料编辑 | ||
| 44 | + static editUserInfoPage = new WDRouterPage("wdComponent", "ets/components/page/EditUserInfoPage"); | ||
| 45 | + //修改昵称 | ||
| 46 | + static editUserNikeNamePage = new WDRouterPage("wdComponent", "ets/components/page/EditUserNikeNamePage"); | ||
| 47 | + //修改简介 | ||
| 48 | + static editUserIntroductionPage = new WDRouterPage("wdComponent", "ets/components/page/EditUserIntroductionPage"); | ||
| 43 | } | 49 | } |
| @@ -44,6 +44,10 @@ export default struct MinePagePersonFunctionUI { | @@ -44,6 +44,10 @@ export default struct MinePagePersonFunctionUI { | ||
| 44 | WDRouterRule.jumpWithPage(WDRouterPage.followListPage) | 44 | WDRouterRule.jumpWithPage(WDRouterPage.followListPage) |
| 45 | break; | 45 | break; |
| 46 | } | 46 | } |
| 47 | + case "收藏":{ | ||
| 48 | + WDRouterRule.jumpWithPage(WDRouterPage.editUserInfoPage) | ||
| 49 | + break; | ||
| 50 | + } | ||
| 47 | } | 51 | } |
| 48 | }).width('169lpx') | 52 | }).width('169lpx') |
| 49 | .height('117lpx') | 53 | .height('117lpx') |
| 1 | +import { ResourcesUtils } from 'wdKit' | ||
| 2 | +import { ResponseDTO } from 'wdNetwork' | ||
| 3 | +import { MyCollectionModel } from '../../model/MyCollectionModel' | ||
| 4 | +import { CustomTitleUI } from '../reusable/CustomTitleUI' | ||
| 5 | + | ||
| 6 | +@Entry | ||
| 7 | +@Component | ||
| 8 | +struct BrowsingHistoryPage { | ||
| 9 | + private browsingHistoryList:MyCollectionModel[] = [] | ||
| 10 | + | ||
| 11 | + aboutToAppear(){ | ||
| 12 | + ResourcesUtils.getResourcesJson<ResponseDTO<MyCollectionModel[]>>(getContext(this),'browsingHistory_list_data.json').then((success)=>{ | ||
| 13 | + success.data?.forEach(element => { | ||
| 14 | + this.browsingHistoryList.push(element) | ||
| 15 | + }); | ||
| 16 | + console.log("ycg",this.browsingHistoryList.length.toString()); | ||
| 17 | + }) | ||
| 18 | + } | ||
| 19 | + | ||
| 20 | + build() { | ||
| 21 | + Column(){ | ||
| 22 | + CustomTitleUI({titleName:'浏览历史'}) | ||
| 23 | + List({}){ | ||
| 24 | + ForEach( | ||
| 25 | + this.browsingHistoryList, | ||
| 26 | + (item: MyCollectionModel) =>{ | ||
| 27 | + ListItem(){ | ||
| 28 | + this.HistoryItem(item) | ||
| 29 | + } | ||
| 30 | + } | ||
| 31 | + ) | ||
| 32 | + } | ||
| 33 | + } | ||
| 34 | + .height('100%') | ||
| 35 | + } | ||
| 36 | + | ||
| 37 | + @Builder | ||
| 38 | + HistoryItem(item: MyCollectionModel){ | ||
| 39 | + Column(){ | ||
| 40 | + Row(){ | ||
| 41 | + Column(){ | ||
| 42 | + Text('就像是一场不断升级的权亡。') | ||
| 43 | + .maxLines(3) | ||
| 44 | + Text('2024-03-14') | ||
| 45 | + .margin({top:10,bottom:0}) | ||
| 46 | + } | ||
| 47 | + .width('60%') | ||
| 48 | + .alignItems(HorizontalAlign.Start) | ||
| 49 | + | ||
| 50 | + Blank() | ||
| 51 | + | ||
| 52 | + Image('') | ||
| 53 | + .backgroundColor(Color.Orange) | ||
| 54 | + .width('30%') | ||
| 55 | + .height(80) | ||
| 56 | + .margin({top:10}) | ||
| 57 | + } | ||
| 58 | + Blank() | ||
| 59 | + Divider() | ||
| 60 | + .width('90%') | ||
| 61 | + } | ||
| 62 | + .width('100%') | ||
| 63 | + .height(100) | ||
| 64 | + } | ||
| 65 | +} |
| 1 | +import router from '@ohos.router'; | ||
| 2 | +import { CustomTitleUI } from '../reusable/CustomTitleUI'; | ||
| 3 | +import { EditInfoModel, EditListInfo } from '../../model/EditInfoModel'; | ||
| 4 | +import EditInfoViewModel from '../../viewmodel/EditInfoViewModel'; | ||
| 5 | +import { WDRouterPage, WDRouterRule } from 'wdRouter'; | ||
| 6 | + | ||
| 7 | + | ||
| 8 | +@Entry | ||
| 9 | +@Component | ||
| 10 | +struct EditUserInfoPage { | ||
| 11 | + private listData: EditListInfo[] = [] | ||
| 12 | + editInfo: EditInfoModel = new EditInfoModel('','待完善','待完善','待完善','待完善','待完善','待完善') | ||
| 13 | + | ||
| 14 | + aboutToAppear() { | ||
| 15 | + this.listData = EditInfoViewModel.getEditListInfo(this.editInfo) | ||
| 16 | + this.getAccountOwnerInfo() | ||
| 17 | + } | ||
| 18 | + | ||
| 19 | + build() { | ||
| 20 | + Row() { | ||
| 21 | + Column() { | ||
| 22 | + CustomTitleUI({titleName:'资料编辑'}) | ||
| 23 | + Image(this.editInfo.headPhotoUrl?this.editInfo.headPhotoUrl:'') | ||
| 24 | + .backgroundColor(Color.Gray) | ||
| 25 | + .width(100) | ||
| 26 | + .height(100) | ||
| 27 | + .borderRadius(50) | ||
| 28 | + .margin({top:20,bottom:-10}) | ||
| 29 | + | ||
| 30 | + Button('点击更换头像') | ||
| 31 | + .fontColor(Color.Gray) | ||
| 32 | + .fontSize(18) | ||
| 33 | + .backgroundColor(Color.White) | ||
| 34 | + .margin(20) | ||
| 35 | + | ||
| 36 | + List({}){ | ||
| 37 | + ForEach(this.listData,(item:EditListInfo,index:number) =>{ | ||
| 38 | + ListItem(){ | ||
| 39 | + this.RouterItem(item,index+1) | ||
| 40 | + } | ||
| 41 | + } | ||
| 42 | + ) | ||
| 43 | + } | ||
| 44 | + .layoutWeight(1) | ||
| 45 | + .alignListItem(ListItemAlign.Center) | ||
| 46 | + .width('100%') | ||
| 47 | + } | ||
| 48 | + } | ||
| 49 | + .width('100%') | ||
| 50 | + .height('100%') | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + @Builder | ||
| 54 | + RouterItem(r:EditListInfo,i:Number){ | ||
| 55 | + Column(){ | ||
| 56 | + Row(){ | ||
| 57 | + Text(r.title) | ||
| 58 | + .fontSize(18) | ||
| 59 | + .fontColor(Color.Gray) | ||
| 60 | + Blank() | ||
| 61 | + | ||
| 62 | + Text(r.subTitle) | ||
| 63 | + .fontSize(16) | ||
| 64 | + .fontColor(Color.Gray) | ||
| 65 | + .padding({right:10}) | ||
| 66 | + | ||
| 67 | + Image($r('app.media.mine_user_edit')) | ||
| 68 | + .width('12') | ||
| 69 | + .height('12') | ||
| 70 | + } | ||
| 71 | + .alignItems(VerticalAlign.Center) | ||
| 72 | + .width('100%') | ||
| 73 | + .padding(16) | ||
| 74 | + | ||
| 75 | + Divider() | ||
| 76 | + .width('90%') | ||
| 77 | + } | ||
| 78 | + .height(60) | ||
| 79 | + .width('100%') | ||
| 80 | + .onClick(()=>{ | ||
| 81 | + if (i === 1){ | ||
| 82 | + // WDRouterRule.jumpWithPage(WDRouterPage.editUserInfoPage) | ||
| 83 | + WDRouterRule.jumpWithPage(WDRouterPage.editUserNikeNamePage) | ||
| 84 | + }else if (i === 2){ | ||
| 85 | + WDRouterRule.jumpWithPage(WDRouterPage.editUserIntroductionPage) | ||
| 86 | + // router.pushUrl({ | ||
| 87 | + // url:'pages/EditUserInstoductionPage', | ||
| 88 | + // params:{pageNum:i} | ||
| 89 | + // }) | ||
| 90 | + } else if (i === 4) { | ||
| 91 | + DatePickerDialog.show({ | ||
| 92 | + start:new Date('1900-1-1'), | ||
| 93 | + end:new Date(), | ||
| 94 | + selected:new Date, | ||
| 95 | + lunar:false, | ||
| 96 | + // onAccept:(value:DatePickerResult) => { | ||
| 97 | + // | ||
| 98 | + // } | ||
| 99 | + }) | ||
| 100 | + }else if(i === 5){ | ||
| 101 | + TextPickerDialog.show({ | ||
| 102 | + range:['男','女'], | ||
| 103 | + selected:0, | ||
| 104 | + // onAccept:(value:TextPickerResult) => { | ||
| 105 | + // | ||
| 106 | + // } | ||
| 107 | + }) | ||
| 108 | + } | ||
| 109 | + }) | ||
| 110 | + } | ||
| 111 | + | ||
| 112 | + getAccountOwnerInfo(){ | ||
| 113 | + EditInfoViewModel.queryAccountOwnerInfo(1).then((result) => { | ||
| 114 | + this.editInfo = result | ||
| 115 | + }); | ||
| 116 | + } | ||
| 117 | + | ||
| 118 | +} |
sight_harmony/features/wdComponent/src/main/ets/components/page/EditUserIntroductionPage.ets
0 → 100644
| 1 | +import { CustomTitleUI } from '../reusable/CustomTitleUI' | ||
| 2 | + | ||
| 3 | +@Entry | ||
| 4 | +@Component | ||
| 5 | +struct EditUserIntroductionPage { | ||
| 6 | + @State numCount: number = 0 | ||
| 7 | + @State textColor : string = '#222222' | ||
| 8 | + | ||
| 9 | + build() { | ||
| 10 | + Column(){ | ||
| 11 | + CustomTitleUI({titleName:'修改简介'}) | ||
| 12 | + | ||
| 13 | + Row(){ | ||
| 14 | + TextInput({placeholder:'请输入简介'}) | ||
| 15 | + .maxLength(60) | ||
| 16 | + .width('100%') | ||
| 17 | + .height(80) | ||
| 18 | + .backgroundColor(Color.White) | ||
| 19 | + .onChange(value => { | ||
| 20 | + this.numCount = value.length | ||
| 21 | + if (this.numCount === 60) { | ||
| 22 | + this.textColor = '#ED2800' | ||
| 23 | + }else { | ||
| 24 | + this.textColor = '#222222' | ||
| 25 | + } | ||
| 26 | + }) | ||
| 27 | + | ||
| 28 | + Text(this.numCount.toString() + '/60') | ||
| 29 | + .fontColor(this.textColor) | ||
| 30 | + .margin({left: -50}) | ||
| 31 | + } | ||
| 32 | + .alignItems(VerticalAlign.Bottom) | ||
| 33 | + | ||
| 34 | + | ||
| 35 | + Divider() | ||
| 36 | + .margin(12) | ||
| 37 | + | ||
| 38 | + Text('1、账号中(头像、昵称等)不允许含有违禁违规内容;\n2、出于商业或作为素材恶搞目的,而将国旗、国徽以及国家领导人用于头像、昵称;\n3、最多60个字,只能输入中文、数字、英文字母。') | ||
| 39 | + .fontSize(13) | ||
| 40 | + .padding(12) | ||
| 41 | + .fontColor(Color.Gray) | ||
| 42 | + | ||
| 43 | + Button('保存') | ||
| 44 | + .type(ButtonType.Normal) | ||
| 45 | + .width('90%') | ||
| 46 | + .backgroundColor('#ED2800') | ||
| 47 | + .borderRadius(5) | ||
| 48 | + .margin(30) | ||
| 49 | + } | ||
| 50 | + } | ||
| 51 | +} |
| 1 | +import { CustomTitleUI } from '../reusable/CustomTitleUI' | ||
| 2 | + | ||
| 3 | +@Entry | ||
| 4 | +@Component | ||
| 5 | +struct EditUserNikeNamePage { | ||
| 6 | + ///接收传参 | ||
| 7 | + @State numCount: number = 0 | ||
| 8 | + @State textColor : string = '#222222' | ||
| 9 | + | ||
| 10 | + build() { | ||
| 11 | + Column(){ | ||
| 12 | + CustomTitleUI({titleName:'修改昵称'}) | ||
| 13 | + | ||
| 14 | + Row(){ | ||
| 15 | + TextInput({placeholder:'请输入昵称'}) | ||
| 16 | + .width('100%') | ||
| 17 | + .maxLength(16) | ||
| 18 | + .height(50) | ||
| 19 | + .backgroundColor(Color.White) | ||
| 20 | + .onChange(value => { | ||
| 21 | + this.numCount = value.length | ||
| 22 | + if (this.numCount === 16) { | ||
| 23 | + this.textColor = '#ED2800' | ||
| 24 | + }else { | ||
| 25 | + this.textColor = '#222222' | ||
| 26 | + } | ||
| 27 | + }) | ||
| 28 | + | ||
| 29 | + Text(this.numCount.toString() + '/16') | ||
| 30 | + .fontColor(this.textColor) | ||
| 31 | + .margin({left: -50}) | ||
| 32 | + } | ||
| 33 | + .alignItems(VerticalAlign.Center) | ||
| 34 | + | ||
| 35 | + Divider() | ||
| 36 | + .margin(12) | ||
| 37 | + | ||
| 38 | + Text('1、账号中(头像、昵称等)不允许含有违禁违规内容;\n2、出于商业或作为素材恶搞目的,而将国旗、国徽以及国家领导人用于头像、昵称;\n3、最多16个字,只能输入中文、数字、英文字母。') | ||
| 39 | + .fontSize(13) | ||
| 40 | + .padding(12) | ||
| 41 | + .fontColor(Color.Gray) | ||
| 42 | + | ||
| 43 | + Button('保存') | ||
| 44 | + .type(ButtonType.Normal) | ||
| 45 | + .width('90%') | ||
| 46 | + .backgroundColor('#ED2800') | ||
| 47 | + .borderRadius(5) | ||
| 48 | + .margin(30) | ||
| 49 | + } | ||
| 50 | + } | ||
| 51 | +} |
| 1 | + | ||
| 2 | +export class EditListInfo{ | ||
| 3 | + //标题 | ||
| 4 | + title:string | ||
| 5 | + //副标题 | ||
| 6 | + subTitle:string | ||
| 7 | + | ||
| 8 | + constructor(title:string , subTitle:string) { | ||
| 9 | + this.title = title; | ||
| 10 | + this.subTitle = subTitle | ||
| 11 | + } | ||
| 12 | +} | ||
| 13 | + | ||
| 14 | +export class EditInfoModel{ | ||
| 15 | + //头像 | ||
| 16 | + headPhotoUrl:string = '' | ||
| 17 | + //昵称 | ||
| 18 | + userName:string = '' | ||
| 19 | + //简介 | ||
| 20 | + introduction:string = '' | ||
| 21 | + //城市 | ||
| 22 | + city:string = '' | ||
| 23 | + //地区 | ||
| 24 | + county:string = '' | ||
| 25 | + //生日 | ||
| 26 | + birthday:string = '' | ||
| 27 | + //性别 | ||
| 28 | + sex:string = '' | ||
| 29 | + | ||
| 30 | + constructor(headPhotoUrl:string , userName:string , introduction:string , city:string , county:string, birthday:string , sex:string) { | ||
| 31 | + this.headPhotoUrl = headPhotoUrl; | ||
| 32 | + this.userName = userName; | ||
| 33 | + this.introduction = introduction; | ||
| 34 | + this.city = city; | ||
| 35 | + this.county = county; | ||
| 36 | + this.birthday = birthday; | ||
| 37 | + this.sex = sex; | ||
| 38 | + } | ||
| 39 | + | ||
| 40 | +} |
| 1 | + | ||
| 2 | +// { | ||
| 3 | +// "hasNext": 0, | ||
| 4 | +// "list": [ | ||
| 5 | +// Object{...}, | ||
| 6 | +// Object{...} | ||
| 7 | +// ], | ||
| 8 | +// "pageNum": 1, | ||
| 9 | +// "pageSize": 20, | ||
| 10 | +// "totalCount": 2 | ||
| 11 | +// }, | ||
| 12 | + | ||
| 13 | +export class MyCollectionModel{ | ||
| 14 | + //标题 | ||
| 15 | + newsTitle:string | ||
| 16 | + //封面 | ||
| 17 | + coverUrl:string | ||
| 18 | + | ||
| 19 | + constructor(newsTitle:string , coverUrl:string) { | ||
| 20 | + this.newsTitle = newsTitle; | ||
| 21 | + this.coverUrl = coverUrl | ||
| 22 | + } | ||
| 23 | +} | ||
| 24 | + | ||
| 25 | +@Observed | ||
| 26 | +export class MyCollectionItem{ | ||
| 27 | + pageNum:number = 0 | ||
| 28 | + pageSize:number = 0 | ||
| 29 | + totalCount:number = 0 | ||
| 30 | + hasNext:number = 0 | ||
| 31 | + list:MyCollectionModel[] = [] | ||
| 32 | +} | ||
| 33 | + | ||
| 34 | + | ||
| 35 | +export class MyCollectionListModel{ | ||
| 36 | + list:MyCollectionModel[] = [] | ||
| 37 | + | ||
| 38 | + pageNum: number = 0 | ||
| 39 | + pageSize: number = 20 | ||
| 40 | + totalCount: number = 0 | ||
| 41 | + | ||
| 42 | + constructor(list?:MyCollectionModel[],pageNum?: number,pageSize?: number,totalCount?: number) { | ||
| 43 | + } | ||
| 44 | +} | ||
| 45 | + |
| 1 | + | ||
| 2 | +import { EditInfoModel, EditListInfo } from '../model/EditInfoModel'; | ||
| 3 | +import HashMap from '@ohos.util.HashMap'; | ||
| 4 | +import { HttpUrlUtils, ResponseDTO, WDHttp } from 'wdNetwork'; | ||
| 5 | + | ||
| 6 | + | ||
| 7 | +class EditInfoViewModel { | ||
| 8 | + private static instance: EditInfoViewModel; | ||
| 9 | + editListData:EditListInfo[] = [] | ||
| 10 | + /** | ||
| 11 | + * 单例模式 | ||
| 12 | + * @returns | ||
| 13 | + */ | ||
| 14 | + public static getInstance(): EditInfoViewModel { | ||
| 15 | + if (!EditInfoViewModel.instance) { | ||
| 16 | + EditInfoViewModel.instance = new EditInfoViewModel(); | ||
| 17 | + } | ||
| 18 | + return EditInfoViewModel.instance; | ||
| 19 | + } | ||
| 20 | + | ||
| 21 | + BaseGetRequest(requestUrl:string){ | ||
| 22 | + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders() | ||
| 23 | + return WDHttp.get<ResponseDTO>(requestUrl,headers) | ||
| 24 | + } | ||
| 25 | + | ||
| 26 | + | ||
| 27 | + getEditListInfo(item:EditInfoModel):EditListInfo[]{ | ||
| 28 | + this.editListData = [ | ||
| 29 | + new EditListInfo('昵称',item&&item.userName?item.userName:'待完善'), | ||
| 30 | + new EditListInfo('简介',item&&item.introduction?item.introduction:'待完善'), | ||
| 31 | + new EditListInfo('地区',item&&item.city?item.city:'待完善'), | ||
| 32 | + new EditListInfo('生日',item&&item.birthday?item.birthday:'待完善'), | ||
| 33 | + new EditListInfo('性别',item&&item.sex?item.sex:'待完善'),] | ||
| 34 | + return this.editListData | ||
| 35 | + } | ||
| 36 | + | ||
| 37 | + queryAccountOwnerInfo(userType:number):PromiseLike<EditInfoModel>{ | ||
| 38 | + return new Promise(((success, error) => { | ||
| 39 | + this.BaseGetRequest(HttpUrlUtils.APPOINTMENT_AccountOwner_PATH).then(navResDTO =>{ | ||
| 40 | + if (navResDTO.code == 200) { | ||
| 41 | + // success(JSON.parse(navResDTO.data)) | ||
| 42 | + } | ||
| 43 | + }).catch() | ||
| 44 | + })) | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + updateUserInfo(){ | ||
| 48 | + | ||
| 49 | + } | ||
| 50 | + | ||
| 51 | +} | ||
| 52 | + | ||
| 53 | +const editInfoViewModel = EditInfoViewModel.getInstance(); | ||
| 54 | + | ||
| 55 | +export default editInfoViewModel as EditInfoViewModel |
| 1 | +import { MyCollectionListModel } from '../model/MyCollectionModel'; | ||
| 2 | +import HashMap from '@ohos.util.HashMap'; | ||
| 3 | +import { HttpUrlUtils, ResponseDTO, WDHttp } from 'wdNetwork'; | ||
| 4 | +import { Logger } from 'wdKit'; | ||
| 5 | + | ||
| 6 | +const TAG = "MyCollectionViewModel" | ||
| 7 | + | ||
| 8 | +class MyCollectionViewModel { | ||
| 9 | + private static instance:MyCollectionViewModel | ||
| 10 | + | ||
| 11 | + /** | ||
| 12 | + * 单例模式 | ||
| 13 | + * @returns | ||
| 14 | + */ | ||
| 15 | + public static getInstance(): MyCollectionViewModel { | ||
| 16 | + if (!MyCollectionViewModel.instance) { | ||
| 17 | + MyCollectionViewModel.instance = new MyCollectionViewModel(); | ||
| 18 | + } | ||
| 19 | + return MyCollectionViewModel.instance; | ||
| 20 | + } | ||
| 21 | + | ||
| 22 | + BaseGetRequest(type:number,tagId:string,pageNum:string){ | ||
| 23 | + let url = HttpUrlUtils.getMyCollectionListDataUrl()+ `?type=${type}&operateTag=${1}&pageSize=${20}&pageNum=${pageNum}` | ||
| 24 | + if (tagId.length > 0) { | ||
| 25 | + url = url + `&tagId=${tagId}` | ||
| 26 | + } | ||
| 27 | + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders() | ||
| 28 | + return WDHttp.get<ResponseDTO<MyCollectionListModel>>(url, headers) | ||
| 29 | + } | ||
| 30 | + | ||
| 31 | + //Type 1 收藏 2 浏览历史 | ||
| 32 | + //tagId 收藏界面 标签筛选 | ||
| 33 | + fetchMyCollectList(type:number,tagId:string,pageNum:string):Promise<MyCollectionListModel>{ | ||
| 34 | + return new Promise<MyCollectionListModel>((success,error) => { | ||
| 35 | + this.BaseGetRequest(type,tagId,pageNum).then((navResDTO: ResponseDTO<MyCollectionListModel>) => { | ||
| 36 | + if (navResDTO) { | ||
| 37 | + let listData = navResDTO.data as MyCollectionListModel | ||
| 38 | + success(listData) | ||
| 39 | + }else{ | ||
| 40 | + Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp); | ||
| 41 | + error("page data invalid"); | ||
| 42 | + } | ||
| 43 | + }).catch((err: Error) => { | ||
| 44 | + Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`); | ||
| 45 | + error("page data invalid"); | ||
| 46 | + }) | ||
| 47 | + }) | ||
| 48 | + } | ||
| 49 | +} |
| @@ -2,7 +2,9 @@ | @@ -2,7 +2,9 @@ | ||
| 2 | "src": [ | 2 | "src": [ |
| 3 | "components/MorningEveningPaper/MorningEveningPaperComponent", | 3 | "components/MorningEveningPaper/MorningEveningPaperComponent", |
| 4 | "components/page/AppointmentListPage", | 4 | "components/page/AppointmentListPage", |
| 5 | - "components/page/FollowListPage" | 5 | + "components/page/FollowListPage", |
| 6 | + "components/page/EditUserInfoPage", | ||
| 7 | + "components/page/EditUserNikeNamePage", | ||
| 8 | + "components/page/EditUserIntroductionPage" | ||
| 6 | ] | 9 | ] |
| 7 | } | 10 | } |
| 8 | - |
| 1 | +{ | ||
| 2 | + "code": "0", | ||
| 3 | + "data": { | ||
| 4 | + "hasNext": 0, | ||
| 5 | + "list": [ | ||
| 6 | + { | ||
| 7 | + "activityExt": null, | ||
| 8 | + "appStyle": "23", | ||
| 9 | + "askInfo": { | ||
| 10 | + "answerContent": "已回复已回复已回复已回复已回复已回复已回复已回复已回复已回复已回复已回复已回复已回复已回复已回复已回复已回复已回复已回复已回复已回复已回复已回复已回复", | ||
| 11 | + "askId": 60000000430, | ||
| 12 | + "content": "首先,修路期间道路的封闭和交通拥堵成为了最大的问题。原本通畅的道路在施工期间常常被堵得水泄不通,不仅给市民的出行带来了极大的不便,也影响了周边商户的生意。此外,由于施工期间各种设备和材料的运输需求增加,交通压力也随之增大。\n\n其次,修路期间产生的噪音和环境污染也是一个难以忍受的烦恼。大型机械和运输车辆的轰鸣声、建筑材料加工的噪音以及工人施工的喧闹声,都给居民的生活带来了很大的干扰。同时,由于施工期间各种设备、材料的使用和运输,产生的灰尘、废气等也会对环境造成一定的污染。\n\n再者,修路期间的施工安全问题也令人担忧。由于施工期间道路的不规范和设备的摆放不当,容易导致交通事故的发生。此外,由于施工人员的疏忽大意,也可能引发一些安全隐患。\n\n针对以上问题,我们可以采取以下措施来缓解修路期间的烦恼:\n\n合理规划施工时间和路线,尽量减少对居民生活和商户经营的影响。\n\n加强施工现场的安全管理,确保施工期间的安全。\n\n采取必要的环保措施,减少施工期间对环境的影响。\n\n总之,修路虽然带来了许多烦恼,但也是城市发展所必须面对的问题。只有通过合理的规划和管理,才能最大程度地减少修路期间的各种烦恼,让我们的生活更加便利和舒适。", | ||
| 13 | + "domainName": "治安", | ||
| 14 | + "forumName": "安徽省合肥市委书记虞爱华", | ||
| 15 | + "realAskId": "17050288", | ||
| 16 | + "stateInfo": 4, | ||
| 17 | + "typeName": "咨询" | ||
| 18 | + }, | ||
| 19 | + "axisColor": "", | ||
| 20 | + "bestNoticer": null, | ||
| 21 | + "bottomNavId": null, | ||
| 22 | + "cardItemId": "", | ||
| 23 | + "channelId": 2062, | ||
| 24 | + "commentInfo": null, | ||
| 25 | + "corner": "", | ||
| 26 | + "coverSize": "", | ||
| 27 | + "coverType": 1, | ||
| 28 | + "coverUrl": "http://testlybcustomer.people.cn/files/attachment/month_2310/202310_b1XKIRsW35n7A3Srz5EeUaLtWnqryjNz_m.jpg", | ||
| 29 | + "expIds": "", | ||
| 30 | + "extra": "", | ||
| 31 | + "fullColumnImgUrls": [ | ||
| 32 | + { | ||
| 33 | + "format": null, | ||
| 34 | + "height": null, | ||
| 35 | + "landscape": null, | ||
| 36 | + "size": null, | ||
| 37 | + "url": "http://testlybcustomer.people.cn/files/attachment/month_2310/202310_b1XKIRsW35n7A3Srz5EeUaLtWnqryjNz_m.jpg", | ||
| 38 | + "weight": null | ||
| 39 | + } | ||
| 40 | + ], | ||
| 41 | + "hasMore": null, | ||
| 42 | + "itemId": "", | ||
| 43 | + "itemType": "", | ||
| 44 | + "itemTypeCode": "", | ||
| 45 | + "keyArticle": null, | ||
| 46 | + "landscape": null, | ||
| 47 | + "likeStyle": null, | ||
| 48 | + "linkUrl": "", | ||
| 49 | + "liveInfo": null, | ||
| 50 | + "menuShow": 1, | ||
| 51 | + "newTags": "", | ||
| 52 | + "newsAuthor": "", | ||
| 53 | + "newsSubTitle": "", | ||
| 54 | + "newsSummary": "", | ||
| 55 | + "newsTitle": "8月5号正在修路,给出行带来了诸多不变", | ||
| 56 | + "newsTitleColor": "", | ||
| 57 | + "objectId": "60000000430", | ||
| 58 | + "objectLevel": "", | ||
| 59 | + "objectType": "16", | ||
| 60 | + "openComment": null, | ||
| 61 | + "openLikes": null, | ||
| 62 | + "pageId": "", | ||
| 63 | + "photoNum": null, | ||
| 64 | + "position": null, | ||
| 65 | + "productNum": null, | ||
| 66 | + "publishTime": "1697091605000", | ||
| 67 | + "pushTime": null, | ||
| 68 | + "pushUnqueId": null, | ||
| 69 | + "readFlag": 0, | ||
| 70 | + "recommend": null, | ||
| 71 | + "relId": 500000002539, | ||
| 72 | + "relObjectId": "2062", | ||
| 73 | + "relType": 1, | ||
| 74 | + "rmhInfo": null, | ||
| 75 | + "rmhPlatform": null, | ||
| 76 | + "sceneId": "", | ||
| 77 | + "shareInfo": null, | ||
| 78 | + "slideShows": [ | ||
| 79 | + | ||
| 80 | + ], | ||
| 81 | + "sortValue": null, | ||
| 82 | + "source": "", | ||
| 83 | + "subObjectType": "", | ||
| 84 | + "subSceneId": "", | ||
| 85 | + "tagIds": [ | ||
| 86 | + | ||
| 87 | + ], | ||
| 88 | + "tagWord": null, | ||
| 89 | + "titleShow": null, | ||
| 90 | + "titleShowPolicy": null, | ||
| 91 | + "topicTemplate": null, | ||
| 92 | + "traceId": "", | ||
| 93 | + "traceInfo": "", | ||
| 94 | + "userInfo": null, | ||
| 95 | + "videoInfo": null, | ||
| 96 | + "visitorComment": 0, | ||
| 97 | + "voiceInfo": null | ||
| 98 | + }, | ||
| 99 | + { | ||
| 100 | + "activityExt": null, | ||
| 101 | + "appStyle": "13", | ||
| 102 | + "askInfo": null, | ||
| 103 | + "axisColor": "", | ||
| 104 | + "bestNoticer": null, | ||
| 105 | + "bottomNavId": null, | ||
| 106 | + "cardItemId": "", | ||
| 107 | + "channelId": 2002, | ||
| 108 | + "commentInfo": null, | ||
| 109 | + "corner": "", | ||
| 110 | + "coverSize": "616*463", | ||
| 111 | + "coverType": 1, | ||
| 112 | + "coverUrl": "https://rmrbcmsonline.peopleapp.com/upload/image/202403/202403151512545044.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90", | ||
| 113 | + "expIds": "", | ||
| 114 | + "extra": "", | ||
| 115 | + "fullColumnImgUrls": [ | ||
| 116 | + { | ||
| 117 | + "format": null, | ||
| 118 | + "height": 463, | ||
| 119 | + "landscape": 1, | ||
| 120 | + "size": 1, | ||
| 121 | + "url": "https://rmrbcmsonline.peopleapp.com/upload/image/202403/202403151512545044.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90", | ||
| 122 | + "weight": 616 | ||
| 123 | + } | ||
| 124 | + ], | ||
| 125 | + "hasMore": null, | ||
| 126 | + "itemId": "", | ||
| 127 | + "itemType": "", | ||
| 128 | + "itemTypeCode": "", | ||
| 129 | + "keyArticle": 0, | ||
| 130 | + "landscape": null, | ||
| 131 | + "likeStyle": null, | ||
| 132 | + "linkUrl": "", | ||
| 133 | + "liveInfo": null, | ||
| 134 | + "menuShow": 2, | ||
| 135 | + "newTags": "", | ||
| 136 | + "newsAuthor": "", | ||
| 137 | + "newsSubTitle": "", | ||
| 138 | + "newsSummary": "涉事人员被拘。", | ||
| 139 | + "newsTitle": "北京昌平一社区火警延报近1小时:2人被拘,原因离谱", | ||
| 140 | + "newsTitleColor": "", | ||
| 141 | + "objectId": "30034963995", | ||
| 142 | + "objectLevel": "", | ||
| 143 | + "objectType": "8", | ||
| 144 | + "openComment": null, | ||
| 145 | + "openLikes": null, | ||
| 146 | + "pageId": "", | ||
| 147 | + "photoNum": null, | ||
| 148 | + "position": null, | ||
| 149 | + "productNum": null, | ||
| 150 | + "publishTime": "1710487201000", | ||
| 151 | + "pushTime": null, | ||
| 152 | + "pushUnqueId": null, | ||
| 153 | + "readFlag": 0, | ||
| 154 | + "recommend": null, | ||
| 155 | + "relId": 500002806288, | ||
| 156 | + "relObjectId": "2002", | ||
| 157 | + "relType": 1, | ||
| 158 | + "rmhInfo": null, | ||
| 159 | + "rmhPlatform": 0, | ||
| 160 | + "sceneId": "", | ||
| 161 | + "shareInfo": null, | ||
| 162 | + "slideShows": [ | ||
| 163 | + | ||
| 164 | + ], | ||
| 165 | + "sortValue": null, | ||
| 166 | + "source": "央视新闻", | ||
| 167 | + "subObjectType": "", | ||
| 168 | + "subSceneId": "", | ||
| 169 | + "tagIds": [ | ||
| 170 | + | ||
| 171 | + ], | ||
| 172 | + "tagWord": null, | ||
| 173 | + "titleShow": null, | ||
| 174 | + "titleShowPolicy": null, | ||
| 175 | + "topicTemplate": null, | ||
| 176 | + "traceId": "", | ||
| 177 | + "traceInfo": "", | ||
| 178 | + "userInfo": null, | ||
| 179 | + "videoInfo": null, | ||
| 180 | + "visitorComment": 0, | ||
| 181 | + "voiceInfo": null | ||
| 182 | + } | ||
| 183 | + ], | ||
| 184 | + "pageNum": 1, | ||
| 185 | + "pageSize": 20, | ||
| 186 | + "totalCount": 2 | ||
| 187 | + }, | ||
| 188 | + "message": "Success", | ||
| 189 | + "meta": null, | ||
| 190 | + "requestId": "", | ||
| 191 | + "success": true, | ||
| 192 | + "timestamp": 1711010813300 | ||
| 193 | +} |
-
Please register or login to post a comment