功能:改造Salon小程序OpenID快捷登录

This commit is contained in:
2026-10-10 11:02:45 +08:00
parent dd3bcd40bc
commit 4bb8665aab
41 changed files with 1068 additions and 1304 deletions
+3 -554
View File
@@ -1,554 +1,3 @@
.auth-page {
display: flex;
flex-direction: column;
justify-content: flex-start;
padding: 34rpx 28rpx 48rpx;
background: #f4f8f5;
}
.brand {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 24rpx;
}
.logo {
width: 112rpx;
height: 112rpx;
border-radius: 30rpx;
background: #e5eee9;
box-shadow: 0 16rpx 34rpx rgba(111, 143, 131, 0.24);
}
.brand-name {
margin-top: 24rpx;
color: #2e4a3d;
font-size: 42rpx;
font-weight: 800;
}
.brand-sub {
margin-top: 8rpx;
color: #7b8f82;
font-size: 23rpx;
}
.auth-card {
padding: 30rpx 24rpx 26rpx;
border: 1rpx solid #e1ebe3;
border-radius: 24rpx;
background: #fbfdfb;
box-shadow: 0 18rpx 46rpx rgba(55, 94, 72, .08);
}
.welcome-copy { color: #2e4a3d; font-size: 34rpx; font-weight: 800; }
.welcome-hint { margin-top: 8rpx; color: #87978c; font-size: 23rpx; }
.mode-tabs {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 12rpx;
margin: 12rpx 0 10rpx;
padding: 8rpx;
border-radius: 12px;
background: #edf5ef;
}
.mode-tab {
display: flex;
align-items: center;
justify-content: center;
min-height: 64rpx;
border-radius: 10px;
color: #766f66;
font-size: 24rpx;
font-weight: 800;
}
.mode-tab.active {
background: #ffffff;
color: #3d6652;
box-shadow: 0 8rpx 18rpx rgba(58, 48, 34, 0.08);
}
.code-row {
display: flex;
align-items: center;
width: 100%;
min-width: 0;
gap: 14rpx;
}
.auth-card .field {
display: block;
min-height: 0;
padding: 0;
border: 0;
}
.auth-card .field-label {
display: block;
width: auto;
margin-bottom: 12rpx;
}
.auth-card .field input {
display: block;
box-sizing: border-box;
width: 100%;
height: 84rpx;
flex: none;
padding: 0 24rpx;
border: 1rpx solid #dfe9e1;
border-radius: 14rpx;
background: #f7faf7;
}
.code-input {
width: auto !important;
min-width: 0;
flex: 1 !important;
}
.code-btn {
width: 176rpx;
min-width: 176rpx;
max-width: 176rpx;
height: 68rpx;
flex: none;
padding: 0;
border: 1rpx solid #b9d0c0;
border-radius: 12rpx;
background: #edf5ef;
color: #6f8f83;
font-size: 24rpx;
font-weight: 700;
line-height: 68rpx;
text-align: center;
white-space: nowrap;
}
.code-btn.counting {
color: #aaa39a;
font-weight: 500;
}
.agreement-row,
.remember-row {
display: flex;
align-items: center;
gap: 14rpx;
margin-top: 22rpx;
color: #736c63;
font-size: 24rpx;
}
.remember-row {
margin-top: 18rpx;
}
.agreement-check {
display: flex;
align-items: center;
justify-content: center;
width: 34rpx;
min-width: 34rpx;
height: 34rpx;
border: 1rpx solid #bfb7ad;
border-radius: 8rpx;
color: #fffdf8;
font-size: 22rpx;
font-weight: 900;
}
.agreement-check.checked {
border-color: #6f8f83;
background: #6f8f83;
}
.agreement-copy {
flex: 1;
line-height: 1.45;
}
.agreement-link {
color: #55786d;
font-weight: 800;
}
.agreement-error {
margin-top: 16rpx;
color: #c36a6a;
font-size: 23rpx;
line-height: 1.5;
}
.login-btn {
margin-top: 28rpx;
}
.login-btn.disabled {
opacity: 0.56;
}
.auth-links {
display: flex;
justify-content: space-between;
margin-top: 18rpx;
}
.wechat-btn {
margin-top: 34rpx;
border: 1rpx solid #c9dbce;
background: #edf5ef;
color: #3d6652;
}
.shop-select-mask {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 20;
display: flex;
align-items: center;
justify-content: center;
padding: 48rpx;
background: rgba(36, 33, 29, 0.38);
}
.shop-select-dialog {
width: 100%;
max-height: 76vh;
padding: 28rpx;
border-radius: 8px;
background: #fffdf8;
box-shadow: 0 24rpx 64rpx rgba(58, 48, 34, 0.18);
}
.shop-select-header {
display: flex;
flex-direction: column;
gap: 8rpx;
margin-bottom: 22rpx;
}
.shop-select-title {
color: #24211d;
font-size: 32rpx;
font-weight: 900;
}
.shop-select-subtitle {
color: #928a80;
font-size: 24rpx;
}
.shop-option-list {
max-height: 520rpx;
}
.shop-option {
display: flex;
align-items: center;
gap: 18rpx;
min-height: 112rpx;
margin-bottom: 14rpx;
padding: 18rpx;
border: 1rpx solid #ece3d7;
border-radius: 8px;
background: #fbf7f0;
}
.shop-option.disabled {
opacity: 0.6;
}
.shop-option-icon {
display: flex;
align-items: center;
justify-content: center;
width: 72rpx;
min-width: 72rpx;
height: 72rpx;
border-radius: 8px;
background: #e5eee9;
color: #55786d;
font-size: 26rpx;
font-weight: 900;
}
.shop-option-copy {
display: flex;
min-width: 0;
flex: 1;
flex-direction: column;
gap: 8rpx;
}
.shop-option-name {
color: #2f2a25;
font-size: 28rpx;
font-weight: 800;
}
.shop-option-id {
color: #9a9288;
font-size: 22rpx;
}
.shop-switching {
margin-top: 12rpx;
color: #6f8f83;
font-size: 24rpx;
font-weight: 700;
text-align: center;
}
.agreement-mask {
position: fixed;
inset: 0;
z-index: 90;
display: flex;
align-items: center;
justify-content: center;
padding: 28rpx;
background: rgba(36, 33, 29, 0.42);
}
.agreement-modal {
width: 100%;
max-height: 82vh;
padding: 30rpx 28rpx;
border-radius: 24rpx;
background: #fffdf8;
box-shadow: 0 24rpx 64rpx rgba(58, 48, 34, 0.18);
}
.agreement-modal-title {
color: #24211d;
font-size: 32rpx;
font-weight: 900;
line-height: 1.35;
}
.agreement-modal-meta {
margin-top: 10rpx;
color: #928a80;
font-size: 22rpx;
}
.agreement-modal-body {
height: 640rpx;
max-height: 56vh;
margin-top: 22rpx;
padding: 20rpx;
border-radius: 18rpx;
background: #f3eee7;
color: #2f2a25;
font-size: 24rpx;
line-height: 1.85;
}
.agreement-modal-close {
margin-top: 22rpx;
}
/* 简洁登录布局沿用 Salon 现有绿色配色和控件语言。 */
.auth-page {
box-sizing: border-box;
min-height: 100vh;
padding: 0 36rpx 48rpx;
background: #f4f8f5;
}
.topbar {
display: flex;
align-items: center;
justify-content: center;
height: 96rpx;
border-bottom: 1rpx solid #e7eee9;
}
.topbar-title {
color: #2e4a3d;
font-size: 32rpx;
font-weight: 800;
}
.entry-view,
.form-view {
width: 100%;
max-width: 680rpx;
margin: 0 auto;
}
.entry-brand {
margin-top: 132rpx;
margin-bottom: 0;
}
.entry-brand .logo {
width: 128rpx;
height: 128rpx;
}
.entry-brand .brand-name {
margin-top: 22rpx;
font-size: 42rpx;
}
.entry-brand .brand-sub {
margin-top: 10rpx;
}
.entry-actions {
margin-top: 132rpx;
}
.entry-primary,
.entry-secondary {
width: 100%;
height: 92rpx;
margin: 0;
border-radius: 14rpx;
font-size: 29rpx;
line-height: 92rpx;
}
.entry-primary {
background: #6f8f83;
color: #fffdf8;
}
.entry-secondary {
margin-top: 22rpx;
border: 1rpx solid #9fbcac;
background: #fbfdfb;
color: #55786d;
}
.entry-password,
.entry-register {
color: #6f8f83;
font-size: 26rpx;
text-align: center;
}
.entry-password {
margin-top: 30rpx;
}
.entry-register {
margin-top: 24rpx;
color: #8b968f;
}
.entry-register text {
margin-left: 4rpx;
font-size: 32rpx;
}
.entry-agreement {
margin-top: 118rpx;
}
.form-view {
padding-top: 54rpx;
}
.form-heading {
position: relative;
margin-bottom: 72rpx;
text-align: center;
}
.back-entry {
position: absolute;
top: -8rpx;
left: 0;
color: #6f8f83;
font-size: 30rpx;
}
.back-entry text {
margin-left: 4rpx;
font-size: 24rpx;
}
.form-title {
color: #2e4a3d;
font-size: 42rpx;
font-weight: 800;
}
.form-subtitle {
margin-top: 12rpx;
color: #87978c;
font-size: 23rpx;
}
.compact-field {
margin-top: 28rpx;
}
.compact-field .field-label {
display: none;
}
.compact-field input {
box-sizing: border-box;
width: 100%;
height: 88rpx;
padding: 0 8rpx;
border-bottom: 1rpx solid #dce7df;
background: transparent;
color: #2e4a3d;
font-size: 29rpx;
}
.compact-field .code-row {
border-bottom: 1rpx solid #dce7df;
}
.compact-field .code-input {
height: 88rpx;
border-bottom: 0;
}
.compact-field .code-btn {
width: 190rpx;
min-width: 190rpx;
max-width: 190rpx;
height: 72rpx;
border: 0;
background: transparent;
color: #55786d;
line-height: 72rpx;
}
.form-view .agreement-row {
margin-top: 44rpx;
}
.form-view .remember-row {
margin-top: 20rpx;
}
.form-view .login-btn {
height: 88rpx;
margin-top: 38rpx;
border-radius: 14rpx;
line-height: 88rpx;
}
.form-links {
display: flex;
justify-content: center;
gap: 48rpx;
margin-top: 28rpx;
color: #6f8f83;
font-size: 24rpx;
}
.login-page { box-sizing:border-box; display:flex; min-height:calc(100vh - 88rpx); flex-direction:column; padding:0 56rpx 38rpx; background:#fff; }.login-main { display:flex; flex:1; flex-direction:column; }.brand-area { display:flex; flex-direction:column; align-items:center; padding-top:190rpx; }.login-logo { width:196rpx; height:196rpx; border-radius:46rpx; }.brand-name { margin-top:26rpx; color:#202522; font-size:40rpx; font-weight:800; letter-spacing:3rpx; }.brand-sub { margin-top:10rpx; color:#9a9f9c; font-size:22rpx; letter-spacing:4rpx; }.action-area { margin-top:118rpx; }.quick-btn { display:flex; align-items:center; justify-content:center; height:92rpx; border-radius:999rpx; background:#2f8f78; color:#fff; font-size:30rpx; font-weight:500; line-height:92rpx; box-shadow:0 10rpx 20rpx rgba(47,143,120,.16); }.quick-btn::after { border:0; }.wechat-symbol { display:flex; align-items:center; justify-content:center; width:38rpx; height:38rpx; margin-right:14rpx; border:2rpx solid rgba(255,255,255,.9); border-radius:50%; font-size:18rpx; font-weight:800; line-height:38rpx; }.remember-row { display:flex; align-items:center; justify-content:center; margin-top:30rpx; color:#737a76; font-size:23rpx; }.check { display:flex; align-items:center; justify-content:center; width:32rpx; height:32rpx; margin-right:12rpx; border:2rpx solid #b7bdb9; border-radius:50%; color:#fff; font-size:19rpx; }.check.small { width:28rpx; height:28rpx; flex:none; margin-right:8rpx; border-radius:7rpx; }.check.checked { border-color:#2f8f78; background:#2f8f78; }.state-line { display:flex; flex-direction:column; align-items:center; margin-top:34rpx; }.state-title { color:#765b32; font-size:24rpx; font-weight:700; }.state-message { margin-top:7rpx; color:#9a8260; font-size:20rpx; text-align:center; }.agreement-footer { padding-top:50rpx; }.agreement-line { display:flex; align-items:flex-start; justify-content:center; }.agreement-copy { color:#a0a4a1; font-size:20rpx; line-height:1.55; text-align:center; }.agreement-link { color:#6b7570; }.agreement-error { margin-top:10rpx; color:#ad6954; font-size:19rpx; text-align:center; }
.modal-mask { position:fixed; z-index:20; inset:0; display:flex; align-items:flex-end; background:rgba(0,0,0,.56); }.modal-mask.center { align-items:center; justify-content:center; padding:36rpx; }.agreement-sheet { box-sizing:border-box; width:100%; max-height:74vh; padding:16rpx 42rpx 48rpx; border-radius:28rpx 28rpx 0 0; background:#fff; }.sheet-handle { width:72rpx; height:8rpx; margin:0 auto 34rpx; border-radius:999rpx; background:#e4e5e4; }.modal-title { display:block; color:#222724; font-size:34rpx; font-weight:800; }.modal-version { display:block; margin-top:10rpx; color:#a1a5a2; font-size:21rpx; }.modal-body { height:38vh; margin-top:24rpx; color:#707773; font-size:25rpx; line-height:1.75; white-space:pre-wrap; }.sheet-actions { display:flex; gap:24rpx; margin-top:30rpx; }.sheet-btn { height:88rpx; flex:1; border-radius:14rpx; font-size:29rpx; line-height:88rpx; }.sheet-btn.secondary { background:#f3f3f3; color:#242824; }.sheet-btn.primary { background:#19be72; color:#fff; }.shop-dialog { box-sizing:border-box; width:100%; padding:34rpx; border-radius:24rpx; background:#fff; }.shop-option { display:flex; align-items:center; margin-top:20rpx; padding:22rpx; border-radius:16rpx; background:#f3f8f5; color:#344b40; font-size:26rpx; }.shop-icon { display:flex; align-items:center; justify-content:center; width:52rpx; height:52rpx; margin-right:16rpx; border-radius:14rpx; background:#dbe9df; color:#35634d; font-weight:800; }.shop-arrow { margin-left:auto; color:#82948a; font-size:34rpx; }.switching { display:block; margin-top:20rpx; color:#82948a; text-align:center; }
@media (max-height:700px) { .brand-area { padding-top:90rpx; }.action-area { margin-top:70rpx; }.login-logo { width:160rpx; height:160rpx; } }