feat: 新增提现法币路由,优化提现审批路由配置;在安全客户端中处理401错误,重置认证状态

This commit is contained in:
2025-12-22 03:13:58 +07:00
parent 0655cc2f5a
commit b29ec8f601
2 changed files with 18 additions and 12 deletions

View File

@@ -2,6 +2,7 @@ import type { Ref, WatchSource } from 'vue';
import { ref, watch } from 'vue';
import { treaty } from '@elysiajs/eden';
import type { App } from '@riwa/api-types';
import { useAuthStore } from '@/store/modules/auth';
import { getServiceBaseURL } from '@/utils/service';
import { localStg } from '@/utils/storage';
import { $t } from '@/locales';
@@ -67,6 +68,9 @@ export function safeClient<T, E>(
type: 'error'
});
}
} else if (res.status === 401) {
const authStore = useAuthStore();
authStore.resetStore();
} else if (!options.silent) {
window.$message?.create((res.error as any).message || 'Error', {
type: 'error'