index.js 560 B

1234567891011121314151617181920212223242526272829303132333435
  1. Component({
  2. properties: {
  3. cutBar: {
  4. type: Function
  5. }
  6. },
  7. options: {
  8. addGlobalClass: true,
  9. },
  10. data: {
  11. appid: "wx7505ddb0a1ec6146"
  12. },
  13. methods: {
  14. async openRecord(e) {
  15. const {
  16. it,
  17. item
  18. } = e.currentTarget.dataset;
  19. const res = await getApp().globalData.evidence(it);
  20. console.log(res)
  21. if (res) {
  22. if (it.PageCur) {
  23. this.triggerEvent("cutBar", it.PageCur)
  24. } else {
  25. wx.navigateTo({
  26. url: it.PageCur ? '#' : it.path,
  27. })
  28. }
  29. }
  30. },
  31. toMsg() {
  32. this.triggerEvent("cutBar", 'Message')
  33. }
  34. }
  35. })