Skip to content

Commit

Permalink
Merge pull request #670 from linthan/adddemotip
Browse files Browse the repository at this point in the history
feat: Adddemotip
  • Loading branch information
sysulq committed Oct 9, 2023
2 parents 61e095b + 7abed55 commit 07e63e4
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions assets/src/pages/user/login/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ import { connect } from 'dva';
import { Dispatch } from '@@/plugin-dva/connect';
import { ExclamationCircleOutlined, LoginOutlined } from '@ant-design/icons/lib';


export const getEnv = () => {
const domain = window.location.host;
if (/^.*jupiterconsole.douyu.com.*?$/g.test(domain)) {
return 'demo';
}
return '';
};

var md5 = require('md5');

const { Tab, UserName, Password, Submit } = LoginFrom;
Expand Down Expand Up @@ -217,6 +226,16 @@ const Login: React.FC<LoginProps> = (props: LoginProps) => {
</div>

<div className={styles.main}>{renderLoginForm()}</div>
{getEnv() == 'demo' &&
<div>
<div style={{ display: "flex", justifyContent: "center", color: 'red' }}>
演示环境,账号密码:admin/admin
</div>
<div style={{ display: "flex", justifyContent: "center", color: 'red', fontSize: "20px" }}>
仅供斗鱼demo演示,非实际业务系统,请勿重复上报弱口令漏洞
</div>
</div>
}
</div>
</div>
);
Expand Down

0 comments on commit 07e63e4

Please sign in to comment.