index.js 620 B

123456789101112131415161718192021222324252627282930
  1. import {
  2. getWxQrcode
  3. } from '~/api/user'
  4. Component({
  5. data: {
  6. show: false,
  7. qrCode: ''
  8. },
  9. methods: {
  10. async open() {
  11. let res = await getWxQrcode()
  12. console.log(res);
  13. this.getTabBar().setData({
  14. mask: true
  15. })
  16. this.setData({
  17. show: true,
  18. qrCode: res.ticketUrl
  19. })
  20. },
  21. closeModal() {
  22. this.setData({
  23. show: false
  24. })
  25. this.getTabBar().setData({
  26. mask: false
  27. })
  28. },
  29. }
  30. })