yangchenggong1_wd

fix:bug[17349] UI还原问题-【uat】进入重置密码页,鸿蒙显示设置密码,android显示重置密码

1 import { ContentDTO } from 'wdBean/Index' 1 import { ContentDTO } from 'wdBean/Index'
2 import { StringUtils, UserDataLocal } from 'wdKit/Index' 2 import { StringUtils, UserDataLocal } from 'wdKit/Index'
3 -import { ProcessUtils } from 'wdRouter/Index'  
4 import MinePageDatasModel from '../../../model/MinePageDatasModel' 3 import MinePageDatasModel from '../../../model/MinePageDatasModel'
5 import { CommentLikeOperationRequestItem } from '../../../viewmodel/CommentLikeOperationRequestItem' 4 import { CommentLikeOperationRequestItem } from '../../../viewmodel/CommentLikeOperationRequestItem'
6 import { CommentListItem } from '../../../viewmodel/CommentListItem' 5 import { CommentListItem } from '../../../viewmodel/CommentListItem'
7 import measure from '@ohos.measure' 6 import measure from '@ohos.measure'
8 -import { TrackingContent, TrackConstants, TrackParamConvert } from 'wdTracking/Index'  
9 7
10 @Component 8 @Component
11 export struct ChildCommentComponent { 9 export struct ChildCommentComponent {
@@ -16,8 +14,6 @@ export struct ChildCommentComponent { @@ -16,8 +14,6 @@ export struct ChildCommentComponent {
16 @State isExpandParent: boolean = false; 14 @State isExpandParent: boolean = false;
17 @State isOverLines: boolean = false 15 @State isOverLines: boolean = false
18 @State isOverLinesParent: boolean = false 16 @State isOverLinesParent: boolean = false
19 - testText:string = "1,因为读书的人\n是低着头向上看的人\n身处一隅,却能放眼世界\n2,因为读书的人\n总是比不读书的人\n活得有趣一点\n3,因为读书的人\n即使平凡,绝不平庸"  
20 - @Link fromPage:number  
21 17
22 build() { 18 build() {
23 Column() { 19 Column() {
@@ -196,15 +192,6 @@ export struct ChildCommentComponent { @@ -196,15 +192,6 @@ export struct ChildCommentComponent {
196 192
197 }.height('69lpx') 193 }.height('69lpx')
198 .justifyContent(FlexAlign.Center) 194 .justifyContent(FlexAlign.Center)
199 - .onClick(() => {  
200 - let content = getParams(this.data)  
201 - if(this.fromPage === 0 ){  
202 - TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.PageName.Main_Personal,TrackConstants.PageName.Main_Personal,TrackParamConvert.program(content))  
203 - }else{  
204 - TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.PageName.Customer_Personal,TrackConstants.PageName.Customer_Personal,TrackParamConvert.program(content))  
205 - }  
206 - ProcessUtils.processPage(content)  
207 - })  
208 } 195 }
209 .margin({ top: '19lpx', bottom: '31lpx', left: '31lpx', right: '31lpx' }) 196 .margin({ top: '19lpx', bottom: '31lpx', left: '31lpx', right: '31lpx' })
210 .padding({ left: '23lpx' }) 197 .padding({ left: '23lpx' })
@@ -10,6 +10,7 @@ import { OtherUserCommentLikeStatusRequestItem } from '../../../viewmodel/OtherU @@ -10,6 +10,7 @@ import { OtherUserCommentLikeStatusRequestItem } from '../../../viewmodel/OtherU
10 import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh'; 10 import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh';
11 import { ContentDTO } from 'wdBean/Index'; 11 import { ContentDTO } from 'wdBean/Index';
12 import { TrackingContent, TrackConstants, TrackParamConvert } from 'wdTracking/Index'; 12 import { TrackingContent, TrackConstants, TrackParamConvert } from 'wdTracking/Index';
  13 +import { ProcessUtils } from 'wdRouter/Index';
13 14
14 const TAG = "HomePageBottomCommentComponent" 15 const TAG = "HomePageBottomCommentComponent"
15 16
@@ -85,10 +86,15 @@ export struct HomePageBottomCommentComponent { @@ -85,10 +86,15 @@ export struct HomePageBottomCommentComponent {
85 ChildCommentComponent({ 86 ChildCommentComponent({
86 data: item, 87 data: item,
87 levelHead: UserDataLocal.getUserLevelHeaderUrl(), 88 levelHead: UserDataLocal.getUserLevelHeaderUrl(),
88 - isLastItem: index === this.data_comment.totalCount() - 1,  
89 - fromPage:0 89 + isLastItem: index === this.data_comment.totalCount() - 1
90 }) 90 })
91 - }.onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => { 91 + }
  92 + .onClick(()=>{
  93 + let content = getParams(item)
  94 + TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.PageName.Main_Personal,TrackConstants.PageName.Main_Personal,TrackParamConvert.program(content))
  95 + ProcessUtils.processPage(content)
  96 + })
  97 + .onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => {
92 if (isVisible) { 98 if (isVisible) {
93 let contentDTO = getParams(item) 99 let contentDTO = getParams(item)
94 TrackingContent.common(TrackConstants.EventType.Show, TrackConstants.PageName.Main_Personal,TrackConstants.PageName.Main_Personal, TrackParamConvert.program(contentDTO)) 100 TrackingContent.common(TrackConstants.EventType.Show, TrackConstants.PageName.Main_Personal,TrackConstants.PageName.Main_Personal, TrackParamConvert.program(contentDTO))
@@ -10,6 +10,7 @@ import { EmptyComponent } from '../../view/EmptyComponent'; @@ -10,6 +10,7 @@ import { EmptyComponent } from '../../view/EmptyComponent';
10 import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh'; 10 import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh';
11 import { ContentDTO } from 'wdBean/Index'; 11 import { ContentDTO } from 'wdBean/Index';
12 import { TrackingContent, TrackConstants, TrackParamConvert } from 'wdTracking/Index'; 12 import { TrackingContent, TrackConstants, TrackParamConvert } from 'wdTracking/Index';
  13 +import { ProcessUtils } from 'wdRouter/Index';
13 14
14 const TAG = "HomePageBottomComponent" 15 const TAG = "HomePageBottomComponent"
15 /** 16 /**
@@ -87,9 +88,13 @@ export struct OtherHomePageBottomCommentComponent { @@ -87,9 +88,13 @@ export struct OtherHomePageBottomCommentComponent {
87 data: item, 88 data: item,
88 levelHead: this.levelHead, 89 levelHead: this.levelHead,
89 isLastItem: index === this.data_comment.totalCount() - 1, 90 isLastItem: index === this.data_comment.totalCount() - 1,
90 - fromPage:1  
91 }) 91 })
92 - }.onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => { 92 + }
  93 + .onClick(()=>{
  94 + let content = getParams(item)
  95 + TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.PageName.Customer_Personal,TrackConstants.PageName.Customer_Personal,TrackParamConvert.program(content))
  96 + ProcessUtils.processPage(content)
  97 + }).onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => {
93 if (isVisible) { 98 if (isVisible) {
94 let contentDTO = getParams(item) 99 let contentDTO = getParams(item)
95 TrackingContent.common(TrackConstants.EventType.Show, TrackConstants.PageName.Customer_Personal,TrackConstants.PageName.Customer_Personal, TrackParamConvert.program(contentDTO)) 100 TrackingContent.common(TrackConstants.EventType.Show, TrackConstants.PageName.Customer_Personal,TrackConstants.PageName.Customer_Personal, TrackParamConvert.program(contentDTO))
@@ -4,10 +4,7 @@ import { LoginViewModel } from './LoginViewModel' @@ -4,10 +4,7 @@ import { LoginViewModel } from './LoginViewModel'
4 import router from '@ohos.router' 4 import router from '@ohos.router'
5 import { WDRouterRule, WDRouterPage } from 'wdRouter'; 5 import { WDRouterRule, WDRouterPage } from 'wdRouter';
6 import { SettingPasswordParams } from './SettingPasswordPage' 6 import { SettingPasswordParams } from './SettingPasswordPage'
7 -import { Router } from '@ohos.arkui.UIContext'  
8 -import { CustomToast, EmitterEventId, EmitterUtils, NetworkUtil, SPHelper, StringUtils, ToastUtils } from 'wdKit/Index'  
9 -import { SpConstants } from 'wdConstant/Index'  
10 -import { emitter } from '@kit.BasicServicesKit' 7 +import { CustomToast, NetworkUtil,StringUtils } from 'wdKit/Index'
11 8
12 9
13 const TAG = 'ForgetPasswordPage' 10 const TAG = 'ForgetPasswordPage'
@@ -24,6 +21,7 @@ struct ForgetPasswordPage { @@ -24,6 +21,7 @@ struct ForgetPasswordPage {
24 @State @Watch('onCodeSend') isCodeSend: boolean = false //验证码点击发送事件 21 @State @Watch('onCodeSend') isCodeSend: boolean = false //验证码点击发送事件
25 @State params:Record<string, number> = router.getParams() as Record<string, number>;//登录 密码登录 填写手机号 点击忘记密码 带过来手机号 22 @State params:Record<string, number> = router.getParams() as Record<string, number>;//登录 密码登录 填写手机号 点击忘记密码 带过来手机号
26 @State pageTitle:string = '找回密码'; 23 @State pageTitle:string = '找回密码';
  24 + @State isForgetPassword: number = 0 //是否是登录页忘记密码过来的,标题不一样
27 @State codeStateSuccess:boolean=false 25 @State codeStateSuccess:boolean=false
28 onCodeSend() { 26 onCodeSend() {
29 if (this.isCodeSend) { 27 if (this.isCodeSend) {
@@ -31,10 +29,6 @@ struct ForgetPasswordPage { @@ -31,10 +29,6 @@ struct ForgetPasswordPage {
31 } 29 }
32 } 30 }
33 31
34 -  
35 -  
36 -  
37 -  
38 @State toastText:string = "" 32 @State toastText:string = ""
39 dialogToast: CustomDialogController = new CustomDialogController({ 33 dialogToast: CustomDialogController = new CustomDialogController({
40 builder: CustomToast({ 34 builder: CustomToast({
@@ -87,6 +81,7 @@ struct ForgetPasswordPage { @@ -87,6 +81,7 @@ struct ForgetPasswordPage {
87 let phone = "" 81 let phone = ""
88 if(this.params){ 82 if(this.params){
89 phone = this.params['phone']+ "" 83 phone = this.params['phone']+ ""
  84 + this.isForgetPassword = this.params['isForgetPassword']
90 } 85 }
91 if(StringUtils.isNotEmpty(phone) && phone.indexOf("****") === -1){ 86 if(StringUtils.isNotEmpty(phone) && phone.indexOf("****") === -1){
92 this.phoneContent = phone 87 this.phoneContent = phone
@@ -157,7 +152,8 @@ struct ForgetPasswordPage { @@ -157,7 +152,8 @@ struct ForgetPasswordPage {
157 pageID:'1', 152 pageID:'1',
158 phoneContent:this.phoneContent, 153 phoneContent:this.phoneContent,
159 codeContent:this.codeContent, 154 codeContent:this.codeContent,
160 - pageType:1 155 + pageType:1,
  156 + isForgetPassword:this.isForgetPassword
161 } 157 }
162 WDRouterRule.jumpWithPage(WDRouterPage.settingPasswordPage, params) 158 WDRouterRule.jumpWithPage(WDRouterPage.settingPasswordPage, params)
163 }).catch((message: string)=>{ 159 }).catch((message: string)=>{
@@ -171,7 +167,8 @@ struct ForgetPasswordPage { @@ -171,7 +167,8 @@ struct ForgetPasswordPage {
171 pageID:'1', 167 pageID:'1',
172 phoneContent:this.phoneContent, 168 phoneContent:this.phoneContent,
173 codeContent:this.codeContent, 169 codeContent:this.codeContent,
174 - pageType:0 170 + pageType:0,
  171 + isForgetPassword:this.isForgetPassword
175 } 172 }
176 WDRouterRule.jumpWithReplacePage(WDRouterPage.settingPasswordPage, params) 173 WDRouterRule.jumpWithReplacePage(WDRouterPage.settingPasswordPage, params)
177 174
@@ -177,10 +177,11 @@ struct LoginPage { @@ -177,10 +177,11 @@ struct LoginPage {
177 .onClick(() => { 177 .onClick(() => {
178 TrackingButton.click("loginPageForgotPassword",TrackConstants.PageName.Login_Page,TrackConstants.PageName.Login_Page) 178 TrackingButton.click("loginPageForgotPassword",TrackConstants.PageName.Login_Page,TrackConstants.PageName.Login_Page)
179 if(StringUtils.isNotEmpty(this.accountContent) && StringUtils.photoMatch(this.accountContent)){ 179 if(StringUtils.isNotEmpty(this.accountContent) && StringUtils.photoMatch(this.accountContent)){
180 - let pageType = { 'phone': Number(this.accountContent) } as Record<string, number>; 180 + let pageType = { 'phone': Number(this.accountContent),'isForgetPassword':1 } as Record<string, number>;
181 WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage, pageType) 181 WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage, pageType)
182 }else{ 182 }else{
183 - WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage) 183 + let pageType = {'isForgetPassword':1 } as Record<string, number>;
  184 + WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage,pageType)
184 } 185 }
185 }) 186 })
186 } 187 }
@@ -18,6 +18,7 @@ export interface SettingPasswordParams { @@ -18,6 +18,7 @@ export interface SettingPasswordParams {
18 codeContent?: string; 18 codeContent?: string;
19 tempToken?:string; 19 tempToken?:string;
20 pageType?:number; //0、登录->忘记密码 1、设置->重置密码 20 pageType?:number; //0、登录->忘记密码 1、设置->重置密码
  21 + isForgetPassword?:number
21 } 22 }
22 23
23 export default class AccoutPageDataModel { 24 export default class AccoutPageDataModel {
@@ -107,6 +108,17 @@ export struct SettingPasswordPage { @@ -107,6 +108,17 @@ export struct SettingPasswordPage {
107 let params:SettingPasswordParams = router.getParams() as SettingPasswordParams; 108 let params:SettingPasswordParams = router.getParams() as SettingPasswordParams;
108 this.pageId = parseInt(params.pageID); 109 this.pageId = parseInt(params.pageID);
109 this.getPageListData(this.pageId) 110 this.getPageListData(this.pageId)
  111 + if(params){
  112 + if(params.isForgetPassword === 1){
  113 + this.listData.forEach((item) => {
  114 + if (item.compType === 0) {
  115 + item.compTitle = "重置密码"
  116 + }
  117 + })
  118 + }
  119 + }
  120 +
  121 +
110 122
111 this.phoneContent = params.phoneContent!; 123 this.phoneContent = params.phoneContent!;
112 this.codeContent = params.codeContent!; 124 this.codeContent = params.codeContent!;
@@ -151,8 +163,6 @@ export struct SettingPasswordPage { @@ -151,8 +163,6 @@ export struct SettingPasswordPage {
151 this.getTitleCell(item, HorizontalAlign.Start) 163 this.getTitleCell(item, HorizontalAlign.Start)
152 } else if (item.compType == 1) { 164 } else if (item.compType == 1) {
153 this.getPasswordCell(item) 165 this.getPasswordCell(item)
154 - } else if (item.compType == 2) {  
155 - this.getCodeCell(item)  
156 } else if (item.compType == 3) { 166 } else if (item.compType == 3) {
157 if (index == this.listData.length - 1) { 167 if (index == this.listData.length - 1) {
158 this.getDescCell(item, HorizontalAlign.Center) 168 this.getDescCell(item, HorizontalAlign.Center)
@@ -161,18 +171,12 @@ export struct SettingPasswordPage { @@ -161,18 +171,12 @@ export struct SettingPasswordPage {
161 } 171 }
162 } else if (item.compType == 4) { 172 } else if (item.compType == 4) {
163 this.getButtonCell(item) 173 this.getButtonCell(item)
164 - } else if (item.compType == 5) {  
165 - this.getLogoCell(item)  
166 - } else if (item.compType == 7) {  
167 - this.getPhoneCell(item)  
168 - } else {  
169 - Text('' + item.compType)  
170 } 174 }
171 } 175 }
172 }) 176 })
173 } 177 }
174 }.width('100%') 178 }.width('100%')
175 - .padding('30lpx') 179 + .padding({ left:"31lpx",right:"31lpx",top:"131lpx" })
176 .height('100%') 180 .height('100%')
177 } 181 }
178 182