export default function (status, message) { if (import.meta.client && [ 400, 401, 403 ].includes(status)) { // 全局弹提示 let title if (status === 400) title = message else if (status === 401) title = '抱歉,您尚未登录' else if (status === 403) title = '抱歉,您没有权限' nextTick(() => { const toast = useToast() toast.add({ icon: 'i-heroicons-exclamation-triangle-20-solid', timeout: 3000, title: title, color: 'red' }) }) // 全局弹登录 const { $isSignIn } = storeToRefs(useUserStore()) const { $openSign } = useUserStore() if (status === 401 && !$isSignIn.value) { $openSign() } } }