forked from 77media/video-flow
1
This commit is contained in:
parent
99f3002ff6
commit
6d9ed1501e
@ -46,7 +46,10 @@ export const errorHandle = debounce(
|
|||||||
customMessage || HTTP_ERROR_MESSAGES[code] || DEFAULT_ERROR_MESSAGE;
|
customMessage || HTTP_ERROR_MESSAGES[code] || DEFAULT_ERROR_MESSAGE;
|
||||||
|
|
||||||
// 显示错误提示
|
// 显示错误提示
|
||||||
|
// 402 状态码 不需要显示提示
|
||||||
|
if (code !== 402) {
|
||||||
window.msg.error(errorMessage);
|
window.msg.error(errorMessage);
|
||||||
|
}
|
||||||
|
|
||||||
// 执行特殊错误码的处理函数
|
// 执行特殊错误码的处理函数
|
||||||
const handler = ERROR_HANDLERS[code];
|
const handler = ERROR_HANDLERS[code];
|
||||||
|
|||||||
@ -25,6 +25,7 @@ import {
|
|||||||
getUserSubscriptionInfo,
|
getUserSubscriptionInfo,
|
||||||
} from "@/lib/stripe";
|
} from "@/lib/stripe";
|
||||||
import UserCard from "@/components/common/userCard";
|
import UserCard from "@/components/common/userCard";
|
||||||
|
import { showInsufficientPointsNotification } from "@/utils/notifications";
|
||||||
|
|
||||||
interface User {
|
interface User {
|
||||||
id: string;
|
id: string;
|
||||||
@ -239,7 +240,11 @@ export function TopBar({ collapsed, isDesktop=true }: { collapsed: boolean, isDe
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Notifications */}
|
{/* Notifications */}
|
||||||
{/* <Button variant="ghost" size="sm" onClick={() => window.msg.error('Loading...')}>
|
{/* <Button variant="ghost" size="sm" onClick={() => showInsufficientPointsNotification({
|
||||||
|
current_balance: 20,
|
||||||
|
required_tokens: 100,
|
||||||
|
message: 'Insufficient points'
|
||||||
|
})}>
|
||||||
<Bell className="h-4 w-4" />
|
<Bell className="h-4 w-4" />
|
||||||
</Button> */}
|
</Button> */}
|
||||||
|
|
||||||
|
|||||||
@ -90,7 +90,7 @@ export const showInsufficientPointsNotification = (detail?: {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
duration: 5,
|
duration: 0,
|
||||||
placement: 'topRight',
|
placement: 'topRight',
|
||||||
style: darkGlassStyle,
|
style: darkGlassStyle,
|
||||||
className: 'dark-glass-notification',
|
className: 'dark-glass-notification',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user