新增icp
This commit is contained in:
@@ -2,5 +2,6 @@
|
|||||||
// 部署时可以直接修改这个文件来改变配置,无需重新编译
|
// 部署时可以直接修改这个文件来改变配置,无需重新编译
|
||||||
window.APP_CONFIG = {
|
window.APP_CONFIG = {
|
||||||
// 权限验证开关:'1' 开启,'0' 关闭
|
// 权限验证开关:'1' 开启,'0' 关闭
|
||||||
AUTH_ACCESS: "0",
|
AUTH_ACCESS: "1",
|
||||||
|
ICP_NUMBER: "",
|
||||||
};
|
};
|
||||||
@@ -14,6 +14,9 @@ const PhoneLogin: React.FC<PhoneLoginProps> = ({ handleLoginSuccess }) => {
|
|||||||
const [countdown, setCountdown] = useState(0);
|
const [countdown, setCountdown] = useState(0);
|
||||||
const [isLoading, setIsLoading] = useState(false);
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
|
|
||||||
|
// 获取备案号配置
|
||||||
|
const icpNumber = (window as any).APP_CONFIG?.ICP_NUMBER;
|
||||||
|
|
||||||
// 发送验证码
|
// 发送验证码
|
||||||
const handleSendCode = async () => {
|
const handleSendCode = async () => {
|
||||||
if (!phone || !/^1[3-9]\d{9}$/.test(phone)) {
|
if (!phone || !/^1[3-9]\d{9}$/.test(phone)) {
|
||||||
@@ -144,6 +147,13 @@ const PhoneLogin: React.FC<PhoneLoginProps> = ({ handleLoginSuccess }) => {
|
|||||||
) : '登录'}
|
) : '登录'}
|
||||||
</Button>
|
</Button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
{/* 备案号显示 */}
|
||||||
|
{icpNumber && (
|
||||||
|
<div className="text-center mt-8 text-xs text-gray-400">
|
||||||
|
<a href="https://beian.miit.gov.cn/" target="_blank" rel="noopener noreferrer">{icpNumber}</a>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user