diff --git a/src/pages/MemberValid.css b/src/pages/MemberValid.css
index 616bddcb..6a502ad7 100644
--- a/src/pages/MemberValid.css
+++ b/src/pages/MemberValid.css
@@ -1,7 +1,7 @@
.member-valid-page {
width: 100%;
min-height: 100vh;
- background: linear-gradient(180deg, #f0f9ff 0%, #f5f5f5 100%);
+ background: var(--page-bg);
padding-bottom: 40px;
}
@@ -20,7 +20,7 @@
.success-header .ant-result-icon .anticon {
font-size: 64px;
- color: #52c41a;
+ color: var(--brand-color);
}
.success-header .ant-result-title {
@@ -44,10 +44,10 @@
.member-info-card {
width: 100%;
- border-radius: 12px;
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
+ border-radius: var(--radius-md);
+ box-shadow: var(--shadow-elevated);
margin-bottom: 20px;
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
+ background: var(--brand-gradient);
}
.member-info-card .ant-card-body {
@@ -118,21 +118,44 @@
.detail-value.amount {
font-size: 18px;
font-weight: 600;
- color: #ff4d4f;
+ color: var(--danger-color);
}
.back-home-btn {
height: 52px;
font-size: 16px;
font-weight: 600;
- border-radius: 8px;
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- border: none;
+ border-radius: var(--radius-sm);
+ background: var(--brand-gradient) !important;
+ color: var(--text-on-brand) !important;
+ border: none !important;
margin-top: 8px;
}
-.back-home-btn:hover {
- background: linear-gradient(135deg, #5568d3 0%, #6a3f91 100%);
+.back-home-btn:hover,
+.back-home-btn:focus {
+ background: var(--brand-gradient-hover) !important;
+ color: var(--text-on-brand) !important;
+}
+
+.invoice-btn,
+.renew-btn {
+ height: 52px;
+ font-size: 16px;
+ font-weight: 600;
+ border-radius: var(--radius-sm);
+ background: var(--brand-gradient) !important;
+ color: var(--text-on-brand) !important;
+ border: none !important;
+ margin-bottom: 12px;
+}
+
+.invoice-btn:hover,
+.invoice-btn:focus,
+.renew-btn:hover,
+.renew-btn:focus {
+ background: var(--brand-gradient-hover) !important;
+ color: var(--text-on-brand) !important;
}
/* 移动端适配 */
diff --git a/src/pages/MemberValid.tsx b/src/pages/MemberValid.tsx
index 019ee883..1b58d7cd 100644
--- a/src/pages/MemberValid.tsx
+++ b/src/pages/MemberValid.tsx
@@ -1,6 +1,7 @@
import { useNavigate, useLocation } from 'react-router-dom'
import { Button, Card, Result } from 'antd'
import { CheckCircleOutlined } from '@ant-design/icons'
+import { getUserId, getMemberNo } from '../utils/request'
import './MemberValid.css'
const MemberValid = () => {
@@ -8,9 +9,12 @@ const MemberValid = () => {
const location = useLocation()
const memberData = location.state || {}
+ // userId/memberNo 优先取路由透传,其次取 localStorage (刷新页面后仍能展示)
const {
- memberId = 'MEM20260510001',
- memberType = '普通会员',
+ userId = getUserId(),
+ memberNo = getMemberNo(),
+ memberId = '',
+ memberType = '个人会员',
amount = 99.00,
validPeriod = '1年'
} = memberData
@@ -32,6 +36,24 @@ const MemberValid = () => {
navigate('/')
}
+ const handleInvoice = () => {
+ navigate('/invoice', { state: { userId, memberNo, memberId, amount } })
+ }
+
+ const handleRenew = () => {
+ navigate('/payment', {
+ state: {
+ userId,
+ memberNo,
+ memberId,
+ memberType,
+ amount,
+ validPeriod,
+ isRenew: true,
+ },
+ })
+ }
+
return (
@@ -53,8 +75,8 @@ const MemberValid = () => {
-
会员ID
-
{memberId}
+
会员编号
+
{memberNo || '--'}
@@ -82,6 +104,26 @@ const MemberValid = () => {
@@ -191,11 +200,6 @@ const Payment = () => {
点击下方按钮,将在浏览器中打开支付宝支付页面,完成支付后请返回本页面。
}
@@ -208,20 +212,6 @@ const Payment = () => {
在浏览器中打开支付页面
-
}
- className="alipay-action-btn"
- onClick={handleCopyLink}
- block
- size="large"
- >
- 复制支付链接
-
-
-