2.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <template>
  2. <div class="section">
  3. <img class="img" src="/static/image/recruit/2.jpg" alt="">
  4. <div class="input-box">
  5. <u--input
  6. :class="{'active': email}"
  7. placeholder=""
  8. v-model="email"
  9. border="none"
  10. ></u--input>
  11. <u-button text="Submit to" @click="submit"></u-button>
  12. </div>
  13. </div>
  14. </template>
  15. <script>
  16. export default {
  17. data () {
  18. return {
  19. email: ''
  20. }
  21. },
  22. methods: {
  23. submit() {
  24. if (!this.email.trim()) {
  25. uni.$u.toast('Please enter the what APP account');
  26. return
  27. }
  28. uni.showLoading({
  29. title: this.$t('login.lab18')
  30. })
  31. uni.$u.http.post('api/live_streaming/submit_email', {
  32. email: this.email.trim()
  33. }).then(res => {
  34. uni.showToast({
  35. title: this.$t('login.lab13'),
  36. icon: "success"
  37. })
  38. this.email = ''
  39. }).finally(() => {
  40. uni.hideLoading();
  41. });
  42. }
  43. }
  44. }
  45. </script>
  46. <style lang="scss">
  47. .section {
  48. position: relative;
  49. }
  50. .img {
  51. width: 100%;
  52. display: block;
  53. }
  54. .input-box {
  55. position: absolute;
  56. bottom: 46.13vw;
  57. left: 14.13vw;
  58. .u-input {
  59. height: 7.2vw;
  60. width: 51.4vw;
  61. &.active {
  62. background-color: #fff;
  63. }
  64. }
  65. .u-button {
  66. width: 26vw;
  67. height: 7.2vw;
  68. margin-top: 3.1vw;
  69. opacity: 0 !important;
  70. }
  71. }
  72. </style>