shareQrCode.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <template>
  2. <view class="content">
  3. <image src="../../static/img/sharebase.png" mode="widthFix" class="baseimg"></image>
  4. <view class="erweima">
  5. <tki-qrcode
  6. :cid="cid"
  7. ref="qrcode"
  8. :val="val"
  9. :size="size"
  10. :unit="unit"
  11. :background="background"
  12. :foreground="foreground"
  13. :pdground="pdground"
  14. :iconSize="iconSize"
  15. :lv="lv"
  16. :onval="onval"
  17. :loadMake="loadMake"
  18. :usingComponents="usingComponents"
  19. @result="qrR"
  20. />
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. import {
  26. mapState,
  27. mapMutations
  28. } from 'vuex';
  29. export default {
  30. data() {
  31. return {
  32. val: '',
  33. cid: 'cid',
  34. size: 150,
  35. unit: '150',
  36. background: '#FFFFFF',
  37. foreground: '#000000',
  38. pdground: '#000000',
  39. icon: '',
  40. iconSize: 40,
  41. lv: 3,
  42. onval: true,
  43. loadMake: true,
  44. usingComponents: true,
  45. };
  46. },
  47. onLoad() {
  48. },
  49. onShow() {
  50. this.val = 'http://hgd.liuniu946.com/appdom/index.html?spread=' + this.userInfo.uid
  51. },
  52. //下拉刷新
  53. onPullDownRefresh() {
  54. },
  55. computed: {
  56. ...mapState(['baseURL', 'urlFile']),
  57. ...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
  58. },
  59. methods: {
  60. qrR(res) {
  61. this.src = res;
  62. },
  63. }
  64. };
  65. </script>
  66. <style lang="scss">
  67. .baseimg {
  68. width: 100%;
  69. }
  70. .erweima {
  71. width: 300rpx;
  72. position: absolute;
  73. top: 923rpx;
  74. left: 0;
  75. right: 0;
  76. margin: auto;
  77. display: flex;
  78. justify-content: center;
  79. }
  80. </style>