Skip to content

Commit

Permalink
fix: fix unable to login via wechat
Browse files Browse the repository at this point in the history
  • Loading branch information
songquanpeng committed Feb 1, 2025
1 parent c67b167 commit 1521df6
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
38 changes: 38 additions & 0 deletions web/default/src/components/LoginForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,44 @@ const LoginForm = () => {
)}
</Card.Content>
</Card>
<Modal
onClose={() => setShowWeChatLoginModal(false)}
onOpen={() => setShowWeChatLoginModal(true)}
open={showWeChatLoginModal}
size={'mini'}
>
<Modal.Content>
<Modal.Description>
<Image src={status.wechat_qrcode} fluid />
<div style={{ textAlign: 'center' }}>
<p>
微信扫码关注公众号,输入「验证码」获取验证码(三分钟内有效)
</p>
</div>
<Form size='large'>
<Form.Input
fluid
placeholder='验证码'
name='wechat_verification_code'
value={inputs.wechat_verification_code}
onChange={handleChange}
/>
<Button
fluid
size='large'
style={{
background: '#2F73FF', // 使用更现代的蓝色
color: 'white',
marginBottom: '1.5em',
}}
onClick={onSubmitWeChatVerificationCode}
>
登录
</Button>
</Form>
</Modal.Description>
</Modal.Content>
</Modal>
</Grid.Column>
</Grid>
);
Expand Down
2 changes: 1 addition & 1 deletion web/default/src/components/RegisterForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ const RegisterForm = () => {
<Button
onClick={sendVerificationCode}
disabled={loading}
style={{ backgroundColor: '#2185d0', color: 'white' }}
// style={{ backgroundColor: '#2F73FF', color: 'white' }}
>
获取验证码
</Button>
Expand Down

0 comments on commit 1521df6

Please sign in to comment.