美化了样式2.0
This commit is contained in:
@ -1,18 +1,21 @@
|
||||
<view class="flex-col page">
|
||||
<image
|
||||
class="self-center image"
|
||||
src="./images/logo.png"
|
||||
/>
|
||||
<text class="self-center text">欢迎登陆—青橙校园</text>
|
||||
<view class="page">
|
||||
|
||||
<view class="flex-col self-stretch group">
|
||||
<text class="self-start font text_2">忘记密码</text>
|
||||
<!-- 顶部 Logo 与标题 -->
|
||||
<image class="logo" src="/static/logo.jpg" mode="aspectFit" />
|
||||
<text class="page-title">欢迎登录 — 丁香校园</text>
|
||||
|
||||
<!-- 重置密码卡片 -->
|
||||
<view class="card">
|
||||
<text class="card-title">忘记密码</text>
|
||||
|
||||
<view class="form">
|
||||
|
||||
<!-- 手机号 -->
|
||||
<view class="flex-col justify-start self-stretch relative section mt-20">
|
||||
<view class="field">
|
||||
<input
|
||||
class="flex-col justify-start items-start text-wrapper view input"
|
||||
class="field-input"
|
||||
placeholder="请输入手机号"
|
||||
placeholder-class="ph"
|
||||
maxlength="11"
|
||||
type="number"
|
||||
model:value="{{phone}}"
|
||||
@ -20,58 +23,55 @@
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view class="flex-col self-stretch group_2 mt-20">
|
||||
<!-- 验证码 + 发送 -->
|
||||
<view class="flex-row items-center self-stretch relative section_2">
|
||||
<input
|
||||
class="flex-col justify-start items-start text-wrapper_2 view_2 input_1"
|
||||
placeholder="请输入验证码"
|
||||
maxlength="6"
|
||||
type="number"
|
||||
model:value="{{code}}"
|
||||
bindinput="onCodeInput"
|
||||
/>
|
||||
<text
|
||||
class="flex-col justify-start items-center shrink-0 text-wrapper_3 ml-12 text_6 send-code {{ countdown>0 ? 'disabled' : '' }}"
|
||||
bindtap="{{ countdown>0 ? '' : 'getSmsCode' }}"
|
||||
>{{ codeButtonText }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 新密码 -->
|
||||
<view class="flex-col justify-start self-stretch relative section_1 mt-22">
|
||||
<input
|
||||
class="flex-col justify-start items-start text-wrapper text-wrapper_1 input_2"
|
||||
placeholder="请输入密码"
|
||||
password="true"
|
||||
model:value="{{newPwd}}"
|
||||
bindinput="onNewPwdInput"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<!-- 确认密码 -->
|
||||
<view class="flex-col justify-start self-stretch relative section_3 mt-22">
|
||||
<input
|
||||
class="flex-col justify-start items-start text-wrapper text-wrapper_5 input_3"
|
||||
placeholder="请再次输入密码"
|
||||
password="true"
|
||||
model:value="{{confirmPwd}}"
|
||||
bindinput="onConfirmPwdInput"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<!-- 登录账号 -->
|
||||
<!-- 验证码 + 发送 -->
|
||||
<view class="field field-row">
|
||||
<input
|
||||
class="field-input flex-1"
|
||||
placeholder="请输入验证码"
|
||||
placeholder-class="ph"
|
||||
maxlength="6"
|
||||
type="number"
|
||||
model:value="{{code}}"
|
||||
bindinput="onCodeInput"
|
||||
/>
|
||||
<text
|
||||
class="self-end text_9 mt-22 link"
|
||||
bindtap="gotoLogin"
|
||||
>登录账号</text>
|
||||
class="code-btn {{ countdown>0 ? 'disabled' : '' }}"
|
||||
bindtap="{{ countdown>0 ? '' : 'getSmsCode' }}"
|
||||
>{{ codeButtonText }}
|
||||
</text>
|
||||
</view>
|
||||
|
||||
<!-- 重置密码 按钮 -->
|
||||
<view
|
||||
class="flex-col justify-start items-center self-stretch text-wrapper_4 mt-22 reset-button"
|
||||
bindtap="resetPassword"
|
||||
>
|
||||
<text class="text_10">重置密码</text>
|
||||
</view>
|
||||
<!-- 新密码 -->
|
||||
<view class="field">
|
||||
<input
|
||||
class="field-input"
|
||||
placeholder="请输入密码"
|
||||
placeholder-class="ph"
|
||||
password="true"
|
||||
model:value="{{newPwd}}"
|
||||
bindinput="onNewPwdInput"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<!-- 确认密码 -->
|
||||
<view class="field field-last">
|
||||
<input
|
||||
class="field-input"
|
||||
placeholder="请再次输入密码"
|
||||
placeholder-class="ph"
|
||||
password="true"
|
||||
model:value="{{confirmPwd}}"
|
||||
bindinput="onConfirmPwdInput"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<!-- 登录账号 -->
|
||||
<text class="link-right" bindtap="gotoLogin">登录账号</text>
|
||||
|
||||
<!-- 重置密码 按钮 -->
|
||||
<view class="btn-primary reset-button" bindtap="resetPassword">
|
||||
<text class="btn-primary-text">重置密码</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -1,131 +1,141 @@
|
||||
/* ===== 页面基础 ===== */
|
||||
.page {
|
||||
padding: 86.25rpx 46.2rpx 326.25rpx 49.89rpx;
|
||||
background-color: #ffffff;
|
||||
box-sizing: border-box;
|
||||
min-height: 100vh;
|
||||
padding: 64rpx 32rpx 48rpx;
|
||||
background: #ffffff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.logo {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
border-radius: 24rpx;
|
||||
box-shadow: 0 8rpx 24rpx rgba(0,0,0,0.06);
|
||||
}
|
||||
|
||||
.page-title {
|
||||
margin-top: 16rpx;
|
||||
font-size: 36rpx;
|
||||
color: #1c2023;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
/* ===== 卡片容器 ===== */
|
||||
.card {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
height: 100%;
|
||||
margin-top: 28rpx;
|
||||
background: #fff;
|
||||
border-radius: 24rpx;
|
||||
box-shadow: 0 10rpx 28rpx rgba(0,0,0,0.06);
|
||||
padding: 28rpx;
|
||||
}
|
||||
.image {
|
||||
width: 232.5rpx;
|
||||
height: 232.5rpx;
|
||||
}
|
||||
.text {
|
||||
margin-top: 37.8rpx;
|
||||
|
||||
.card-title {
|
||||
font-size: 32rpx;
|
||||
color: #1c2023;
|
||||
font-size: 37.5rpx;
|
||||
font-family: SourceHanSansCN;
|
||||
line-height: 35.18rpx;
|
||||
font-weight: 700;
|
||||
padding-bottom: 12rpx;
|
||||
border-bottom: 1rpx solid #f1f1f1;
|
||||
}
|
||||
.group {
|
||||
margin-top: 86.14rpx;
|
||||
|
||||
/* ===== 表单 ===== */
|
||||
.form { padding-top: 20rpx; }
|
||||
|
||||
.field {
|
||||
background: #fff;
|
||||
border: 1rpx solid #e9e9ec;
|
||||
border-radius: 16rpx;
|
||||
padding: 20rpx 24rpx;
|
||||
box-shadow: 0 6rpx 16rpx rgba(0,0,0,0.04);
|
||||
margin-top: 18rpx;
|
||||
}
|
||||
.font {
|
||||
.field:focus-within {
|
||||
border-color: #ff8d1a;
|
||||
box-shadow: 0 8rpx 24rpx rgba(255,141,26,0.12);
|
||||
}
|
||||
|
||||
.field-input {
|
||||
width: 100%;
|
||||
font-size: 30rpx;
|
||||
font-family: SourceHanSansCN;
|
||||
line-height: 27.79rpx;
|
||||
color: #b3b3b3;
|
||||
}
|
||||
.text_2 {
|
||||
color: #1c2023;
|
||||
line-height: 28.09rpx;
|
||||
line-height: 44rpx;
|
||||
}
|
||||
.section {
|
||||
margin-left: 2.61rpx;
|
||||
margin-right: 4.42rpx;
|
||||
padding: 20.63rpx 0 18.75rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 9.38rpx;
|
||||
box-shadow: 0rpx 3.75rpx 11.25rpx #00000040;
|
||||
.ph { color: #9aa0a6; }
|
||||
|
||||
/* 输入 + 发送验证码 并排 */
|
||||
.field-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16rpx;
|
||||
padding-right: 16rpx;
|
||||
}
|
||||
.text-wrapper {
|
||||
margin-left: 16.88rpx;
|
||||
margin-right: 16.88rpx;
|
||||
.flex-1 { flex: 1; }
|
||||
|
||||
.field-last {
|
||||
margin-bottom: 26rpx;
|
||||
}
|
||||
.view {
|
||||
padding: 15.92rpx 0 12.64rpx;
|
||||
background-color: #ffffff00;
|
||||
|
||||
/* ===== 发送验证码按钮(用 text 作为按钮) ===== */
|
||||
.code-btn {
|
||||
height: 44rpx;
|
||||
padding: 0 24rpx;
|
||||
background: #ff8d1a;
|
||||
border-radius: 14rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
white-space: nowrap;
|
||||
box-shadow: 0 8rpx 18rpx rgba(255,141,26,0.25);
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
font-weight: 600;
|
||||
transition: transform .08s ease-in-out, opacity .2s;
|
||||
}
|
||||
.group_2 {
|
||||
padding-left: 2.61rpx;
|
||||
.code-btn:active { transform: scale(0.98); }
|
||||
.code-btn.disabled {
|
||||
opacity: 0.55;
|
||||
box-shadow: none;
|
||||
}
|
||||
.section_2 {
|
||||
margin-right: 4.42rpx;
|
||||
padding: 25.16rpx 16.88rpx 24.22rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 9.38rpx;
|
||||
box-shadow: 0rpx 3.75rpx 7.5rpx #00000040;
|
||||
|
||||
/* ===== 右侧链接 ===== */
|
||||
.link-right {
|
||||
margin-top: 14rpx;
|
||||
font-size: 26rpx;
|
||||
color: #666a73;
|
||||
align-self: flex-end;
|
||||
}
|
||||
.text-wrapper_2 {
|
||||
flex: 1 1 0;
|
||||
|
||||
/* ===== 主按钮 ===== */
|
||||
.btn-primary {
|
||||
margin-top: 28rpx;
|
||||
height: 96rpx;
|
||||
border-radius: 18rpx;
|
||||
background: linear-gradient(180deg, #ff9a2d 0%, #ff8d1a 100%);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 14rpx 28rpx rgba(255,141,26,0.28);
|
||||
transition: transform .06s ease-in-out;
|
||||
}
|
||||
.view_2 {
|
||||
padding: 12.51rpx 0 15.96rpx;
|
||||
background-color: #ffffff00;
|
||||
height: 66.25rpx;
|
||||
}
|
||||
.text-wrapper_3 {
|
||||
margin-right: 18.77rpx;
|
||||
padding: 13.16rpx 0 10.93rpx;
|
||||
background-color: #ff8d1a;
|
||||
border-radius: 9.38rpx;
|
||||
width: 157.5rpx;
|
||||
height: 45rpx;
|
||||
}
|
||||
.text_6 {
|
||||
.btn-primary:active { transform: scale(0.985); }
|
||||
.btn-primary-text {
|
||||
color: #ffffff;
|
||||
font-size: 22.5rpx;
|
||||
font-family: AlibabaPuHuiTi;
|
||||
line-height: 20.91rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
.section_1 {
|
||||
margin-right: 4.42rpx;
|
||||
padding: 21.56rpx 0 17.81rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 9.38rpx;
|
||||
box-shadow: 0rpx 3.75rpx 7.5rpx #00000040;
|
||||
}
|
||||
.text-wrapper_1 {
|
||||
padding: 13.84rpx 0 14.55rpx;
|
||||
background-color: #ffffff00;
|
||||
}
|
||||
.section_3 {
|
||||
margin-right: 4.42rpx;
|
||||
padding: 19.22rpx 0 20.16rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 9.38rpx;
|
||||
box-shadow: 0rpx 3.75rpx 7.5rpx #00000040;
|
||||
}
|
||||
.text-wrapper_5 {
|
||||
padding: 13.37rpx 0 14.87rpx;
|
||||
background-color: #ffffff00;
|
||||
}
|
||||
.text_9 {
|
||||
color: #1c2023;
|
||||
font-size: 26.25rpx;
|
||||
font-family: SourceHanSansCN;
|
||||
line-height: 24.23rpx;
|
||||
}
|
||||
.text-wrapper_4 {
|
||||
margin-right: 4.42rpx;
|
||||
padding: 36.04rpx 0 34.01rpx;
|
||||
background-color: #ff8d1a;
|
||||
border-radius: 9.38rpx;
|
||||
}
|
||||
.text_10 {
|
||||
color: #ffffff;
|
||||
font-size: 30rpx;
|
||||
font-family: AlibabaPuHuiTi;
|
||||
line-height: 27.45rpx;
|
||||
}
|
||||
.input {
|
||||
padding: 15rpx 16.26rpx 13.13rpx 16.26rpx;
|
||||
}
|
||||
.input_1 {
|
||||
padding: 13.13rpx 16.26rpx 16.88rpx 16.26rpx;
|
||||
}
|
||||
.input_2 {
|
||||
padding: 13.13rpx 16.26rpx 15rpx 16.26rpx;
|
||||
}
|
||||
.input_3 {
|
||||
padding: 13.13rpx 16.26rpx 15rpx 16.26rpx;
|
||||
}
|
||||
|
||||
/* ===== 可选:保留一些你原先可能依赖的工具类,避免其它页面受影响 ===== */
|
||||
.flex-col { display: flex; flex-direction: column; }
|
||||
.flex-row { display: flex; flex-direction: row; }
|
||||
.items-center { align-items: center; }
|
||||
.self-center { align-self: center; }
|
||||
.self-stretch { align-self: stretch; }
|
||||
.self-start { align-self: flex-start; }
|
||||
.relative { position: relative; }
|
||||
.shrink-0 { flex-shrink: 0; }
|
||||
.mt-20 { margin-top: 40rpx; }
|
||||
.mt-22 { margin-top: 44rpx; }
|
||||
.ml-12 { margin-left: 24rpx; }
|
Reference in New Issue
Block a user