1234567891011121314151617181920212223242526272829303132333435363738
  1. //index.js
  2. //获取应用实例
  3. import ArticleList from './article.js'
  4. const app = getApp()
  5. Page({
  6. onShow() {
  7. wx.setNavigationBarTitle({
  8. title: '购房百科'
  9. })
  10. },
  11. onLoad(e) {
  12. let Detail = null
  13. ArticleList.ArticleList.map((item) => {
  14. if (item.Type - 0 === e.type - 0) {
  15. item.List.map((subItem) => {
  16. if (subItem.Id - 0 === e.id - 0) {
  17. Detail = subItem
  18. }
  19. })
  20. }
  21. })
  22. this.setData({
  23. Detail: Detail
  24. })
  25. },
  26. data: {
  27. UserInfo: app.globalData.UserInfo, // 用户信息
  28. Detail: null
  29. },
  30. onShareAppMessage: function () {
  31. return {
  32. title: this.data.Detail.Title,
  33. path: '/pages/SelfServiceTool/Cyclopedia/Detail?id=' + this.data.Detail.Id + '&type=' + this.data.Detail.Type,
  34. imageUrl: this.data.Detail.MainImg
  35. }
  36. }
  37. })