index.js 540 B

12345678910111213141516171819202122232425262728293031323334
  1. Component({
  2. properties: {
  3. cutBar: {
  4. type: Function
  5. }
  6. },
  7. options: {
  8. addGlobalClass: true,
  9. },
  10. data: {
  11. appid: "wxc1b6ae925ac1d06a"
  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. if (res) {
  21. if (it.PageCur) {
  22. this.triggerEvent("cutBar", it.PageCur)
  23. } else {
  24. wx.navigateTo({
  25. url: it.PageCur ? '#' : it.path,
  26. })
  27. }
  28. }
  29. },
  30. toMsg() {
  31. this.triggerEvent("cutBar", 'Message')
  32. }
  33. }
  34. })