支付组件统一使用二维码展示

This commit is contained in:
2026-03-13 14:13:06 +08:00
parent 82bd8051d8
commit 2b77ea189b
16 changed files with 206 additions and 193 deletions

View File

@@ -6,10 +6,9 @@ export const usePlatformType = (): TradePlatform => {
// 在SSR环境下返回默认值
const [platform, setPlatform] = useState<TradePlatform>(() => {
if (typeof window === 'undefined') return TradePlatform.Desktop
// return window.matchMedia('(max-width: 768px)').matches
// ? TradePlatform.Mobile
// : TradePlatform.Desktop
return TradePlatform.Desktop
return window.matchMedia('(max-width: 768px)').matches
? TradePlatform.Mobile
: TradePlatform.Desktop
})
useEffect(() => {