fix: 完善打包历史与登录提示
This commit is contained in:
@@ -325,7 +325,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>密码 *</label>
|
||||
<input v-model="userForm.password" type="password" placeholder="至少 6 位">
|
||||
<input v-model="userForm.password" type="password" placeholder="至少 12 位">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="checkbox-label">
|
||||
@@ -349,7 +349,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>新密码</label>
|
||||
<input v-model="newPassword" type="password" placeholder="至少 6 位">
|
||||
<input v-model="newPassword" type="password" placeholder="至少 12 位">
|
||||
</div>
|
||||
<div style="margin-top: 20px; display: flex; gap: 12px; justify-content: flex-end;">
|
||||
<button class="action-btn" style="padding: 8px 16px;" @click="showPasswordModal = false">取消</button>
|
||||
@@ -650,6 +650,10 @@ const createUser = async () => {
|
||||
alert('请填写用户名和密码')
|
||||
return
|
||||
}
|
||||
if (userForm.value.password.length < 12) {
|
||||
alert('密码至少 12 位')
|
||||
return
|
||||
}
|
||||
try {
|
||||
const res = await authFetch('/api/users', {
|
||||
method: 'POST',
|
||||
@@ -674,8 +678,8 @@ const openPasswordModal = (u) => {
|
||||
}
|
||||
|
||||
const changePassword = async () => {
|
||||
if (!newPassword.value || newPassword.value.length < 6) {
|
||||
alert('密码至少 6 位')
|
||||
if (!newPassword.value || newPassword.value.length < 12) {
|
||||
alert('密码至少 12 位')
|
||||
return
|
||||
}
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user