Browse Source

统一所有页面的授权登录提示样式

pull/1/head
徐飞洋 3 months ago
parent
commit
9960795e11
  1. 0
      pages/buyer/goods-detail.js
  2. 0
      pages/buyer/goods-detail.json
  3. 0
      pages/buyer/goods-detail.wxml
  4. 0
      pages/buyer/goods-detail.wxss
  5. 36
      pages/buyer/index.wxml
  6. 63
      pages/buyer/index.wxss
  7. 40
      pages/index/index.wxml
  8. 50
      pages/index/index.wxss
  9. 12
      pages/seller/index.wxml
  10. 47
      pages/seller/index.wxss
  11. 14
      pages/settlement/index.js
  12. 37
      pages/settlement/index.wxml
  13. 63
      pages/settlement/index.wxss

0
pages/buyer/goods-detail.js

0
pages/buyer/goods-detail.json

0
pages/buyer/goods-detail.wxml

0
pages/buyer/goods-detail.wxss

36
pages/buyer/index.wxml

@ -137,33 +137,25 @@
</view>
<!-- 未授权登录提示弹窗 -->
<view wx:if="{{showAuthModal}}" class="modal-overlay" style="position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); display: flex; justify-content: center; align-items: center; z-index: 9999;">
<view class="modal-container" style="background: white; padding: 40rpx; border-radius: 16rpx; width: 80%; max-width: 500rpx; text-align: center;">
<view class="modal-title" style="font-size: 32rpx; font-weight: bold; margin-bottom: 30rpx; color: #333;">
<text>提示</text>
</view>
<view class="modal-content" style="font-size: 28rpx; color: #666; margin-bottom: 40rpx; line-height: 1.5;">
<text>请先登录后再预约商品</text>
</view>
<view class="modal-buttons">
<button class="primary-button" style="background-color: #1677ff; color: white; font-size: 28rpx; line-height: 80rpx; border-radius: 8rpx; margin-bottom: 20rpx;" bindtap="showOneKeyLogin">一键登录</button>
<button class="cancel-button" style="background-color: #f5f5f5; color: #333; font-size: 28rpx; line-height: 80rpx; border-radius: 8rpx;" bindtap="closeAuthModal">取消</button>
<view wx:if="{{showAuthModal}}" class="auth-modal-overlay">
<view class="auth-modal-container">
<view class="auth-modal-title">提示</view>
<view class="auth-modal-content">请先登录后再操作</view>
<view class="auth-modal-buttons">
<button class="auth-primary-button" bindtap="showOneKeyLogin">一键登录</button>
<button class="auth-cancel-button" bindtap="closeAuthModal">取消</button>
</view>
</view>
</view>
<!-- 一键登录弹窗 -->
<view wx:if="{{showOneKeyLoginModal}}" class="modal-overlay" style="position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); display: flex; justify-content: center; align-items: center; z-index: 9999;">
<view class="modal-container" style="background: white; padding: 40rpx; border-radius: 16rpx; width: 80%; max-width: 500rpx; text-align: center;">
<view class="modal-title" style="font-size: 32rpx; font-weight: bold; margin-bottom: 30rpx; color: #333;">
<text>授权登录</text>
</view>
<view class="modal-content" style="font-size: 28rpx; color: #666; margin-bottom: 40rpx; line-height: 1.5;">
<text>请授权获取您的手机号用于登录</text>
</view>
<view class="modal-buttons">
<button class="primary-button" open-type="getPhoneNumber" bind:getphonenumber="onGetPhoneNumber" style="background-color: #1677ff; color: white; font-size: 28rpx; line-height: 80rpx; border-radius: 8rpx; margin-bottom: 20rpx;">授权获取手机号</button>
<button class="cancel-button" style="background-color: #f5f5f5; color: #333; font-size: 28rpx; line-height: 80rpx; border-radius: 8rpx;" bindtap="closeOneKeyLoginModal">取消</button>
<view wx:if="{{showOneKeyLoginModal}}" class="auth-modal-overlay">
<view class="auth-modal-container">
<view class="auth-modal-title">授权登录</view>
<view class="auth-modal-content">请授权获取您的手机号用于登录</view>
<view class="auth-modal-buttons">
<button class="auth-primary-button" open-type="getPhoneNumber" bind:getphonenumber="onGetPhoneNumber">授权获取手机号</button>
<button class="auth-cancel-button" bindtap="closeOneKeyLoginModal">取消</button>
</view>
</view>
</view>

