fix: 短信认证弹窗改成登录页图纸风格
This commit is contained in:
@@ -340,12 +340,16 @@ async function finishNqi() {
|
||||
</form>
|
||||
<p v-if="mode === 'nqi'" class="lv-notice" :class="{ on: noticeVisible }" :aria-hidden="!noticeVisible">请使用大数据平台账号登录</p>
|
||||
</section>
|
||||
<n-modal v-model:show="smsRequired" class="app-dialog" :mask-closable="false" preset="card" title="短信认证">
|
||||
<n-input v-model:value="smsCode" placeholder="请输入短信验证码" @keyup.enter="finishNqi" />
|
||||
<div class="sms-actions">
|
||||
<n-button @click="backFromSms">返回</n-button>
|
||||
<n-button :disabled="smsSending || countdown > 0" @click="sendSms">{{ countdown > 0 ? `重新发送(${countdown})` : "发送验证码" }}</n-button>
|
||||
<n-button type="primary" :loading="busy" :disabled="!smsCode.trim()" @click="finishNqi">提交</n-button>
|
||||
<n-modal v-model:show="smsRequired" :mask-closable="false" :auto-focus="false">
|
||||
<div class="lv-sms-sheet" role="dialog" aria-modal="true" aria-labelledby="sms-title">
|
||||
<h2 id="sms-title">短信认证</h2>
|
||||
<label for="login-sms">验证码</label>
|
||||
<input id="login-sms" v-model="smsCode" placeholder="sms code" autocomplete="one-time-code" @keyup.enter="finishNqi" />
|
||||
<div class="lv-sms-actions">
|
||||
<button type="button" @click="backFromSms">返回</button>
|
||||
<button type="button" :disabled="smsSending || countdown > 0" @click="sendSms">{{ countdown > 0 ? `重新发送(${countdown})` : "发送验证码" }}</button>
|
||||
</div>
|
||||
<button class="lv-sms-go" type="button" :disabled="busy || !smsCode.trim()" @click="finishNqi">{{ busy ? "提交中" : "提交" }}</button>
|
||||
</div>
|
||||
</n-modal>
|
||||
</div>
|
||||
|
||||
@@ -194,3 +194,86 @@ html[data-theme="dark"] .gate.lv-tower {
|
||||
@keyframes lv-mast {
|
||||
to { clip-path: inset(0 0 0 0); }
|
||||
}
|
||||
|
||||
.lv-sms-sheet {
|
||||
--paper: color-mix(in srgb, #ebe4d2 70%, #d7dce2);
|
||||
--ink-line: #2c3038;
|
||||
--field: color-mix(in srgb, var(--paper) 70%, #fff);
|
||||
--muted-line: color-mix(in srgb, var(--ink-line) 42%, var(--paper));
|
||||
width: min(320px, calc(100vw - 48px));
|
||||
padding: 28px 24px 24px;
|
||||
background: var(--paper);
|
||||
color: var(--ink-line);
|
||||
border: 1px solid var(--ink-line);
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
font-family: SimSun, "Songti SC", serif;
|
||||
}
|
||||
html[data-theme="dark"] .lv-sms-sheet {
|
||||
--paper: #161512;
|
||||
--ink-line: #e6dece;
|
||||
--field: #24211b;
|
||||
}
|
||||
.lv-sms-sheet h2 {
|
||||
margin: 0 0 18px;
|
||||
font-size: 22px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.12em;
|
||||
text-align: center;
|
||||
}
|
||||
.lv-sms-sheet label {
|
||||
display: block;
|
||||
margin: 0 0 8px;
|
||||
}
|
||||
.lv-sms-sheet input {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 36px;
|
||||
margin: 0 0 16px;
|
||||
padding: 0 8px;
|
||||
border: 1px solid var(--ink-line);
|
||||
border-radius: 0;
|
||||
background: var(--field);
|
||||
color: var(--ink-line);
|
||||
font: inherit;
|
||||
outline: none;
|
||||
caret-color: var(--ink-line);
|
||||
}
|
||||
.lv-sms-sheet input::placeholder { color: var(--muted-line); }
|
||||
.lv-sms-sheet input:focus { box-shadow: inset 0 0 0 1px var(--ink-line); }
|
||||
.lv-sms-actions {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
.lv-sms-actions button,
|
||||
.lv-sms-go {
|
||||
height: 36px;
|
||||
padding: 0 12px;
|
||||
border: 1px solid var(--ink-line);
|
||||
border-radius: 0;
|
||||
background: var(--paper);
|
||||
color: var(--ink-line);
|
||||
font: inherit;
|
||||
cursor: pointer;
|
||||
}
|
||||
.lv-sms-actions button { flex: 1; }
|
||||
.lv-sms-go {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
background: var(--ink-line);
|
||||
color: var(--paper);
|
||||
letter-spacing: 0.3em;
|
||||
font-size: 16px;
|
||||
}
|
||||
.lv-sms-actions button:hover,
|
||||
.lv-sms-go:hover { filter: brightness(1.08); }
|
||||
.lv-sms-actions button:disabled,
|
||||
.lv-sms-go:disabled { opacity: 0.6; cursor: default; filter: none; }
|
||||
body:has(.lv-sms-sheet) .n-modal-mask {
|
||||
background: color-mix(in srgb, #2c3038 42%, transparent);
|
||||
}
|
||||
html[data-theme="dark"] body:has(.lv-sms-sheet) .n-modal-mask {
|
||||
background: color-mix(in srgb, #000 64%, transparent);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user