index.js 512 B

1234567891011121314151617181920212223242526
  1. Page({
  2. data: {
  3. },
  4. onLoad: function (options) {
  5. },
  6. navigateToOrder: function() {
  7. wx.navigateTo({
  8. url: '/pages/zf_static/index'
  9. })
  10. },
  11. navigateToDesc: function(e) {
  12. const type = e.currentTarget.dataset.type;
  13. if (type) {
  14. wx.navigateTo({
  15. url: '../common_desc/index?type=' + type,
  16. fail: function(err) {
  17. console.error('页面跳转失败:', err);
  18. }
  19. })
  20. } else {
  21. console.warn('navigateToDesc: 缺少 type 参数');
  22. }
  23. }
  24. })