时空网前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
959 B

5 years ago
  1. <template>
  2. <view>
  3. 分享海报
  4. <view class="qrcode-hidden" style="height: 100px;width: 100%;">
  5. <tkiQrcod cid="qrcode"
  6. @result="result"
  7. ref="qrcode"
  8. :val="qrcode"
  9. onval
  10. :size="340"
  11. :showLoading="false"
  12. /></view>
  13. <image src="../../static/images/empty.png" mode="aspectFill" style="width: 200rpx;height: 200rpx;"></image>
  14. <view class="save-pic bg-blueself discenter animation-slide-right" @click="saveIamge" data-provider="save" data-scene="">保存分享海报</view>
  15. </view>
  16. </template>
  17. <script>
  18. import tkiQrcode from "tki-qrcode"; // 二维码生成器
  19. export default {
  20. components: {
  21. tkiQrcode
  22. },
  23. data() {
  24. return {
  25. qrcode: '',
  26. qrcodeImg: '',
  27. code: ''
  28. }
  29. },
  30. methods: {
  31. result(e) {
  32. uni.setStorage({ key: 'shareImg', data: e })
  33. this.qrcodeImg = e
  34. },
  35. saveIamge(e) {
  36. this.share(e)
  37. },
  38. },
  39. onLoad() {
  40. this.qrcode = 'dadaa'
  41. }
  42. }
  43. </script>
  44. <style>
  45. </style>