63
pages/buyer/index.wxss

@ -476,3 +476,66 @@ button:after {
width: 100%;
box-sizing: border-box;
}
/* 统一登录授权弹窗样式 */
.auth-modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
z-index: 1002;
}
.auth-modal-container {
background-color: #fff;
border-radius: 20rpx;
width: 80%;
max-width: 500rpx;
padding: 40rpx;
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.15);
}
.auth-modal-title {
font-size: 36rpx;
font-weight: bold;
color: #333;
text-align: center;
margin-bottom: 30rpx;
}
.auth-modal-content {
font-size: 32rpx;
line-height: 1.5;
color: #666;
text-align: center;
margin-bottom: 40rpx;
}
.auth-modal-buttons {
display: flex;
flex-direction: column;
gap: 20rpx;
}
.auth-primary-button {
background-color: #1677ff;
color: #fff;
font-size: 32rpx;
line-height: 1.5;
border-radius: 8rpx;
padding: 20rpx 0;
}
.auth-cancel-button {
background-color: #f5f5f5;
color: #666;
font-size: 32rpx;
line-height: 1.5;
border-radius: 8rpx;
padding: 20rpx 0;
}

40
pages/index/index.wxml

@ -19,37 +19,25 @@
</view>
<!-- 未授权登录提示弹窗 -->
<view wx:if="{{showAuthModal}}" class="modal-overlay">
<view class="modal-container">
<view class="modal-title">
<text>提示</text>
</view>
<view class="modal-content">
<text>您还没有授权登录</text>
</view>
<view class="modal-buttons">
<button class="primary-button" bindtap="showOneKeyLogin">
一键登录
</button>
<button class="cancel-button" bindtap="closeAuthModal">取消</button>
<view wx:if="{{showAuthModal}}" class="auth-modal-overlay">
<view class="auth-modal-container">
<view class="auth-modal-title">提示</view>
<view class="auth-modal-content">请先登录后再操作</view>
<view class="auth-modal-buttons">
<button class="auth-primary-button" bindtap="showOneKeyLogin">一键登录</button>
<button class="auth-cancel-button" bindtap="closeAuthModal">取消</button>
</view>
</view>
</view>
<!-- 一键登录弹窗 -->
<view wx:if="{{showOneKeyLoginModal}}" class="modal-overlay">
<view class="modal-container">
<view class="modal-title">
<text>授权登录</text>
</view>
<view class="modal-content">
<text>请授权获取您的手机号用于登录</text>
</view>
<view class="modal-buttons">
<button class="primary-button" open-type="getPhoneNumber" bind:getphonenumber="onGetPhoneNumber">
授权获取手机号
</button>
<button class="cancel-button" bindtap="closeOneKeyLoginModal">取消</button>
<view wx:if="{{showOneKeyLoginModal}}" class="auth-modal-overlay">
<view class="auth-modal-container">
<view class="auth-modal-title">授权登录</view>
<view class="auth-modal-content">请授权获取您的手机号用于登录</view>
<view class="auth-modal-buttons">
<button class="auth-primary-button" open-type="getPhoneNumber" bind:getphonenumber="onGetPhoneNumber">授权获取手机号</button>
<button class="auth-cancel-button" bindtap="closeOneKeyLoginModal">取消</button>
</view>
</view>
</view>

50
pages/index/index.wxss

