首页修改

This commit is contained in:
仲么了
2023-08-23 16:22:08 +08:00
parent cc63cda4e7
commit 79d6771aad
34 changed files with 788 additions and 403 deletions

View File

@@ -39,7 +39,7 @@
</uni-forms>
<button type="default" class="submit-btn" @click="submit">提交</button>
<view class="login-box-tips">
<view style="color: #999">说明密码需要包含特殊字符字母数字长度为8-16</view>
<view style="color: #999">说明密码需要长度为8-16</view>
</view>
</view>
</view>
@@ -140,14 +140,15 @@ export default {
icon: 'none',
})
} else {
// 密码需要包含特殊字符字母数字,长度为8-16
if (
!/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[#@!~%^&*.])[a-zA-Z\d#@!~%^&*.]{8,16}$/.test(
this.formData.password,
)
) {
return this.$util.toast('密码需要包含特殊字符字母数字长度为8-16')
// 密码需要长度为8-16
if (this.formData.password.length < 8 || this.formData.password.length > 16) {
uni.showToast({
title: '密码需要长度为8-16',
icon: 'none',
})
return
}
let loginName = encrypt(this.formData.phone)
gongkey({ loginName }).then((response) => {
let publicKey = response.data

View File

@@ -4,7 +4,8 @@
<Cn-htmlToImg domId="content" @renderFinish="renderFinish" style="display: flex">
<view class="content" id="content">
<view class="user-info">
<image class="avatar" :src="userInfo.avatar"></image>
<image class="avatar" :src="userInfo.avatar" v-if="userInfo.avatar"></image>
<image class="avatar" src="/static/head.png" v-else></image>
<view class="right">
<view class="user-info-name">{{ userInfo.nickname }}</view>
<view class="user-info-role">{{ roleName }}</view>
@@ -91,6 +92,7 @@ export default {
},
onLoad(options) {
this.userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
console.log(this.userInfo)
this.content = JSON.stringify({
type: 'userId',
id: this.userInfo.userIndex,
@@ -122,6 +124,7 @@ export default {
height: 100rpx;
width: 100rpx;
border-radius: 8rpx;
flex-shrink: 0;
}
.right {
@@ -132,6 +135,7 @@ export default {
.user-info-name {
font-size: 32rpx;
color: #333333;
word-break: break-all;
}
.user-info-role {

View File

@@ -137,9 +137,13 @@ export default {
if (this.formData.password != this.formData.password2) {
return this.$util.toast('两次密码不一致')
}
// 密码需要包含特殊字符字母数字,长度为8-16
if (!/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[#@!~%^&*])[a-zA-Z\d#@!~%^&*]{8,16}$/.test(this.formData.password)) {
return this.$util.toast('密码需要包含特殊字符字母数字长度为8-16')
// 密码需要长度为8-16
if (this.formData.password.length < 8 || this.formData.password.length > 16) {
uni.showToast({
title: '密码需要长度为8-16',
icon: 'none',
})
return
}
let loginName = encrypt(this.formData.phone)
gongkey({ loginName }).then((response) => {

View File

@@ -110,6 +110,7 @@ export default {
waitTime: 0,
tenantId: '',
companyName: '',
inter:null
}
},
components: {},

View File

@@ -58,6 +58,7 @@ export default {
step: 1,
loading: false,
waitTime: 0,
inter:null,
// 表单数据
formData: {
phone: '',