pwd.vue 1006 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <template>
  2. <view class="content">
  3. <view class="input-group">
  4. <view class="input-row">
  5. <text class="title">邮箱:</text>
  6. <m-input type="text" focus clearable v-model="email" placeholder="请输入邮箱"></m-input>
  7. </view>
  8. </view>
  9. <view class="btn-row">
  10. <button type="primary" class="primary" @tap="findPassword">提交</button>
  11. </view>
  12. </view>
  13. </template>
  14. <script>
  15. import service from '../../service.js';
  16. import mInput from '../../components/m-input.vue';
  17. export default {
  18. components: {
  19. mInput
  20. },
  21. data() {
  22. return {
  23. email: ''
  24. }
  25. },
  26. methods: {
  27. findPassword() {
  28. /**
  29. * 仅做示例
  30. */
  31. if (this.email.length < 3 || !~this.email.indexOf('@')) {
  32. uni.showToast({
  33. icon: 'none',
  34. title: '邮箱地址不合法',
  35. });
  36. return;
  37. }
  38. uni.showToast({
  39. icon: 'none',
  40. title: '已发送重置邮件至注册邮箱,请注意查收。',
  41. duration: 3000
  42. });
  43. }
  44. }
  45. }
  46. </script>
  47. <style>
  48. </style>