1234567891011121314151617181920212223242526272829303132333435363738 |
- //index.js
- //获取应用实例
- import ArticleList from './article.js'
- const app = getApp()
-
- Page({
- onShow() {
- wx.setNavigationBarTitle({
- title: '购房百科'
- })
- },
- onLoad(e) {
- let Detail = null
- ArticleList.ArticleList.map((item) => {
- if (item.Type - 0 === e.type - 0) {
- item.List.map((subItem) => {
- if (subItem.Id - 0 === e.id - 0) {
- Detail = subItem
- }
- })
- }
- })
- this.setData({
- Detail: Detail
- })
- },
- data: {
- UserInfo: app.globalData.UserInfo, // 用户信息
- Detail: null
- },
- onShareAppMessage: function () {
- return {
- title: this.data.Detail.Title,
- path: '/pages/SelfServiceTool/Cyclopedia/Detail?id=' + this.data.Detail.Id + '&type=' + this.data.Detail.Type,
- imageUrl: this.data.Detail.MainImg
- }
- }
- })
|