From 195e42f50ee46e331cff0f50077a25c6cb6872c1 Mon Sep 17 00:00:00 2001 From: xiaoxiao Date: Wed, 4 Jun 2025 11:19:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/ets/Views/HeroPopWindow.ets | 76 ++++++------- .../src/main/ets/constants/BasicConstant.ets | 5 +- .../basic/src/main/ets/utils/ChangeUtil.ets | 4 + .../src/main/ets/view/ChangePasswordComp.ets | 15 ++- .../src/main/ets/view/ChangePhoneComp.ets | 13 +-- .../src/main/ets/view/ChooseEmailComp.ets | 17 +-- .../src/main/ets/view/ForgetPasswordComp.ets | 103 +++++++++++++----- .../mypage/src/main/ets/view/FourSection.ets | 25 ++++- .../mypage/src/main/ets/view/HeaderView.ets | 38 ++++--- .../resources/base/media/login_password.png | Bin 0 -> 1214 bytes 10 files changed, 176 insertions(+), 120 deletions(-) create mode 100644 features/mypage/src/main/resources/base/media/login_password.png diff --git a/commons/basic/src/main/ets/Views/HeroPopWindow.ets b/commons/basic/src/main/ets/Views/HeroPopWindow.ets index eb657bc..8e7a370 100644 --- a/commons/basic/src/main/ets/Views/HeroPopWindow.ets +++ b/commons/basic/src/main/ets/Views/HeroPopWindow.ets @@ -9,21 +9,23 @@ interface DefaultData { } +@Preview @CustomDialog export struct HeroPopWindow { @Prop heroId:string = ''; @State detailsData:object = new Object; - private years: string[] = ['2019年英雄榜','2018年英雄榜','2017年英雄榜','2016年英雄榜','2015年英雄榜']; controller: CustomDialogController; - heroDetailsRequestUrl:string = BasicConstant.urlExpertAPI+'gethonorDetail' - hashMap: HashMap = new HashMap(); + aboutToAppear(): void { + this.updateHeroDetailsAction(); + } updateHeroDetailsAction(){ - this.hashMap.set('id',this.heroId); - hdHttp.httpReq(this.heroDetailsRequestUrl,this.hashMap).then(async (res: HdResponse) => { + const hashMap: HashMap = new HashMap(); + hashMap.set('id',this.heroId); + hdHttp.httpReq(BasicConstant.gethonorDetail,hashMap).then(async (res: HdResponse) => { let json:RequestDefaultModel = JSON.parse(res+'') as RequestDefaultModel; - if(json.code=='1') { + if(json.code == '1') { this.detailsData = json.data; } else { console.error('英雄榜失败:'+json.message) @@ -36,39 +38,37 @@ export struct HeroPopWindow { build() { Stack() { - //半透明黑色背景 Column().width('100%').height('100%').backgroundColor('#50000000') - //弹窗主体 Column() { - //头部图标 - Image($r('app.media.heroPop_headericon')) - .width(80) - .height(80) + Image(BasicConstant.urlImage+this.detailsData['img']) + .alt($r('app.media.heroPop_headericon')) + .width(90) + .height(90) .margin({top:-25}) .zIndex(2) - //标题和正文范围 + Column() { - Text('肝胆英雄榜') - .fontSize(20) - .fontColor('#673986') + Text(this.detailsData['title']) + .fontSize(16) + .fontColor('#DA57E5') .margin({top:20}) Grid() { - ForEach(this.years,(item:string)=>{ + ForEach(this.detailsData['honorlist'],(item:Record)=>{ GridItem({style:GridItemStyle.PLAIN}) { - Text(item) - .fontSize(10) - .fontColor(Color.Black) - .backgroundColor(Color.White) // 添加背景色确保可见 + Text(item.nick_name) + .fontSize(12) + .fontColor('#DA57E5') + .backgroundColor(Color.White) .textAlign(TextAlign.Center) - .width('100%') // 确保文本容器宽度 + .width('100%').height('100%') } .height(20) .width('48%') - .padding(5) - .borderRadius(10) + // .padding(5) + .borderRadius(5) .borderWidth(1) - .borderColor(Color.Red) + .borderColor('#DA57E5') }) } .columnsGap(10) @@ -76,15 +76,14 @@ export struct HeroPopWindow { .padding(10) .width('100%') .height('auto') - Text('感谢有您,一路相伴。"肝胆英雄榜"是由国内最具影响力的肝胆病互联网线上服务平台-\n' + - '肝胆相照依据肝胆病医生在各自领域年度所做工作,综合评选出来的最认可的"肝胆好医生",授予证书并赠送精美感恩好礼。\n' + - '目前"肝胆英雄榜"荣誉包括:"护肝大使"护肝新量""公益之星""科普达入"、"视频之星"、"人气科室"及"宣传之星"等。') - .fontSize(12) - .fontColor('#666666') + + Text(this.detailsData['note']) + .fontSize(14) + .fontColor('#333333') .textAlign(TextAlign.Start) .lineHeight(20) .width('90%') - .margin({bottom:10}) + .margin({top:5,bottom:10}) } .zIndex(1) .margin({top:-10,bottom:10}) @@ -94,15 +93,12 @@ export struct HeroPopWindow { .height('auto') .width('90%') - //删除按钮 - Button() { - Image($r('app.media.heropop_delete')) - .width(30) - .height(30) - } - .zIndex(3) - .position({ x: '88%', y: 10 }) - .onClick(() => this.controller.close()) + Image($r('app.media.heropop_delete')) + .width(30) + .height(30) + .zIndex(3) + .position({ x: '88%', y: 10 }) + .onClick(() => this.controller.close()) } .width('90%') .backgroundImage($r('app.media.heroPop_bg')) diff --git a/commons/basic/src/main/ets/constants/BasicConstant.ets b/commons/basic/src/main/ets/constants/BasicConstant.ets index 9468341..92833db 100644 --- a/commons/basic/src/main/ets/constants/BasicConstant.ets +++ b/commons/basic/src/main/ets/constants/BasicConstant.ets @@ -38,7 +38,10 @@ export class BasicConstant { static readonly videoByKeyWordsNew = BasicConstant.urlExpertApp + "videoByKeyWordsNew"; static readonly tagList = BasicConstant.urlExpertApp + "tagList"; static readonly meetingListBySearch = BasicConstant.urlExpertAPI + "meetingListBySearch"; - static readonly videoBySearchNew = BasicConstant.urlExpertApp+'videoBySearchNew'//搜索肝胆视频列表 + static readonly videoBySearchNew = BasicConstant.urlExpertApp+'videoBySearchNew';//搜索肝胆视频列表 + static readonly myData = BasicConstant.urlExpertAPI+'my'; + static readonly gethonorDetail = BasicConstant.urlExpertAPI+'gethonorDetail'; + static readonly updatePwd = BasicConstant.urlExpertAPI+'updatePwd' static readonly province=['全国','北京市','天津市','河北省','山西省' ,'内蒙古自治区','辽宁省','吉林省','黑龙江省','上海市','江苏省','浙江省' diff --git a/commons/basic/src/main/ets/utils/ChangeUtil.ets b/commons/basic/src/main/ets/utils/ChangeUtil.ets index f660514..e8f0afe 100644 --- a/commons/basic/src/main/ets/utils/ChangeUtil.ets +++ b/commons/basic/src/main/ets/utils/ChangeUtil.ets @@ -58,6 +58,10 @@ export class ChangeUtil { return reg2.test(password); } + static isEmail(email:string): boolean { + const reg2: RegExp = new RegExp('^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$') + return reg2.test(email); + } static async convertUriToBase64(uri: string): Promise { // 打开文件并读取数据 diff --git a/features/mypage/src/main/ets/view/ChangePasswordComp.ets b/features/mypage/src/main/ets/view/ChangePasswordComp.ets index 5468efc..775e7ee 100644 --- a/features/mypage/src/main/ets/view/ChangePasswordComp.ets +++ b/features/mypage/src/main/ets/view/ChangePasswordComp.ets @@ -1,4 +1,4 @@ -import { hdHttp, HdResponse, BasicConstant, ExpertData, authStore } from '@itcast/basic' +import { hdHttp, HdResponse, BasicConstant, ExpertData, authStore, ChangeUtil } from '@itcast/basic' import { BusinessError } from '@kit.BasicServicesKit'; import promptAction from '@ohos.promptAction'; import HashMap from '@ohos.util.HashMap'; @@ -106,24 +106,23 @@ export struct ChangePasswordComp { .borderWidth(1) .fontColor($r('app.color.main_color')) .onClick(() => { - const passwordRegex = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$/ - if (this.oldPassword.length <= 0 || !this.oldPassword) { + if (!this.oldPassword) { promptAction.showToast({message:'请输入原密码'}) return } - if (!passwordRegex.test(this.oldPassword)) { + if (!ChangeUtil.isPassword(this.oldPassword)) { promptAction.showToast({message:'原密码格式错误'}) return } - if (this.newPassword.length <= 0 || !this.newPassword) { + if (!this.newPassword) { promptAction.showToast({message:'请输入原密码'}) return } - if (!passwordRegex.test(this.newPassword)) { + if (!ChangeUtil.isPassword(this.newPassword)) { promptAction.showToast({message:'新密码格式错误'}) return } - if (this.confirmPassword.length <= 0 || !this.confirmPassword) { + if (!this.confirmPassword) { promptAction.showToast({message:'请确认新密码'}) return } @@ -131,7 +130,7 @@ export struct ChangePasswordComp { promptAction.showToast({message:'新密码与确认密码不一致'}) return } - if (!passwordRegex.test(this.confirmPassword)) { + if (!ChangeUtil.isPassword(this.confirmPassword)) { promptAction.showToast({message:'密码格式不正确,请重新输入!'}) return } diff --git a/features/mypage/src/main/ets/view/ChangePhoneComp.ets b/features/mypage/src/main/ets/view/ChangePhoneComp.ets index 7b08888..c63c2ec 100644 --- a/features/mypage/src/main/ets/view/ChangePhoneComp.ets +++ b/features/mypage/src/main/ets/view/ChangePhoneComp.ets @@ -1,4 +1,4 @@ -import { hdHttp, HdResponse, BasicConstant, ExpertData, authStore } from '@itcast/basic' +import { hdHttp, HdResponse, BasicConstant, ExpertData, authStore, ChangeUtil } from '@itcast/basic' import { BusinessError } from '@kit.BasicServicesKit'; import promptAction from '@ohos.promptAction'; import HashMap from '@ohos.util.HashMap'; @@ -130,7 +130,7 @@ export struct ChangePhoneComp { promptAction.showToast({message:'请输入手机号'}) return } - if (!EMAIL_REGEX.test(this.phoneNumber)) { + if (!ChangeUtil.isMobileNum(this.phoneNumber)) { promptAction.showToast({message:'请输入正确的手机号'}) return } @@ -154,12 +154,12 @@ export struct ChangePhoneComp { .fontSize(18) .position({x:'5%',y:'80%'}) .onClick(() => { - if (this.phoneNumber.length < 11 || !this.phoneNumber) { + if (!this.phoneNumber) { promptAction.showToast({message:'请输入手机号'}) return } - if (!EMAIL_REGEX.test(this.phoneNumber)) { - promptAction.showToast({message:'请输入正确的手机号'}) + if (!ChangeUtil.isMobileNum(this.phoneNumber)) { + promptAction.showToast({message:'手机号格式错误,请重新输入'}) return } if (!this.smsCode) { @@ -174,6 +174,3 @@ export struct ChangePhoneComp { .backgroundColor('#FFFFFF') } } - -// 手机正则表达式 -const EMAIL_REGEX = /^1[3-9][0-9]{9}$/ diff --git a/features/mypage/src/main/ets/view/ChooseEmailComp.ets b/features/mypage/src/main/ets/view/ChooseEmailComp.ets index 130bbd8..a5480c0 100644 --- a/features/mypage/src/main/ets/view/ChooseEmailComp.ets +++ b/features/mypage/src/main/ets/view/ChooseEmailComp.ets @@ -1,4 +1,4 @@ -import { hdHttp, HdResponse, BasicConstant, ExpertData, authStore } from '@itcast/basic' +import { hdHttp, HdResponse, BasicConstant, ExpertData, authStore, ChangeUtil } from '@itcast/basic' import { BusinessError } from '@kit.BasicServicesKit'; import promptAction from '@ohos.promptAction'; import { router } from '@kit.ArkUI'; @@ -66,10 +66,6 @@ export struct ChooseEmailComp { }) } - private validateEmailFormat(email: string): boolean { - return EMAIL_REGEX.test(email.trim()) - } - build() { Column() { // 手机号输入框 @@ -114,10 +110,10 @@ export struct ChooseEmailComp { .fontSize(18) .position({x:'5%',y:'80%'}) .onClick(() => { - // if (this.validateEmailFormat(this.emailString)) { - // promptAction.showToast({message:'请输入正确的邮箱格式'}) - // return - // } + if (!ChangeUtil.isEmail(this.emailString)) { + promptAction.showToast({message:'请输入正确的邮箱格式'}) + return + } this.commitEmailData(this.emailString); }) } @@ -126,6 +122,3 @@ export struct ChooseEmailComp { .backgroundColor('#FFFFFF') } } - -// 邮箱正则表达式 -const EMAIL_REGEX = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/; diff --git a/features/mypage/src/main/ets/view/ForgetPasswordComp.ets b/features/mypage/src/main/ets/view/ForgetPasswordComp.ets index 72c0aa4..68f0989 100644 --- a/features/mypage/src/main/ets/view/ForgetPasswordComp.ets +++ b/features/mypage/src/main/ets/view/ForgetPasswordComp.ets @@ -1,5 +1,21 @@ -import promptAction from '@ohos.promptAction'; import { router } from '@kit.ArkUI'; +import HashMap from '@ohos.util.HashMap'; +import { hdHttp, HdResponse, BasicConstant, ChangeUtil, authStore } from '@itcast/basic' +import { BusinessError } from '@kit.BasicServicesKit'; +import promptAction from '@ohos.promptAction'; + +interface callBackData { + code: number, + message:string, + msg:string, + data: string +} + +interface updateExtraData { + mobile: string, + password: string, + sms: string +} @Preview @Component @@ -12,7 +28,44 @@ export struct ForgetPasswordComp { @State passWordSrc1: Resource = $r('app.media.icon_forgetpassword_show'); @State passWordSrc2: Resource = $r('app.media.icon_forgetpassword'); - // 验证码倒计时 + submitData() { + if (!this.phoneNumber) { + promptAction.showToast({message:'请输入手机号'}) + return + } + if (!ChangeUtil.isMobileNum(this.phoneNumber)) { + promptAction.showToast({message:'手机号格式错误,请重新输入'}) + return + } + if (!this.smsCode) { + promptAction.showToast({message:'请输入验证码'}) + return + } + if (!this.password) { + promptAction.showToast({message:'请输入密码'}) + return + } + if (!ChangeUtil.isPassword(this.password)) { + promptAction.showToast({message:'密码格式错误,请重新输入'}) + return + } + + const hashMap: HashMap = new HashMap(); + hashMap.set('mobile',this.phoneNumber) + hashMap.set('password',this.password) + hashMap.set('sms',this.smsCode) + hdHttp.httpReq(BasicConstant.updatePwd, hashMap).then(async (res: HdResponse) => { + let json:callBackData = JSON.parse(res+'') as callBackData; + console.log('忘记密码 修改数据成功:',json); + promptAction.showToast({message:json.message}); + if (json.code === 200) { + router.back(); + } + }).catch((err: BusinessError) => { + console.error(`忘记密码 修改数据 fail: ${err}`); + }) + } + private startCountdown() { this.countdown = 60 const timer = setInterval(() => { @@ -32,7 +85,6 @@ export struct ForgetPasswordComp { .height(18) .objectFit(ImageFit.Contain) .margin({left:10}) - // 手机号输入框 TextInput({ placeholder: '请输入手机号码' }) .fontSize(16) .backgroundColor(Color.White) @@ -47,7 +99,6 @@ export struct ForgetPasswordComp { .borderWidth(1) .borderColor('#CCCCCC') - // 验证码输入区域 Row() { Row() { Image($r('app.media.icon_verification_code')) @@ -58,6 +109,9 @@ export struct ForgetPasswordComp { TextInput({ placeholder: '请输入验证码' }) .fontSize(16) .backgroundColor(Color.White) + .onChange((value:string)=>{ + this.smsCode = value; + }) } .margin({ top: 10 }) .width('60%') @@ -80,10 +134,10 @@ export struct ForgetPasswordComp { .margin({ top: 10 }) .enabled(this.countdown === 0) .onClick(() => { - if (this.phoneNumber.length >= 11) { + if (ChangeUtil.isMobileNum(this.phoneNumber)) { this.startCountdown() } else { - promptAction.showToast({message:'请输入手机号'}) + promptAction.showToast({message:'手机号格式错误,请重新输入'}) } }) } @@ -91,18 +145,26 @@ export struct ForgetPasswordComp { .justifyContent(FlexAlign.SpaceBetween) Row() { - Image($r('app.media.icon_forgetpassword_show')) + Image($r('app.media.login_password')) .width(18) .height(18) .objectFit(ImageFit.Contain) .margin({left:10}) - // 密码输入框 TextInput({ placeholder: '6~16位数字字母组合' }) .fontSize(16) - .width('95%') + .width('83%') .backgroundColor(Color.White) - .type(this.showPassword ? InputType.Normal : InputType.Password) - .passwordIcon({ onIconSrc: this.passWordSrc1, offIconSrc: this.passWordSrc2 }) + .showPasswordIcon(false) + .type(this.showPassword?InputType.Normal:InputType.Password) + .onChange((value:string)=>{ + this.password = value; + }) + Image(this.showPassword?this.passWordSrc1:this.passWordSrc2) + .width(20) + .height(15) + .onClick(()=>{ + this.showPassword = !this.showPassword; + }) } .margin({ top: 10 }) .width('95%') @@ -111,7 +173,6 @@ export struct ForgetPasswordComp { .borderWidth(1) .borderColor('#CCCCCC') - // 登录按钮 Button({type:ButtonType.Normal}){ Text('登 录') } @@ -123,23 +184,7 @@ export struct ForgetPasswordComp { .fontColor('#FFFFFF') .fontSize(18) .onClick(() => { - // 处理登录逻辑 - if (!/^1[3-9]\d{9}$/.test(this.phoneNumber)) { - promptAction.showToast({message:'请输入有效手机号'}) - return - } - - if (!this.smsCode) { - promptAction.showToast({message:'请输入验证码'}) - return - } - - if (!/^(?=.*[a-zA-Z])(?=.*\d)[\w]{6,16}$/.test(this.password)) { - promptAction.showToast({message:'密码格式不正确'}) - return - } - - // 执行登录操作... + this.submitData(); }) } .width('100%') diff --git a/features/mypage/src/main/ets/view/FourSection.ets b/features/mypage/src/main/ets/view/FourSection.ets index f7f387d..676b60c 100644 --- a/features/mypage/src/main/ets/view/FourSection.ets +++ b/features/mypage/src/main/ets/view/FourSection.ets @@ -16,10 +16,15 @@ export struct FourSection { @State refreshFlag: boolean = false; @State fourSectionList:Array = [ - new MyPageSectionClass('oneItem',$r('app.media.app_icon'),'微信绑定',''), - new MyPageSectionClass('twoItem',$r('app.media.my_page_choosePhone'),'更换手机号','pages/MinePage/ChangePhonePage'), - new MyPageSectionClass('threeItem',this.pushIconPath,this.pushStatus,''), - new MyPageSectionClass('fourItem',$r('app.media.my_page_version'),'发现新版本','') + // new MyPageSectionClass('oneItem',$r('app.media.app_icon'),'微信绑定',''), + // new MyPageSectionClass('twoItem',$r('app.media.my_page_choosePhone'),'更换手机号','pages/MinePage/ChangePhonePage'), + // new MyPageSectionClass('threeItem',this.pushIconPath,this.pushStatus,''), + // new MyPageSectionClass('fourItem',$r('app.media.my_page_version'),'发现新版本','') + + new MyPageSectionClass('oneItem',$r('app.media.my_page_choosePhone'),'更换手机号','pages/MinePage/ChangePhonePage'), + new MyPageSectionClass('twoItem',this.pushIconPath,this.pushStatus,''), + new MyPageSectionClass('threeItem',$r('app.media.app_icon'),'关于','pages/WebView/WebPage'), + new MyPageSectionClass('fourItem',$r('app.media.app_icon'),'直播群','pages/WebView/WebPage') ]; aboutToAppear() { @@ -54,7 +59,7 @@ export struct FourSection { this.pushIconPath = this.pushStatus == '通知已开'?$r('app.media.my_page_message_on'):$r('app.media.my_home_push_down'); // 更新数组中的标题 this.fourSectionList = this.fourSectionList.map((item, index) => { - if (index === 2) { + if (index === 1) { return new MyPageSectionClass(item.id, this.pushIconPath, this.pushStatus, item.path); } return item; @@ -102,6 +107,16 @@ export struct FourSection { .onClick(()=>{ if (item.title.includes('通知')) { this.handleNotificationClick(); + } else if (item.title.includes('关于')) { + router.pushUrl({ + url:item.path, + params: { url: 'http://doc.igandan.com/app/html/about/2017/about2.html' ,title:'关于肝胆相照'} + }) + } else if (item.title.includes('直播群')) { + router.pushUrl({ + url: 'pages/WebView/WebPage', + params: { url: 'http://wx.igandan.com/qun/gdxzqun' ,title:'肝胆相照直播群'} + }) } else { router.pushUrl({ url:item.path diff --git a/features/mypage/src/main/ets/view/HeaderView.ets b/features/mypage/src/main/ets/view/HeaderView.ets index cf59696..20885d9 100644 --- a/features/mypage/src/main/ets/view/HeaderView.ets +++ b/features/mypage/src/main/ets/view/HeaderView.ets @@ -15,6 +15,13 @@ interface callBackData { specialy:[] } +interface callMyBackData { + expert:ExpertData, + code:number, + message:string, + specialy:[] +} + interface heroFirst { id: string; nick_name: string; @@ -28,12 +35,12 @@ export struct HeaderView { @State name:string = authStore.getUser().realName; @State myPageData:object = new Object; @State heroArray:Array = []; + @State clickHeroId:string = ''; private scrollerForList: Scroller = new Scroller() - private heroList: string[] = ['2020年英雄榜','2021年英雄榜','2022年英雄榜','2023年英雄榜','2024年英雄榜'] dialogController: CustomDialogController = new CustomDialogController({ - builder: HeroPopWindow(), + builder: HeroPopWindow({heroId:this.clickHeroId}), alignment: DialogAlignment.Center, customStyle: true }) @@ -64,21 +71,21 @@ export struct HeaderView { uploadBackImgAction() { const hashMap: HashMap = new HashMap(); - const userDataUrl:string = BasicConstant.urlExpertAPI+'my'; - hdHttp.httpReq(userDataUrl,hashMap).then(async (res: HdResponse) => { + hdHttp.httpReq(BasicConstant.myData,hashMap).then(async (res: HdResponse) => { console.info(`我的背景图: ${res}`); let json:RequestDefaultModel = JSON.parse(res+'') as RequestDefaultModel; if(json.code == '200') { + this.heroArray = json.data["honor_list"]; this.myPageData = json.data; // 获取ranking值(带安全类型转换) const ranking: string = this.myPageData["ranking"]?.toString() ?? ""; if (Number(ranking) > 0) { - // 创建排名对象[4](@ref) + // 创建排名对象 const rankDic: heroFirst = { "id": "ranking", "nick_name": `随访达人 I 排名${ranking}` }; - // 插入数组首位[9](@ref) + // 插入数组首位 this.heroArray.unshift(rankDic); } } else { @@ -103,7 +110,7 @@ export struct HeaderView { .width(60) .height(60) .borderRadius(5) - .objectFit(ImageFit.Fill) + .objectFit(ImageFit.Cover) .onClick(()=>this.handleAvatarClick()) Column({space:5}) { Text(this.name) @@ -111,14 +118,14 @@ export struct HeaderView { .fontColor('#FFFFFF') .onClick(()=>this.handleAvatarClick()) List({space:5,initialIndex:this.heroIndex,scroller:this.scrollerForList}) { - ForEach(this.heroArray, (item: object,index:number) => { + ForEach(this.heroArray, (item: heroFirst) => { ListItem() { Row() { - Image($r('app.media.my_home_hero_ranking')) + Image(item.id === 'ranking'?$r('app.media.my_home_hero_ranking'):$r('app.media.my_page_header_hertIcon')) .width(13) .height(13) .margin({left:7}) - Text(item["nick_name"]) + Text(item.nick_name) .fontColor(Color.White) .fontSize(11) .margin({left:4,right:10}) @@ -128,14 +135,11 @@ export struct HeaderView { .borderRadius(9) .borderWidth(1) .borderColor(Color.White) - .onClick(() => { - console.log('Show HeroPopWindow'); - }) .onClick(()=>{ - this.dialogController.open(); - // if (!this.heroArray[index] as heroFirst == 'ranking') { - // this.dialogController.open(heroId:this.heroArray[index]['id'] as string); - // } + if (item.id !== 'ranking') { + this.clickHeroId = item.id; + this.dialogController.open(); + } }) } }) diff --git a/features/mypage/src/main/resources/base/media/login_password.png b/features/mypage/src/main/resources/base/media/login_password.png new file mode 100644 index 0000000000000000000000000000000000000000..766f8002ac72dd60ab52bfd247c1e6a69b3c38fc GIT binary patch literal 1214 zcmeAS@N?(olHy`uVBq!ia0vp^!ayv}!3HE>9xS;9q$EpRBT9nv(@M${i&7aJQ}UBi z6+Ckj(^G>|6H_V+Po~;1Ffc1-hD4M^`1)8S=jZArg4F0$^BXQ!4Z zB&DWj=GiK}-@RW+Av48RDcsc8z_-9TH6zobswg$M$}c3jDm&RSMakYy!KT6rXh3di zNuokUZcbjYRfVk**jy_h8zii+qySb@l5ML5aa4qFfP!;=QL2Keo~drKfuV_lxuu?= zsiBF5p^k!)fuXU!fw8`!v96(!m4T&|p{W8CC;@FNN=dT{a&d#&1?1T(Wt5Z@Sn2DR zmzV368|&p4rRy77T3YHG80i}s=>k>g7FXt#Bv$C=6)VF`a7isrF3Kz@$;{7F0GXJW zlwVq6s|0i@#0$9vaAWg|p}__=rzZw7nBlm3xGDeq!wkCrKY$Q<>xAZeQcG9+bt$I z&4cPq!R;1PoO<AP1iAQ}cj{y$G19Q?>*iXJBA7_H=O! zskoK&=l_3uW)7X$y|WlOI~WQj1=yK3+JwAO6j;yxNKc`zd5wjYiHMJ}VFFXF!aj~8 zOC8oQ9a$5whDmfcM`$zS1>VQ(kIp*iupT+ycti4)m!QUPi;z6-5Z$=LpBf{?I{KM5 zG7G$CezZMc55E@Mq{)q|j%G(FOj*bFC_bWwNoaM;re+SwWqeEf4Ii)_zj);kBe&Fi zVXw~y0&Frbn0ma!);c}=pRT}bu&7#CyEehs zXXCG!^wc`+`N=h_!13wjI-@fMEtl3iww-MgYs=Owxsfv=vG>9xWyx8Yo~#R$YV`!n b8CWD33hm6cJ6ZW01(hhCu6{1-oD!MR# literal 0 HcmV?d00001