Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
王士厅
2024-04-09 18:10:14 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
c1a39dbcc3b68941204cde6795dfcdb29f978fbd
c1a39dbc
2 parents
77cd8bad
68c44b7d
Merge branch 'main' of
http://192.168.1.42/developOne/harmonyPool
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
97 additions
and
1622 deletions
sight_harmony/commons/wdNetwork/src/main/ets/http/HttpUrlUtils.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/ChannelSubscriptionLayout.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/EditUserInfoPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/PageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/areaPickerDialog/AreaPickerDialog.ets
sight_harmony/features/wdComponent/src/main/ets/model/EditInfoModel.ets
sight_harmony/features/wdComponent/src/main/ets/viewmodel/EditInfoViewModel.ets
sight_harmony/commons/wdNetwork/src/main/ets/http/HttpUrlUtils.ets
View file @
c1a39db
...
...
@@ -104,6 +104,10 @@ export class HttpUrlUtils {
*/
static readonly APPOINTMENT_editUserDetail1_PATH: string = "/api/rmrb-user-center/user/zh/c/completeUserInfo";
/**
* 资料编辑 地区拉取
*/
static readonly APPOINTMENT_userArea_PATH: string = "/api/rmrb-content-center/c/service/sys-area/treeselect";
/**
/**
* 个人中心 关注列表详情
*/
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/ChannelSubscriptionLayout.ets
View file @
c1a39db
...
...
@@ -431,6 +431,7 @@ struct ChannelDialog {
}
}.width('100%').height('100%')
.scrollBar(BarState.Off)
}
.padding({ top: 40, right: 15, bottom: 20, left: 15 })
.backgroundColor('#ffffff')
...
...
@@ -482,1512 +483,6 @@ struct ChannelSubscriptionLayout {
this.myChannelList.push(item)
this.storeChannelIds = this.channelIds.join(',')
}
// @State currentTopNavSelectedIndex: number = 0
// @State topNavList: TopNavDTO [] = [
// {
// channelId: 2001,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 1,
// defaultPermitted: 1,
// delPermitted: 0,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 0,
// myChannel: "0",
// name: "推荐",
// num: 1,
// pageId: 20011,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2002,
// channelStrategy: 2,
// channelStyle: 2,
// channelType: 1,
// defaultPermitted: 1,
// delPermitted: 0,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 0,
// myChannel: "0",
// name: "热点",
// num: 2,
// pageId: 20012,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2003,
// channelStrategy: 2,
// channelStyle: 2,
// channelType: 1,
// defaultPermitted: 0,
// delPermitted: 0,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "锐评",
// num: 3,
// pageId: 20013,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2066,
// channelStrategy: 2,
// channelStyle: 3,
// channelType: 1,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "播报",
// num: 4,
// pageId: 21003,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2006,
// channelStrategy: 2,
// channelStyle: 3,
// channelType: 1,
// defaultPermitted: 0,
// delPermitted: 0,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "版面",
// num: 5,
// pageId: 20016,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2011,
// channelStrategy: 2,
// channelStyle: 2,
// channelType: 1,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "体育",
// num: 6,
// pageId: 20021,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2020,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 1,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "国际",
// num: 7,
// pageId: 20030,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2063,
// channelStrategy: 2,
// channelStyle: 2,
// channelType: 1,
// defaultPermitted: 0,
// delPermitted: 0,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 0,
// myChannel: "0",
// name: "两会",
// num: 8,
// pageId: 21000,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2072,
// channelStrategy: 2,
// channelStyle: 2,
// channelType: 1,
// defaultPermitted: 0,
// delPermitted: 0,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 0,
// myChannel: "0",
// name: "亚运",
// num: 9,
// pageId: 21009,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2015,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 1,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "科技",
// num: 10,
// pageId: 20025,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2004,
// channelStrategy: 2,
// channelStyle: 2,
// channelType: 1,
// defaultPermitted: 0,
// delPermitted: 0,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "云课堂",
// num: 11,
// pageId: 20014,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2005,
// channelStrategy: 2,
// channelStyle: 2,
// channelType: 1,
// defaultPermitted: 0,
// delPermitted: 0,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "文件",
// num: 12,
// pageId: 20015,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2007,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 1,
// defaultPermitted: 0,
// delPermitted: 0,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "镜头",
// num: 13,
// pageId: 20017,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2008,
// channelStrategy: 2,
// channelStyle: 2,
// channelType: 1,
// defaultPermitted: 0,
// delPermitted: 0,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "公益",
// num: 14,
// pageId: 20018,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2009,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 1,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "社会",
// num: 15,
// pageId: 20019,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2010,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 1,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "财经",
// num: 16,
// pageId: 20020,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2012,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 1,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "文化",
// num: 17,
// pageId: 20022,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2013,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 1,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "教育",
// num: 18,
// pageId: 20023,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2014,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 1,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "军事",
// num: 19,
// pageId: 20024,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2017,
// channelStrategy: 2,
// channelStyle: 2,
// channelType: 1,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "健康",
// num: 20,
// pageId: 20027,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2019,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 1,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "房产",
// num: 21,
// pageId: 20029,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2018,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 1,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "汽车",
// num: 22,
// pageId: 20028,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2065,
// channelStrategy: 2,
// channelStyle: 2,
// channelType: 1,
// defaultPermitted: 0,
// delPermitted: 0,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "三农",
// num: 24,
// pageId: 21002,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2024,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 1,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "家居",
// num: 25,
// pageId: 20034,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2021,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 1,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "法治",
// num: 27,
// pageId: 20031,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2022,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 1,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "美食",
// num: 28,
// pageId: 20032,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2025,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 1,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "育儿",
// num: 29,
// pageId: 20035,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2026,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 1,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "生态",
// num: 30,
// pageId: 20036,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2023,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 1,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "时尚",
// num: 31,
// pageId: 20033,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2027,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 2,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "北京",
// num: 32,
// pageId: 20037,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2029,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 2,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "天津",
// num: 33,
// pageId: 20039,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2030,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 2,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "河北",
// num: 34,
// pageId: 20040,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2042,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 2,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "河南",
// num: 35,
// pageId: 20052,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2041,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 2,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "山东",
// num: 36,
// pageId: 20051,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2031,
// channelStrategy: 2,
// channelStyle: 2,
// channelType: 2,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "山西",
// num: 37,
// pageId: 20041,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2032,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 2,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "内蒙古",
// num: 38,
// pageId: 20042,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2033,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 2,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "辽宁",
// num: 39,
// pageId: 20043,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2034,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 2,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "吉林",
// num: 40,
// pageId: 20044,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2035,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 2,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "黑龙江",
// num: 41,
// pageId: 20045,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2028,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 2,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "上海",
// num: 42,
// pageId: 20038,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2036,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 2,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "江苏",
// num: 43,
// pageId: 20046,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2037,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 2,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "浙江",
// num: 44,
// pageId: 20047,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2038,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 2,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "安徽",
// num: 45,
// pageId: 20048,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2039,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 2,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "福建",
// num: 46,
// pageId: 20049,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2040,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 2,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "江西",
// num: 47,
// pageId: 20050,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2045,
// channelStrategy: 2,
// channelStyle: 2,
// channelType: 2,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "广东",
// num: 48,
// pageId: 20055,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2046,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 2,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "广西",
// num: 49,
// pageId: 20056,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2048,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 2,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "重庆",
// num: 50,
// pageId: 20058,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2049,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 2,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "四川",
// num: 51,
// pageId: 20059,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2051,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 2,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "云南",
// num: 52,
// pageId: 20061,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2050,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 2,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "贵州",
// num: 53,
// pageId: 20060,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2044,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 2,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "湖南",
// num: 54,
// pageId: 20054,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2043,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 2,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "湖北",
// num: 55,
// pageId: 20053,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2052,
// channelStrategy: 2,
// channelStyle: 2,
// channelType: 2,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "西藏",
// num: 56,
// pageId: 20062,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2057,
// channelStrategy: 2,
// channelStyle: 2,
// channelType: 2,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "新疆",
// num: 57,
// pageId: 20067,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2053,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 2,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "陕西",
// num: 58,
// pageId: 20063,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2054,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 2,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "甘肃",
// num: 59,
// pageId: 20064,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2055,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 2,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "青海",
// num: 60,
// pageId: 20065,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2056,
// channelStrategy: 2,
// channelStyle: 2,
// channelType: 2,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "宁夏",
// num: 61,
// pageId: 20066,
// pageType: "",
// underlineCColor: ""
// },
// {
// channelId: 2047,
// channelStrategy: 1,
// channelStyle: 2,
// channelType: 2,
// defaultPermitted: 0,
// delPermitted: 1,
// fontCColor: "#FFFFFF",
// fontColor: "#F9AB99",
// headlinesOn: 0,
// homeChannel: "0",
// iconCUrl: "",
// iconCUrlSize: "",
// iconUrl: "",
// iconUrlSize: "",
// localChannel: "0",
// moreChannel: "0",
// movePermitted: 1,
// myChannel: "0",
// name: "海南",
// num: 62,
// pageId: 20057,
// pageType: "",
// underlineCColor: ""
// }
// ]
// @State myChannelList: TopNavDTO [] = []
// @State moreChannelList: TopNavDTO [] = []
// @State localChannelList: TopNavDTO [] = []
dialogController: CustomDialogController | null = new CustomDialogController({
builder: ChannelDialog({
currentTopNavSelectedIndex: $currentTopNavSelectedIndex,
...
...
@@ -2005,60 +500,6 @@ struct ChannelSubscriptionLayout {
customStyle: true,
})
// topNavListHandle() {
// let defaultMyChannelList: TopNavDTO[] = []
// let handledTopNavList = [...this.topNavList]
// handledTopNavList.sort((a, b) => {
// return a.num - b.num;
// });
// handledTopNavList.forEach(item => {
// if (item.defaultPermitted === 1 || item.movePermitted === 0 || item.delPermitted === 0 || item.headlinesOn === 1) {
// defaultMyChannelList.push(item);
// }
// })
// defaultMyChannelList.forEach(item => {
// item.myChannel = '1'
// if (item.defaultPermitted === 1) {
// item.homeChannel = '1'
// }
// let index = handledTopNavList.findIndex(_item => _item.channelId === item.channelId)
// if (index !== -1) {
// handledTopNavList.splice(index, 1)
// }
// })
//
// handledTopNavList.unshift(...defaultMyChannelList)
// handledTopNavList.forEach((item, index) => {
// if (item.channelType === 2) {
// item.localChannel = '1'
// }
// if (index >= 11) {
// if (item.channelType === 1) {
// item.moreChannel = '1'
// }
// } else {
// if (item.channelType === 1 && item.myChannel !== '1') {
// item.moreChannel = '1'
// }
// }
//
// if (item.myChannel === '1') {
// this.myChannelList.push(item)
// }
// if (item.moreChannel === '1') {
// this.moreChannelList.push(item)
// }
// if (item.localChannel === '1') {
// this.localChannelList.push(item)
// }
// })
// }
aboutToAppear() {
// this.topNavListHandle()
}
aboutToDisappear() {
this.dialogController = null // 将dialogController置空
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/EditUserInfoPage.ets
View file @
c1a39db
...
...
@@ -17,8 +17,11 @@ struct EditUserInfoPage {
dialogController: CustomDialogController = new CustomDialogController({
builder: AreaPickerDialog({dataSource:this.dataSource,
confirmCallback:(area:string)=>{
this.currentUserInfo.userExtend.city = area;
confirmCallback:(province:string,city:string,county:string,address:string)=>{
this.currentUserInfo.userExtend.province = province;
this.currentUserInfo.userExtend.city = city;
this.currentUserInfo.userExtend.county = county;
this.currentUserInfo.userExtend.address = address;
this.currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_region
this.updateEditModel()
}
...
...
@@ -100,6 +103,8 @@ struct EditUserInfoPage {
.width('100%')
.onClick(()=>{
if (i === 1){
let params: editModelParams = {
editContent: this.currentUserInfo.userName
}
...
...
@@ -129,7 +134,7 @@ struct EditUserInfoPage {
range:['女','男'],
selected:0,
onAccept:(value:TextPickerResult) => {
this.currentUserInfo.userExtend.sex = value.index
.toString()
;
this.currentUserInfo.userExtend.sex = value.index
as number
;
this.currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_sex
this.updateEditModel()
}
...
...
@@ -163,11 +168,12 @@ struct EditUserInfoPage {
updateEditModel(){
this.listData = []
this.listData.push(...EditInfoViewModel.getEditListInfo(this.currentUserInfo))
EditInfoViewModel.updateUserInfo(this.currentUserInfo)
}
getAccountOwnerInfo(){
EditInfoViewModel.queryAccountOwnerInfo(1,getContext(this)).then((editModel) => {
this.headerImg = editModel.userExtend.headPhotoUrl
this.currentUserInfo = editModel;
this.currentUserInfo = editModel
as editModel
;
this.listData.push(...EditInfoViewModel.getEditListInfo(editModel))
});
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/PageComponent.ets
View file @
c1a39db
...
...
@@ -78,6 +78,7 @@ export struct PageComponent {
}
}
}
.scrollBar(BarState.Off)
.cachedCount(5)
.height(CommonConstants.FULL_PARENT)
.onScrollIndex((start: number, end: number) => {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/areaPickerDialog/AreaPickerDialog.ets
View file @
c1a39db
...
...
@@ -13,7 +13,7 @@ export struct AreaPickerDialog {
title: string = '地区选择'
@Provide dataSource: AreaListModel[] = []
result: JSON[] = [];
confirmCallback: (
area
:string) => void = () => {
confirmCallback: (
province:string,city:string,county:string,address
:string) => void = () => {
}
build() {
...
...
@@ -37,7 +37,7 @@ export struct AreaPickerDialog {
Button('确定',{type:ButtonType.Normal})
.onClick(()=> {
this.controller.close()
this.confirmCallback(this.currentFirst.label+this.currentSecondBean.label+this.currentThirdBean.label);
this.confirmCallback(this.currentFirst.label
,this.currentSecondBean.label,this.currentThirdBean.label,this.currentFirst.label
+this.currentSecondBean.label+this.currentThirdBean.label);
})
.backgroundColor(0xffffff)
.fontColor(Color.Blue)
...
...
sight_harmony/features/wdComponent/src/main/ets/model/EditInfoModel.ets
View file @
c1a39db
...
...
@@ -3,13 +3,13 @@
* WDEditDataModelType 更新资料类型
*/
export const enum WDEditDataModelType {
WDEditDataModelType_default, //默认不修改
WDEditDataModelType_default
= 0
, //默认不修改
WDEditDataModelType_head, //头像
WDEditDataModelType_nickname, //昵称
WDEditDataModelType_intro, //简介
WDEditDataModelType_sex, //性别
WDEditDataModelType_birthday, //生日
WDEditDataModelType_region
,
//地址
WDEditDataModelType_region
//地址
}
export class EditListInfo{
...
...
@@ -29,18 +29,22 @@ export class EditInfoModel{
headPhotoUrl:string = ''
//简介
introduction:string = ''
//
城市
//
省
city:string = ''
//地区
//市
province:string = ''
//区
county:string = ''
//地址
address:string = ''
//生日
birthday:string = ''
//性别
sex:
string = ''
sex:
number = 0
airec:number = 0
constructor(headPhotoUrl?:string , introduction?:string,city?:string , county?:string,birthday?:string , sex?:
string
,airec?:number) {
constructor(headPhotoUrl?:string , introduction?:string,city?:string , county?:string,birthday?:string , sex?:
number
,airec?:number) {
}
}
...
...
@@ -55,9 +59,9 @@ export class editModel{
userExtend:EditInfoModel = new EditInfoModel()
editDataType:
WDEditDataModelType = 0
editDataType:
number = WDEditDataModelType.WDEditDataModelType_default
constructor(userName?:string , userNameStatus?:string,phone?:string , headPhotoStatus?:string,userExtend?:EditInfoModel,editDataType?:
WDEditDataModelType
) {
constructor(userName?:string , userNameStatus?:string,phone?:string , headPhotoStatus?:string,userExtend?:EditInfoModel,editDataType?:
number
) {
}
}
...
...
@@ -72,9 +76,24 @@ export interface editModelParams {
city?:string;
county?:string;
province?:string;
address?:string;
//生日
birthday?:string;
//性别
sex?:string;
}
export interface editItem{
code:number
data:editModel
message:string
success:boolean
timestamp:number
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/viewmodel/EditInfoViewModel.ets
View file @
c1a39db
import { EditInfoModel, EditListInfo, editModel, editModelParams, WDEditDataModelType } from '../model/EditInfoModel';
import {
editItem,
EditListInfo, editModel, editModelParams, WDEditDataModelType } from '../model/EditInfoModel';
import HashMap from '@ohos.util.HashMap';
import { HttpUrlUtils, ResponseDTO, WDHttp } from 'wdNetwork';
import { Logger, ResourcesUtils } from 'wdKit';
import { AreaListManageModel, AreaListModel } from '../model/AreaListModel';
import promptAction from '@ohos.promptAction';
const TAG = "EditInfoViewModel"
class EditInfoViewModel {
private static instance: EditInfoViewModel;
editListData:EditListInfo[] = []
editListData:EditListInfo[] = []
params: editModelParams = {}
/**
* 单例模式
* @returns
...
...
@@ -23,38 +27,38 @@ class EditInfoViewModel {
BaseGetRequest(requestUrl:string){
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders()
requestUrl = HttpUrlUtils.HOST_SIT + requestUrl
return WDHttp.get<ResponseDTO>(requestUrl,headers)
requestUrl = HttpUrlUtils.getHost() + requestUrl
return WDHttp.get<editItem>(requestUrl,headers)
}
BaseP
OSTRequest(requestUrl:string
){
BaseP
ostRequest(requestUrl:string,params: object
){
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders()
requestUrl = HttpUrlUtils.HOST_SIT + requestUrl
return WDHttp.post<ResponseDTO>(requestUrl,headers)
requestUrl = HttpUrlUtils.getHost() + requestUrl
return WDHttp.post<ResponseDTO>(requestUrl,params,headers)
}
getEditListInfo(item?:editModel):EditListInfo[]{
this.editListData = [
new EditListInfo('昵称',item&&item.userName.length > 0?item.userName:'待完善'),
new EditListInfo('简介',item&&item.userExtend.introduction.length > 0?item.userExtend.introduction:'待完善'),
new EditListInfo('地区',item&&item.userExtend.city.length > 0?item.userExtend.city:'待完善'),
new EditListInfo('生日',item&&item.userExtend.birthday.length > 0?item.userExtend.birthday:'待完善'),
new EditListInfo('性别',item&&item.userExtend.sex.length > 0?(item.userExtend.sex=== '1'?'男':'女'):'待完善'),]
new EditListInfo('简介',item&&item.userExtend.introduction?item.userExtend.introduction:'待完善'),
new EditListInfo('地区',item&&item.userExtend.address?item.userExtend.address:'待完善'),
new EditListInfo('生日',item&&item.userExtend.birthday?item.userExtend.birthday:'待完善'),
new EditListInfo('性别',item?(item.userExtend.sex === 1?'男':'女'):'待完善'),]
return this.editListData
}
///1普通用户
queryAccountOwnerInfo(userType:number, context: Context):PromiseLike<editModel>{
return new Promise(((success, error) => {
this.BaseGetRequest(userType == 1?HttpUrlUtils.APPOINTMENT_QueryUserDetail_PATH:HttpUrlUtils.APPOINTMENT_AccountOwner_PATH).then((navResDTO:ResponseDTO) =>{
if (navResDTO.code == 200) {
// let editM = navResDTO.data as EditInfoModel
// success(JSON.parse(navResDTO.data)
this.BaseGetRequest(userType == 1?HttpUrlUtils.APPOINTMENT_QueryUserDetail_PATH:HttpUrlUtils.APPOINTMENT_AccountOwner_PATH).then((editDTO:editItem) =>{
if (editDTO.code == 0) {
success(editDTO.data)
}else {
success(this.GetqueryAccountOwnerLocal(context))
}
success(this.GetqueryAccountOwnerLocal(context))
}).catch((error: Error) => {
Logger.info(
'EditInfoViewModel','EditInfoViewModel
','EditInfoViewModel')
Logger.info(
TAG,'queryAccountOwnerInfo
','EditInfoViewModel')
success(this.GetqueryAccountOwnerLocal(context))
})
}))
...
...
@@ -74,15 +78,14 @@ class EditInfoViewModel {
getAreaList(context: Context):PromiseLike<AreaListModel[]>{
return new Promise((success, error) => {
success(this.getAreaListLocal(context))
//
this.BaseGetReque
st(HttpUrlUtils.APPOINTMENT_AccountOwner_PATH).then((navResDTO:ResponseDTO) =>{
//
HttpRequest.po
st(HttpUrlUtils.APPOINTMENT_AccountOwner_PATH).then((navResDTO:ResponseDTO) =>{
// if (navResDTO.code == 200) {
// // let editM = navResDTO.data as EditInfoModel
// // success(JSON.parse(navResDTO.data)
// }
//
// }).catch((error: Error) => {
// Logger.info('EditInfoViewModel','EditInfoViewModel','EditInfoViewModel')
// success(this.GetqueryAccountOwnerLocal(context))
// Logger.info(TAG,'getAreaList','EditInfoViewModel')
// success(this.getAreaListLocal(context))
//
// })
})
...
...
@@ -103,34 +106,35 @@ class EditInfoViewModel {
return new AreaListManageModel(item.code,item.id,item.label,item.children)
}
// updateUserInfo(item?:editModel):Promise<ResponseDTO> {
// let params: editModelParams = {};
// if (item.editDataType === WDEditDataModelType.WDEditDataModelType_head) {
// // params =
// } else if (item.editDataType === WDEditDataModelType.WDEditDataModelType_nickname) {
// params = { userName: item.userName }
// } else if (item.editDataType === WDEditDataModelType.WDEditDataModelType_intro) {
// params = { introduction: item.userExtend.introduction }
// } else if (item.editDataType === WDEditDataModelType.WDEditDataModelType_sex) {
// params = { sex: item.userExtend.sex }
// } else if (item.editDataType === WDEditDataModelType.WDEditDataModelType_birthday) {
// params = { birthday: item.userExtend.birthday }
// } else if (item.editDataType === WDEditDataModelType.WDEditDataModelType_region) {
// params = { county: item.userExtend.county }
// } else {
// }
// return new Promise((success, error) => {
// this.BasePOSTRequest(HttpUrlUtils.APPOINTMENT_editUserDetail_PATH)
// .then((navResDTO: ResponseDTO) => {
// if (navResDTO.code == 200) {
// }
// })
// .catch((error: Error) => {
//
// })
// })
// }
updateUserInfo(item:editModel):Promise<ResponseDTO> {
if (item.editDataType == WDEditDataModelType.WDEditDataModelType_head) {
} else if (item.editDataType == WDEditDataModelType.WDEditDataModelType_nickname) {
this.params = { userName: item.userName }
}
else if (item.editDataType == WDEditDataModelType.WDEditDataModelType_intro) {
this.params = { introduction: item.userExtend.introduction }
} else if (item.editDataType == WDEditDataModelType.WDEditDataModelType_sex) {
this.params = { sex: item.userExtend.sex.toString() }
} else if (item.editDataType == WDEditDataModelType.WDEditDataModelType_birthday) {
this.params = { birthday: item.userExtend.birthday }
} else if (item.editDataType == WDEditDataModelType.WDEditDataModelType_region) {
this.params = {province:item.userExtend.province,city:item.userExtend.city, county: item.userExtend.county ,address:item.userExtend.address}
}
return new Promise((success, error) => {
this.BasePostRequest(HttpUrlUtils.APPOINTMENT_editUserDetail_PATH,this.params)
.then((navResDTO: ResponseDTO) => {
if (navResDTO.code == 0) {
promptAction.showToast({ message: '修改成功' })
}
})
.catch((error: Error) => {
Logger.info(TAG,'updateUserInfo','EditInfoViewModel')
})
})
}
}
const editInfoViewModel = EditInfoViewModel.getInstance();
...
...
Please
register
or
login
to post a comment