const app = getApp() import { getTypicalList } from '../../api/index' Page({ /** * 页面的初始数据 */ data: { // 此页面 页面内容距最顶部的距离 height: app.globalData.navHeight , id:'', caseTitle:'', createdTime:'', backId:'', caseData:[], isComplete:false }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { console.log("options",options) this.setData({ id:options.id }) this.getTypicalList() }, /*****打开更多案例 ******/ getMoreCase(){ wx.navigateTo({ url: '/pages/classicCase/classicCase' }); }, async getTypicalList(){ wx.showLoading({ title: '加载中', }) try{ let res:any= await getTypicalList(this.data.id) res.data.dynamicItem[0].contentDescription = res.data.dynamicItem[0].contentDescription.replace(/\