shishuangxi

更换换绑事件id

@@ -23,6 +23,9 @@ export enum EmitterEventId { @@ -23,6 +23,9 @@ export enum EmitterEventId {
23 // 登录成功 23 // 登录成功
24 LOGIN_SUCCESS = 8, 24 LOGIN_SUCCESS = 8,
25 25
  26 + // 换绑成功
  27 + PHONE_CHANGE_SUCCESS = 9,
  28 +
26 // App回到前台 29 // App回到前台
27 APP_ENTER_FOREGROUD = 100, 30 APP_ENTER_FOREGROUD = 100,
28 // App进入后台 31 // App进入后台
@@ -76,7 +76,7 @@ export struct AccountAndSecurityLayout { @@ -76,7 +76,7 @@ export struct AccountAndSecurityLayout {
76 addEmitEvent(){ 76 addEmitEvent(){
77 // 定义一个eventId为1的事件 77 // 定义一个eventId为1的事件
78 let event: emitter.InnerEvent = { 78 let event: emitter.InnerEvent = {
79 - eventId: 10010 79 + eventId: EmitterEventId.PHONE_CHANGE_SUCCESS
80 }; 80 };
81 81
82 // 收到eventId为1的事件后执行该回调 82 // 收到eventId为1的事件后执行该回调
@@ -7,7 +7,7 @@ import { Params } from '../../../../../../../commons/wdRouter/oh_modules/wdBean/ @@ -7,7 +7,7 @@ import { Params } from '../../../../../../../commons/wdRouter/oh_modules/wdBean/
7 import { WDRouterRule, WDRouterPage } from 'wdRouter'; 7 import { WDRouterRule, WDRouterPage } from 'wdRouter';
8 import { SettingPasswordParams } from './SettingPasswordLayout' 8 import { SettingPasswordParams } from './SettingPasswordLayout'
9 import { Router } from '@ohos.arkui.UIContext' 9 import { Router } from '@ohos.arkui.UIContext'
10 -import { SPHelper, ToastUtils } from 'wdKit/Index' 10 +import { EmitterEventId, EmitterUtils, SPHelper, ToastUtils } from 'wdKit/Index'
11 import { SpConstants } from 'wdConstant/Index' 11 import { SpConstants } from 'wdConstant/Index'
12 import { emitter } from '@kit.BasicServicesKit' 12 import { emitter } from '@kit.BasicServicesKit'
13 13
@@ -189,7 +189,7 @@ struct ForgetPasswordPage { @@ -189,7 +189,7 @@ struct ForgetPasswordPage {
189 sendEmitEvent(){ 189 sendEmitEvent(){
190 // 定义一个eventId为1的事件,事件优先级为Low 190 // 定义一个eventId为1的事件,事件优先级为Low
191 let event: emitter.InnerEvent = { 191 let event: emitter.InnerEvent = {
192 - eventId: 10010, 192 + eventId: EmitterEventId.PHONE_CHANGE_SUCCESS,
193 priority: emitter.EventPriority.LOW 193 priority: emitter.EventPriority.LOW
194 }; 194 };
195 195