forked from wangziqi/gongxue-base
fix: make SMS code input visible on login
This commit is contained in:
@@ -114,12 +114,18 @@ export default function StudentLoginPage() {
|
||||
<Text className='row-main'>{loginCopy.formTitle}</Text>
|
||||
<Text className='row-meta'>{loginCopy.formMeta}</Text>
|
||||
{reason ? <Text className='error-text'>{reason}</Text> : null}
|
||||
<Input className='input' type='number' maxlength={11} placeholder='请输入手机号' value={phone} onInput={event => setPhone(String(event.detail.value || ''))} />
|
||||
<View className='toolbar'>
|
||||
<Input className='input' type='number' maxlength={6} placeholder='验证码' value={code} onInput={event => setCode(String(event.detail.value || ''))} />
|
||||
<Button className='secondary-button' loading={sending} onClick={handleSendCode}>
|
||||
<View className='login-field'>
|
||||
<Text className='login-field-label'>手机号</Text>
|
||||
<Input className='login-input' type='number' maxlength={11} placeholder='请输入手机号' value={phone} onInput={event => setPhone(String(event.detail.value || ''))} />
|
||||
</View>
|
||||
<View className='login-field'>
|
||||
<Text className='login-field-label'>验证码</Text>
|
||||
<View className='login-code-row'>
|
||||
<Input className='login-input login-code-input' type='number' maxlength={6} placeholder='请输入短信验证码' value={code} onInput={event => setCode(String(event.detail.value || ''))} />
|
||||
<Button className='login-send-button secondary-button' loading={sending} onClick={handleSendCode}>
|
||||
发送
|
||||
</Button>
|
||||
</Button>
|
||||
</View>
|
||||
</View>
|
||||
<Button className='primary-button' loading={verifying} onClick={handleLogin}>
|
||||
登录
|
||||
|
||||
@@ -104,16 +104,49 @@
|
||||
font-size: 19px;
|
||||
}
|
||||
|
||||
.login-card .toolbar {
|
||||
align-items: center;
|
||||
overflow-x: visible;
|
||||
.login-field {
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.login-card .toolbar .input {
|
||||
flex: 1;
|
||||
.login-field-label {
|
||||
color: #334155;
|
||||
font-size: 17px;
|
||||
font-weight: 850;
|
||||
}
|
||||
|
||||
.login-input {
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 54px;
|
||||
min-height: 54px;
|
||||
padding: 0 16px;
|
||||
border: 1px solid #dbe3ef;
|
||||
border-radius: 10px;
|
||||
background: #fff;
|
||||
color: #111827;
|
||||
font-size: 17px;
|
||||
line-height: 54px;
|
||||
}
|
||||
|
||||
.login-code-row {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) 104px;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.login-code-input {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.login-send-button {
|
||||
width: 104px;
|
||||
min-width: 104px;
|
||||
}
|
||||
|
||||
.login-page-admin {
|
||||
background:
|
||||
linear-gradient(to right, rgba(15, 23, 42, 0.035) 1px, transparent 1px),
|
||||
@@ -2179,9 +2212,11 @@
|
||||
border-radius: 24px 0 0 24px;
|
||||
}
|
||||
|
||||
.login-card .input {
|
||||
.login-input {
|
||||
height: 52px;
|
||||
min-height: 52px;
|
||||
font-size: 15px;
|
||||
line-height: 52px;
|
||||
}
|
||||
|
||||
.login-card .primary-button,
|
||||
@@ -2287,8 +2322,13 @@
|
||||
flex: 1 1 150px;
|
||||
}
|
||||
|
||||
.login-card .toolbar .secondary-button {
|
||||
flex: 0 0 86px;
|
||||
.login-code-row {
|
||||
grid-template-columns: minmax(0, 1fr) 92px;
|
||||
}
|
||||
|
||||
.login-send-button {
|
||||
width: 92px;
|
||||
min-width: 92px;
|
||||
}
|
||||
|
||||
.asset-preview-frame,
|
||||
|
||||
Reference in New Issue
Block a user