diff --git a/components/LoginPopup/LoginPopup.vue b/components/LoginPopup/LoginPopup.vue index eaf851c..a20d0da 100644 --- a/components/LoginPopup/LoginPopup.vue +++ b/components/LoginPopup/LoginPopup.vue @@ -2,30 +2,79 @@ + - 登录授权 + 授权登录 + + + - + - - + + + 昵称 + + + + + + + + + + @@ -47,6 +96,7 @@ const popupRef = ref(null); const privacyRef = ref(null); const avatarUrl = ref(""); const nickname = ref(""); +const isAgreed = ref(false); const userStore = useUserStore(); @@ -97,10 +147,8 @@ const getFestivalName = () => { }; const open = async () => { - console.log(22223333); // #ifdef MP-WEIXIN const isAgreed = await privacyRef.value.check(); - console.log(1111, isAgreed); if (isAgreed) { popupRef.value.open(); } @@ -124,6 +172,10 @@ const onChooseAvatar = (e) => { }; const confirmLogin = async () => { + // if (!isAgreed.value) { + // uni.showToast({ title: "请先同意用户协议和隐私政策", icon: "none" }); + // return; + // } try { const platform = getPlatformProvider(); if (platform === "mp-weixin") { @@ -181,61 +233,175 @@ defineExpose({ open, close }); } .popup-container { background-color: #fff; - padding: 40rpx 30rpx 60rpx; - border-top-left-radius: 30rpx; - border-top-right-radius: 30rpx; + padding: 20rpx 40rpx 60rpx; + border-top-left-radius: 48rpx; + border-top-right-radius: 48rpx; + position: relative; + + .drag-handle { + width: 64rpx; + height: 8rpx; + background: #e5e5e5; + border-radius: 4rpx; + margin: 0 auto 30rpx; + } .popup-header { - text-align: center; - margin-bottom: 30rpx; + display: flex; + justify-content: center; + align-items: center; + margin-bottom: 60rpx; + position: relative; .popup-title { font-size: 36rpx; - font-weight: bold; + font-weight: 600; + color: #1a1a1a; + } + + .close-btn { + position: absolute; + right: 0; + top: 50%; + transform: translateY(-50%); + padding: 10rpx; } } - .avatar-nickname { + .avatar-section { display: flex; - flex-direction: column; - align-items: center; - margin-bottom: 30rpx; + justify-content: center; + margin-bottom: 80rpx; .avatar-selector { - width: 145rpx; - height: 145rpx; + display: flex; + flex-direction: column; + align-items: center; + } + + .avatar-wrapper { + width: 200rpx; + height: 200rpx; + background: #f5f5f5; border-radius: 50%; + position: relative; + margin-bottom: 20rpx; + border: 4rpx solid #fff; + box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05); + + .avatar-preview { + width: 100%; + height: 100%; + border-radius: 50%; + } + + .camera-icon { + position: absolute; + right: 10rpx; + bottom: 10rpx; + width: 48rpx; + height: 48rpx; + background: #ff4d4f; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + border: 4rpx solid #fff; + } + } + + .upload-tip { font-size: 26rpx; + color: #999; + } + } + + .form-section { + margin-bottom: 80rpx; + + .input-group { + display: flex; + align-items: center; + padding: 30rpx 0; + border-bottom: 1rpx solid #f0f0f0; + + .label { + font-size: 30rpx; + color: #1a1a1a; + font-weight: 500; + width: 100rpx; + } + + .nickname-input { + flex: 1; + font-size: 30rpx; + color: #1a1a1a; + margin-left: 20rpx; + } + + .placeholder { + color: #ccc; + } + + .get-nickname-btn { + font-size: 26rpx; + color: #576b95; + font-weight: 500; + } + } + } + + .action-section { + .confirm-btn { + background: #ff4d4f; + color: #fff; + font-size: 34rpx; + font-weight: 600; + height: 100rpx; + border-radius: 50rpx; display: flex; align-items: center; justify-content: center; - margin-bottom: 20rpx; - background-color: #eee; + margin-bottom: 40rpx; + box-shadow: 0 12rpx 24rpx rgba(255, 77, 79, 0.3); + + &:active { + opacity: 0.8; + } } - .avatar-preview { - width: 100%; - height: 100%; - border-radius: 50%; - } + .agreement-row { + display: flex; + align-items: center; + justify-content: center; + padding-bottom: 20rpx; - .nickname-input { - width: 80%; - border: 1rpx solid #ccc; - border-radius: 20rpx; - padding: 20rpx; - font-size: 26rpx; - text-align: center; - } - } + .checkbox { + width: 32rpx; + height: 32rpx; + border: 2rpx solid #ccc; + border-radius: 50%; + margin-right: 16rpx; + display: flex; + align-items: center; + justify-content: center; + transition: all 0.2s; - .confirm-btn { - background-color: #07c160; - color: white; - font-size: 30rpx; - border-radius: 50rpx; - padding: 20rpx 0; - width: 100%; + &.checked { + background: #ff4d4f; + border-color: #ff4d4f; + } + } + + .agreement-text { + font-size: 24rpx; + color: #999; + + .link { + color: #576b95; + } + } + } } } diff --git a/static/images/default-avatar.png b/static/images/default-avatar.png new file mode 100644 index 0000000..931ea39 Binary files /dev/null and b/static/images/default-avatar.png differ