在compoent scripy中我有以下函数,我可以在created()或mount()中设置等效函数吗?
window.addEventListener('load', function () {
mode = router.currentRoute.query.mode
actionCode = router.currentRoute.query.oobCode
// apiKey = router.currentRoute.query.apiKey
continueUrl = router.currentRoute.query.continueUrl
switch (mode) {
case 'resetPassword':
// handleResetPassword(actionCode, continueUrl)
break
case 'recoverEmail':
// handleRecoverEmail(actionCode)
break
case 'verifyEmail':
handleVerifyEmail(actionCode, continueUrl)
break
default:
console.log('ERROR mode: ', mode)
// Error: invalid mode.
}
})
并设置handleVerifyEmail(actionCode,continueUrl)函数作为方法??
感谢您的反馈