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
xugenyuan
2024-07-12 18:46:05 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1abf57518df9e9ad5efa612ef6bbb44024f3f2dc
1abf5751
1 parent
b5c1baaf
ref |> 处理退出登录或注销 取消推送别名设置
Signed-off-by: xugenyuan <xugenyuan@wondertek.com.cn>
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
sight_harmony/commons/wdKit/src/main/ets/utils/EmitterUtils.ets
sight_harmony/features/wdComponent/src/main/ets/components/setting/AccountAndSecurityLayout.ets
sight_harmony/features/wdHwAbility/src/main/ets/getuiPush/GetuiPush.ets
sight_harmony/commons/wdKit/src/main/ets/utils/EmitterUtils.ets
View file @
1abf575
...
...
@@ -13,7 +13,7 @@ export class EmitterUtils {
static sendEmptyEvent(eventId: number) {
let event: emitter.InnerEvent = {
eventId: eventId,
priority: emitter.EventPriority.
LOW
priority: emitter.EventPriority.
IMMEDIATE
};
emitter.emit(event);
}
...
...
@@ -26,7 +26,7 @@ export class EmitterUtils {
static sendEvent(eventId: number, str?: string | number) {
let event: emitter.InnerEvent = {
eventId: eventId,
priority: emitter.EventPriority.
LOW
priority: emitter.EventPriority.
IMMEDIATE
};
let eventData: emitter.EventData = {
data: {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/setting/AccountAndSecurityLayout.ets
View file @
1abf575
...
...
@@ -486,6 +486,7 @@ export struct AccountAndSecurityLayout {
let login = new LoginViewModel;
login.logOut().then(()=>{
this.showToastTip('退出登录')
EmitterUtils.sendEvent(EmitterEventId.FORCE_USER_LOGIN_OUT)
EmitterUtils.sendEvent(EmitterEventId.PEOPLE_SHIP_ATTENTION)
router.back();
}).catch((error:string)=>{
...
...
@@ -498,6 +499,8 @@ export struct AccountAndSecurityLayout {
TrackingButton.click("cancelAccountPageCancelAccountSuccess",TrackConstants.PageName.Cancel_Account,TrackConstants.PageName.Cancel_Account)
this.logoutViewModel.requestLogout().then(()=>{
ToastUtils.shortToast("注销成功")
EmitterUtils.sendEmptyEvent(EmitterEventId.FORCE_USER_LOGIN_OUT)
EmitterUtils.sendEmptyEvent(EmitterEventId.PEOPLE_SHIP_ATTENTION)
router.back()
})
}
...
...
sight_harmony/features/wdHwAbility/src/main/ets/getuiPush/GetuiPush.ets
View file @
1abf575
...
...
@@ -95,7 +95,7 @@ export class GetuiPush {
if (!this.initialed) { return }
if (HttpUtils.isLogin()) {
const userId = SPHelper.default.getSync(SpConstants.USER_ID, "") as string
this.currentUserId = userId
this.currentUserId = userId
+ ""
this.setAlias(true, userId)
}
let tags = [this.TAG_PD_ZH, AppUtils.getAppVersionCode()]
...
...
@@ -112,7 +112,7 @@ export class GetuiPush {
// 登录和退出
EmitterUtils.receiveEvent(EmitterEventId.LOGIN_SUCCESS, () => {
const userId = SPHelper.default.getSync(SpConstants.USER_ID, "") as string
this.currentUserId = userId
this.currentUserId = userId
+ ""
this.setAlias(true, userId)
})
EmitterUtils.receiveEvent(EmitterEventId.FORCE_USER_LOGIN_OUT, () => {
...
...
Please
register
or
login
to post a comment