orderissuer.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <template>
  2. <view :style="getHeight">
  3. <!-- 公共组件-每个页面必须引入 -->
  4. <public-module></public-module>
  5. <service-widget @btnClick="btn_click"></service-widget>
  6. <view class="content d-flex flex-column a-center j-center">
  7. <image src="/static/image/addStaff/face_sao.png" mode="widthFix" lazy-load style="width: 500upx;"></image>
  8. <image :src="recommendImg" mode="widthFix" lazy-load style="width: 450upx;"></image>
  9. <view>新成员只需要扫描您的二维码,即可马上注册加入啦!</view>
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. import {
  15. mapState
  16. } from "vuex"
  17. import QR from "@/common/wxqrcode.js"
  18. export default {
  19. data() {
  20. return {
  21. recommendImg: ""
  22. }
  23. },
  24. computed: {
  25. ...mapState(['userInfo']),
  26. getHeight() {
  27. let height = uni.getSystemInfoSync().windowHeight;
  28. return `height: ${height}px;`;
  29. }
  30. },
  31. onLoad() {
  32. var id = this.userInfo.sysUser.id;
  33. console.log(id)
  34. this.recommendImg = QR.createQrCodeImg(this.$base.h5BaseUrl + "/#/pages/register/orderissuer?id=" + id, {
  35. size: parseInt(200) //二维码大小
  36. })
  37. },
  38. methods: {
  39. btn_click() {
  40. uni.navigateTo({
  41. url: '/pages/chat/chat'
  42. })
  43. },
  44. }
  45. }
  46. </script>
  47. <style>
  48. .content {
  49. position: absolute;
  50. top: 50%;
  51. left: 50%;
  52. transform: translate(-50%, -60%);
  53. }
  54. .content>image {
  55. margin-top: 30upx;
  56. margin-bottom: 30upx;
  57. }
  58. .content>view {
  59. width: 400upx;
  60. color: red;
  61. text-align: center;
  62. }
  63. </style>