feat: 新增提现法币路由,优化提现审批路由配置;在安全客户端中处理401错误,重置认证状态
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user