diff --git a/src/api/index.ts b/src/api/index.ts index bde7e35..9e94f61 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -287,6 +287,7 @@ export async function accountadd(data?: any) { const res = await post('wallect',data); if(res.code==0){ message.success("新增成功") + router.push("/mine/wallet") } console.log(res) @@ -394,6 +395,7 @@ export async function deleteaccount(data: any) { const res = await del('wallect/' + data); if(res.code==0){ message.success("删除成功") + router.push("/mine/wallet") } console.log(res) diff --git a/src/utils/i18n.ts b/src/utils/i18n.ts index a2e7ad4..71d4cde 100644 --- a/src/utils/i18n.ts +++ b/src/utils/i18n.ts @@ -22,9 +22,9 @@ const createI18n = (config: Config) => ({ }); const i18nSymbol = Symbol(); - +let i18n: any; export function provideI18n(i18nConfig: Config) { - const i18n = createI18n(i18nConfig); + i18n = createI18n(i18nConfig); provide(i18nSymbol, i18n); return i18n; } @@ -33,5 +33,9 @@ export function useI18n() { const i18n = inject(i18nSymbol); if (!i18n) throw new Error("No i18n provided!!!"); + return i18n; +} + +export function geti18n(){ return i18n; } \ No newline at end of file