kun-galgame-vue/src/error/errorHandler.ts

18 lines
559 B
TypeScript
Raw Normal View History

2023-10-03 12:55:53 +00:00
// 全局消息组件(顶部)
import message from '@/components/alert/Message'
import { getErrorMessageEN, getErrorMessageCN } from './errorI18n'
const showMessage = (errorCode: number) => {
const messageType = 'error'
const messageTextEN = getErrorMessageEN(errorCode)
const messageTextCN = getErrorMessageCN(errorCode)
message(messageTextEN, messageTextCN, messageType)
}
/**
* KUNGalgame
*/
export const kungalgameErrorHandler = (errorNumber: number) => {
showMessage(errorNumber)
}