Initial commit: 心理咨询预约系统
PHP 前后端一体:首页咨询师列表、预约表单、管理后台、二维码准入与邮件通知;敏感配置与提交数据通过 .gitignore 排除。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
143
css/admin.css
Normal file
143
css/admin.css
Normal file
@@ -0,0 +1,143 @@
|
||||
.admin-page {
|
||||
min-height: 100vh;
|
||||
padding: var(--space-md);
|
||||
padding-bottom: calc(var(--space-xl) + var(--safe-bottom));
|
||||
}
|
||||
|
||||
.admin-login {
|
||||
max-width: 360px;
|
||||
margin: 80px auto 0;
|
||||
}
|
||||
|
||||
.admin-login__title {
|
||||
font-size: 22px;
|
||||
font-weight: 700;
|
||||
text-align: center;
|
||||
margin-bottom: var(--space-xl);
|
||||
}
|
||||
|
||||
.admin-login .form-field {
|
||||
margin-bottom: var(--space-lg);
|
||||
}
|
||||
|
||||
.admin-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: var(--space-lg);
|
||||
padding-top: var(--space-md);
|
||||
}
|
||||
|
||||
.admin-header__title {
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.admin-actions {
|
||||
display: flex;
|
||||
gap: var(--space-sm);
|
||||
margin-bottom: var(--space-md);
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.admin-actions .btn {
|
||||
flex: 1;
|
||||
min-width: 120px;
|
||||
font-size: 14px;
|
||||
min-height: 40px;
|
||||
}
|
||||
|
||||
.submission-card {
|
||||
background: var(--color-surface);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-md);
|
||||
margin-bottom: var(--space-md);
|
||||
box-shadow: var(--shadow-sm);
|
||||
border-left: 3px solid var(--color-primary);
|
||||
}
|
||||
|
||||
.submission-card__time {
|
||||
font-size: 12px;
|
||||
color: var(--color-text-muted);
|
||||
margin-bottom: var(--space-sm);
|
||||
}
|
||||
|
||||
.submission-card__row {
|
||||
font-size: 14px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.submission-card__row strong {
|
||||
color: var(--color-text-secondary);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.submission-card__desc {
|
||||
font-size: 13px;
|
||||
color: var(--color-text-muted);
|
||||
margin-top: var(--space-sm);
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.admin-empty {
|
||||
text-align: center;
|
||||
padding: var(--space-xl);
|
||||
color: var(--color-text-muted);
|
||||
}
|
||||
|
||||
.qr-page {
|
||||
padding: var(--space-lg) var(--space-md);
|
||||
text-align: center;
|
||||
max-width: 400px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.qr-page__title {
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
margin-bottom: var(--space-sm);
|
||||
}
|
||||
|
||||
.qr-page__desc {
|
||||
font-size: 14px;
|
||||
color: var(--color-text-secondary);
|
||||
margin-bottom: var(--space-xl);
|
||||
}
|
||||
|
||||
.qr-canvas-wrap {
|
||||
display: inline-block;
|
||||
padding: var(--space-md);
|
||||
background: #fff;
|
||||
border-radius: var(--radius-lg);
|
||||
box-shadow: var(--shadow-md);
|
||||
margin-bottom: var(--space-lg);
|
||||
}
|
||||
|
||||
.qr-url-box {
|
||||
background: var(--color-surface);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-md);
|
||||
font-size: 12px;
|
||||
word-break: break-all;
|
||||
text-align: left;
|
||||
margin-bottom: var(--space-md);
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
|
||||
.qr-actions {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-sm);
|
||||
}
|
||||
|
||||
.qr-note {
|
||||
margin-top: var(--space-xl);
|
||||
font-size: 12px;
|
||||
color: var(--color-text-muted);
|
||||
line-height: 1.6;
|
||||
text-align: left;
|
||||
}
|
||||
322
css/base.css
Normal file
322
css/base.css
Normal file
@@ -0,0 +1,322 @@
|
||||
@import url("variables.css");
|
||||
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
html {
|
||||
font-size: 16px;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: var(--font-family);
|
||||
background: var(--color-bg);
|
||||
color: var(--color-text);
|
||||
line-height: 1.5;
|
||||
min-height: 100vh;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
img {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
button,
|
||||
input,
|
||||
textarea,
|
||||
select {
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
.page {
|
||||
max-width: 480px;
|
||||
margin: 0 auto;
|
||||
min-height: 100vh;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.page--fade-in {
|
||||
animation: fadeIn 0.35s ease;
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(8px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
.header {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
height: var(--header-height);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: rgba(255, 255, 255, 0.88);
|
||||
backdrop-filter: blur(12px);
|
||||
-webkit-backdrop-filter: blur(12px);
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
padding: 0 var(--space-md);
|
||||
}
|
||||
|
||||
.header__title {
|
||||
font-size: 17px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.header__back {
|
||||
position: absolute;
|
||||
left: var(--space-md);
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: none;
|
||||
background: var(--color-primary-light);
|
||||
cursor: pointer;
|
||||
color: var(--color-primary-dark);
|
||||
border-radius: var(--radius-full);
|
||||
font-size: 18px;
|
||||
transition: background 0.15s, transform 0.15s;
|
||||
}
|
||||
|
||||
.header__back:active {
|
||||
background: var(--color-primary-light);
|
||||
transform: scale(0.95);
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 48px;
|
||||
padding: 0 var(--space-lg);
|
||||
border: none;
|
||||
border-radius: var(--radius-xl);
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: transform 0.15s, opacity 0.15s, background 0.15s;
|
||||
}
|
||||
|
||||
.btn:active {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
.btn--primary {
|
||||
background: var(--gradient-primary);
|
||||
color: #fff;
|
||||
box-shadow: var(--shadow-lg);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.btn--primary:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.btn--block {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.btn--ghost {
|
||||
background: transparent;
|
||||
color: var(--color-primary);
|
||||
border: 1px solid var(--color-primary);
|
||||
}
|
||||
|
||||
.btn--shine::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: -100%;
|
||||
width: 60%;
|
||||
height: 100%;
|
||||
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
|
||||
transform: skewX(-20deg);
|
||||
animation: btnShine 3s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes btnShine {
|
||||
0%, 100% { left: -100%; }
|
||||
50% { left: 150%; }
|
||||
}
|
||||
|
||||
.footer-cta {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 100%;
|
||||
max-width: 480px;
|
||||
padding: var(--space-md) 20px;
|
||||
padding-bottom: calc(var(--space-md) + var(--safe-bottom));
|
||||
background: linear-gradient(to top, rgba(255, 255, 255, 0.98) 70%, transparent);
|
||||
z-index: 50;
|
||||
}
|
||||
|
||||
.footer-cta--glass {
|
||||
background: linear-gradient(to top, rgba(240, 245, 242, 0.95) 60%, transparent);
|
||||
backdrop-filter: blur(8px);
|
||||
-webkit-backdrop-filter: blur(8px);
|
||||
}
|
||||
|
||||
.toast {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
background: rgba(0, 0, 0, 0.75);
|
||||
color: #fff;
|
||||
padding: 12px 20px;
|
||||
border-radius: var(--radius-md);
|
||||
font-size: 14px;
|
||||
z-index: 9999;
|
||||
pointer-events: none;
|
||||
animation: toastIn 0.25s ease;
|
||||
}
|
||||
|
||||
@keyframes toastIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translate(-50%, -50%) scale(0.9);
|
||||
}
|
||||
}
|
||||
|
||||
.access-denied {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 10000;
|
||||
background: var(--color-bg);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: var(--space-xl);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.access-denied__icon {
|
||||
font-size: 64px;
|
||||
margin-bottom: var(--space-lg);
|
||||
}
|
||||
|
||||
.access-denied__title {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
margin-bottom: var(--space-sm);
|
||||
}
|
||||
|
||||
.access-denied__desc {
|
||||
color: var(--color-text-secondary);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.required {
|
||||
color: var(--color-danger);
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
.picker-overlay {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
z-index: 200;
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transition: opacity 0.25s, visibility 0.25s;
|
||||
}
|
||||
|
||||
.picker-overlay.is-open {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.picker-sheet {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
max-width: 480px;
|
||||
margin: 0 auto;
|
||||
background: var(--color-surface);
|
||||
border-radius: var(--radius-lg) var(--radius-lg) 0 0;
|
||||
z-index: 201;
|
||||
transform: translateY(100%);
|
||||
transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
|
||||
padding-bottom: var(--safe-bottom);
|
||||
}
|
||||
|
||||
.picker-overlay.is-open .picker-sheet {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.picker-sheet__header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: var(--space-md);
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
.picker-sheet__title {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.picker-sheet__cancel,
|
||||
.picker-sheet__confirm {
|
||||
border: none;
|
||||
background: none;
|
||||
font-size: 15px;
|
||||
cursor: pointer;
|
||||
padding: 4px 8px;
|
||||
}
|
||||
|
||||
.picker-sheet__cancel {
|
||||
color: var(--color-text-muted);
|
||||
}
|
||||
|
||||
.picker-sheet__confirm {
|
||||
color: var(--color-primary);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.picker-sheet__list {
|
||||
max-height: 50vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.picker-item {
|
||||
padding: var(--space-md) var(--space-lg);
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
cursor: pointer;
|
||||
transition: background 0.15s;
|
||||
}
|
||||
|
||||
.picker-item:active,
|
||||
.picker-item.is-selected {
|
||||
background: var(--color-primary-light);
|
||||
color: var(--color-primary);
|
||||
}
|
||||
382
css/form.css
Normal file
382
css/form.css
Normal file
@@ -0,0 +1,382 @@
|
||||
.form-page {
|
||||
padding-bottom: calc(88px + var(--safe-bottom));
|
||||
background: var(--color-bg);
|
||||
}
|
||||
|
||||
.form-body {
|
||||
padding: var(--space-md);
|
||||
}
|
||||
|
||||
.form-card {
|
||||
background: var(--gradient-surface);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: 18px;
|
||||
margin-bottom: 14px;
|
||||
box-shadow: var(--shadow-card);
|
||||
border: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
.form-card__title {
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
margin-bottom: var(--space-md);
|
||||
color: var(--color-text);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.form-card__title::before {
|
||||
content: "";
|
||||
width: 4px;
|
||||
height: 16px;
|
||||
background: var(--gradient-primary);
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.form-field {
|
||||
margin-bottom: var(--space-md);
|
||||
}
|
||||
|
||||
.form-field:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.form-field__label {
|
||||
display: block;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
color: var(--color-text-secondary);
|
||||
margin-bottom: var(--space-sm);
|
||||
}
|
||||
|
||||
.form-field__input,
|
||||
.form-field__select {
|
||||
width: 100%;
|
||||
min-height: 46px;
|
||||
padding: 11px 14px;
|
||||
border: 1px solid var(--color-border-strong);
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--color-bg-warm);
|
||||
color: var(--color-text);
|
||||
outline: none;
|
||||
transition: border-color 0.2s, box-shadow 0.2s;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.form-field__input::placeholder {
|
||||
color: var(--color-text-muted);
|
||||
}
|
||||
|
||||
.form-field__input:focus,
|
||||
.form-field__select:focus {
|
||||
border-color: var(--color-primary);
|
||||
box-shadow: 0 0 0 3px rgba(76, 175, 138, 0.15);
|
||||
}
|
||||
|
||||
.form-field__input.is-error,
|
||||
.form-field__select.is-error {
|
||||
border-color: var(--color-danger);
|
||||
}
|
||||
|
||||
.form-field__picker {
|
||||
width: 100%;
|
||||
min-height: 46px;
|
||||
padding: 11px 14px;
|
||||
border: 1px solid var(--color-border-strong);
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--color-bg-warm);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
cursor: pointer;
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.form-field__picker.is-placeholder {
|
||||
color: var(--color-text-muted);
|
||||
}
|
||||
|
||||
.form-field__picker-arrow {
|
||||
color: var(--color-text-muted);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.form-field__doctor {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-md);
|
||||
padding: var(--space-sm);
|
||||
background: var(--color-primary-light);
|
||||
border-radius: var(--radius-md);
|
||||
}
|
||||
|
||||
.form-field__doctor-avatar {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
border-radius: var(--radius-full);
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.form-field__doctor-name {
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.form-field__doctor-role {
|
||||
font-size: 12px;
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
.textarea-wrap {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.form-field__textarea {
|
||||
width: 100%;
|
||||
min-height: 120px;
|
||||
padding: 12px 14px;
|
||||
border: 1px solid var(--color-border-strong);
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--color-bg-warm);
|
||||
resize: none;
|
||||
outline: none;
|
||||
line-height: 1.65;
|
||||
font-size: 15px;
|
||||
transition: border-color 0.2s, box-shadow 0.2s;
|
||||
}
|
||||
|
||||
.form-field__textarea:focus {
|
||||
border-color: var(--color-primary);
|
||||
box-shadow: 0 0 0 3px rgba(76, 175, 138, 0.15);
|
||||
}
|
||||
|
||||
.textarea-wrap__footer {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
margin-top: var(--space-sm);
|
||||
}
|
||||
|
||||
.char-count {
|
||||
font-size: 12px;
|
||||
color: var(--color-text-muted);
|
||||
}
|
||||
|
||||
.service-info {
|
||||
padding: 16px;
|
||||
margin: 0 var(--space-md) var(--space-md);
|
||||
background: var(--gradient-surface);
|
||||
border-radius: var(--radius-lg);
|
||||
border: 1px solid var(--color-border);
|
||||
box-shadow: var(--shadow-sm);
|
||||
}
|
||||
|
||||
.service-info__title {
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
color: var(--color-text);
|
||||
margin-bottom: var(--space-md);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.service-info__title::before {
|
||||
content: "ℹ";
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: var(--color-primary-light);
|
||||
color: var(--color-primary-dark);
|
||||
border-radius: var(--radius-full);
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.service-info__item {
|
||||
font-size: 13px;
|
||||
color: var(--color-text-secondary);
|
||||
line-height: 1.75;
|
||||
margin-bottom: var(--space-sm);
|
||||
padding-left: 1.2em;
|
||||
text-indent: -1.2em;
|
||||
}
|
||||
|
||||
.service-info__phone {
|
||||
font-size: 13px;
|
||||
color: var(--color-primary-dark);
|
||||
margin-top: var(--space-md);
|
||||
font-weight: 600;
|
||||
padding: 10px 12px;
|
||||
background: var(--color-primary-light);
|
||||
border-radius: var(--radius-sm);
|
||||
}
|
||||
|
||||
.submit-bar {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 100%;
|
||||
max-width: 480px;
|
||||
padding: var(--space-md) 20px;
|
||||
padding-bottom: calc(var(--space-md) + var(--safe-bottom));
|
||||
background: rgba(255, 255, 255, 0.92);
|
||||
backdrop-filter: blur(12px);
|
||||
-webkit-backdrop-filter: blur(12px);
|
||||
border-top: 1px solid var(--color-border);
|
||||
z-index: 50;
|
||||
}
|
||||
|
||||
.success-overlay {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(240, 245, 242, 0.96);
|
||||
backdrop-filter: blur(8px);
|
||||
z-index: 300;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: var(--space-xl);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.success-overlay__icon {
|
||||
font-size: 56px;
|
||||
margin-bottom: var(--space-md);
|
||||
}
|
||||
|
||||
.success-overlay__title {
|
||||
font-size: 22px;
|
||||
font-weight: 700;
|
||||
margin-bottom: var(--space-sm);
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.success-overlay__desc {
|
||||
color: var(--color-text-secondary);
|
||||
margin-bottom: var(--space-xl);
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
.doctor-banner {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-md);
|
||||
margin: var(--space-md);
|
||||
padding: 14px 16px;
|
||||
background: var(--gradient-surface);
|
||||
border-radius: var(--radius-lg);
|
||||
border: 1px solid var(--color-border);
|
||||
box-shadow: var(--shadow-card);
|
||||
}
|
||||
|
||||
.doctor-banner__avatar-wrap {
|
||||
position: relative;
|
||||
flex-shrink: 0;
|
||||
width: 62px;
|
||||
height: 62px;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.doctor-banner__avatar-ring {
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
border-radius: var(--radius-full);
|
||||
overflow: hidden;
|
||||
background: #eef5f1;
|
||||
border: 2px solid #fff;
|
||||
box-shadow: 0 4px 12px rgba(76, 175, 138, 0.15);
|
||||
}
|
||||
|
||||
.doctor-banner__avatar {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
object-position: center top;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.doctor-banner__verified {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 2;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background: linear-gradient(145deg, #ffb04a 0%, #ff9226 100%);
|
||||
color: #fff;
|
||||
border-radius: var(--radius-full);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: 2px solid #fff;
|
||||
box-shadow: 0 2px 6px rgba(255, 146, 38, 0.4);
|
||||
}
|
||||
|
||||
.doctor-banner__name {
|
||||
font-weight: 700;
|
||||
font-size: 15px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.doctor-banner__tag {
|
||||
font-size: 10px;
|
||||
padding: 2px 8px;
|
||||
background: #fff4e8;
|
||||
color: #e07b2a;
|
||||
border-radius: var(--radius-full);
|
||||
font-weight: 600;
|
||||
border: 1px solid rgba(224, 123, 42, 0.15);
|
||||
}
|
||||
|
||||
.doctor-banner__hospital {
|
||||
font-size: 13px;
|
||||
color: var(--color-hospital);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.gender-group {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.gender-option {
|
||||
flex: 1;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.gender-option input {
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.gender-option__text {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 46px;
|
||||
border: 1px solid var(--color-border-strong);
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--color-bg-warm);
|
||||
color: var(--color-text-secondary);
|
||||
font-weight: 500;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.gender-option input:checked + .gender-option__text {
|
||||
border-color: var(--color-primary);
|
||||
background: var(--color-primary-light);
|
||||
color: var(--color-primary-dark);
|
||||
font-weight: 700;
|
||||
box-shadow: 0 0 0 3px rgba(76, 175, 138, 0.12);
|
||||
}
|
||||
|
||||
.gender-option:active .gender-option__text {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
311
css/home.css
Normal file
311
css/home.css
Normal file
@@ -0,0 +1,311 @@
|
||||
.page--home {
|
||||
background: var(--color-bg);
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
/* ── Hero ── */
|
||||
.hero {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: calc(14px + env(safe-area-inset-top, 0px)) 20px 18px;
|
||||
background: var(--gradient-hero);
|
||||
}
|
||||
|
||||
.hero__decor {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
pointer-events: none;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.hero__blob {
|
||||
position: absolute;
|
||||
border-radius: 50%;
|
||||
filter: blur(40px);
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.hero__blob--1 {
|
||||
width: 160px;
|
||||
height: 160px;
|
||||
background: rgba(126, 203, 168, 0.3);
|
||||
top: -30px;
|
||||
right: -20px;
|
||||
}
|
||||
|
||||
.hero__blob--2 {
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
background: rgba(76, 175, 138, 0.18);
|
||||
bottom: 10px;
|
||||
left: -30px;
|
||||
}
|
||||
|
||||
.hero__badge {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
display: inline-flex;
|
||||
padding: 5px 14px;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.1em;
|
||||
color: var(--color-primary-dark);
|
||||
background: rgba(255, 255, 255, 0.85);
|
||||
border: 1px solid rgba(255, 255, 255, 0.95);
|
||||
border-radius: var(--radius-full);
|
||||
box-shadow: 0 2px 10px rgba(45, 150, 104, 0.08);
|
||||
}
|
||||
|
||||
.hero__content {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.hero__title {
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
color: var(--color-text);
|
||||
line-height: 1.45;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.hero__title br {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.hero__desc {
|
||||
font-size: 13px;
|
||||
color: var(--color-text-secondary);
|
||||
line-height: 1.6;
|
||||
margin: 0 auto;
|
||||
max-width: 280px;
|
||||
}
|
||||
|
||||
.hero__image-wrap {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
margin-top: 2px;
|
||||
padding: 10px;
|
||||
background: rgba(255, 255, 255, 0.65);
|
||||
border-radius: 20px;
|
||||
box-shadow: 0 8px 28px rgba(76, 175, 138, 0.12);
|
||||
}
|
||||
|
||||
.hero__illustration {
|
||||
width: min(76vw, 236px);
|
||||
height: auto;
|
||||
border-radius: 14px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* ── Doctor list ── */
|
||||
.doctor-list {
|
||||
padding: 18px 16px calc(var(--footer-cta-height) + var(--space-lg) + var(--safe-bottom));
|
||||
}
|
||||
|
||||
.doctor-list__header {
|
||||
margin-bottom: 14px;
|
||||
padding: 0 2px;
|
||||
}
|
||||
|
||||
.doctor-list__heading {
|
||||
font-size: 17px;
|
||||
font-weight: 700;
|
||||
color: var(--color-text);
|
||||
margin-bottom: 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.doctor-list__heading::before {
|
||||
content: "";
|
||||
width: 4px;
|
||||
height: 16px;
|
||||
background: var(--gradient-primary);
|
||||
border-radius: 2px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.doctor-list__sub {
|
||||
font-size: 12px;
|
||||
color: var(--color-text-muted);
|
||||
padding-left: 12px;
|
||||
}
|
||||
|
||||
.doctor-list__cards {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
/* ── Doctor card ── */
|
||||
.doctor-card {
|
||||
position: relative;
|
||||
display: flex;
|
||||
gap: 14px;
|
||||
align-items: flex-start;
|
||||
background: var(--color-surface);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: 14px 44px 14px 14px;
|
||||
box-shadow: var(--shadow-card);
|
||||
cursor: pointer;
|
||||
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
||||
border: 1px solid var(--color-border);
|
||||
animation: cardIn 0.4s ease backwards;
|
||||
}
|
||||
|
||||
.doctor-card:nth-child(1) { animation-delay: 0.04s; }
|
||||
.doctor-card:nth-child(2) { animation-delay: 0.1s; }
|
||||
.doctor-card:nth-child(3) { animation-delay: 0.16s; }
|
||||
|
||||
@keyframes cardIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(10px);
|
||||
}
|
||||
}
|
||||
|
||||
.doctor-card:active {
|
||||
transform: scale(0.99);
|
||||
box-shadow: var(--shadow-sm);
|
||||
}
|
||||
|
||||
/* 头像容器:overflow 可见,避免认证角标被裁切 */
|
||||
.doctor-card__avatar-wrap {
|
||||
position: relative;
|
||||
flex-shrink: 0;
|
||||
width: 86px;
|
||||
height: 86px;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.doctor-card__avatar-ring {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border-radius: var(--radius-full);
|
||||
overflow: hidden;
|
||||
background: #eef5f1;
|
||||
border: 2px solid #fff;
|
||||
box-shadow: 0 4px 12px rgba(76, 175, 138, 0.15);
|
||||
}
|
||||
|
||||
.doctor-card__avatar {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
object-position: center top;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* 认证对号:参考设计橙色角标,叠在头像右下 */
|
||||
.doctor-card__verified {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 3;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
background: linear-gradient(145deg, #ffb04a 0%, #ff9226 100%);
|
||||
color: #fff;
|
||||
border-radius: var(--radius-full);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: 2.5px solid #fff;
|
||||
box-shadow: 0 2px 8px rgba(255, 146, 38, 0.45);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.doctor-card__body {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
||||
.doctor-card__name-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.doctor-card__name {
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.doctor-card__tag {
|
||||
font-size: 10px;
|
||||
font-weight: 600;
|
||||
padding: 2px 8px;
|
||||
background: #fff4e8;
|
||||
color: #e07b2a;
|
||||
border-radius: var(--radius-full);
|
||||
white-space: nowrap;
|
||||
border: 1px solid rgba(224, 123, 42, 0.15);
|
||||
}
|
||||
|
||||
.doctor-card__hospital {
|
||||
font-size: 13px;
|
||||
color: var(--color-hospital);
|
||||
font-weight: 600;
|
||||
margin-bottom: 8px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.doctor-card__fields {
|
||||
font-size: 12px;
|
||||
color: var(--color-text-secondary);
|
||||
line-height: 1.55;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.doctor-card__fields-label {
|
||||
color: var(--color-text-muted);
|
||||
font-weight: 500;
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
.doctor-card__fields-label::after {
|
||||
content: ":";
|
||||
}
|
||||
|
||||
.doctor-card__arrow {
|
||||
position: absolute;
|
||||
right: 12px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 16px;
|
||||
color: var(--color-primary-dark);
|
||||
background: var(--color-primary-light);
|
||||
border-radius: var(--radius-full);
|
||||
}
|
||||
|
||||
.doctor-list__empty {
|
||||
text-align: center;
|
||||
padding: var(--space-xl);
|
||||
color: var(--color-text-muted);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
@media (min-width: 360px) {
|
||||
.hero__title br {
|
||||
display: inline;
|
||||
}
|
||||
}
|
||||
46
css/variables.css
Normal file
46
css/variables.css
Normal file
@@ -0,0 +1,46 @@
|
||||
:root {
|
||||
--color-primary: #4caf8a;
|
||||
--color-primary-dark: #2d9668;
|
||||
--color-primary-light: #e8f7ef;
|
||||
--color-primary-soft: #f3fbf7;
|
||||
--color-accent: #7ecba8;
|
||||
--color-bg: #f0f5f2;
|
||||
--color-bg-warm: #fafcf9;
|
||||
--color-surface: #ffffff;
|
||||
--color-text: #1a2e24;
|
||||
--color-text-secondary: #5a6f64;
|
||||
--color-text-muted: #8fa396;
|
||||
--color-border: rgba(45, 150, 104, 0.1);
|
||||
--color-border-strong: rgba(45, 150, 104, 0.18);
|
||||
--color-danger: #e54d4d;
|
||||
--color-tag-bg: linear-gradient(135deg, #edf9f2 0%, #e0f3ea 100%);
|
||||
--color-tag-text: #2d9668;
|
||||
--color-hospital: #3a9d72;
|
||||
|
||||
--radius-sm: 10px;
|
||||
--radius-md: 14px;
|
||||
--radius-lg: 20px;
|
||||
--radius-xl: 28px;
|
||||
--radius-full: 9999px;
|
||||
|
||||
--shadow-sm: 0 2px 12px rgba(45, 120, 90, 0.06);
|
||||
--shadow-md: 0 8px 24px rgba(45, 120, 90, 0.08);
|
||||
--shadow-lg: 0 12px 32px rgba(45, 120, 90, 0.14);
|
||||
--shadow-card: 0 4px 20px rgba(26, 46, 36, 0.05);
|
||||
--shadow-glow: 0 8px 32px rgba(76, 175, 138, 0.22);
|
||||
|
||||
--space-xs: 4px;
|
||||
--space-sm: 8px;
|
||||
--space-md: 16px;
|
||||
--space-lg: 24px;
|
||||
--space-xl: 32px;
|
||||
|
||||
--font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
|
||||
--header-height: 48px;
|
||||
--footer-cta-height: 80px;
|
||||
--safe-bottom: env(safe-area-inset-bottom, 0px);
|
||||
|
||||
--gradient-primary: linear-gradient(135deg, #5ec99a 0%, #3da876 50%, #2d9668 100%);
|
||||
--gradient-hero: linear-gradient(165deg, #e8f7ef 0%, #f5fbf8 45%, #f0f5f2 100%);
|
||||
--gradient-surface: linear-gradient(180deg, #ffffff 0%, #fafdfb 100%);
|
||||
}
|
||||
Reference in New Issue
Block a user