Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
cc4713e6
Commit
cc4713e6
authored
Jun 24, 2021
by
guomingpang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doct: 添加隐藏手机入口的注释提示
parent
00994e6d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
102 additions
and
4 deletions
+102
-4
src/modules/root/Login.jsx
+102
-0
src/modules/root/WechatLogin.tsx
+0
-4
No files found.
src/modules/root/Login.jsx
View file @
cc4713e6
...
...
@@ -12,6 +12,10 @@ import user from '@/common/js/user';
const
{
TabPane
}
=
Tabs
;
function
Login
(
props
)
{
/**
* 手机登陆入口,暂时隐藏,此页注释代码勿删
*/
// const [phone, setPhone] = useState(''); // 登录手机号
// const [phoneverify, setPhoneverify] = useState(''); // 密码登录验证码
// const [openCheck1, setOpenCheck1] = useState(false);
...
...
@@ -22,6 +26,10 @@ function Login(props) {
// const [phoneError, setPhoneError] = useState(false);
// const [checkObject1, setCheckObject1] = useState({});
/**
* 手机登陆入口,暂时隐藏,此页注释代码勿删
*/
useEffect
(()
=>
{
const
enterpriseId
=
getParameterByName
(
'enterpriseId'
);
const
userId
=
getParameterByName
(
'userId'
);
...
...
@@ -60,6 +68,11 @@ function Login(props) {
});
});
}
/**
* 手机登陆入口,暂时隐藏,此页注释代码勿删
*/
// async function checkAccount(code, callback = () => {}) {
// callback();
// }
...
...
@@ -147,6 +160,10 @@ function Login(props) {
// });
// }
/**
* 手机登陆入口,暂时隐藏,此页注释代码勿删
*/
return
(
<
div
className=
'login-page'
>
<
div
className=
'logo-img-box'
>
...
...
@@ -167,6 +184,91 @@ function Login(props) {
<
TabPane
tab=
'企业微信登录'
key=
'1'
>
<
WechatLogin
></
WechatLogin
>
</
TabPane
>
{
/* 手机登陆入口,暂时隐藏,此页注释代码勿删 */
}
{
/* <TabPane tab='手机号登录' key='2'>
<div className='login-form'>
<div className='form'>
<div className='username' style={{ marginBottom: 16 }}>
<Input
type='phone'
autoComplete='off'
name='account'
maxLength={11}
placeholder="请输入手机号"
value={phone}
onChange={(e) => {
setPhone(e.target.value)
}}
/>
</div>
<div className='error-message'></div>
<div className='phoneverify'>
<Input
type="text"
id="phoneverify"
name="phoneverify"
placeholder="请输入验证码"
autoComplete="off"
value={phoneverify}
maxLength={4}
onChange={(e) => {
setPhoneverify(e.target.value)
}}
/>
<Popover
visible={openCheck1}
trigger='click'
title=''
content={
<div>
<span style={{ fontSize: '12px', color: '#999', marginBottom: 8, display: 'block' }}>请完成安全验证</span>
<CheckBeforeSendCode
callback={(data, nc) => {
setCheckObject1(nc)
checkAccount(1, (userType) => {
handleSendSMSCode(data, userType)
setTimeout(() => {
setOpenCheck1(false)
}, 500)
})
}}
/>
</div>
}
onVisibleChange={(value) => {
if (!value) {
setOpenCheck1(false)
}
}}
placement='bottomRight'>
<div
className='btn'
id='sendVerifyCode'
onClick={() => {
if (checking1) return
checkSend(1)
}}>
{codeText}
</div>
</Popover>
</div>
<div className='error-message'>{errorMessage}</div>
<div className='submit'>
<div className='btn'>
<span
id='loginIn'
onClick={() => {
handleSubmit()
}}>
登录
</span>
</div>
</div>
</div>
</div>
</TabPane> */
}
{
/* 手机登陆入口,暂时隐藏,此页注释代码勿删 */
}
</
Tabs
>
</
div
>
</
div
>
...
...
src/modules/root/WechatLogin.tsx
View file @
cc4713e6
...
...
@@ -27,15 +27,11 @@ export default function WechatLogin(props: any) {
Service
.
Hades
(
'anon/hades/getTicket'
,
{}).
then
((
res
:
any
)
=>
{
setTicket
(
res
.
result
);
const
redirect
=
`
${
PATH
}
?ticket=
${
res
.
result
}
&appTermEnum=XIAOMAI_CLOUD_CLASS_PC_WEB_ADMIN&env=
${
process
.
env
.
DEPLOY_ENV
||
'dev'
}
`
;
// console.log(redirect)
// const url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww409ccf9c6e31f19e&redirect_uri=${encodeURIComponent(redirect)}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
// console.log(url)
const
qrcodeWrapDom
:
any
=
document
.
querySelector
(
'#qrcode'
);
let
qrnode
=
new
qrcode
({
text
:
redirect
,
correctLevel
:
2
,
size
:
180
,
// image: 'https://image.xiaomaiketang.com/xm/Newk4NrxKC.png',
image
:
'https://image.xiaomaiketang.com/xm/bFkRBz7teA.png'
,
imageSize
:
50
,
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment