invite.vue 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <template>
  2. <div>
  3. <van-nav-bar title="邀请成员" left-text="返回" @click-left="$route_back" left-arrow></van-nav-bar>
  4. <div style="padding:0.5rem 0.5rem;">
  5. <div style=" text-align: center; -webkit-border-radius: 0.2rem;-moz-border-radius: 0.2rem;border-radius: 0.2rem; padding:0.5rem 0;">
  6. <h4>{{ company_info.name }}</h4>
  7. <div id="example"><qrcode-vue class="qrcode_box" :value="url" :size="150" level="H"></qrcode-vue></div>
  8. <p style="color:#999; font-size:0.28rem;">用APP扫一扫,快速加入组织</p>
  9. </div>
  10. </div>
  11. </div>
  12. </template>
  13. <script src="html5plus://ready"></script>
  14. <script>
  15. import request from '@/utils/request';
  16. import QrcodeVue from 'qrcode.vue';
  17. import plusShare from '../../../static/js/plusShare.js';
  18. import { getToken, getUserId } from '@/utils/auth';
  19. import Vue from 'vue';
  20. import axios from 'axios';
  21. export default {
  22. name: 'invite',
  23. data() {
  24. return {
  25. userinfo: this.$store.getters.user_info,
  26. url: 'http://192.168.1.3:8080/#/join_company?id=',
  27. company_info: {},
  28. site_id: '',
  29. employee_id: ''
  30. };
  31. },
  32. components: {
  33. QrcodeVue
  34. // coreDialog
  35. },
  36. created() {
  37. this.companyId = this.$route.query.id;
  38. let id = this.$route.query.id;
  39. let dept_id = this.$route.query.dept_id;
  40. this.url = this.url + id;
  41. this.site_id = this.userinfo.site_id;
  42. this.employee_id = this.userinfo.id;
  43. this.get_company_info(id);
  44. },
  45. methods: {
  46. getUserInfo(event) {},
  47. get_company_info(id) {
  48. let self = this;
  49. request('get', '/addons/ems/index/get_company_info', { id: id })
  50. .then(res => {
  51. if (res.data.code == 1) {
  52. self.company_info = res.data.data;
  53. self.url = this.url + '&site_id=' + this.site_id + '&employee_idz';
  54. }
  55. })
  56. .catch(e => {});
  57. }
  58. }
  59. };
  60. </script>
  61. <style scoped></style>