Browse Source

修改密码

master
maochaoying 2 years ago
parent
commit
c2d120975d
  1. 2
      src/components/Setting/components/Admin.vue
  2. 54
      src/components/Setting/components/User.vue

2
src/components/Setting/components/Admin.vue

@ -66,6 +66,7 @@
<script setup> <script setup>
import Eye from '@/assets/img/login/eye.png' import Eye from '@/assets/img/login/eye.png'
import Open from '@/assets/img/login/open.png' import Open from '@/assets/img/login/open.png'
import { showSuccessToast, showFailToast } from 'vant'
import { ref } from 'vue' import { ref } from 'vue'
const initShowPassword = ref(false) const initShowPassword = ref(false)
@ -99,6 +100,7 @@ const handleUpdatePassword = () => {
} }
initTip.value = '' initTip.value = ''
updateTip.value = '' updateTip.value = ''
showSuccessToast('修改成功')
} }
</script> </script>

54
src/components/Setting/components/User.vue

@ -25,7 +25,18 @@
<p class="title"> <p class="title">
正在修改 <span class="username">username1</span> 的密码 正在修改 <span class="username">username1</span> 的密码
</p> </p>
<div class="update_form"></div>
<div class="update_form">
<img
:src="showUpdateUserPasswordVisible ? Open : Eye"
class="eye"
@click="showUpdateUserPassword"
/>
<input
:type="showUpdateUserPasswordVisible ? 'text' : 'password'"
class="password_input"
/>
<p class="tip">*密码限制信息</p>
</div>
<div class="btns"> <div class="btns">
<div class="btn" @click="returnToList">返回</div> <div class="btn" @click="returnToList">返回</div>
<div class="btn">修改</div> <div class="btn">修改</div>
@ -110,6 +121,11 @@ const showUpdatePassword = () => {
changePasswordVisible.value = true changePasswordVisible.value = true
} }
const showUpdateUserPasswordVisible = ref(false)
const showUpdateUserPassword = () => {
showUpdateUserPasswordVisible.value = !showUpdateUserPasswordVisible.value
}
const returnToList = () => { const returnToList = () => {
changePasswordVisible.value = false changePasswordVisible.value = false
} }
@ -338,6 +354,42 @@ const hideUserModal = () => {
margin-bottom: 59px; margin-bottom: 59px;
background: url(../../../assets/img/admin/password.png) no-repeat; background: url(../../../assets/img/admin/password.png) no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
position: relative;
.eye {
width: 16px;
height: 13px;
position: absolute;
top: 6px;
right: 5px;
}
.password_input {
width: 245px;
height: 17px;
position: absolute;
top: 2px;
left: 43px;
font-family: Source Han Sans CN;
font-size: 12px;
font-weight: 350;
line-height: normal;
letter-spacing: 0.06em;
color: #06518b;
border: none;
outline: none;
}
.tip {
position: absolute;
font-family: Source Han Sans CN;
font-size: 12px;
font-weight: 350;
line-height: normal;
letter-spacing: 0.06em;
color: #fa1c1c;
width: 320px;
height: 17px;
left: 6px;
top: 40px;
}
} }
.btns { .btns {
width: 187px; width: 187px;

Loading…
Cancel
Save