3.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <template>
  2. <div class="section">
  3. <img class="img" src="/static/image/recruit/3.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: 6.66vw;
  57. left: 13.33vw;
  58. display: flex;
  59. align-items: center;
  60. flex-wrap: nowrap;
  61. .u-input {
  62. height: 7.2vw;
  63. width: 40vw;
  64. &.active {
  65. background-color: #fff;
  66. }
  67. }
  68. .u-button {
  69. width: 20vw;
  70. height: 7.2vw;
  71. opacity: 0 !important;
  72. }
  73. }
  74. </style>