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
yangchenggong1_wd
2024-06-03 15:48:02 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ea881d6bb689987fecb2e34e5ffdfeafcc8a2f59
ea881d6b
1 parent
5ea7c44f
fix:bug[17818] UI还原问题-【uat】点击退出,提示未居中,并且样式和android不一致
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
6 deletions
sight_harmony/features/wdComponent/src/main/ets/components/setting/AccountAndSecurityLayout.ets
sight_harmony/features/wdComponent/src/main/ets/components/setting/AccountAndSecurityLayout.ets
View file @
ea881d6
import { SpConstants } from 'wdConstant';
import { Logger, SPHelper, ToastUtils, EmitterEventId, EmitterUtils, DateTimeUtils } from 'wdKit';
import { Logger, SPHelper, ToastUtils, EmitterEventId, EmitterUtils, DateTimeUtils
, CustomToast
} from 'wdKit';
import {MineMainSettingFunctionItem} from '../../viewmodel/MineMainSettingFunctionItem';
import MineSettingDatasModel from '../../model/MineSettingDatasModel';
import router from '@ohos.router';
...
...
@@ -31,6 +31,17 @@ export struct AccountAndSecurityLayout {
pageShowAccountTime:number = 0;
pageHideAccountTime:number = 0;
@State toastText:string = ""
dialogToast: CustomDialogController = new CustomDialogController({
builder: CustomToast({
msg: this.toastText,
}),
autoCancel: false,
alignment: DialogAlignment.Center,
customStyle: true,
maskColor:"#00000000"
})
//注销账户 浏览埋点
logoutLayoutHide(){
this.logoutLayoutHideTime = DateTimeUtils.getTimeStamp()
...
...
@@ -127,9 +138,6 @@ export struct AccountAndSecurityLayout {
// 收到eventId为1的事件后执行该回调
let callback = (eventData: emitter.EventData): void => {
// promptAction.showToast({
// message: JSON.stringify(eventData)
// });
if(eventData&&eventData.data){
this.listData[0].subTitle = eventData.data['content']
}
...
...
@@ -477,11 +485,11 @@ export struct AccountAndSecurityLayout {
logout(){
let login = new LoginViewModel;
login.logOut().then(()=>{
promptAction.showToast({ message: '退出登录' }
)
this.showToastTip('退出登录'
)
EmitterUtils.sendEvent(EmitterEventId.PEOPLE_SHIP_ATTENTION)
router.back();
}).catch((error:string)=>{
promptAction.showToast({ message: error }
)
this.showToastTip(error
)
});
}
...
...
@@ -500,6 +508,11 @@ export struct AccountAndSecurityLayout {
securityNum = phoneNum.replace(needSecurityString,'****')
return securityNum;
}
showToastTip(msg:string){
this.toastText = msg
this.dialogToast.open()
}
}
@Component
...
...
Please
register
or
login
to post a comment