+
+
+
+
+
+ {error ? (
+
+ {error}
+
+ 重新加载
+
+
+ ) : null}
+
+ {isLoading ? (
+
+ {Array.from({ length: 4 }).map((_, index) => (
+
+ ))}
+
+ ) : products.length > 0 ? (
+
+ {products.map((product) => (
+
+ ))}
+
+ ) : (
+
+ 暂无可购买套餐
+
+ )}
+
+ {nativePayment ? (
+
+ 微信扫码支付
+
+ {nativeQrImageUrl ? (
+

+ ) : (
+
+ 生成中
+
+ )}
+
+
+ {nativePayment.isConfirming ? '确认中' : '我已支付'}
+
+
+ ) : null}
+
+ );
+}
diff --git a/src/components/platform-entry/PlatformProfileRewardCodeRedeemModal.test.tsx b/src/components/platform-entry/PlatformProfileRewardCodeRedeemModal.test.tsx
new file mode 100644
index 00000000..2eace460
--- /dev/null
+++ b/src/components/platform-entry/PlatformProfileRewardCodeRedeemModal.test.tsx
@@ -0,0 +1,54 @@
+/* @vitest-environment jsdom */
+
+import { render, screen } from '@testing-library/react';
+import userEvent from '@testing-library/user-event';
+import { describe, expect, test, vi } from 'vitest';
+
+import { PlatformProfileRewardCodeRedeemModal } from './PlatformProfileRewardCodeRedeemModal';
+
+describe('PlatformProfileRewardCodeRedeemModal', () => {
+ test('submits on button click and enter key', async () => {
+ const user = userEvent.setup();
+ const onSubmit = vi.fn();
+ const onChange = vi.fn();
+
+ render(
+