美化了样式2.0
This commit is contained in:
@ -1,78 +1,107 @@
|
||||
<view class="flex-col page">
|
||||
<image
|
||||
class="self-center image"
|
||||
src="./images/logo.png"
|
||||
/>
|
||||
<text class="self-center text">欢迎登陆—青橙校园</text>
|
||||
<view class="flex-col self-stretch group">
|
||||
<view class="flex-col register">
|
||||
<text class="self-start font text_2">账号注册</text>
|
||||
<view class="flex-col self-stretch group_6 mt-20">
|
||||
<view class="flex-col">
|
||||
<view class="flex-col justify-start relative section">
|
||||
<input class="flex-col justify-start items-start text-wrapper_5 view input"
|
||||
placeholder="{{ placeholder }}"
|
||||
maxlength="18"
|
||||
bindinput="onInput" data-field="nickname" value="{{nickname}}"
|
||||
/>
|
||||
</view>
|
||||
<view class="flex-col justify-start section_1 mt-22">
|
||||
<input
|
||||
class="flex-col justify-start items-start text-wrapper_5 text-wrapper_1 input_1"
|
||||
placeholder="请输入手机号"
|
||||
maxlength="11"
|
||||
type="number"
|
||||
bindinput="onInput" data-field="phone" value="{{phone}}"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-row items-center relative section_3 mt-22">
|
||||
<input
|
||||
class="flex-col justify-start items-start text-wrapper_2 view_6 input_2"
|
||||
placeholder="请输入验证码"
|
||||
maxlength="6"
|
||||
bindinput="onInput" data-field="captcha" value="{{captcha}}"
|
||||
/>
|
||||
<view bindtap="{{sending ? '' : 'sendSmsCode'}}" class="flex-col justify-start items-center shrink-0 text-wrapper_3 ml-18">
|
||||
<text class="text_7">{{ sending ? count + 's后重发' : '发送验证码' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-col mt-22">
|
||||
<view class="flex-col justify-start relative section_2">
|
||||
<input
|
||||
class="flex-col justify-start items-start text-wrapper_5 view_1 input_3"
|
||||
placeholder="请输入邀请码"
|
||||
maxlength="6"
|
||||
bindinput="onInput" data-field="inviteCode" value="{{inviteCode}}"
|
||||
/>
|
||||
</view>
|
||||
<view class="flex-col justify-start section_2 mt-22">
|
||||
<input class="flex-col justify-start items-start text-wrapper_5 view_3 input_4"
|
||||
placeholder="请输入密码"
|
||||
password="true"
|
||||
maxlength="11"
|
||||
bindinput="onInput" data-field="password" value="{{password}}"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="page">
|
||||
|
||||
<!-- 顶部 Logo 与标题 -->
|
||||
<image class="logo" src="/static/logo.jpg" mode="aspectFit" />
|
||||
<text class="page-title">欢迎登录 — 丁香校园</text>
|
||||
|
||||
<!-- 注册卡片 -->
|
||||
<view class="card">
|
||||
|
||||
<view class="card-head">
|
||||
<text class="card-title">账号注册</text>
|
||||
</view>
|
||||
|
||||
<!-- 表单 -->
|
||||
<view class="form">
|
||||
|
||||
<!-- 昵称 -->
|
||||
<view class="field">
|
||||
<input
|
||||
class="field-input"
|
||||
placeholder="{{ placeholder }}"
|
||||
placeholder-class="ph"
|
||||
maxlength="18"
|
||||
bindinput="onInput" data-field="nickname" value="{{nickname}}"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<!-- 手机号 -->
|
||||
<view class="field">
|
||||
<input
|
||||
class="field-input"
|
||||
placeholder="请输入手机号"
|
||||
placeholder-class="ph"
|
||||
maxlength="11"
|
||||
type="number"
|
||||
bindinput="onInput" data-field="phone" value="{{phone}}"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<!-- 验证码(输入 + 发送) -->
|
||||
<view class="field field-row">
|
||||
<input
|
||||
class="field-input flex-1"
|
||||
placeholder="请输入验证码"
|
||||
placeholder-class="ph"
|
||||
maxlength="6"
|
||||
bindinput="onInput" data-field="captcha" value="{{captcha}}"
|
||||
/>
|
||||
<view
|
||||
bindtap="{{sending ? '' : 'sendSmsCode'}}"
|
||||
class="code-btn {{sending ? 'disabled' : ''}}"
|
||||
>
|
||||
<text class="code-btn-text">{{ sending ? count + 's后重发' : '发送验证码' }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-row items-center group_1 mt-26">
|
||||
<!-- 复选框 -->
|
||||
|
||||
<!-- 邀请码 -->
|
||||
<view class="field">
|
||||
<input
|
||||
class="field-input"
|
||||
placeholder="请输入邀请码"
|
||||
placeholder-class="ph"
|
||||
maxlength="6"
|
||||
bindinput="onInput" data-field="inviteCode" value="{{inviteCode}}"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<!-- 密码 -->
|
||||
<view class="field">
|
||||
<input
|
||||
class="field-input"
|
||||
placeholder="请输入密码"
|
||||
placeholder-class="ph"
|
||||
password="true"
|
||||
maxlength="18"
|
||||
bindinput="onInput" data-field="password" value="{{password}}"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<!-- 协议勾选 -->
|
||||
<view class="agreements">
|
||||
<checkbox-group bindchange="onCheckboxChange">
|
||||
<checkbox value="agree" checked="{{agree}}" color="#FF8D1A" />
|
||||
</checkbox-group>
|
||||
<view class="group_2 ml-13">
|
||||
<text class="font_2 text_10">我已阅读并同意</text>
|
||||
<text class="font_2" bind:tap="gotoAgreement">《用户协议》</text>
|
||||
<text class="text_11">&</text>
|
||||
<text class="font_2" bind:tap="gotoPolicy">《隐私协议》</text>
|
||||
<view class="agreements-text">
|
||||
<text class="muted">我已阅读并同意</text>
|
||||
<text class="link" bind:tap="gotoAgreement">《用户协议》</text>
|
||||
<text class="muted">&</text>
|
||||
<text class="link" bind:tap="gotoPolicy">《隐私协议》</text>
|
||||
</view>
|
||||
</view>
|
||||
<view bindtap="onRegister" class="flex-col justify-start items-center text-wrapper_6 mt-26"><text class="font text_12">注册</text></view>
|
||||
|
||||
<!-- 注册按钮 -->
|
||||
<view class="btn-primary" bindtap="onRegister">
|
||||
<text class="btn-primary-text">注册</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="self-center group_3">
|
||||
<text class="font_2 text_13">已有账号?</text>
|
||||
<text bindtap="gotoLogin" class="font_2 text_14" >立即登录→</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 登录引导 -->
|
||||
<view class="footer-tip">
|
||||
<text class="muted">已有账号?</text>
|
||||
<text class="link-strong" bindtap="gotoLogin">立即登录 →</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
@ -1,172 +1,182 @@
|
||||
.ml-13 {
|
||||
margin-left: 24.38rpx;
|
||||
}
|
||||
/* ===== 基础布局 ===== */
|
||||
.page {
|
||||
padding: 0rpx 49.74rpx 79.82rpx 49.74rpx;
|
||||
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;
|
||||
}
|
||||
.register {
|
||||
margin-top: -30rpx;
|
||||
|
||||
.card-head {
|
||||
padding-bottom: 12rpx;
|
||||
border-bottom: 1rpx solid #f1f1f1;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
.group {
|
||||
margin-top: 86.36rpx;
|
||||
|
||||
.form {
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
.font {
|
||||
|
||||
/* ===== 表单字段 ===== */
|
||||
.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;
|
||||
}
|
||||
|
||||
.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.2rpx;
|
||||
line-height: 44rpx;
|
||||
}
|
||||
.group_6 {
|
||||
padding-left: 2.76rpx;
|
||||
|
||||
.ph { color: #9aa0a6; }
|
||||
|
||||
.field-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16rpx;
|
||||
padding-right: 16rpx;
|
||||
}
|
||||
.section {
|
||||
padding: 20.63rpx 0 18.75rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 9.38rpx;
|
||||
box-shadow: 0rpx 3.75rpx 11.25rpx #00000040;
|
||||
|
||||
.flex-1 { flex: 1; }
|
||||
|
||||
/* ===== 验证码按钮 ===== */
|
||||
.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);
|
||||
transition: transform .08s ease-in-out, opacity .2s;
|
||||
}
|
||||
.text-wrapper_5 {
|
||||
margin-left: 16.88rpx;
|
||||
margin-right: 16.88rpx;
|
||||
|
||||
.code-btn:active { transform: scale(0.98); }
|
||||
|
||||
.code-btn.disabled {
|
||||
opacity: 0.55;
|
||||
box-shadow: none;
|
||||
}
|
||||
.view {
|
||||
padding: 15.92rpx 0 12.62rpx;
|
||||
background-color: #ffffff00;
|
||||
|
||||
.code-btn-text {
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
.section_1 {
|
||||
padding: 20.16rpx 0 19.22rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 9.38rpx;
|
||||
box-shadow: 0rpx 3.75rpx 7.5rpx #00000040;
|
||||
|
||||
/* ===== 协议区 ===== */
|
||||
.agreements {
|
||||
margin-top: 22rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 14rpx;
|
||||
}
|
||||
.text-wrapper_1 {
|
||||
padding: 12.64rpx 0 15.92rpx;
|
||||
background-color: #ffffff00;
|
||||
|
||||
.agreements-text {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8rpx;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.section_3 {
|
||||
padding: 25.63rpx 16.88rpx 28.75rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 9.38rpx;
|
||||
box-shadow: 0rpx 3.75rpx 7.5rpx #00000040;
|
||||
|
||||
.muted { color: #666a73; font-size: 26rpx; }
|
||||
.link { color: #ff5e00; font-size: 26rpx; }
|
||||
.link-strong { color: #ff5e00; font-size: 28rpx; font-weight: 700; }
|
||||
|
||||
/* ===== 主按钮 ===== */
|
||||
.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;
|
||||
}
|
||||
.text-wrapper_2 {
|
||||
flex: 1 1 0;
|
||||
}
|
||||
.view_6 {
|
||||
padding: 16.73rpx 0 11.74rpx;
|
||||
background-color: #ffffff00;
|
||||
height: 66.25rpx;
|
||||
}
|
||||
.text-wrapper_3 {
|
||||
margin-right: 15rpx;
|
||||
padding: 13.16rpx 0 10.93rpx;
|
||||
background-color: #ff8d1a;
|
||||
border-radius: 9.38rpx;
|
||||
width: 157.5rpx;
|
||||
height: 45rpx;
|
||||
}
|
||||
.text_7 {
|
||||
|
||||
.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_2 {
|
||||
padding: 20.63rpx 0 18.75rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 9.38rpx;
|
||||
box-shadow: 0rpx 3.75rpx 7.5rpx #00000040;
|
||||
|
||||
/* ===== 底部引导 ===== */
|
||||
.footer-tip {
|
||||
margin-top: 28rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8rpx;
|
||||
}
|
||||
.view_1 {
|
||||
padding: 11.7rpx 0 16.89rpx;
|
||||
background-color: #ffffff00;
|
||||
}
|
||||
.view_3 {
|
||||
padding: 11.96rpx 0 16.29rpx;
|
||||
background-color: #ffffff00;
|
||||
}
|
||||
.group_1 {
|
||||
padding: 0 2.76rpx;
|
||||
}
|
||||
.group_2 {
|
||||
line-height: 24.56rpx;
|
||||
height: 24.56rpx;
|
||||
}
|
||||
.font_2 {
|
||||
font-size: 26.25rpx;
|
||||
font-family: SourceHanSansCN;
|
||||
line-height: 24.49rpx;
|
||||
color: #ff5e00;
|
||||
}
|
||||
.text_10 {
|
||||
color: #1c2023;
|
||||
line-height: 24.56rpx;
|
||||
}
|
||||
.text_11 {
|
||||
color: #1c2023;
|
||||
font-size: 26.25rpx;
|
||||
font-family: SourceHanSansCN;
|
||||
line-height: 19.93rpx;
|
||||
}
|
||||
.text-wrapper_6 {
|
||||
margin-left: 2.76rpx;
|
||||
padding: 37.63rpx 0 32.27rpx;
|
||||
background-color: #ff8d1a;
|
||||
border-radius: 9.38rpx;
|
||||
}
|
||||
.text_12 {
|
||||
color: #ffffff;
|
||||
line-height: 27.6rpx;
|
||||
}
|
||||
.group_3 {
|
||||
margin-top: 37rpx;
|
||||
line-height: 24.36rpx;
|
||||
}
|
||||
.text_13 {
|
||||
color: #383838;
|
||||
line-height: 24.28rpx;
|
||||
}
|
||||
.text_14 {
|
||||
line-height: 24.36rpx;
|
||||
}
|
||||
.input {
|
||||
padding: 13.13rpx 16.26rpx 15rpx 16.26rpx;
|
||||
}
|
||||
.input_1 {
|
||||
padding: 13.13rpx 16.26rpx 15rpx 16.26rpx;
|
||||
}
|
||||
.input_2 {
|
||||
padding: 13.13rpx 16.26rpx 15rpx 16.26rpx;
|
||||
}
|
||||
.input_3 {
|
||||
padding: 13.13rpx 16.26rpx 15rpx 16.26rpx;
|
||||
}
|
||||
.input_4 {
|
||||
padding: 13.13rpx 16.26rpx 15rpx 16.26rpx;
|
||||
}
|
||||
.checkbox {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.checkbox .wx-checkbox-input {
|
||||
width: 37.5rpx;
|
||||
height: 37.5rpx;
|
||||
}
|
||||
|
||||
/* ===== 兼容你原先的类名(可选保留,避免影响其他样式) ===== */
|
||||
.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-start { align-self: flex-start; }
|
||||
.self-stretch { align-self: stretch; }
|
||||
.relative { position: relative; }
|
||||
.shrink-0 { flex-shrink: 0; }
|
||||
|
||||
.mt-20 { margin-top: 40rpx; }
|
||||
.mt-22 { margin-top: 44rpx; } /* 你原文件的 mt-22 语义留存 */
|
||||
.mt-26 { margin-top: 52rpx; }
|
||||
.ml-13 { margin-left: 26rpx; }
|
||||
.ml-18 { margin-left: 36rpx; }
|
||||
|
||||
/* 旧色彩类(若其他页面使用到,可保留) */
|
||||
.text { color: #1c2023; }
|
||||
.font { font-size: 36rpx; }
|
||||
.font_2 { font-size: 26rpx; color: #1c2023; }
|
||||
.text_10, .text_11 { font-size: 26rpx; }
|
||||
|
||||
/* 你原先的按钮类名占位(防止引用处报错) */
|
||||
.text-wrapper_6 { }
|
||||
|
Reference in New Issue
Block a user