forgotPasswordEnt.vue 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <template>
  2. <div class="box">
  3. <navBar v-if="!isMobile" :showLoginBtn="false" class="navBar"></navBar>
  4. <div class="content pa-10">
  5. <div class="resume-header">
  6. <div class="resume-title">企业修改密码</div>
  7. </div>
  8. <editPasswordPage class="mt-5" :showCancelBtn="false" :captchaVerification="captchaVerification" @getCode="getCode" @cancel="router.push('/login')"></editPasswordPage>
  9. </div>
  10. </div>
  11. <Verify
  12. ref="verify"
  13. captchaType="blockPuzzle"
  14. :imgSize="{ width: '400px', height: '200px' }"
  15. mode="pop"
  16. @success="verifySuccess"
  17. />
  18. </template>
  19. <script setup>
  20. defineOptions({ name: 'forgotPasswordEnt'})
  21. import { useRouter } from 'vue-router'
  22. import navBar from '@/layout/personal/navBar.vue'
  23. import editPasswordPage from '@/views/login/components/editPasswordEnt.vue'
  24. import Verify from '@/components/Verifition'
  25. import { ref, onMounted } from 'vue'
  26. const router = useRouter()
  27. const isMobile = ref(false)
  28. onMounted(() => {
  29. const userAgent = navigator.userAgent
  30. isMobile.value = /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i.test(userAgent)
  31. })
  32. // 验证码
  33. const verify = ref()
  34. // 获取验证码
  35. const getCode = async () => {
  36. // 弹出验证码 // 已开启:则展示验证码;只有完成验证码的情况,才进行登录
  37. verify.value.show()
  38. }
  39. const captchaVerification = ref(false)
  40. const verifySuccess = (params) => {
  41. captchaVerification.value = params.captchaVerification
  42. }
  43. </script>
  44. <style scoped lang="scss">
  45. .navBar {
  46. position: absolute;
  47. top: 0;
  48. z-index: 2;
  49. }
  50. .box {
  51. position: relative;
  52. width: 100%;
  53. height: 100%;
  54. background-image: url('https://minio.menduner.com/dev/menduner/login-banner.png');
  55. background-size: cover;
  56. }
  57. .content {
  58. position: absolute;
  59. top: 50%;
  60. left: 50%;
  61. translate: -50% -50%;
  62. width: 500px;
  63. height: 450px;
  64. background-color: #fff;
  65. border-radius: 10px;
  66. }
  67. </style>