You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

page.js 1.2 KiB

4 years ago
1234567891011121314151617181920212223242526272829303132
  1. (function () {
  2. var page = {
  3. isScroll: false,
  4. init: function ($page) {
  5. $page.find('#pageNewBtn1').on('tap', function () {
  6. learun.nav.go({ path: 'demo/page/cpage', title: '我是标题', isBack: true, isHead: true, param: '我是一个参数', type: 'right' });
  7. });
  8. $page.find('#pageNewBtn2').on('tap', function () {
  9. learun.nav.go({ path: 'demo/page/cpage', title: '我是标题', isBack: true, isHead: true, param: '我是一个参数' });
  10. });
  11. $page.find('#pageNewBtn3').on('tap', function () {
  12. learun.nav.go({ path: 'demo/page/cpage', title: '我是标题', isBack: true, isHead: true, param: '我是一个参数', type: 'bottom' });
  13. });
  14. $page.find('#pageCloseBtn').on('tap', function () {
  15. learun.nav.closeCurrent();
  16. //learun.nav.close('demo/page');
  17. });
  18. },
  19. beforedestroy: function (pageinfo) {
  20. return true;// false 就不关闭
  21. },
  22. destroy: function (pageinfo) {
  23. },
  24. reload: function ($page, pageinfo) {
  25. }
  26. };
  27. return page;
  28. })();