美化了样式2.0

This commit is contained in:
2025-08-15 11:14:42 +08:00
parent 1b4d3e310b
commit 23ab2798d8
23 changed files with 1555 additions and 1106 deletions

View File

@ -11,9 +11,37 @@ Page({
courseId: 0, // 课程id
courseObj: '', // 课程对象
globalImgUrl, // 全局图片
isMaskVisible: false
isMaskVisible: false,
isNoticeVisible: true,
noticeHtml: `
<h3>一、购买与使用</h3>
<p>1购买后请在 <strong>「我的订单」</strong> 中查看并进入课程学习;</p>
<p>2课程为虚拟内容服务一经购买概不支持无理由退款</p>
<h3>二、账号与权益</h3>
<p>1课程仅限购买账号本人使用不可转借、分享或用于商业用途</p>
<p>2如发现恶意盗链、传播等行为我们有权封禁账号并追究法律责任。</p>
<h3>三、发票与售后</h3>
<p>如需发票或遇到问题,请在课程详情页联系客服。</p>
<h3>四、其他</h3>
<p>购买即视为同意本须知及平台服务协议。</p>
`,
},
// 打开/关闭弹窗
openNotice() {
this.setData({ isNoticeVisible: true });
},
closeNotice() {
this.setData({ isNoticeVisible: false });
},
// 阻止冒泡/滚动穿透的空函数
noop() {},
// 创建订单方法
createOrder() {
const { courseId } = this.data;

View File

@ -51,3 +51,27 @@
<!-- 遮罩 -->
<view wx:if="{{isMaskVisible}}" class="page-mask"></view>
</view>
<!-- ===== 购买须知弹窗(富文本) ===== -->
<view wx:if="{{isNoticeVisible}}" class="modal-mask" catchtouchmove="noop">
<view class="modal" catchtap="noop">
<view class="modal-title">课程购买须知</view>
<!-- 富文本内容:支持 p/h1-h6/strong/em/ul/ol/a 等常见标签 -->
<scroll-view scroll-y class="modal-body">
<rich-text nodes="{{noticeHtml}}"></rich-text>
</scroll-view>
<view class="modal-actions">
<button class="btn-primary" bindtap="closeNotice">我知道了</button>
</view>
</view>
</view>
<!-- 右上角购买须知按钮 -->
<view class="notice-icon" bindtap="openNotice">
<image src="./image/info.png" mode="aspectFit" class="notice-icon-img" />
<text class="notice-icon-text">购买须知</text>
</view>

View File

@ -203,3 +203,108 @@
.ml-11 { margin-left: 20rpx; }
.mt-15 { margin-top: 28rpx; }
.ml-1 { margin-left: 2rpx; }
/* 入口小字 */
.notice-entry {
margin-right: 16rpx;
font-size: 24rpx;
color: #8a8a8a;
text-decoration: underline;
}
/* 弹窗遮罩 */
.modal-mask {
position: fixed;
z-index: 999; /* 确保在你的 .footer 与其他遮罩之上 */
inset: 0;
background: rgba(0,0,0,0.45);
display: flex;
justify-content: center;
align-items: center;
padding: 40rpx;
}
/* 弹窗容器 */
.modal {
width: 86%;
max-width: 640rpx;
max-height: 70vh;
background: #fff;
border-radius: 24rpx;
overflow: hidden;
box-shadow: 0 12rpx 40rpx rgba(0,0,0,0.18);
}
/* 标题 */
.modal-title {
padding: 28rpx 32rpx 12rpx;
font-size: 32rpx;
font-weight: 600;
color: #222;
}
/* 内容区滚动 */
.modal-body {
max-height: 48vh;
padding: 8rpx 32rpx 24rpx;
}
/* 富文本默认样式优化 */
.modal-body rich-text {
display: block;
font-size: 26rpx;
line-height: 1.75;
color: #444;
}
.modal-body h3 { font-size: 28rpx; margin: 18rpx 0 8rpx; color: #222; }
.modal-body p { margin: 10rpx 0; }
.modal-body ul, .modal-body ol { margin: 10rpx 0 10rpx 28rpx; }
.modal-body a { color: #1677ff; word-break: break-all; }
/* 底部按钮区 */
.modal-actions {
padding: 20rpx 24rpx 28rpx;
}
.btn-primary {
width: 100%;
height: 84rpx;
line-height: 84rpx;
text-align: center;
border-radius: 16rpx;
background: #ff8a00; /* 你的主色调(可换成项目变量) */
color: #fff;
font-size: 30rpx;
font-weight: 600;
}
.btn-primary:active {
opacity: 0.85;
}
.notice-icon {
position: absolute;
top: 20rpx;
right: 20rpx;
z-index: 10;
display: flex;
align-items: center;
background: rgba(255, 255, 255, 0.92);
border-radius: 30rpx;
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.15);
padding: 6rpx 14rpx;
}
.notice-icon-img {
width: 34rpx;
height: 34rpx;
margin-right: 8rpx;
}
.notice-icon-text {
font-size: 24rpx;
color: #333;
}
.notice-icon:active {
opacity: 0.85;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

@ -12,7 +12,7 @@
.title {
font-size: 40rpx;
font-weight: 700;
color: #e67e22; /* 主色:橙 */
color: #ff8a00; /* 主色:橙 */
}
.content {
@ -101,9 +101,9 @@
margin-top: 24rpx;
}
.btn-primary {
background: linear-gradient(180deg, #ffa400 0%, #e67e22 100%);
background: linear-gradient(180deg, #ffa400 0%, #ff8a00 100%);
color: #ffffff;
box-shadow: 0 6rpx 14rpx rgba(230,126,34,0.30);
box-shadow: 0 6rpx 14rpx rgba(255,138,0,0.30);
}
/* ===== 列表与条目 ===== */
@ -135,7 +135,7 @@
.rank-text {
font-size: 28rpx;
font-weight: 700;
color: #333333;
color: #ff8a00; /* 改为亮橙 */
}
.person-line {
@ -174,7 +174,7 @@
.kv:first-of-type { border-top: 0; }
.kv-key { font-size: 26rpx; color: #666666; }
.kv-val { font-size: 28rpx; color: #1f1f1f; }
.money { color: #e67e22; font-weight: 700; }
.money { color: #ff8a00; font-weight: 700; }
/* ===== 空状态 ===== */
.empty {

View File

@ -8,7 +8,7 @@
.page-title { padding: 24rpx 24rpx 0; }
.title {
color: #e67e22; /* 暖橙主色 */
color: #ff8a00; /* 主标题亮橙 */
font-size: 40rpx;
font-weight: 700;
}
@ -71,9 +71,9 @@
margin-top: 24rpx;
}
.btn-primary {
background: linear-gradient(180deg, #ffa400 0%, #e67e22 100%);
background: linear-gradient(180deg, #ffa400 0%, #ff8a00 100%);
color: #ffffff;
box-shadow: 0 6rpx 14rpx rgba(230,126,34,0.30);
box-shadow: 0 6rpx 14rpx rgba(255,138,0,0.30);
}
/* 空状态 */
@ -114,7 +114,7 @@
justify-content: center;
border: 1rpx solid #ffd6b3;
}
.link-text { font-size: 24rpx; color: #e67e22; font-weight: 600; }
.link-text { font-size: 24rpx; color: #ff8a00; font-weight: 600; }
/* 键值行 */
.row {
@ -129,7 +129,7 @@
.mono { font-size: 28rpx; color: #1f1f1f; font-family: monospace; letter-spacing: 1rpx; }
.copy {
font-size: 24rpx;
color: #e67e22;
color: #ff8a00;
padding: 8rpx 14rpx;
border-radius: 12rpx;
background: #fff4f2;
@ -168,7 +168,7 @@
font-weight: 700;
color: #1f1f1f;
}
.gi-value.money { color: #e67e22; }
.gi-value.money { color: #ff8a00; }
/* 小屏两列适配 */
@media (max-width: 360px) {

View File

@ -10,7 +10,7 @@
padding: 24rpx 24rpx 0;
}
.title {
color: #e67e22; /* 主标题橙 */
color: #ff8a00; /* 主标题橙 */
font-size: 40rpx;
font-weight: 700;
}
@ -80,9 +80,9 @@
}
.btn-primary {
background: linear-gradient(180deg, #ffa400 0%, #e67e22 100%);
background: linear-gradient(180deg, #ffa400 0%, #ff8a00 100%);
color: #ffffff;
box-shadow: 0 6rpx 14rpx rgba(230, 126, 34, 0.30);
box-shadow: 0 6rpx 14rpx rgba(255, 138, 0, 0.30);
}
/* ===== 空状态 ===== */
@ -136,7 +136,7 @@
.link-text {
font-size: 24rpx;
color: #e67e22;
color: #ff8a00;
font-weight: 600;
}
@ -169,7 +169,7 @@
.copy {
font-size: 24rpx;
color: #e67e22;
color: #ff8a00;
padding: 8rpx 14rpx;
border-radius: 12rpx;
background: #fff4f2;
@ -228,7 +228,7 @@
.grid-item:nth-child(6) .gi-value,
.grid-item:nth-child(8) .gi-value,
.grid-item:nth-child(9) .gi-value {
color: #e67e22;
color: #ff8a00;
}
/* 小屏两列适配 */

View File

@ -7,7 +7,7 @@
}
.page-title { padding: 24rpx 24rpx 0; }
.title {
color: #e67e22; /* 橙主色 */
color: #ff8a00; /* 橙主色 */
font-size: 40rpx;
font-weight: 700;
}
@ -64,9 +64,9 @@
font-weight: 600;
}
.btn-primary {
background: linear-gradient(180deg, #ffa400 0%, #e67e22 100%);
background: linear-gradient(180deg, #ffa400 0%, #ff8a00 100%);
color: #ffffff;
box-shadow: 0 6rpx 14rpx rgba(230,126,34,0.30);
box-shadow: 0 6rpx 14rpx rgba(255,138,0,0.30);
}
/* ===== 列表容器 ===== */
@ -119,7 +119,7 @@
max-width: 70%;
word-break: break-all;
}
.money { color: #e67e22; font-weight: 700; }
.money { color: #ff8a00; font-weight: 700; }
/* 空状态 */
.empty {

View File

@ -1,104 +1,108 @@
<view class="flex-col page">
<!-- 遮罩层(上传时显示) -->
<view wx:if="{{isUploading}}" class="mask">
<text class="loading-text">上传中...</text>
<view class="page">
<!-- 遮罩层(上传时显示) -->
<view wx:if="{{isUploading}}" class="mask">
<text class="loading-text">上传中...</text>
</view>
<!-- 顶部 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 class="head-link" bind:tap="gotoNotice">
<text class="head-link-text">员工账号申请须知</text>
<image class="head-link-icon" src="./images/right.png" mode="aspectFit" />
</view>
</view>
<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">
<view class="flex-row justify-between group_1">
<text class="font text_2">员工账号申请</text>
<view class="flex-row items-center group_2" bind:tap="gotoNotice">
<image
class="shrink-0 image_2 image_3"
src="./images/right.png"
/>
<text class="font_2 text_3">员工账号申请须知</text>
</view>
</view>
<view class="flex-col mt-15">
<!-- 姓名输入 -->
<view class="flex-col justify-start section">
<input
class="flex-col justify-start items-start text-wrapper view input"
placeholder="请输入姓名"
maxlength="8"
bindinput="onInput"
data-field="name"
value="{{name}}"
/>
</view>
<!-- 手机号输入 -->
<view class="flex-col justify-start section_1 mt-21">
<input
class="flex-col justify-start items-start text-wrapper text-wrapper_1 input_1"
placeholder="请输入手机号"
maxlength="11"
type="number"
bindinput="onInput"
data-field="phone"
value="{{phone}}"
/>
</view>
<!-- 验证码输入 + 发送按钮 -->
<view class="flex-row items-center section_3 mt-21">
<input
class="flex-col justify-start items-start text-wrapper_2 view_3 input_2"
placeholder="请输入验证码"
type="number"
bindinput="onInput"
data-field="code"
value="{{code}}"
maxlength="6"
/>
<view
class="flex-col justify-start items-center shrink-0 text-wrapper_3 ml-16"
bindtap="getSmsCode"
>
<text class="text_8">
{{ codeButtonText }}
</text>
</view>
</view>
<!-- 身份证号输入 -->
<view class="flex-col justify-start items-start section_2 mt-21">
<input
class="flex-col justify-start items-start text-wrapper_4 view_4 input_3"
placeholder="请输入身份证号"
type="idcard"
bindinput="onInput"
data-field="idcard"
maxlength="18"
value="{{idcard}}"
/>
</view>
<!-- 上传简历 -->
<view class="flex-col items-center section_4 mt-21" bindtap="chooseResume">
<image
class="image_4"
src="./images/resume.png"
/>
<text class="{{resumeUploaded?'upload-success-text':'font_2 text_10 mt-12'}}">
{{ resumeUploaded ? '简历上传成功!' : '点击上传简历' }}
</text>
</view>
<!-- 提交按钮 -->
<view class="flex-col justify-start items-center text-wrapper_5 mt-21" bindtap="handleSubmit">
<text class="text_11">提交申请</text>
</view>
</view>
</view>
<view class="flex-row justify-center items-center relative group_4 mt-28" bind:tap="gotoQuery">
<image
class="image_2 pos"
src="./images/right.png"
<!-- 表单 -->
<view class="form">
<!-- 姓名 -->
<view class="field">
<input
class="field-input"
placeholder="请输入姓名"
placeholder-class="ph"
maxlength="8"
bindinput="onInput"
data-field="name"
value="{{name}}"
/>
<text class="font_2 text_12">我的申请记录</text>
</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"
type="number"
maxlength="6"
bindinput="onInput"
data-field="code"
value="{{code}}"
/>
<view
class="code-btn"
bindtap="getSmsCode"
>
<text class="code-btn-text">{{ codeButtonText }}</text>
</view>
</view>
<!-- 身份证号 -->
<view class="field">
<input
class="field-input"
placeholder="请输入身份证号"
placeholder-class="ph"
type="idcard"
maxlength="18"
bindinput="onInput"
data-field="idcard"
value="{{idcard}}"
/>
</view>
<!-- 上传简历 -->
<view class="upload-box" bindtap="chooseResume">
<image class="upload-icon" src="./images/resume.png" mode="aspectFit" />
<text class="{{ resumeUploaded ? 'upload-success-text' : 'upload-tip' }}">{{ resumeUploaded ? '简历上传成功!' : '点击上传简历' }}
</text>
</view>
<!-- 提交按钮 -->
<view class="btn-primary" bindtap="handleSubmit">
<text class="btn-primary-text">提交申请</text>
</view>
</view>
<!-- 我的申请记录 -->
<view class="record" bind:tap="gotoQuery">
<text class="record-text">我的申请记录</text>
<image class="record-icon" src="./images/right.png" mode="aspectFit" />
</view>
</view>
</view>

View File

@ -1,205 +1,208 @@
/* pages/loginModule/employeeAccountApply/employeeAccountApply.wxss */
.mt-15 {
margin-top: 28.13rpx;
}
.mt-21 {
margin-top: 39.38rpx;
}
/* ===== 页面与顶区 ===== */
.page {
padding: 67.5rpx 49.69rpx 84.38rpx 51.56rpx;
background-color: #ffffff;
width: 100%;
height: 100%;
position: fixed;
bottom: 0;
overflow: auto;
height: calc(100vh - 1rpx);
box-sizing: border-box;
min-height: 100vh;
padding: 56rpx 32rpx 40rpx;
background-image: linear-gradient(180deg, #ffe3c4 0%, #fff 38%);
display: flex;
flex-direction: column;
align-items: center;
position: relative;
}
.image {
width: 232.5rpx;
height: 232.5rpx;
.logo {
width: 180rpx;
height: 180rpx;
border-radius: 24rpx;
box-shadow: 0 8rpx 24rpx rgba(0,0,0,0.06);
}
.text {
margin-top: 35.14rpx;
.page-title {
margin-top: 12rpx;
font-size: 34rpx;
color: #1c2023;
font-size: 37.5rpx;
font-family: AlibabaPuHuiTi;
line-height: 35.21rpx;
font-weight: 700;
}
.group {
margin-top: 62.77rpx;
}
.group_1 {
padding-left: 2.77rpx;
}
.font {
font-size: 30rpx;
font-family: SourceHanSansCN;
line-height: 27.79rpx;
color: #b3b3b3;
}
.text_2 {
color: #1c2023;
line-height: 28.01rpx;
}
.group_2 {
width: 236.4rpx;
}
.image_2 {
width: 30rpx;
height: 30rpx;
}
.image_3 {
margin-left: 206.4rpx;
}
.font_2 {
font-size: 26.25rpx;
font-family: SourceHanSansCN;
line-height: 24.3rpx;
color: #ff8d1a;
}
.text_3 {
margin-left: -236.4rpx;
}
.section {
padding: 20.63rpx 0 18.75rpx;
background-color: #ffffff;
border-radius: 9.38rpx;
box-shadow: 0rpx 3.75rpx 11.25rpx #00000040;
}
.text-wrapper {
margin-left: 16.88rpx;
margin-right: 16.88rpx;
}
.view {
padding: 15.92rpx 0 12.67rpx;
background-color: #ffffff00;
}
.section_1 {
padding: 20.16rpx 0 19.22rpx;
background-color: #ffffff;
border-radius: 9.38rpx;
box-shadow: 0rpx 3.75rpx 7.5rpx #00000040;
}
.text-wrapper_1 {
padding: 12.64rpx 0 15.92rpx;
background-color: #ffffff00;
}
.section_3 {
padding: 30.69rpx 16.88rpx;
background-color: #ffffff;
border-radius: 9.38rpx;
box-shadow: 0rpx 3.75rpx 7.5rpx #00000040;
}
.text-wrapper_2 {
flex: 1 1 0;
}
.view_3 {
padding: 16.73rpx 0 11.74rpx;
background-color: #ffffff00;
height: 56.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_8 {
color: #ffffff;
font-size: 22.5rpx;
font-family: AlibabaPuHuiTi;
line-height: 15.91rpx;
}
.section_2 {
padding: 19.69rpx 0;
background-color: #ffffff;
border-radius: 9.38rpx;
box-shadow: 0rpx 3.75rpx 7.5rpx #00000040;
}
.text-wrapper_4 {
margin-left: 16.88rpx;
}
.view_4 {
padding: 16.86rpx 0 11.46rpx;
background-color: #ffffff00;
width: 510.63rpx;
}
.section_4 {
padding: 30.81rpx 0 38.16rpx;
background-color: #ff8d1a1a;
border-radius: 9.38rpx;
border: dotted 1.88rpx #ff8d1a;
}
.image_4 {
width: 127.5rpx;
height: 127.5rpx;
}
.text_10 {
color: #000000;
line-height: 24.23rpx;
}
.text-wrapper_5 {
padding: 36.43rpx 0 33.58rpx;
background-color: #ff8d1a;
border-radius: 9.38rpx;
}
.text_11 {
color: #ffffff;
font-size: 30rpx;
font-family: AlibabaPuHuiTi;
line-height: 27.49rpx;
}
.group_4 {
padding: 2.66rpx 0 3rpx;
}
.pos {
position: absolute;
left: 402.19rpx;
top: 50%;
transform: translateY(-50%);
}
.text_12 {
line-height: 24.34rpx;
}
.input {
padding: 15rpx 16.26rpx 13.13rpx 16.26rpx;
}
.input_1 {
padding: 13.13rpx 16.26rpx 15rpx 16.26rpx;
}
.input_2 {
padding: 0 16.88rpx;
}
.input_3 {
padding: 16.88rpx 16.26rpx 11.25rpx 16.26rpx;
}
/* 遮罩层 */
/* ===== 遮罩(上传中) ===== */
.mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
z-index: 9999;
inset: 0;
background: rgba(0,0,0,0.35);
backdrop-filter: blur(2rpx);
z-index: 99;
display: flex;
justify-content: center;
align-items: center;
justify-content: center;
}
/* 加载中文本 */
.loading-text {
color: #ffffff;
font-size: 34rpx;
font-family: AlibabaPuHuiTi;
padding: 20rpx 28rpx;
background: #000000cc;
color: #fff;
border-radius: 16rpx;
font-size: 28rpx;
}
/* 上传成功文字样式 */
.upload-success-text {
/* ===== 主卡片 ===== */
.card {
width: 100%;
margin-top: 24rpx;
background: #fff;
border-radius: 24rpx;
box-shadow: 0 12rpx 36rpx rgba(0,0,0,0.08);
padding: 24rpx 24rpx 16rpx;
}
.card-head {
display: flex;
align-items: center;
justify-content: space-between;
padding-bottom: 12rpx;
border-bottom: 1rpx solid #f1f1f1;
}
.card-title {
font-size: 30rpx;
font-weight: bold;
font-weight: 700;
color: #1c2023;
}
/* 须知入口 */
.head-link {
display: flex;
align-items: center;
gap: 8rpx;
}
.head-link-icon {
width: 28rpx;
height: 28rpx;
}
.head-link-text {
font-size: 26rpx;
color: #ff8d1a;
}
/* ===== 表单 ===== */
.form { padding-top: 16rpx; }
.field {
background: #fff;
border: 1rpx solid #e9e9ec;
border-radius: 16rpx;
padding: 18rpx 22rpx;
box-shadow: 0 6rpx 16rpx rgba(0,0,0,0.04);
margin-top: 18rpx;
}
.field:focus-within {
border-color: #ff8d1a;
box-shadow: 0 10rpx 24rpx rgba(255,141,26,0.14);
}
.field-input {
width: 100%;
font-size: 30rpx;
color: #1c2023;
line-height: 44rpx;
}
.ph { color: #9aa0a6; }
/* 验证码行 */
.field-row {
display: flex;
align-items: center;
gap: 16rpx;
padding-right: 16rpx;
}
.flex-1 { flex: 1; }
.code-btn {
height: 44rpx;
padding: 0 22rpx;
background: #ff8d1a;
border-radius: 12rpx;
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;
}
.code-btn:active { transform: scale(0.98); }
.code-btn-text {
color: #fff;
font-size: 24rpx;
font-weight: 600;
}
/* ===== 上传简历 ===== */
.upload-box {
margin-top: 18rpx;
border: 1rpx dashed #ffb66a;
background: #fffaf4;
border-radius: 16rpx;
padding: 28rpx 22rpx;
display: flex;
align-items: center;
gap: 16rpx;
transition: transform .06s ease-in-out, background .2s;
}
.upload-box:active { transform: scale(0.992); }
.upload-icon {
width: 56rpx;
height: 56rpx;
}
.upload-tip {
font-size: 26rpx;
color: #666a73;
}
.upload-success-text {
font-size: 26rpx;
color: #13b26b;
font-weight: 600;
}
/* ===== 提交按钮 ===== */
.btn-primary {
margin-top: 22rpx;
height: 96rpx;
border-radius: 48rpx; /* 胶囊 */
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;
}
.btn-primary:active { transform: scale(0.985); }
.btn-primary-text {
color: #ffffff;
font-size: 32rpx;
font-weight: 700;
}
/* ===== 记录入口 ===== */
.record {
margin-top: 12rpx;
padding: 16rpx 8rpx 4rpx;
display: flex;
align-items: center;
gap: 10rpx;
justify-content: center;
}
.record-icon { width: 28rpx; height: 28rpx; }
.record-text { font-size: 26rpx; color: #1c2023; }
/* ===== 复用的工具类(与原项目兼容) ===== */
.flex-col { display: flex; flex-direction: column; }
.flex-row { display: flex; flex-direction: row; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.self-center { align-self: center; }
.self-stretch { align-self: stretch; }
.relative { position: relative; }
.shrink-0 { flex-shrink: 0; }
.mt-15 { margin-top: 30rpx; }
.mt-21 { margin-top: 42rpx; }
.mt-28 { margin-top: 56rpx; }
.ml-16 { margin-left: 32rpx; }

View File

@ -43,6 +43,7 @@
.text {
color: #919191;
line-height: 27.75rpx;
width: 90%;
}
.section_2 {
padding: 33.75rpx 28.13rpx 35.63rpx;

View File

@ -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>

View File

@ -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; }

View File

@ -1,106 +1,113 @@
<view class="flex-col page">
<image class="self-center image" src="./images/logo.png" />
<view class="page">
<view class="flex-col items-center self-stretch group">
<!-- 加上 bold-text -->
<text class="font text bold-text">欢迎登陆—青橙校园</text>
<text class="font mt-12">{{ showRole }}端)</text>
<!-- 顶部 Logo -->
<image class="logo" src="/static/logo.jpg" mode="aspectFit" />
<!-- 标题与角色 -->
<view class="title-wrap">
<text class="title bold-text">欢迎登录 — 丁香校园</text>
<text class="subtitle">{{ showRole }}端)</text>
</view>
<!-- 登录卡片 -->
<view class="card">
<!-- 登录方式切换 -->
<view class="tabs">
<text
class="tab {{loginType==='password' ? 'active' : ''}}"
bindtap="switchToPassword"
>密码登录</text>
<text
class="tab {{loginType==='sms' ? 'active' : ''}}"
bindtap="switchToSms"
wx:if="{{ role === 'user' }}"
>验证码登录</text>
</view>
<view class="flex-col self-stretch group_2">
<view class="flex-row">
<!-- 密码登录 -->
<text
class="font_2 toggle-text {{loginType==='password'?'active':''}}"
bindtap="switchToPassword"
>密码登录</text>
<!-- 表单 -->
<view class="form">
<!-- 验证码登录 -->
<text
class="font_2 ml-8 toggle-text {{loginType==='sms'?'active':''}}"
bindtap="switchToSms" wx:if="{{ role === 'user' }}"
>验证码登录</text>
<!-- 手机号 -->
<view class="field">
<input
class="field-input"
placeholder="请输入手机号"
placeholder-class="ph"
value="{{phone}}"
bindinput="onPhoneInput"
maxlength="11"
type="number"
/>
</view>
<view class="flex-col group_1 mt-20">
<!-- 手机号 输入框,保持原 .text-wrapper 样式 -->
<view class="flex-col self-stretch">
<view class="flex-col justify-start relative section">
<input
class="text-wrapper"
placeholder="请输入手机号"
value="{{phone}}"
bindinput="onPhoneInput"
maxlength="11"
type="number"
/>
</view>
</view>
<!-- 密码/验证码 输入框,保持原 .text-wrapper_2 样式 -->
<view class="flex-row items-center section_2 mt-21">
<input
class="text-wrapper"
placeholder="{{ loginType==='password' ? '请输入密码' : '请输入验证码' }}"
value="{{credential}}"
bindinput="onCredentialInput"
password="{{ loginType==='password' }}"
type="{{ loginType==='sms' ? 'number' : 'text' }}"
/>
<!-- 仅验证码登录时显示倒计时按钮 -->
<view
class="flex-col justify-start items-center shrink-0 text-wrapper_3 ml-2"
bindtap="getSmsCode"
wx:if="{{ loginType==='sms' }}"
>
<text class="text_6">{{ codeButtonText }}</text>
</view>
</view>
<!-- 忘记密码,仅密码登录时显示 -->
<text
class="self-end font_4 text_7"
bindtap="gotoForgetPwd"
wx:if="{{ loginType==='password' }}"
>忘记密码</text>
<!-- 登录按钮 -->
<view
class="flex-col justify-start items-center self-stretch text-wrapper_4"
bindtap="onLogin"
<!-- 密码 / 验证码 -->
<view class="field field-row">
<input
class="field-input flex-1"
placeholder="{{ loginType==='password' ? '请输入密码' : '请输入验证码' }}"
placeholder-class="ph"
value="{{credential}}"
bindinput="onCredentialInput"
password="{{ loginType==='password' }}"
type="{{ loginType==='sms' ? 'number' : 'text' }}"
/>
<!-- 验证码按钮(仅验证码登录显示) -->
<view
class="code-btn"
bindtap="getSmsCode"
wx:if="{{ loginType==='sms' }}"
>
<text class="text_8">登录</text>
</view>
<!-- 协议勾选 -->
<view class="flex-row items-center self-stretch group_3">
<checkbox-group bindchange="onAgreeChange">
<checkbox
class="checkbox"
value="agree"
checked="{{ isAgree }}"
color="#FF8D1A"
/>
</checkbox-group>
<view class="group_4 ml-12">
<text class="font_5 text_9">登录代表您已同意</text>
<text class="font_5" bindtap="gotoAgreement">《用户协议》</text>
<text class="text_10">&</text>
<text class="font_5" bindtap="gotoPolicy">《隐私协议》</text>
</view>
</view>
<!-- 去注册 -->
<view class="self-center group_5" wx:if="{{isShowRegister}}">
<text class="font_4 text_11">没有账号?</text>
<text class="font_5 text_12" bindtap="gotoRegister">去注册→</text>
<text class="code-btn-text">{{ codeButtonText }}</text>
</view>
</view>
</view>
<view class="flex-row justify-evenly items-center self-end section_3" bind:tap="joinUs" wx:if="{{ role === 'user' }}">
<text class="font_2 text_13">加入我们</text>
<image class="image_3" src="./images/joinus.png" />
<!-- 忘记密码(仅密码登录) -->
<text
class="link-right"
bindtap="gotoForgetPwd"
wx:if="{{ loginType==='password' }}"
>忘记密码</text>
<!-- 登录按钮 -->
<view
class="btn-primary"
bindtap="onLogin"
>
<text class="btn-primary-text">登录</text>
</view>
<!-- 协议 -->
<view class="agreements">
<checkbox-group bindchange="onAgreeChange">
<checkbox
class="checkbox"
value="agree"
checked="{{ isAgree }}"
color="#FF8D1A"
/>
</checkbox-group>
<view class="agreements-text">
<text class="muted">登录代表您已同意</text>
<text class="link" bindtap="gotoAgreement">《用户协议》</text>
<text class="muted">&</text>
<text class="link" bindtap="gotoPolicy">《隐私协议》</text>
</view>
</view>
<!-- 去注册 -->
<view class="register" wx:if="{{isShowRegister}}">
<text class="muted">没有账号?</text>
<text class="link-strong" bindtap="gotoRegister">去注册 →</text>
</view>
</view>
</view>
<!-- 加入我们(仅 user 端) -->
<view class="cta-join" bind:tap="joinUs" wx:if="{{ role === 'user' }}">
<text class="cta-join-text">加入我们</text>
<image class="cta-join-img" src="./images/joinus.png" mode="aspectFit" />
</view>
</view>

View File

@ -1,190 +1,241 @@
.mt-21 {
margin-top: 39.38rpx;
}
/* ========== 基础 ========== */
.page {
padding: 105rpx 36.56rpx 40.31rpx 49.76rpx;
box-sizing: border-box;
padding: 72rpx 32rpx 48rpx;
background-color: #ffffff;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
}
.logo {
width: 220rpx;
height: 220rpx;
border-radius: 24rpx;
box-shadow: 0 8rpx 24rpx rgba(0,0,0,0.06);
}
.title-wrap {
margin-top: 24rpx;
align-items: center;
text-align: center;
}
.title {
font-size: 40rpx;
line-height: 1.2;
color: #1c2023;
}
.subtitle {
margin-top: 12rpx;
font-size: 28rpx;
color: #666a73;
}
.bold-text { font-weight: 700; }
/* ========== 卡片容器 ========== */
.card {
width: 100%;
overflow-y: auto;
overflow-x: hidden;
height: 100%;
}
.image {
width: 232.5rpx;
height: 232.5rpx;
}
.group {
margin-top: 35.14rpx;
}
.font {
font-size: 37.5rpx;
font-family: AlibabaPuHuiTi;
line-height: 34.73rpx;
color: #1c2023;
}
.text {
line-height: 35.21rpx;
}
.group_2 {
margin-top: 87.15rpx;
}
.font_2 {
font-size: 30rpx;
font-family: SourceHanSansCN;
line-height: 27.69rpx;
color: #1c2023;
}
.text_2 {
line-height: 28.29rpx;
}
.text_3 {
line-height: 28.2rpx;
}
.group_1 {
padding-left: 2.74rpx;
padding-right: 2.74rpx;
}
.section {
margin-right: 11.32rpx;
padding: 20.63rpx 16.88rpx 18.75rpx;
background-color: #ffffff;
border-radius: 9.38rpx;
box-shadow: 0rpx 3.75rpx 11.25rpx #00000040;
}
.text-wrapper {
margin-left: 16.88rpx;
margin-right: 16.88rpx;
padding: 15.92rpx 0 12.64rpx;
background-color: #ffffff00;
margin-right: 100rpx;
}
.font_3 {
font-size: 30rpx;
font-family: SourceHanSansCN;
line-height: 27.69rpx;
color: #b3b3b3;
}
.text_4 {
margin-left: 16.26rpx;
}
.section_2 {
margin-right: 11.32rpx;
padding: 20.63rpx 16.88rpx 18.75rpx;
background-color: #ffffff;
border-radius: 9.38rpx;
box-shadow: 0rpx 3.75rpx 7.5rpx #00000040;
}
.text_5 {
margin-left: 16.26rpx;
line-height: 27.86rpx;
}
.text-wrapper_3 {
margin-right: 5.63rpx;
padding: 13.16rpx 0 10.93rpx;
background-color: #ff8d1a;
border-radius: 9.38rpx;
width: 157.5rpx;
height: 45rpx;
}
.text_6 {
color: #ffffff;
font-size: 22.5rpx;
font-family: AlibabaPuHuiTi;
line-height: 20.91rpx;
}
.font_4 {
font-size: 26.25rpx;
font-family: SourceHanSansCN;
line-height: 24.49rpx;
color: #383838;
}
.text_7 {
margin-right: 6.39rpx;
margin-top: 28.76rpx;
line-height: 24.36rpx;
}
.text-wrapper_4 {
margin-right: 11.32rpx;
margin-top: 46.26rpx;
padding: 36.73rpx 0 34.16rpx;
background-color: #ff8d1a;
border-radius: 9.38rpx;
}
.text_8 {
color: #ffffff;
font-size: 30rpx;
font-family: AlibabaPuHuiTi;
line-height: 26.61rpx;
}
.group_3 {
margin-top: 48.75rpx;
}
.image_2 {
flex-shrink: 0;
}
.image_1 {
width: 37.5rpx;
height: 37.5rpx;
}
.group_4 {
line-height: 24.49rpx;
height: 24.56rpx;
}
.font_5 {
font-size: 26.25rpx;
font-family: SourceHanSansCN;
line-height: 24.49rpx;
color: #ff5e00;
}
.text_9 {
color: #1c2023;
line-height: 24.43rpx;
}
.text_10 {
color: #1c2023;
font-size: 26.25rpx;
font-family: SourceHanSansCN;
line-height: 19.93rpx;
}
.group_5 {
margin-top: 43.91rpx;
line-height: 24.41rpx;
}
.text_11 {
line-height: 24.28rpx;
}
.text_12 {
line-height: 24.41rpx;
}
.section_3 {
margin-top: 100.11rpx;
padding: 12.06rpx 21.69rpx 12.32rpx 24.15rpx;
background-color: #ffffff;
border-radius: 9.38rpx;
width: 215.63rpx;
border: solid 1.88rpx #ff8d1a;
}
.text_13 {
color: #ff8d1a;
line-height: 27.66rpx;
}
.image_3 {
width: 41.25rpx;
height: 41.25rpx;
margin-top: 32rpx;
background: #fff;
border-radius: 24rpx;
box-shadow: 0 10rpx 28rpx rgba(0,0,0,0.06);
padding: 28rpx;
}
/* 欢迎文本加粗 */
.bold-text {
font-weight: bold;
/* ========== 标签切换 ========== */
.tabs {
display: flex;
align-items: center;
gap: 32rpx;
padding: 8rpx 4rpx 20rpx;
border-bottom: 1rpx solid #f1f1f1;
}
/* 切换按钮默认样式,保持原 font_2 大小active 时放大加粗 */
.toggle-text {
font-size: 28rpx;
font-weight: normal;
transition: font-size 0.2s;
.tab {
font-size: 28rpx;
color: #666a73;
padding: 8rpx 6rpx;
position: relative;
transition: color .2s, transform .2s;
}
.toggle-text.active {
font-size: 36rpx;
font-weight: bold;
.tab.active {
color: #1c2023;
font-weight: 700;
transform: translateY(-1rpx);
}
.tab.active::after {
content: '';
position: absolute;
left: 0;
right: 0;
bottom: -12rpx;
height: 6rpx;
background: #ff8d1a;
border-radius: 6rpx;
}
/* ========== 表单区 ========== */
.form { padding-top: 24rpx; }
.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: 20rpx;
}
.field-input {
width: 100%;
font-size: 30rpx;
color: #1c2023;
line-height: 44rpx;
}
.field-input:focus {
outline: none;
border: none;
}
.field:focus-within {
border-color: #ff8d1a;
box-shadow: 0 8rpx 24rpx rgba(255,141,26,0.12);
}
.ph { color: #9aa0a6; }
/* 输入+验证码并排 */
.field-row {
display: flex;
align-items: center;
gap: 16rpx;
padding-right: 16rpx;
margin-bottom: 26rpx;
}
.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);
active-opacity: 0.85;
}
.code-btn:active { transform: scale(0.98); }
.code-btn-text {
color: #fff;
font-size: 24rpx;
font-weight: 600;
}
/* 忘记密码链接 */
.link-right {
margin-top: 16rpx;
font-size: 26rpx;
color: #666a73;
align-self: flex-end;
}
/* 登录按钮 */
.btn-primary {
margin-top: 32rpx;
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;
}
.btn-primary:active { transform: scale(0.985); }
.btn-primary-text {
color: #ffffff;
font-size: 32rpx;
font-weight: 700;
}
/* 协议区 */
.agreements {
margin-top: 28rpx;
display: flex;
align-items: center;
gap: 16rpx;
}
.checkbox { transform: scale(0.92); }
.agreements-text {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 8rpx;
line-height: 1.4;
}
.muted { color: #666a73; font-size: 26rpx; }
.link { color: #ff5e00; font-size: 26rpx; }
.link-strong { color: #ff5e00; font-size: 28rpx; font-weight: 700; }
/* 注册区 */
.register {
margin-top: 24rpx;
text-align: center;
display: flex;
justify-content: center;
gap: 8rpx;
}
/* 加入我们 CTA */
.cta-join {
margin-top: 48rpx;
padding: 16rpx 22rpx;
border: 1rpx solid #ff8d1a;
border-radius: 14rpx;
display: flex;
align-items: center;
gap: 12rpx;
}
.cta-join-text { color: #ff8d1a; font-size: 28rpx; }
.cta-join-img { width: 44rpx; height: 44rpx; }
/* ========== 兼容你原先用到的类名(可选保留) ========== */
.font { font-size: 37.5rpx; color: #1c2023; }
.font_2 { font-size: 30rpx; color: #1c2023; }
.font_4 { font-size: 26rpx; color: #383838; }
.font_5 { font-size: 26rpx; color: #ff5e00; }
.toggle-text { font-size: 28rpx; transition: font-size .2s; }
.toggle-text.active { font-size: 36rpx; font-weight: 700; }
/* 简易工具类(若你全局已有可删除) */
.items-center { align-items: center; }
.self-center { align-self: center; }
.self-end { align-self: flex-end; }
.justify-evenly { justify-content: space-evenly; }
.relative { position: relative; }
.shrink-0 { flex-shrink: 0; }
.ml-2 { margin-left: 16rpx; }
.ml-8 { margin-left: 32rpx; }
.ml-12 { margin-left: 48rpx; }
.mt-12 { margin-top: 24rpx; }
.mt-20 { margin-top: 40rpx; }

View File

@ -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>

View File

@ -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 { }

View File

@ -11,7 +11,7 @@
margin-left: 9.38rpx;
}
.page {
padding: 65.63rpx 28.13rpx 780rpx;
padding: 65.63rpx 28.13rpx 0;
background-image: linear-gradient(180deg, #ff8d1a -7.3%, #ffffff00 92.1%);
width: 100%;
overflow-y: auto;

View File

@ -1,33 +1,63 @@
<view class="flex-col page">
<view class="flex-col section">
<view class="self-start font text">{{ phone }}</view>
<view class="flex-row justify-between self-stretch group">
<input
class="font text_2"
placeholder="验证码"
bindinput="onInput"
data-field="verificationCode"
value="{{ verificationCode }}"
/>
<view bind:tap="{{ sending ? '' : 'getVerificationCode' }}">
<text class="font text_3">{{ sending ? count + 's后重发' : '发送验证码' }}</text>
</view>
</view>
<input
class="text_1 font"
placeholder="密码"
<view class="page">
<!-- 表单卡片 -->
<view class="card section">
<!-- 顶部手机号 -->
<text class="phone font text">{{ phone }}</text>
<!-- 验证码行:输入 + 发送 -->
<view class="field field-row group">
<input
class="field-input flex-1 font"
placeholder="请输入验证码"
placeholder-class="ph"
bindinput="onInput"
data-field="verificationCode"
value="{{ verificationCode }}"
type="number"
maxlength="6"
/>
<text style="font-size: 22.5rpx;"
class="code-btn font text_3 {{ sending ? 'disabled' : '' }}"
bindtap="{{ sending ? '' : 'getVerificationCode' }}"
>{{ sending ? count + 's后重发' : '发送验证码' }}
</text>
</view>
<!-- 新密码 -->
<view class="field">
<input
class="field-input font"
placeholder="请输入新密码"
placeholder-class="ph"
bindinput="onInput"
data-field="password"
value="{{ password }}"
/>
<view class="self-stretch divider"></view>
<input
class="text_8 font text_4"
placeholder="再输入密码"
password="true"
maxlength="18"
/>
</view>
<view class="divider"></view>
<!-- 再次输入新密码 -->
<view class="field mt-16">
<input
class="field-input font"
placeholder="请再次输入新密码"
placeholder-class="ph"
bindinput="onInput"
data-field="currentPwd"
value="{{ currentPwd }}"
/>
password="true"
maxlength="18"
/>
</view>
<view class="flex-col justify-start items-center text-wrapper mt-20" bind:tap="resetPwd"><text class="font text_5">重置密码</text></view>
</view>
<!-- 提交按钮 -->
<view class="btn-primary text-wrapper mt-20" bindtap="resetPwd">
<text class="btn-primary-text text_5">重置密码</text>
</view>
</view>
</view>

View File

@ -1,62 +1,131 @@
/* ===== 背景与页面 ===== */
.page {
padding: 68.7rpx 47.71rpx 977.1rpx 47.71rpx;
box-sizing: border-box;
min-height: 100vh;
padding: 68.7rpx 47.71rpx 80rpx;
background-image: linear-gradient(180deg, #ffa64d 0%, #f5f5f5 30.1%);
width: 100%;
overflow-y: auto;
overflow-x: hidden;
height: 100%;
}
.section {
padding: 42.06rpx 32.44rpx 31.89rpx 32.44rpx;
/* ===== 卡片容器 ===== */
.section,
.card {
background-color: #ffffff;
border-radius: 19.08rpx;
border-radius: 24rpx; /* 略大圆角更现代 */
padding: 42rpx 32rpx 32rpx;
box-shadow: 0 12rpx 36rpx rgba(0,0,0,0.08);
}
.group {
margin-top: 28.28rpx;
padding: 29.43rpx 0 26.18rpx;
border-top: solid 1.91rpx #e3e3e3;
border-bottom: solid 1.91rpx #e3e3e3;
}
.text_1 {
/* 顶部手机号 */
.phone {
align-self: flex-start;
margin-top: 31.26rpx;
margin-bottom: 8rpx;
color: #323232;
}
/* ===== 表单字段 ===== */
.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: 22rpx;
}
.field:focus-within {
border-color: #ff8d1a;
box-shadow: 0 10rpx 24rpx rgba(255,141,26,0.14);
}
.field-row {
display: flex;
align-items: center;
gap: 16rpx;
padding-right: 16rpx;
border-top: none; /* 覆盖你原 group 的上下边线视觉,改用阴影与留白 */
border-bottom: none;
}
.field-input {
width: 100%;
font-size: 30rpx;
color: #1c2023;
line-height: 44rpx;
}
.ph { color: #9aa0a6; }
/* ===== 发送验证码按钮text 充当按钮) ===== */
.code-btn {
height: 44rpx;
padding: 0 24rpx;
background: #ff8d1a;
border-radius: 14rpx;
display: flex;
align-items: center;
justify-content: center;
white-space: nowrap;
color: #fff;
font-size: 26rpx;
font-weight: 600;
box-shadow: 0 8rpx 18rpx rgba(255,141,26,0.25);
transition: transform .08s ease-in-out, opacity .2s;
}
.code-btn:active { transform: scale(0.98); }
.code-btn.disabled {
opacity: 0.55;
box-shadow: none;
}
/* ===== 分隔线 ===== */
.divider {
margin-top: 28.19rpx;
background-color: #e3e3e3;
height: 1.91rpx;
margin-top: 20rpx;
background-color: #eaeaea;
height: 2rpx;
border-radius: 2rpx;
}
.text_8 {
align-self: flex-start;
margin-top: 27.44rpx;
/* ===== 主按钮 ===== */
.text-wrapper,
.btn-primary {
height: 96rpx;
border-radius: 48rpx; /* 胶囊按钮 */
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:active,
.btn-primary:active { transform: scale(0.985); }
.btn-primary-text,
.text_5 {
color: #ffffff;
font-size: 32rpx;
font-weight: 700;
}
/* ===== 字体与基础色(沿用你原有 font 类命名) ===== */
.font {
font-size: 30.53rpx;
font-family: SourceHanSansCN;
line-height: 28.34rpx;
line-height: 1.45;
color: #323232;
}
.text_3 {
color: #ff8d1a;
line-height: 28.36rpx;
}
.text_2 {
line-height: 28.13rpx;
}
.text {
margin-left: 2.69rpx;
line-height: 23.17rpx;
}
.text_4 {
line-height: 28.45rpx;
}
.text-wrapper {
margin-left: 45.8rpx;
margin-right: 43.89rpx;
padding: 24.58rpx 0 19.6rpx;
background-color: #ff8d1a;
border-radius: 67.46rpx;
}
.text_5 {
color: #ffffff;
}
/* 你原有的一些类做柔性兼容(可保留以免他处引用报错) */
.group { margin-top: 20rpx; } /* 原本有上下边线,已在 field-row 中弱化处理 */
.text_1 { align-self: flex-start; margin-top: 16rpx; }
.text_2 { line-height: 1.3; }
.text_3 { color: #fff; }
.text { margin-left: 0; line-height: 1.2; }
.text_4 { line-height: 1.3; }
.text_8 { align-self: flex-start; margin-top: 16rpx; }
/* ===== 工具类 ===== */
.mt-16 { margin-top: 32rpx; }
.mt-20 { margin-top: 40rpx; }
.flex-1 { flex: 1; }

View File

@ -1,21 +1,52 @@
<view class="flex-col justify-start items-center page">
<view class="flex-col section">
<view class="flex-col items-center">
<image
class="image"
src="./images/logo.png"
/>
<text class="mt-12 text">欢迎进入青橙校园</text>
<view class="page">
<view class="section">
<!-- 顶部 Logo 与标题 -->
<view class="logo-area">
<image class="logo" src="/static/logo.jpg" mode="aspectFill" />
<text class="title">欢迎进入丁香校园</text>
</view>
<view class="mt-38 flex-col">
<view class="flex-col justify-start items-center text-wrapper" bind:tap="userLogin" data-role="{{ 'user' }}"><text class="font text_2">我是用户</text></view>
<view class="flex-col justify-start items-center text-wrapper_2 mt-9" bind:tap="userLogin" data-role="{{ 'supervisor' }}"><text class="font">我是主管</text></view>
<view class="flex-col justify-start items-center text-wrapper_2 mt-9" bind:tap="userLogin" data-role="{{ 'staff' }}">
<text class="font text_3">我是员工</text>
<!-- 身份选择按钮组 -->
<view class="btn-group">
<view
class="btn btn--primary"
hover-class="btn--hover"
hover-stay-time="80"
bind:tap="userLogin"
data-role="{{ 'user' }}"
>
<text class="btn-text btn-text--light">我是用户</text>
</view>
<view class="flex-col justify-start items-center text-wrapper_2 mt-9" bind:tap="userLogin" data-role="{{ 'manager' }}">
<text class="font text_3">我是经理</text>
<view
class="btn btn--outline"
hover-class="btn--hover"
hover-stay-time="80"
bind:tap="userLogin"
data-role="{{ 'staff' }}"
>
<text class="btn-text">我是员工</text>
</view>
<view
class="btn btn--outline"
hover-class="btn--hover"
hover-stay-time="80"
bind:tap="userLogin"
data-role="{{ 'supervisor' }}"
>
<text class="btn-text">我是主管</text>
</view>
<view
class="btn btn--outline"
hover-class="btn--hover"
hover-stay-time="80"
bind:tap="userLogin"
data-role="{{ 'manager' }}"
>
<text class="btn-text">我是经理</text>
</view>
</view>
</view>
</view>
</view>

View File

@ -1,57 +1,104 @@
.mt-9 {
margin-top: 16.88rpx;
}
/* ===== 基础设置 ===== */
.page {
padding: 255rpx 0 0;
background-image: linear-gradient(180deg, #ffeed9 0%, #f5f5f500 125%);
min-height: 100vh;
width: 100%;
overflow-y: auto;
overflow-x: hidden;
height: 100vh;
box-sizing: border-box;
padding: 220rpx 32rpx 48rpx;
background-image: linear-gradient(180deg, #ffeed9 0%, rgba(245,245,245,0) 120%);
}
/* 卡片容器 */
.section {
padding: 39.38rpx 52.5rpx 18.75rpx;
margin: 0 auto;
padding: 48rpx 40rpx 40rpx;
background-color: #ffffff;
border-radius: 35.16rpx;
box-shadow: 0rpx 3.75rpx 7.5rpx #00000040;
border-radius: 32rpx;
box-shadow: 0 8rpx 24rpx rgba(0,0,0,0.08);
max-width: 680rpx; /* 更大屏适配 */
}
.image {
width: 232.5rpx;
height: 232.5rpx;
/* 顶部 Logo 与标题 */
.logo-area {
display: flex;
flex-direction: column;
align-items: center;
}
.text {
.logo {
width: 232rpx;
height: 232rpx;
border-radius: 28rpx;
box-shadow: 0 6rpx 16rpx rgba(0,0,0,0.12);
}
.title {
margin-top: 28rpx;
color: #1c2023;
font-size: 45rpx;
font-size: 44rpx;
line-height: 1.32;
font-weight: 600;
font-family: AlibabaPuHuiTi;
line-height: 41.53rpx;
text-align: center;
letter-spacing: 0.5rpx;
}
.text-wrapper {
padding: 37.5rpx 0 30rpx;
/* 按钮区域 */
.btn-group {
margin-top: 56rpx;
display: grid;
grid-auto-rows: min-content;
row-gap: 22rpx;
}
/* 按钮基类 */
.btn {
width: 100%;
box-sizing: border-box;
border-radius: 20rpx;
padding: 32rpx 28rpx;
display: flex;
align-items: center;
justify-content: center;
transition: transform 120ms ease, opacity 120ms ease, background-color 120ms ease, border-color 120ms ease;
}
/* 主按钮:橙色 */
.btn--primary {
background-color: #ff8d1a;
border-radius: 18.75rpx;
width: 498.75rpx;
box-shadow: 0 10rpx 20rpx rgba(255,141,26,0.25);
}
.font {
font-size: 33.75rpx;
font-family: SourceHanSansCN;
line-height: 32.06rpx;
/* 描边按钮:白底橙边 */
.btn--outline {
background-color: #ffffff;
border: 4rpx solid #ff8d1a;
}
/* 按钮文字 */
.btn-text {
font-size: 34rpx;
line-height: 1.2;
font-weight: 700;
color: #ff8d1a;
font-family: SourceHanSansCN;
}
.text_2 {
.btn-text--light {
color: #ffffff;
line-height: 32.14rpx;
}
.text-wrapper_2 {
padding: 37.5rpx 0 30rpx;
background-color: #ffffff;
border-radius: 18.75rpx;
width: 500.63rpx;
border-left: solid 4rpx #ff8d1a;
border-right: solid 4rpx #ff8d1a;
border-top: solid 4rpx #ff8d1a;
border-bottom: solid 4rpx #ff8d1a;
/* 交互态(按压反馈) */
.btn--hover {
transform: translateY(2rpx) scale(0.99);
opacity: 0.96;
}
.btn--primary.btn--hover {
background-color: #e67807; /* 按压加深 */
}
/* 兼容你原有的工具类(如仍有使用可保留) */
.mt-9 { margin-top: 16rpx; }
/* 可选:为小屏做一点收紧(不影响大屏) */
@media (max-width: 360px) {
.section { padding: 40rpx 28rpx 32rpx; }
.btn { padding: 28rpx 24rpx; }
.title { font-size: 42rpx; }
}
.text_3 {
line-height: 31.8rpx;
}

BIN
static/logo.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 KiB