fix(auth-modal): 优化登录弹窗以符合审核要求并修复TabBar重叠问题
- 增加右上角关闭按钮和“暂不登录”按钮,满足禁止强制登录的审核要求。 - 修复关闭登录弹窗时原生TabBar与自定义TabBar重叠显示的问题。 - 清理无用的第三方登录注释代码,优化弹窗内部布局样式。 - 在主题工具中增加“雄戈小酒”至“橙虎小酒”的品牌名称替换规则。
这个提交包含在:
@@ -3,6 +3,10 @@
|
|||||||
<view v-if="authType" class="auth-modal-wrap" @tap="closeAuthModal" @touchmove.stop.prevent>
|
<view v-if="authType" class="auth-modal-wrap" @tap="closeAuthModal" @touchmove.stop.prevent>
|
||||||
<view class="auth-modal-panel safe-area-inset-bottom" @tap.stop>
|
<view class="auth-modal-panel safe-area-inset-bottom" @tap.stop>
|
||||||
<view class="login-wrap form-wrap">
|
<view class="login-wrap form-wrap">
|
||||||
|
<!-- 审核要求:登录授权弹窗必须提供明确的取消/关闭入口 -->
|
||||||
|
<view class="auth-close-btn" @tap.stop="closeAuthModal">
|
||||||
|
<u-icon name="close" size="36" color="#999"></u-icon>
|
||||||
|
</view>
|
||||||
<!-- 1.账号密码登录(已隐藏) -->
|
<!-- 1.账号密码登录(已隐藏) -->
|
||||||
<view v-if="false && authType === 'accountLogin'">
|
<view v-if="false && authType === 'accountLogin'">
|
||||||
<!-- 标题 -->
|
<!-- 标题 -->
|
||||||
@@ -252,25 +256,12 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="head-subtitle">请使用微信授权手机号登录</view>
|
<view class="head-subtitle">请使用微信授权手机号登录</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="auto-login-box u-flex u-row-center u-col-center">
|
<view class="auto-login-box u-flex-col u-row-center u-col-center">
|
||||||
<!-- 微信 -->
|
<!-- 微信 -->
|
||||||
<button v-if="['wxOfficialAccount', 'wxMiniProgram'].includes(platform)" class="wechat-login" open-type="getPhoneNumber"
|
<button v-if="['wxOfficialAccount', 'wxMiniProgram'].includes(platform)" class="wechat-login" open-type="getPhoneNumber"
|
||||||
@getphonenumber="getPhoneNumber">手机号码一键登录</button>
|
@getphonenumber="getPhoneNumber">手机号码一键登录</button>
|
||||||
<!-- <image
|
<!-- 审核要求:余额等需登录场景须提供可关闭的取消入口,禁止强制登录 -->
|
||||||
v-if="['App', 'wxOfficialAccount', 'wxMiniProgram'].includes(platform)"
|
<button class="u-reset-button auth-cancel-btn" @tap="closeAuthModal">暂不登录</button>
|
||||||
class="auto-login-img"
|
|
||||||
@tap="thirdLogin('wechat')"
|
|
||||||
:src="$IMG_URL + '/imgs/auto_login_wx.png'"
|
|
||||||
></image> -->
|
|
||||||
<!-- 支付宝 -->
|
|
||||||
<!-- <image
|
|
||||||
v-if="['App', 'alipayMiniProgram', 'H5'].includes(platform)"
|
|
||||||
class="auto-login-img"
|
|
||||||
@tap="thirdLogin('alipay')"
|
|
||||||
:src="$IMG_URL + '/imgs/auto_login_ali.png'"
|
|
||||||
mode=""
|
|
||||||
></image> -->
|
|
||||||
<!-- 苹果 -->
|
|
||||||
<!-- #ifdef APP-PLUS -->
|
<!-- #ifdef APP-PLUS -->
|
||||||
<image v-if="device === 'ios'" class="auto-login-img" @tap="thirdLogin('apple')"
|
<image v-if="device === 'ios'" class="auto-login-img" @tap="thirdLogin('apple')"
|
||||||
:src="$IMG_URL + '/imgs/auto_login_iphone.png'"></image>
|
:src="$IMG_URL + '/imgs/auto_login_iphone.png'"></image>
|
||||||
@@ -308,6 +299,7 @@
|
|||||||
import FormValidate from '@/shopro/validate/form';
|
import FormValidate from '@/shopro/validate/form';
|
||||||
import schema from '@/uview-ui/libs/util/async-validator';
|
import schema from '@/uview-ui/libs/util/async-validator';
|
||||||
import wechat from '@/shopro/wechat/wechat';
|
import wechat from '@/shopro/wechat/wechat';
|
||||||
|
import { hideNativeTabBar } from '@/shopro/utils/theme';
|
||||||
import {
|
import {
|
||||||
mapMutations,
|
mapMutations,
|
||||||
mapActions,
|
mapActions,
|
||||||
@@ -454,12 +446,9 @@
|
|||||||
...mapGetters(['initShop', 'isLogin', 'authType'])
|
...mapGetters(['initShop', 'isLogin', 'authType'])
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
authType(val, oldVal) {
|
authType() {
|
||||||
if (val) {
|
// 项目使用自定义 shopro-tabbar,关闭登录弹窗时不能 showTabBar,否则会叠出双导航栏
|
||||||
uni.hideTabBar();
|
hideNativeTabBar();
|
||||||
} else if (oldVal) {
|
|
||||||
uni.showTabBar();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {},
|
||||||
@@ -812,6 +801,31 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.auth-close-btn {
|
||||||
|
position: absolute;
|
||||||
|
top: 24rpx;
|
||||||
|
right: 24rpx;
|
||||||
|
z-index: 2;
|
||||||
|
width: 64rpx;
|
||||||
|
height: 64rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.auth-cancel-btn {
|
||||||
|
width: 520rpx;
|
||||||
|
height: 88rpx;
|
||||||
|
line-height: 88rpx;
|
||||||
|
margin-top: 24rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
border: 1rpx solid #D9D9D9;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #666666;
|
||||||
|
background: #FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
@keyframes title-animation {
|
@keyframes title-animation {
|
||||||
0% {
|
0% {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
@@ -864,6 +878,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.login-wrap {
|
.login-wrap {
|
||||||
|
position: relative;
|
||||||
padding: 50rpx 34rpx 40rpx;
|
padding: 50rpx 34rpx 40rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|||||||
@@ -285,6 +285,7 @@ const LEGACY_HEADER_COLORS = ['#FFA33E', '#ff1926', '#FF0e25', '#ff0e25', '#EFC4
|
|||||||
const BRAND_NAME = '橙虎小酒';
|
const BRAND_NAME = '橙虎小酒';
|
||||||
|
|
||||||
const LEGACY_BRAND_REPLACEMENTS = [
|
const LEGACY_BRAND_REPLACEMENTS = [
|
||||||
|
[/雄戈小酒/g, '橙虎小酒'],
|
||||||
[/雄哥小酒/g, '橙虎小酒'],
|
[/雄哥小酒/g, '橙虎小酒'],
|
||||||
[/雄哥系列/g, '雄戈系列'],
|
[/雄哥系列/g, '雄戈系列'],
|
||||||
[/贵州雄哥酒业有限公司/g, '贵州雄戈酒业有限公司'],
|
[/贵州雄哥酒业有限公司/g, '贵州雄戈酒业有限公司'],
|
||||||
|
|||||||
在新工单中引用
屏蔽一个用户