积分流水页面 访问拦截

积分流水页面 访问拦截
This commit is contained in:
amypeng 2026-06-10 11:40:33 +08:00
parent f0e4f2e814
commit 3201ee958c
1 changed files with 11 additions and 1 deletions

View File

@ -1,4 +1,5 @@
import React , { useState , useEffect } from 'react';
import { Spin } from 'antd';
import { getImageUrl } from 'educoder'
import { getVIPLists, getAuditStatus, applyJoin, getMemberStatus, getMemberInfo, getMemberPointsAccount, getMemberAccountDetail } from '../api';
import {getUniqueIdentifier,getBrowserPlatform,getBrowserBrand} from '../utils';
@ -26,6 +27,7 @@ function ZoneScore(props){
const { id, showNotification, checkIfLogin, showLoginDialog, temp, sectionMemberTitle } = props;
const [ memberStatus , setMemberStatus] = useState(memberStatusEnum.notMember);
const [ accountInfo , setAccountInfo] = useState(null);
const [ loading , setLoading ] = useState(false);
useEffect(()=>{
let uuid = getUniqueIdentifier()
@ -56,6 +58,7 @@ function ZoneScore(props){
}];
function getMemberStatus() {
setLoading(true);
getAuditStatus(id).then(res => {
if (res && res.data && res.data.code === 200) {
setMemberStatus(res.data.data)
@ -65,9 +68,14 @@ function ZoneScore(props){
if(res.data.data == memberStatusEnum.isMember) {
getInfo();
// getDetail();
} else {
showNotification && showNotification('您当前不是专区会员,请先加入会员');
props.history && props.history.replace(`/zone/${deptId}/User`);
}
}).catch(() => { setMemberStatus(memberStatusEnum.notMember) })
.finally(() => {
setLoading(false)
});
}
function getInfo() {
@ -82,6 +90,7 @@ function ZoneScore(props){
return(
<div className={`boxmain width1600 ${temp}_Score_box`}>
<Spin spinning={loading}>
<div className="info">
<div className="info_title">
<Link className="title_a" to={`/zone/${deptId}/User`}>
@ -103,6 +112,7 @@ function ZoneScore(props){
</div>
<ScoreDetail {...props} ></ScoreDetail>
</Spin>
</div>
)
}