// pages/zscqdxalInfo/zscqdxalInfo.js var app = getApp(); Page({ /** * 页面的初始数据 */ data: { data: {}, ywsqjd: app.globalData.imgUrl +'/image/ywsqjd.svg', fulltextList:[] }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { this.showList(options.id) }, showList: function (id) { var that = this; wx.showLoading(); wx.request({ url: app.globalData.url + '/api/v1/searchLaw/caseInfo?id=' + id, success: function (res) { wx.hideLoading(); console.log('data', res.data.data.data.fulltext) console.log('res', res) if (res.data.code == 0) { that.setData({ data: res.data.data.data, fulltextList:res.data.data.data.fulltext.filter((item)=>(item.tag !=='开始'&&item.tag!=='结束')) }) } else { wx.showToast({ title: res.data.msg, }) } } }) }, })