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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. $.request('server_infos', 'GET', {}).then((res) => {
  13. const {
  14. bottom,
  15. top,
  16. introduce
  17. } = res;
  18. WxParse.wxParse('article', 'html', introduce, this);
  19. this.setData({
  20. bottom,
  21. top,
  22. introduce
  23. });
  24. });
  25. },
  26. handleJump(e) {
  27. const {
  28. route,
  29. type,
  30. target
  31. } = e.currentTarget.dataset;
  32. if (route) {
  33. $.router.goto({
  34. path: `/pages/${route}/index`,
  35. type: type && parseInt(type),
  36. params: {
  37. type: target || ''
  38. }
  39. });
  40. }
  41. },
  42. toDetail(e) {
  43. const {
  44. id,
  45. name
  46. } = e.target.dataset;
  47. if (id) {
  48. // $.router.goto({
  49. // path: `/pages/detail/index`,
  50. // query: {
  51. // id
  52. // }
  53. // });
  54. $.router.goto({
  55. path: `/pages/introduce/index`,
  56. query: {
  57. id,
  58. name
  59. }
  60. });
  61. }
  62. },
  63. toConsult() {
  64. // $.wx.showToast({
  65. // title: '持续开发中'
  66. // });
  67. }
  68. });