index.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <template>
  2. <div class="content">
  3. <!-- <div class="title">登录</div>
  4. <div class="cell-group">
  5. <div class="cell-item"><input type="number" :value="form.mobile" :maxlength="11" placeholder="手机号" @input="inputMobile" /></div>
  6. <div class="cell-item">
  7. <input type="number" :value="form.sms_code" :maxlength="6" placeholder="验证码" @input="inputCode" />
  8. <span class="send-code" @click="sendCode()">{{timeNum || '获取验证码'}} <i v-if="timeNum > 0">s</i></span>
  9. </div>
  10. </div>
  11. <div class="login-btn" @click="login()">登录</div> -->
  12. <img v-if="imgUrl" :src="imgUrl + 'bl_login_img.png'" />
  13. <button class="wx-login-btn" plain hover-class="none" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">手机号授权登录</button>
  14. </div>
  15. </template>
  16. <script>
  17. import methods from './methods.js';
  18. export default {
  19. data() {
  20. return {
  21. imgUrl: '',
  22. form: {
  23. mobile: '',
  24. sms_code: ''
  25. },
  26. timeNum: 0
  27. };
  28. },
  29. onLoad(options) {
  30. let app = getApp();
  31. this.imgUrl = app.globalData.imgUrl;
  32. uni.setStorageSync('gid', options.gid || 1);
  33. },
  34. mounted() {},
  35. methods: {
  36. ...methods
  37. }
  38. };
  39. </script>
  40. <style lang="scss" scoped>
  41. @import './style.scss';
  42. </style>