Merge branch 'master' of http://gitea.bugtc.com/zhouyanli/property-manager-side
合并远程master分支
This commit is contained in:
@@ -89,11 +89,12 @@ const selectProject = (item) => {
|
|||||||
padding: 10px;
|
padding: 10px;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
background-color: #f9f9f9;
|
||||||
}
|
}
|
||||||
.search-bar {
|
.search-bar {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 8px 10px;
|
padding: 13px 16px;
|
||||||
background: #f5f5f5;
|
background: #f5f5f5;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
@@ -109,8 +110,9 @@ const selectProject = (item) => {
|
|||||||
.category-left {
|
.category-left {
|
||||||
width: 120px;
|
width: 120px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: #f8f8f8;
|
background: #fff;
|
||||||
border-radius: 6px 0 0 6px;
|
border-radius: 6px 0 0 6px;
|
||||||
|
margin-right: 20rpx;
|
||||||
}
|
}
|
||||||
.category-item {
|
.category-item {
|
||||||
padding: 15px 10px;
|
padding: 15px 10px;
|
||||||
@@ -119,8 +121,8 @@ const selectProject = (item) => {
|
|||||||
border-bottom: 1px solid #eee;
|
border-bottom: 1px solid #eee;
|
||||||
}
|
}
|
||||||
.category-item.active {
|
.category-item.active {
|
||||||
background: #fff;
|
background: #f9f9f9;
|
||||||
color: #007aff;
|
color: #222;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.category-right {
|
.category-right {
|
||||||
|
|||||||
@@ -22,8 +22,8 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 确定按钮 -->
|
<!-- 确定按钮 -->
|
||||||
<button
|
<button
|
||||||
class="confirm-btn"
|
class="confirm-btn"
|
||||||
:disabled="!canConfirm"
|
:disabled="!canConfirm"
|
||||||
@click="handleConfirm"
|
@click="handleConfirm"
|
||||||
>
|
>
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed } from 'vue';
|
import { ref, computed } from 'vue';
|
||||||
import {onLoad,onShow} from '@dcloudio/uni-app'
|
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位任意字符(可根据需求调整)
|
// 密码格式规则:6-16位任意字符(可根据需求调整)
|
||||||
const pwdReg = /^(?=.*[a-zA-Z])(?=.*\d).{6,16}$/;
|
const pwdReg = /^(?=.*[a-zA-Z])(?=.*\d).{6,16}$/;
|
||||||
// 校验条件:新密码符合格式 + 确认密码和新密码一致 + 均不为空
|
// 校验条件:新密码符合格式 + 确认密码和新密码一致 + 均不为空
|
||||||
return pwdReg.test(newPassword.value)
|
return pwdReg.test(newPassword.value)
|
||||||
&& newPassword.value === confirmPassword.value
|
&& newPassword.value === confirmPassword.value
|
||||||
&& newPassword.value && confirmPassword.value;
|
&& newPassword.value && confirmPassword.value;
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -66,10 +66,10 @@ const goBack = () => {
|
|||||||
};
|
};
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
// 从缓存读取参数
|
// 从缓存读取参数
|
||||||
const params = uni.getStorageSync('tempChangePwdParams') || {};
|
const params = uni.getStorageSync('tempChangePwdParams') || {};
|
||||||
// 赋值
|
// 赋值
|
||||||
phone.value = params.phoneNumber
|
phone.value = params.phoneNumber
|
||||||
smsCode.value = params.verifyCode
|
smsCode.value = params.verifyCode
|
||||||
// 用完删除缓存(避免下次跳转读取旧值)
|
// 用完删除缓存(避免下次跳转读取旧值)
|
||||||
uni.removeStorageSync('tempChangePwdParams');
|
uni.removeStorageSync('tempChangePwdParams');
|
||||||
});
|
});
|
||||||
@@ -94,14 +94,14 @@ const handleConfirm = () => {
|
|||||||
setTimeout(() =>{
|
setTimeout(() =>{
|
||||||
uni.navigateTo({ url: '/pageSubPack/loginSub/pwd-login' });
|
uni.navigateTo({ url: '/pageSubPack/loginSub/pwd-login' });
|
||||||
},1500)
|
},1500)
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
uni.showToast({ title: "修改失败", icon: 'error' });
|
uni.showToast({ title: "修改失败", icon: 'error' });
|
||||||
}
|
}
|
||||||
}).catch(err =>{
|
}).catch(err =>{
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '网络异常',
|
title: '网络异常',
|
||||||
icon: 'error'
|
icon: 'error'
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -134,7 +134,7 @@ const handleConfirm = () => {
|
|||||||
}
|
}
|
||||||
.status_bar{
|
.status_bar{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 46px;
|
height: 36px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 顶部导航栏 */
|
/* 顶部导航栏 */
|
||||||
@@ -148,9 +148,10 @@ const handleConfirm = () => {
|
|||||||
.nav-title {
|
.nav-title {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 36rpx;
|
font-size: 32rpx;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #333;
|
color: #000;
|
||||||
|
margin-right: 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 输入框通用样式 */
|
/* 输入框通用样式 */
|
||||||
@@ -180,9 +181,9 @@ const handleConfirm = () => {
|
|||||||
line-height: 88rpx;
|
line-height: 88rpx;
|
||||||
background-color: #4D5DFA;
|
background-color: #4D5DFA;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border-radius: 44rpx;
|
border-radius: 8rpx;
|
||||||
font-size: 32rpx;
|
font-size: 28rpx;
|
||||||
margin-top: 20rpx;
|
margin-top: 66rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 确定按钮禁用状态 */
|
/* 确定按钮禁用状态 */
|
||||||
@@ -192,6 +193,6 @@ const handleConfirm = () => {
|
|||||||
}
|
}
|
||||||
/* 禁用按钮边框 */
|
/* 禁用按钮边框 */
|
||||||
button:after{
|
button:after{
|
||||||
border-radius: 50px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -23,8 +23,8 @@
|
|||||||
<uni-easyinput class="input-content verify-input" type="number" v-model="verifyCode" trim="all"
|
<uni-easyinput class="input-content verify-input" type="number" v-model="verifyCode" trim="all"
|
||||||
placeholder="请输入验证码" :inputBorder="false" maxlength="6" :placeholderStyle="placeholderStyle">
|
placeholder="请输入验证码" :inputBorder="false" maxlength="6" :placeholderStyle="placeholderStyle">
|
||||||
</uni-easyinput>
|
</uni-easyinput>
|
||||||
<button
|
<button
|
||||||
class="get-verify-btn"
|
class="get-verify-btn"
|
||||||
:disabled="!canGetVerify || countDown > 0"
|
:disabled="!canGetVerify || countDown > 0"
|
||||||
@click="getVerifyCode"
|
@click="getVerifyCode"
|
||||||
>
|
>
|
||||||
@@ -32,19 +32,19 @@
|
|||||||
</button>
|
</button>
|
||||||
</view>
|
</view>
|
||||||
<!-- 下一步 -->
|
<!-- 下一步 -->
|
||||||
<button
|
<button
|
||||||
class="forget-btn"
|
class="forget-btn"
|
||||||
:disabled="!canRegister"
|
:disabled="!canRegister"
|
||||||
@click="handleNext"
|
@click="handleNext"
|
||||||
>
|
>
|
||||||
下一步
|
下一步
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed, onUnmounted } from 'vue';
|
import { ref, computed, onUnmounted } from 'vue';
|
||||||
import {getSendCode} from '../api/api.js'
|
import {getSendCode} from '../../api/api.js'
|
||||||
|
|
||||||
// ====响应式数据======
|
// ====响应式数据======
|
||||||
const phoneNumber = ref('')
|
const phoneNumber = ref('')
|
||||||
@@ -73,7 +73,7 @@ const getVerifyCode = () => {
|
|||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '验证码已发送',
|
title: '验证码已发送',
|
||||||
icon: 'success'
|
icon: 'success'
|
||||||
});
|
});
|
||||||
// 开始60秒倒计时
|
// 开始60秒倒计时
|
||||||
countDown.value = 60;
|
countDown.value = 60;
|
||||||
timer = setInterval(() => {
|
timer = setInterval(() => {
|
||||||
@@ -82,25 +82,25 @@ const getVerifyCode = () => {
|
|||||||
clearInterval(timer);
|
clearInterval(timer);
|
||||||
timer = null;
|
timer = null;
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '验证码发送失败',
|
title: '验证码发送失败',
|
||||||
icon: 'error'
|
icon: 'error'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
// 是否下一步
|
// 是否下一步
|
||||||
const canRegister = computed(() => {
|
const canRegister = computed(() => {
|
||||||
const phoneReg = /^1[3-9]\d{9}$/; // 手机号11位
|
const phoneReg = /^1[3-9]\d{9}$/; // 手机号11位
|
||||||
const verifyReg = /^\d{6}$/; // 验证码6位
|
const verifyReg = /^\d{6}$/; // 验证码6位
|
||||||
|
|
||||||
return phoneReg.test(phoneNumber.value)
|
return phoneReg.test(phoneNumber.value)
|
||||||
&& verifyReg.test(verifyCode.value)
|
&& verifyReg.test(verifyCode.value)
|
||||||
});
|
});
|
||||||
// 下一步
|
// 下一步
|
||||||
const handleNext = () =>{
|
const handleNext = () =>{
|
||||||
@@ -121,14 +121,14 @@ const handleNext = () =>{
|
|||||||
const goBack = () => {
|
const goBack = () => {
|
||||||
uni.navigateBack();
|
uni.navigateBack();
|
||||||
};
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.forget-page{
|
.forget-page{
|
||||||
padding: 20rpx 40rpx 40rpx;
|
padding: 20rpx 40rpx 40rpx;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
background: repeating-linear-gradient(180deg, #E2F0FF, #F6FAFF );
|
background: repeating-linear-gradient(180deg, #E2F0FF, #F6FAFF );
|
||||||
}
|
}
|
||||||
.status_bar{
|
.status_bar{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 46px;
|
height: 46px;
|
||||||
@@ -144,9 +144,10 @@ const goBack = () => {
|
|||||||
.nav-title {
|
.nav-title {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 36rpx;
|
font-size: 32rpx;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #333;
|
color: #000;
|
||||||
|
margin-right: 100rpx;
|
||||||
}
|
}
|
||||||
/* 输入框通用样式 */
|
/* 输入框通用样式 */
|
||||||
.input-item {
|
.input-item {
|
||||||
@@ -196,7 +197,7 @@ const goBack = () => {
|
|||||||
background-color: #4D5DFA;
|
background-color: #4D5DFA;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border-radius: 35rpx;
|
border-radius: 35rpx;
|
||||||
font-size: 28rpx;
|
font-size: 26rpx;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
@@ -205,6 +206,9 @@ const goBack = () => {
|
|||||||
background-color: #ccc;
|
background-color: #ccc;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
.get-verify-btn:after{
|
||||||
|
border-radius: 50px;
|
||||||
|
}
|
||||||
/* 下一步按钮 */
|
/* 下一步按钮 */
|
||||||
.forget-btn{
|
.forget-btn{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -212,9 +216,10 @@ const goBack = () => {
|
|||||||
line-height: 88rpx;
|
line-height: 88rpx;
|
||||||
background-color: #4D5DFA;
|
background-color: #4D5DFA;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border-radius: 44rpx;
|
border-radius: 8rpx;
|
||||||
font-size: 32rpx;
|
font-size: 28rpx;
|
||||||
margin-bottom: 40rpx;
|
margin-bottom: 40rpx;
|
||||||
|
margin-top: 66rpx;
|
||||||
}
|
}
|
||||||
.forget-btn:disabled{
|
.forget-btn:disabled{
|
||||||
background-color: #99c8ff;
|
background-color: #99c8ff;
|
||||||
@@ -222,8 +227,8 @@ const goBack = () => {
|
|||||||
}
|
}
|
||||||
/* 禁用按钮边框 */
|
/* 禁用按钮边框 */
|
||||||
button:after{
|
button:after{
|
||||||
border-radius: 50px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
import {
|
import {
|
||||||
getLoginBySms,
|
getLoginBySms,
|
||||||
getSendCode
|
getSendCode
|
||||||
} from '../api/api.js'
|
} from '../../api/api.js'
|
||||||
|
|
||||||
// ========== 响应式数据 ==========
|
// ========== 响应式数据 ==========
|
||||||
// 手机号
|
// 手机号
|
||||||
@@ -243,11 +243,11 @@
|
|||||||
|
|
||||||
/* 登录标题 */
|
/* 登录标题 */
|
||||||
.login-title {
|
.login-title {
|
||||||
font-size: 48rpx;
|
font-size: 52rpx;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #333;
|
color: #333;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 80rpx;
|
margin-bottom: 142rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 输入框项 */
|
/* 输入框项 */
|
||||||
@@ -301,7 +301,7 @@
|
|||||||
background-color: #4D5DFA;
|
background-color: #4D5DFA;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border-radius: 35rpx;
|
border-radius: 35rpx;
|
||||||
font-size: 28rpx;
|
font-size: 26rpx;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
@@ -312,18 +312,21 @@
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
border-radius: 50px;
|
border-radius: 50px;
|
||||||
}
|
}
|
||||||
|
.get-verify-btn:after{
|
||||||
|
border-radius: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
/* 协议勾选项 */
|
/* 协议勾选项 */
|
||||||
.agreement-item {
|
.agreement-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin: 40rpx 0;
|
margin: 70rpx 0 28rpx 0;
|
||||||
padding-left: 10rpx;
|
padding-left: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 协议文本 */
|
/* 协议文本 */
|
||||||
.agreement-text {
|
.agreement-text {
|
||||||
font-size: 28rpx;
|
font-size: 24rpx;
|
||||||
color: #666;
|
color: #666;
|
||||||
margin-left: 10rpx;
|
margin-left: 10rpx;
|
||||||
}
|
}
|
||||||
@@ -337,8 +340,8 @@
|
|||||||
line-height: 88rpx;
|
line-height: 88rpx;
|
||||||
background-color: #4D5DFA;
|
background-color: #4D5DFA;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border-radius: 44rpx;
|
border-radius: 8rpx;
|
||||||
font-size: 32rpx;
|
font-size: 28rpx;
|
||||||
margin-bottom: 60rpx;
|
margin-bottom: 60rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -351,7 +354,7 @@
|
|||||||
|
|
||||||
/* 禁用按钮边框 */
|
/* 禁用按钮边框 */
|
||||||
button:after {
|
button:after {
|
||||||
border-radius: 50px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 底部链接 */
|
/* 底部链接 */
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
<image src="http://47.104.199.163:9090/images/login/password.png" mode=""
|
<image src="http://47.104.199.163:9090/images/login/password.png" mode=""
|
||||||
style="height: 100%;width: 100%;"></image>
|
style="height: 100%;width: 100%;"></image>
|
||||||
</view>
|
</view>
|
||||||
<uni-easyinput class="input-content" type="password" v-model="password" placeholder="请输入密码"
|
<uni-easyinput class="input-content" type="password" v-model="password" placeholder="请输入6-16位密码"
|
||||||
:inputBorder="false" :placeholderStyle="placeholderStyle">
|
:inputBorder="false" :placeholderStyle="placeholderStyle">
|
||||||
</uni-easyinput>
|
</uni-easyinput>
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
} from "@dcloudio/uni-app"
|
} from "@dcloudio/uni-app"
|
||||||
import {
|
import {
|
||||||
getLoginPassword
|
getLoginPassword
|
||||||
} from '../api/api.js'
|
} from '../../api/api.js'
|
||||||
|
|
||||||
// 响应式数据
|
// 响应式数据
|
||||||
const phoneNumber = ref('');
|
const phoneNumber = ref('');
|
||||||
@@ -183,11 +183,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.login-title {
|
.login-title {
|
||||||
font-size: 48rpx;
|
font-size: 52rpx;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #333;
|
color: #333;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 80rpx;
|
margin-bottom: 142rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-item {
|
.input-item {
|
||||||
@@ -218,7 +218,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin: 40rpx 0;
|
margin: 70rpx 0 28rpx 0;
|
||||||
padding: 0 10rpx;
|
padding: 0 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -228,7 +228,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.agreement-text {
|
.agreement-text {
|
||||||
font-size: 28rpx;
|
font-size: 24rpx;
|
||||||
color: #666;
|
color: #666;
|
||||||
margin-left: 10rpx;
|
margin-left: 10rpx;
|
||||||
}
|
}
|
||||||
@@ -240,8 +240,8 @@
|
|||||||
} */
|
} */
|
||||||
|
|
||||||
.forget-pwd {
|
.forget-pwd {
|
||||||
font-size: 28rpx;
|
font-size: 24rpx;
|
||||||
color: #4D5DFA;
|
color: #666;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -251,8 +251,8 @@
|
|||||||
line-height: 88rpx;
|
line-height: 88rpx;
|
||||||
background-color: #4D5DFA;
|
background-color: #4D5DFA;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border-radius: 44rpx;
|
border-radius: 8rpx;
|
||||||
font-size: 32rpx;
|
font-size: 28rpx;
|
||||||
margin-bottom: 60rpx;
|
margin-bottom: 60rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -265,7 +265,7 @@
|
|||||||
|
|
||||||
/* 禁用按钮边框 */
|
/* 禁用按钮边框 */
|
||||||
button:after {
|
button:after {
|
||||||
border-radius: 50px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bottom-link {
|
.bottom-link {
|
||||||
|
|||||||
@@ -29,9 +29,9 @@
|
|||||||
<uni-easyinput class="input-content verify-input" type="number" v-model="verifyCode"
|
<uni-easyinput class="input-content verify-input" type="number" v-model="verifyCode"
|
||||||
placeholder="请输入验证码" :inputBorder="false" maxlength="6" :placeholderStyle="placeholderStyle">
|
placeholder="请输入验证码" :inputBorder="false" maxlength="6" :placeholderStyle="placeholderStyle">
|
||||||
</uni-easyinput>
|
</uni-easyinput>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
class="get-verify-btn"
|
class="get-verify-btn"
|
||||||
:disabled="!canGetVerify || countDown > 0"
|
:disabled="!canGetVerify || countDown > 0"
|
||||||
@click="getVerifyCode"
|
@click="getVerifyCode"
|
||||||
>
|
>
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
<uni-easyinput class="input-content" type="text" v-model="account"
|
<uni-easyinput class="input-content" type="text" v-model="account"
|
||||||
placeholder="请输入账号" :inputBorder="false" :placeholderStyle="placeholderStyle">
|
placeholder="请输入账号" :inputBorder="false" :placeholderStyle="placeholderStyle">
|
||||||
</uni-easyinput>
|
</uni-easyinput>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 密码输入框 -->
|
<!-- 密码输入框 -->
|
||||||
@@ -60,29 +60,25 @@
|
|||||||
<uni-easyinput class="input-content" type="password" v-model="password"
|
<uni-easyinput class="input-content" type="password" v-model="password"
|
||||||
placeholder="请输入密码" :inputBorder="false" :placeholderStyle="placeholderStyle" >
|
placeholder="请输入密码" :inputBorder="false" :placeholderStyle="placeholderStyle" >
|
||||||
</uni-easyinput>
|
</uni-easyinput>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 协议勾选 -->
|
<!-- 协议勾选 -->
|
||||||
<view class="agreement-item" @click="toggleAgreement">
|
<!-- 协议勾选 -->
|
||||||
<uni-icons
|
<view class="agreement-item" >
|
||||||
type="checkbox-filled"
|
<view @click="toggleAgreement">
|
||||||
size="24"
|
<uni-icons type="checkbox-filled" size="24" color="#4D5DFA" v-if="agreeAgreement"></uni-icons>
|
||||||
color="#4D5DFA"
|
<uni-icons type="checkbox" size="24" color="#999" v-else></uni-icons>
|
||||||
v-if="agreeAgreement"
|
</view>
|
||||||
></uni-icons>
|
|
||||||
<uni-icons
|
<text class="agreement-text" @click.stop="goToPrivacy">我已阅读并同意
|
||||||
type="checkbox"
|
<text class="agreePrivacy">《用户隐私政策》</text>
|
||||||
size="24"
|
</text>
|
||||||
color="#999"
|
</view>
|
||||||
v-else
|
|
||||||
></uni-icons>
|
|
||||||
<text class="agreement-text">我已阅读并同意《用户隐私政策》</text>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 立即注册按钮 -->
|
<!-- 立即注册按钮 -->
|
||||||
<button
|
<button
|
||||||
class="register-btn"
|
class="register-btn"
|
||||||
:disabled="!canRegister"
|
:disabled="!canRegister"
|
||||||
@click="handleRegister"
|
@click="handleRegister"
|
||||||
>
|
>
|
||||||
@@ -98,7 +94,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed, onUnmounted } from 'vue';
|
import { ref, computed, onUnmounted } from 'vue';
|
||||||
import {getRegisterUser,getSendCode} from '../api/api.js'
|
import {getRegisterUser,getSendCode} from '../../api/api.js'
|
||||||
|
|
||||||
// ========== 响应式数据 ==========
|
// ========== 响应式数据 ==========
|
||||||
// 表单数据
|
// 表单数据
|
||||||
@@ -127,10 +123,10 @@ const canRegister = computed(() => {
|
|||||||
const accountReg = /^.{4,20}$/; // 账号4-20位
|
const accountReg = /^.{4,20}$/; // 账号4-20位
|
||||||
const pwdReg = /^.{6,16}$/; // 密码6-16位
|
const pwdReg = /^.{6,16}$/; // 密码6-16位
|
||||||
|
|
||||||
return phoneReg.test(phoneNumber.value)
|
return phoneReg.test(phoneNumber.value)
|
||||||
&& verifyReg.test(verifyCode.value)
|
&& verifyReg.test(verifyCode.value)
|
||||||
&& accountReg.test(account.value)
|
&& accountReg.test(account.value)
|
||||||
&& pwdReg.test(password.value)
|
&& pwdReg.test(password.value)
|
||||||
&& agreeAgreement.value;
|
&& agreeAgreement.value;
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -139,6 +135,12 @@ const canRegister = computed(() => {
|
|||||||
const goBack = () => {
|
const goBack = () => {
|
||||||
uni.navigateBack();
|
uni.navigateBack();
|
||||||
};
|
};
|
||||||
|
// 跳转隐私协议
|
||||||
|
const goToPrivacy = () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/pageSubPack/loginSub/privacy',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 切换协议勾选状态
|
// 切换协议勾选状态
|
||||||
const toggleAgreement = () => {
|
const toggleAgreement = () => {
|
||||||
@@ -161,7 +163,7 @@ const getVerifyCode = () => {
|
|||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '验证码已发送',
|
title: '验证码已发送',
|
||||||
icon: 'success'
|
icon: 'success'
|
||||||
});
|
});
|
||||||
// 开始60秒倒计时
|
// 开始60秒倒计时
|
||||||
countDown.value = 60;
|
countDown.value = 60;
|
||||||
timer = setInterval(() => {
|
timer = setInterval(() => {
|
||||||
@@ -171,21 +173,21 @@ const getVerifyCode = () => {
|
|||||||
timer = null;
|
timer = null;
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '验证码发送失败',
|
title: '验证码发送失败',
|
||||||
icon: 'error'
|
icon: 'error'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).catch(err =>{
|
}).catch(err =>{
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '网路异常',
|
title: '网路异常',
|
||||||
icon: 'error'
|
icon: 'error'
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// 处理注册逻辑
|
// 处理注册逻辑
|
||||||
@@ -207,27 +209,27 @@ const handleRegister = () => {
|
|||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.redirectTo({ url: '/pageSubPack/loginSub/pwd-login' });
|
uni.redirectTo({ url: '/pageSubPack/loginSub/pwd-login' });
|
||||||
}, 1500);
|
}, 1500);
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '注册失败',
|
title: '注册失败',
|
||||||
icon: 'error'
|
icon: 'error'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).catch((err) =>{
|
}).catch((err) =>{
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '网络异常',
|
title: '网络异常',
|
||||||
icon: 'error'
|
icon: 'error'
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
// 注册成功后跳转到登录页
|
// 注册成功后跳转到登录页
|
||||||
// uni.redirectTo({
|
// uni.redirectTo({
|
||||||
// url: '/pages/login/pwd-login'
|
// url: '/pages/login/pwd-login'
|
||||||
// });
|
// });
|
||||||
|
|
||||||
// setTimeout(() => {
|
// setTimeout(() => {
|
||||||
|
|
||||||
// }, 1500);
|
// }, 1500);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -264,14 +266,15 @@ onUnmounted(() => {
|
|||||||
.nav-title {
|
.nav-title {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 36rpx;
|
font-size: 32rpx;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #333;
|
color: #333;
|
||||||
|
margin-right: 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 注册标题 */
|
/* 注册标题 */
|
||||||
.register-title {
|
.register-title {
|
||||||
font-size: 48rpx;
|
font-size: 40rpx;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #333;
|
color: #333;
|
||||||
margin-bottom: 60rpx;
|
margin-bottom: 60rpx;
|
||||||
@@ -326,8 +329,8 @@ onUnmounted(() => {
|
|||||||
line-height: 70rpx;
|
line-height: 70rpx;
|
||||||
background-color: #4D5DFA;
|
background-color: #4D5DFA;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border-radius: 35rpx;
|
border-radius: 198rpx;
|
||||||
font-size: 28rpx;
|
font-size: 26rpx;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
@@ -335,13 +338,17 @@ onUnmounted(() => {
|
|||||||
.get-verify-btn:disabled {
|
.get-verify-btn:disabled {
|
||||||
background-color: #ccc;
|
background-color: #ccc;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|
||||||
|
}
|
||||||
|
.get-verify-btn:after{
|
||||||
|
border-radius: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 协议勾选项 */
|
/* 协议勾选项 */
|
||||||
.agreement-item {
|
.agreement-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin: 40rpx 0;
|
margin: 70rpx 0 28rpx 0;
|
||||||
padding-left: 10rpx;
|
padding-left: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -350,6 +357,9 @@ onUnmounted(() => {
|
|||||||
color: #666;
|
color: #666;
|
||||||
margin-left: 10rpx;
|
margin-left: 10rpx;
|
||||||
}
|
}
|
||||||
|
.agreePrivacy{
|
||||||
|
color: #4D5DFA;
|
||||||
|
}
|
||||||
|
|
||||||
/* 立即注册按钮 */
|
/* 立即注册按钮 */
|
||||||
.register-btn {
|
.register-btn {
|
||||||
@@ -358,12 +368,12 @@ onUnmounted(() => {
|
|||||||
line-height: 88rpx;
|
line-height: 88rpx;
|
||||||
background-color: #4D5DFA;
|
background-color: #4D5DFA;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border-radius: 44rpx;
|
border-radius: 8rpx;
|
||||||
font-size: 32rpx;
|
font-size: 28rpx;
|
||||||
margin-bottom: 40rpx;
|
margin-bottom: 40rpx;
|
||||||
}
|
}
|
||||||
button:after{
|
button:after{
|
||||||
border-radius: 50px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
.register-btn:disabled {
|
.register-btn:disabled {
|
||||||
background-color: #99c8ff;
|
background-color: #99c8ff;
|
||||||
@@ -380,4 +390,4 @@ button:after{
|
|||||||
color: #4D5DFA;
|
color: #4D5DFA;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<uni-nav-bar left-icon="left" title="远程开门" backgroundColor ="none" :border="false" @clickLeft="narBack" />
|
<uni-nav-bar left-icon="left" title="远程开门" backgroundColor ="none" :border="false" @clickLeft="narBack" />
|
||||||
</view>
|
</view>
|
||||||
<view class="top-img">
|
<view class="top-img">
|
||||||
<image src="/static/imgs/xuancheng-bg.png" mode="" style="width: 100%;height: 100%;"></image>
|
<image src="/static/imgs/xuancheng-bg.png" mode="" style="width: 100%;height: 100%;"></image>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 提示文案 -->
|
<!-- 提示文案 -->
|
||||||
@@ -25,8 +25,8 @@
|
|||||||
<!-- 网格布局:2行2列 -->
|
<!-- 网格布局:2行2列 -->
|
||||||
<view class="grid-container">
|
<view class="grid-container">
|
||||||
<!-- 每个门选项 -->
|
<!-- 每个门选项 -->
|
||||||
<view
|
<view
|
||||||
v-for="(item, index) in doorList"
|
v-for="(item, index) in doorList"
|
||||||
:key="index"
|
:key="index"
|
||||||
:class="['door-item', { active: selectedDoor === index }]"
|
:class="['door-item', { active: selectedDoor === index }]"
|
||||||
@click="selectDoor(index)"
|
@click="selectDoor(index)"
|
||||||
@@ -67,7 +67,7 @@ const selectDoor = (index) => {
|
|||||||
showSuccess.value = false // 选择新门时隐藏成功提示
|
showSuccess.value = false // 选择新门时隐藏成功提示
|
||||||
}
|
}
|
||||||
// 返回
|
// 返回
|
||||||
const narBack = () =>{
|
const narBack = () =>{
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url:"/pages/index/index"
|
url:"/pages/index/index"
|
||||||
})
|
})
|
||||||
@@ -159,7 +159,7 @@ const openDoor = () => {
|
|||||||
.auth-container {
|
.auth-container {
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
padding: 30rpx 20rpx;
|
padding: 40rpx 42rpx;
|
||||||
margin-bottom: 60rpx;
|
margin-bottom: 60rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -86px;
|
top: -86px;
|
||||||
@@ -168,9 +168,10 @@ const openDoor = () => {
|
|||||||
.auth-title {
|
.auth-title {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
|
font-weight: 500;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
padding-bottom: 20rpx;
|
padding-bottom: 20rpx;
|
||||||
border-bottom: 1px solid #e5e5e5;
|
/* border-bottom: 1px solid #e5e5e5; */
|
||||||
margin-bottom: 30rpx;
|
margin-bottom: 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -204,14 +205,14 @@ const openDoor = () => {
|
|||||||
|
|
||||||
/* 门图标 */
|
/* 门图标 */
|
||||||
.door-icon {
|
.door-icon {
|
||||||
width: 80rpx;
|
width: 126rpx;
|
||||||
height: 80rpx;
|
height: 114rpx;
|
||||||
/* background-color: #f5f5f5; */
|
/* background-color: #f5f5f5; */
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-bottom: 15rpx;
|
margin-bottom: 44rpx;
|
||||||
}
|
}
|
||||||
.icon-text {
|
.icon-text {
|
||||||
/* font-size: 40rpx; */
|
/* font-size: 40rpx; */
|
||||||
@@ -221,8 +222,9 @@ const openDoor = () => {
|
|||||||
|
|
||||||
/* 门名称 */
|
/* 门名称 */
|
||||||
.door-name {
|
.door-name {
|
||||||
font-size: 26rpx;
|
font-size: 32rpx;
|
||||||
color: #333333;
|
color: #222;
|
||||||
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 确认按钮 */
|
/* 确认按钮 */
|
||||||
@@ -239,4 +241,4 @@ const openDoor = () => {
|
|||||||
.confirm-btn::after {
|
.confirm-btn::after {
|
||||||
border: none; /* 去除uni-app默认按钮边框 */
|
border: none; /* 去除uni-app默认按钮边框 */
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -265,7 +265,7 @@ const handleConfirm = () => {
|
|||||||
line-height: 88rpx;
|
line-height: 88rpx;
|
||||||
background-color: #4D5DFA;
|
background-color: #4D5DFA;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border-radius: 44rpx;
|
border-radius: 8rpx;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
border: none;
|
border: none;
|
||||||
@@ -280,6 +280,6 @@ const handleConfirm = () => {
|
|||||||
/* 禁用按钮边框重置 */
|
/* 禁用按钮边框重置 */
|
||||||
button:after {
|
button:after {
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 44rpx;
|
border-radius: 8rpx;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed, onUnmounted } from 'vue';
|
import { ref, computed, onUnmounted } from 'vue';
|
||||||
import {getSendCode} from '../api/api.js'
|
import {getSendCode} from '../../api/api.js'
|
||||||
|
|
||||||
// ====响应式数据======
|
// ====响应式数据======
|
||||||
const phoneNumber = ref('')
|
const phoneNumber = ref('')
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
<view class="guide-page">
|
<view class="guide-page">
|
||||||
<view class="status_bar"></view>
|
<view class="status_bar"></view>
|
||||||
<!-- 引导内容滑动容器 -->
|
<!-- 引导内容滑动容器 -->
|
||||||
<swiper
|
<swiper
|
||||||
class="guide-swiper"
|
class="guide-swiper"
|
||||||
:current="currentStep"
|
:current="currentStep"
|
||||||
@change="handleSwiperChange"
|
@change="handleSwiperChange"
|
||||||
:disable-scroll="false"
|
:disable-scroll="false"
|
||||||
:indicator-dots="false"
|
:indicator-dots="false"
|
||||||
@@ -56,8 +56,8 @@
|
|||||||
|
|
||||||
<!-- 操作按钮 -->
|
<!-- 操作按钮 -->
|
||||||
<view class="guide-btn-wrap">
|
<view class="guide-btn-wrap">
|
||||||
<button
|
<button
|
||||||
class="guide-btn"
|
class="guide-btn"
|
||||||
:class="{ primary: currentStep === 2 }"
|
:class="{ primary: currentStep === 2 }"
|
||||||
@click="handleBtnClick"
|
@click="handleBtnClick"
|
||||||
>
|
>
|
||||||
@@ -167,7 +167,7 @@ const handleBtnClick = () => {
|
|||||||
/* 单个进度点 */
|
/* 单个进度点 */
|
||||||
.dot {
|
.dot {
|
||||||
width: 16rpx;
|
width: 16rpx;
|
||||||
height: 16rpx;
|
height: 8rpx;
|
||||||
border-radius: 8rpx;
|
border-radius: 8rpx;
|
||||||
background-color: #ddd;
|
background-color: #ddd;
|
||||||
margin: 0 8rpx;
|
margin: 0 8rpx;
|
||||||
@@ -176,7 +176,7 @@ const handleBtnClick = () => {
|
|||||||
/* 激活的进度点 */
|
/* 激活的进度点 */
|
||||||
.dot.active {
|
.dot.active {
|
||||||
background-color: #4D5DFA;
|
background-color: #4D5DFA;
|
||||||
width: 40rpx;
|
width: 28rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 按钮容器 */
|
/* 按钮容器 */
|
||||||
@@ -216,4 +216,4 @@ const handleBtnClick = () => {
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user