forgotPasswordEnt.vue 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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')">
  9. <template #custom>
  10. <div class="font-size-14 text-end">
  11. <span class="color-primary cursor-pointer" @click="router.push('/login')">回到登录页</span>
  12. </div>
  13. </template>
  14. </editPasswordPage>
  15. </div>
  16. </div>
  17. <Verify
  18. ref="verify"
  19. captchaType="blockPuzzle"
  20. :imgSize="{ width: '400px', height: '200px' }"
  21. mode="pop"
  22. @success="verifySuccess"
  23. />
  24. </template>
  25. <script setup>
  26. defineOptions({ name: 'forgotPasswordEnt'})
  27. import { useRouter } from 'vue-router'
  28. import navBar from '@/layout/personal/navBar.vue'
  29. import editPasswordPage from '@/views/login/components/editPasswordEnt.vue'
  30. import Verify from '@/components/Verifition'
  31. import { ref, onMounted } from 'vue'
  32. const router = useRouter()
  33. const isMobile = ref(false)
  34. onMounted(() => {
  35. const userAgent = navigator.userAgent
  36. 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)
  37. })
  38. // 验证码
  39. const verify = ref()
  40. // 获取验证码
  41. const getCode = async () => {
  42. // 弹出验证码 // 已开启:则展示验证码;只有完成验证码的情况,才进行登录
  43. verify.value.show()
  44. }
  45. const captchaVerification = ref(false)
  46. const verifySuccess = (params) => {
  47. captchaVerification.value = params.captchaVerification
  48. }
  49. </script>
  50. <style scoped lang="scss">
  51. .navBar {
  52. position: absolute;
  53. top: 0;
  54. z-index: 2;
  55. }
  56. .box {
  57. position: relative;
  58. width: 100%;
  59. height: 100%;
  60. background-image: url('https://minio.menduner.com/dev/menduner/login-banner.png');
  61. background-size: cover;
  62. }
  63. .content {
  64. position: absolute;
  65. top: 50%;
  66. left: 50%;
  67. translate: -50% -50%;
  68. width: 500px;
  69. height: 450px;
  70. background-color: #fff;
  71. border-radius: 10px;
  72. }
  73. </style>