@ -109,7 +109,7 @@ page {
}
/* 弹窗样式 */
.modal-overlay {
.auth-modal-overlay {
position: fixed;
top: 0;
left: 0;
@ -119,38 +119,56 @@ page {
display: flex;
justify-content: center;
align-items: center;
z-index: 999;
z-index: 1002;
}
.modal-container {
background-color: white;
border-radius: 16rpx;
.auth-modal-container {
background-color: #fff;
border-radius: 20rpx;
width: 80%;
max-width: 500rpx;
padding: 40rpx;
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.15);
}
.modal-title {
text-align: center;
margin-bottom: 30rpx;
}
.modal-title text {
.auth-modal-title {
font-size: 36rpx;
font-weight: bold;
color: #333;
text-align: center;
margin-bottom: 30rpx;
}
.modal-content {
.auth-modal-content {
font-size: 32rpx;
line-height: 1.5;
color: #666;
text-align: center;
margin-bottom: 40rpx;
color: #666;
}
.modal-content text {
.auth-modal-buttons {
display: flex;
flex-direction: column;
gap: 20rpx;
}
.auth-primary-button {
background-color: #1677ff;
color: #fff;
font-size: 32rpx;
line-height: 1.5;
border-radius: 8rpx;
padding: 20rpx 0;
}
.modal-buttons {
text-align: center;
.auth-cancel-button {
background-color: #f5f5f5;
color: #666;
font-size: 32rpx;
line-height: 1.5;
border-radius: 8rpx;
padding: 20rpx 0;
}
.primary-button {

12
pages/seller/index.wxml

@ -803,16 +803,10 @@
<!-- 未授权登录提示弹窗 -->
<view wx:if="{{showAuthModal}}" class="auth-modal-overlay">
<view class="auth-modal-container">
<view class="auth-modal-title">
<text>提示</text>
</view>
<view class="auth-modal-content">
<text>您还没有授权登录</text>
</view>
<view class="auth-modal-title">提示</view>
<view class="auth-modal-content">请先登录后再操作</view>
<view class="auth-modal-buttons">
<button class="auth-primary-button" bindtap="showOneKeyLogin">
一键登录
</button>
<button class="auth-primary-button" bindtap="showOneKeyLogin">一键登录</button>
<button class="auth-cancel-button" bindtap="closeAuthModal">取消</button>
</view>
</view>

47
pages/seller/index.wxss

@ -529,38 +529,35 @@ button {
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
background: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
z-index: 999;
z-index: 9999;
}
.auth-modal-container {
background-color: white;
background: white;
padding: 40rpx;
border-radius: 16rpx;
width: 80%;
padding: 40rpx;
}
.auth-modal-title {
max-width: 500rpx;
text-align: center;
margin-bottom: 30rpx;
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.1);
}
.auth-modal-title text {
font-size: 36rpx;
.auth-modal-title {
font-size: 32rpx;
font-weight: bold;
margin-bottom: 30rpx;
color: #333;
}
.auth-modal-content {
text-align: center;
margin-bottom: 40rpx;
font-size: 28rpx;
color: #666;
}
.auth-modal-content text {
font-size: 32rpx;
margin-bottom: 40rpx;
line-height: 1.5;
}
.auth-modal-buttons {
@ -570,22 +567,18 @@ button {
.auth-primary-button {
background-color: #1677ff;
color: white;
width: 100%;
font-size: 28rpx;
line-height: 80rpx;
border-radius: 8rpx;
margin-bottom: 20rpx;
border: none;
font-size: 32rpx;
font-weight: 600;
text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.2);
}
.auth-cancel-button {
background: none;
color: #666;
border: none;
font-size: 32rpx;
font-weight: 600;
text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.1);
background-color: #f5f5f5;
color: #333;
font-size: 28rpx;
line-height: 80rpx;
border-radius: 8rpx;
}
/* 头像选择样式 */

14
pages/settlement/index.js

@ -37,6 +37,7 @@ Page({
// 登录弹窗相关
showAuthModal: false,
showOneKeyLoginModal: false,
loginModalTitle: '请先登录',
loginModalContent: '为了您的账户安全,请先完成手机号登录',
showLoginButton: true
@ -825,6 +826,19 @@ Page({
});
},
// 显示一键登录弹窗
showOneKeyLogin() {
this.setData({
showAuthModal: false,
showOneKeyLoginModal: true
})
},
// 关闭一键登录弹窗
closeOneKeyLoginModal() {
this.setData({ showOneKeyLoginModal: false })
},
// 处理手机号授权
async onGetPhoneNumber(e) {
console.log('用户点击了手机号授权按钮', e.detail);

37
pages/settlement/index.wxml

@ -341,27 +341,26 @@
<!-- 登录授权弹窗 -->
<view class="auth-modal" wx:if="{{showAuthModal}}">
<view class="auth-content">
<view class="auth-header">
<view class="auth-title">登录授权</view>
<view class="auth-close" bindtap="closeAuthModal">×</view>
<!-- 未授权登录提示弹窗 -->
<view wx:if="{{showAuthModal}}" class="auth-modal-overlay">
<view class="auth-modal-container">
<view class="auth-modal-title">提示</view>
<view class="auth-modal-content">请先登录后再操作</view>
<view class="auth-modal-buttons">
<button class="auth-primary-button" bindtap="showOneKeyLogin">一键登录</button>
<button class="auth-cancel-button" bindtap="closeAuthModal">取消</button>
</view>
<view class="auth-body">
<view class="auth-icon">📱</view>
<view class="auth-text">为了提供更好的服务,需要获取您的手机号进行身份验证</view>
<!-- 手机号授权按钮 -->
<button
class="auth-btn"
open-type="getPhoneNumber"
bindgetphonenumber="onGetPhoneNumber"
>
授权手机号
</button>
</view>
</view>
<view class="auth-tip">授权后即可完成入驻申请</view>
<!-- 一键登录弹窗 -->
<view wx:if="{{showOneKeyLoginModal}}" class="auth-modal-overlay">
<view class="auth-modal-container">
<view class="auth-modal-title">授权登录</view>
<view class="auth-modal-content">请授权获取您的手机号用于登录</view>
<view class="auth-modal-buttons">
<button class="auth-primary-button" open-type="getPhoneNumber" bind:getphonenumber="onGetPhoneNumber">授权获取手机号</button>
<button class="auth-cancel-button" bindtap="closeOneKeyLoginModal">取消</button>
</view>
</view>
</view>

63
pages/settlement/index.wxss

@ -1552,28 +1552,63 @@ picker {
}
/* 登录授权弹窗 */
.auth-modal {
/* 统一的授权登录弹窗样式 */
.auth-modal-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
z-index: 1002;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
z-index: 9999;
}
.auth-content {
background-color: white;
border-radius: 20rpx;
width: 85%;
max-width: 520rpx;
overflow: hidden;
display: flex;
flex-direction: column;
animation: modalSlideIn 0.3s ease-out;
.auth-modal-container {
background: white;
padding: 40rpx;
border-radius: 16rpx;
width: 80%;
max-width: 500rpx;
text-align: center;
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.1);
}
.auth-modal-title {
font-size: 32rpx;
font-weight: bold;
margin-bottom: 30rpx;
color: #333;
}
.auth-modal-content {
font-size: 28rpx;
color: #666;
margin-bottom: 40rpx;
line-height: 1.5;
}
.auth-modal-buttons {
text-align: center;
}
.auth-primary-button {
background-color: #1677ff;
color: white;
font-size: 28rpx;
line-height: 80rpx;
border-radius: 8rpx;
margin-bottom: 20rpx;
}
.auth-cancel-button {
background-color: #f5f5f5;
color: #333;
font-size: 28rpx;
line-height: 80rpx;
border-radius: 8rpx;
}
@keyframes modalSlideIn {

Loading…
Cancel
Save