家政小程序
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.

index.js 728B

123456789101112131415161718192021222324252627282930
  1. const $ = global;
  2. const WxParse = require('../../wxParse/wxParse.js');
  3. new $.Page({
  4. data: {
  5. imgUrls: [
  6. '/img/demo/banner.jpg',
  7. '/img/demo/banner.jpg',
  8. '/img/demo/banner.jpg'
  9. ]
  10. },
  11. onLoad() {
  12. WxParse.wxParse('article', 'html', '<div>hello world</div>', this);
  13. },
  14. handleJump(e) {
  15. const {
  16. route,
  17. type,
  18. target
  19. } = e.currentTarget.dataset;
  20. if (route) {
  21. $.router.goto({
  22. path: `/pages/${route}/index`,
  23. type: type && parseInt(type),
  24. params: {
  25. target: target || ''
  26. }
  27. });
  28. }
  29. }
  30. });