修改引导页、登录页等页面样式
This commit is contained in:
@@ -22,8 +22,8 @@
|
||||
</view>
|
||||
|
||||
<!-- 确定按钮 -->
|
||||
<button
|
||||
class="confirm-btn"
|
||||
<button
|
||||
class="confirm-btn"
|
||||
:disabled="!canConfirm"
|
||||
@click="handleConfirm"
|
||||
>
|
||||
@@ -35,7 +35,7 @@
|
||||
<script setup>
|
||||
import { ref, computed } from 'vue';
|
||||
import {onLoad,onShow} from '@dcloudio/uni-app'
|
||||
import{getResetPassword} from '../api/api.js'
|
||||
import{getResetPassword} from '../../api/api.js'
|
||||
|
||||
|
||||
// ========== 响应式数据 ==========
|
||||
@@ -54,8 +54,8 @@ const canConfirm = computed(() => {
|
||||
// 密码格式规则:6-16位任意字符(可根据需求调整)
|
||||
const pwdReg = /^(?=.*[a-zA-Z])(?=.*\d).{6,16}$/;
|
||||
// 校验条件:新密码符合格式 + 确认密码和新密码一致 + 均不为空
|
||||
return pwdReg.test(newPassword.value)
|
||||
&& newPassword.value === confirmPassword.value
|
||||
return pwdReg.test(newPassword.value)
|
||||
&& newPassword.value === confirmPassword.value
|
||||
&& newPassword.value && confirmPassword.value;
|
||||
});
|
||||
|
||||
@@ -66,10 +66,10 @@ const goBack = () => {
|
||||
};
|
||||
onShow(() => {
|
||||
// 从缓存读取参数
|
||||
const params = uni.getStorageSync('tempChangePwdParams') || {};
|
||||
const params = uni.getStorageSync('tempChangePwdParams') || {};
|
||||
// 赋值
|
||||
phone.value = params.phoneNumber
|
||||
smsCode.value = params.verifyCode
|
||||
smsCode.value = params.verifyCode
|
||||
// 用完删除缓存(避免下次跳转读取旧值)
|
||||
uni.removeStorageSync('tempChangePwdParams');
|
||||
});
|
||||
@@ -94,14 +94,14 @@ const handleConfirm = () => {
|
||||
setTimeout(() =>{
|
||||
uni.navigateTo({ url: '/pageSubPack/loginSub/pwd-login' });
|
||||
},1500)
|
||||
|
||||
|
||||
}else{
|
||||
uni.showToast({ title: "修改失败", icon: 'error' });
|
||||
}
|
||||
}
|
||||
}).catch(err =>{
|
||||
uni.showToast({
|
||||
title: '网络异常',
|
||||
icon: 'error'
|
||||
title: '网络异常',
|
||||
icon: 'error'
|
||||
});
|
||||
})
|
||||
|
||||
@@ -134,7 +134,7 @@ const handleConfirm = () => {
|
||||
}
|
||||
.status_bar{
|
||||
width: 100%;
|
||||
height: 46px;
|
||||
height: 36px;
|
||||
}
|
||||
|
||||
/* 顶部导航栏 */
|
||||
@@ -148,9 +148,10 @@ const handleConfirm = () => {
|
||||
.nav-title {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
font-size: 36rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
color: #000;
|
||||
margin-right: 100rpx;
|
||||
}
|
||||
|
||||
/* 输入框通用样式 */
|
||||
@@ -180,9 +181,9 @@ const handleConfirm = () => {
|
||||
line-height: 88rpx;
|
||||
background-color: #4D5DFA;
|
||||
color: #fff;
|
||||
border-radius: 44rpx;
|
||||
font-size: 32rpx;
|
||||
margin-top: 20rpx;
|
||||
border-radius: 8rpx;
|
||||
font-size: 28rpx;
|
||||
margin-top: 66rpx;
|
||||
}
|
||||
|
||||
/* 确定按钮禁用状态 */
|
||||
@@ -192,6 +193,6 @@ const handleConfirm = () => {
|
||||
}
|
||||
/* 禁用按钮边框 */
|
||||
button:after{
|
||||
border-radius: 50px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user