合并账号和手机号登录页面;更换图片地址;
This commit is contained in:
@@ -1,18 +1,12 @@
|
||||
<template>
|
||||
<view class="reset-pwd-page">
|
||||
<view class="status_bar"></view>
|
||||
<!-- 顶部导航栏 -->
|
||||
<view class="nav-bar">
|
||||
<uni-icons type="left" size="28" color="#333" @click="goBack"></uni-icons>
|
||||
<view class="nav-title">修改密码</view>
|
||||
</view>
|
||||
|
||||
<!-- 新密码输入框 -->
|
||||
<view class="input-item">
|
||||
<uni-easyinput class="input-content" type="password" v-model="newPassword"
|
||||
placeholder="请输入密码" :inputBorder="false" :placeholderStyle="placeholderStyle">
|
||||
</uni-easyinput>
|
||||
</view>
|
||||
<view class="pwd-hint" v-if="passwordTooSimple">密码过于简单,需字母和数字组合</view>
|
||||
|
||||
<!-- 确认密码输入框 -->
|
||||
<view class="input-item">
|
||||
@@ -59,11 +53,14 @@ const canConfirm = computed(() => {
|
||||
&& newPassword.value && confirmPassword.value;
|
||||
});
|
||||
|
||||
// 密码是否过于简单(缺少字母或数字组合)
|
||||
const passwordTooSimple = computed(() => {
|
||||
const pwd = newPassword.value;
|
||||
if (!pwd) return false;
|
||||
return !(/[a-zA-Z]/.test(pwd) && /\d/.test(pwd));
|
||||
});
|
||||
|
||||
// ========== 方法 ==========
|
||||
// 返回上一页
|
||||
const goBack = () => {
|
||||
uni.navigateBack();
|
||||
};
|
||||
onShow(() => {
|
||||
// 从缓存读取参数
|
||||
const params = uni.getStorageSync('tempChangePwdParams') || {};
|
||||
@@ -92,16 +89,16 @@ const handleConfirm = () => {
|
||||
//uni.setStorageSync('token', res.token); // 后端返回token字段
|
||||
uni.showToast({ title: '修改成功', icon: 'success' });
|
||||
setTimeout(() =>{
|
||||
uni.navigateTo({ url: '/pageSubPack/loginSub/pwd-login' });
|
||||
uni.navigateTo({ url: '/pageSubPack/loginSub/login?mode=pwd' });
|
||||
},1500)
|
||||
|
||||
}else{
|
||||
uni.showToast({ title: "修改失败", icon: 'error' });
|
||||
uni.showToast({ title: "修改失败", icon: 'none' });
|
||||
}
|
||||
}).catch(err =>{
|
||||
uni.showToast({
|
||||
title: err.msg,
|
||||
icon: 'error'
|
||||
title: err.msg || '网络异常',
|
||||
icon: 'none'
|
||||
});
|
||||
})
|
||||
|
||||
@@ -115,27 +112,6 @@ const handleConfirm = () => {
|
||||
min-height: 100vh;
|
||||
background: repeating-linear-gradient(180deg, #E2F0FF, #F6FAFF );
|
||||
}
|
||||
.status_bar{
|
||||
width: 100%;
|
||||
height: 36px;
|
||||
}
|
||||
|
||||
/* 顶部导航栏 */
|
||||
.nav-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 88rpx;
|
||||
margin-bottom: 60rpx;
|
||||
}
|
||||
|
||||
.nav-title {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: #000;
|
||||
margin-right: 100rpx;
|
||||
}
|
||||
|
||||
/* 输入框通用样式 */
|
||||
.input-item {
|
||||
@@ -175,6 +151,13 @@ const handleConfirm = () => {
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
/* 密码提示 */
|
||||
.pwd-hint {
|
||||
margin: -20rpx 30rpx 20rpx;
|
||||
font-size: 24rpx;
|
||||
color: #e74c3c;
|
||||
}
|
||||
|
||||
/* 确定按钮 */
|
||||
.confirm-btn {
|
||||
width: 100%;
|
||||
|
||||
Reference in New Issue
Block a user