index.js 903 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //Component Object
  2. Component({
  3. properties: {
  4. shops: { type: Array, value: [] },
  5. },
  6. data: {
  7. },
  8. methods: {
  9. getLocation: function(res){
  10. this.triggerEvent('getLocation', { });
  11. },
  12. gotoShopInfo:function (e){
  13. let id = e.currentTarget.dataset.id;
  14. let pages = getCurrentPages(); // 当前页,
  15. let prevPage = pages[pages.length - 2]; // 上一页
  16. prevPage.setData({
  17. chooseStoreId: id,
  18. })
  19. wx.navigateBack({ //返回
  20. delta: 1
  21. })
  22. // wx.switchTab({
  23. // url: '../../pages/index/index?storeId='+id,
  24. // })
  25. }
  26. },
  27. created: function(){
  28. },
  29. attached: function(){
  30. },
  31. ready: function(){
  32. },
  33. moved: function(){
  34. },
  35. detached: function(){
  36. },
  37. });