email-verify.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <template>
  2. <view>
  3. <headContent>
  4. <template #left>
  5. <view class="head-revers-back iconfont" @click.stop="reversBackBtn()">&#xe604;</view>
  6. </template>
  7. </headContent>
  8. <view class="page-content">
  9. <text class="login-title">注册</text>
  10. <text class="login-content">验证码已发送至{{email}}</text>
  11. <view class="code-box">
  12. <u-code-input v-model="emailCode" :maxlength="6" :focus="true"></u-code-input>
  13. <view class="code-hint" @click.stop="resendCode()">重新发送</view>
  14. </view>
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. import {
  20. Api_getEmailCode
  21. } from "@/api/index.js"
  22. import {
  23. reverseBack
  24. } from "@/utils/common.js"
  25. export default {
  26. name: 'emailVerify',
  27. data() {
  28. return {
  29. email: '',
  30. emailCode: ''
  31. };
  32. },
  33. onLoad(opt) {
  34. this.email = opt?.email;
  35. this.getEmailCode()
  36. },
  37. methods: {
  38. getEmailCode() {
  39. Api_getEmailCode({
  40. user_string: this.email
  41. }).then(res => {
  42. }).catch(err => {
  43. })
  44. },
  45. reversBackBtn() {
  46. reverseBack()
  47. },
  48. resendCode(){
  49. this.getEmailCode()
  50. }
  51. }
  52. }
  53. </script>
  54. <style lang="scss" scoped>
  55. @import "~./common.scss"
  56. </style>