forked from nsjcy/frontEnd/nsjcy

liuwh
2020-06-09 5a887acf1924950715086633d329db045223b5c4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// 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/lawInfo?id=' + id,
      success: function (res) {
        wx.hideLoading();
        console.log('data', res.data.data.data.laws)
        console.log('res', res)
        if (res.data.code == 0) {
          that.setData({
            data: res.data.data.data,
            fulltextList:res.data.data.data.laws.filter((item)=>(item.tag !=='开始'&&item.tag!=='结束'))
          })
        } else {
          wx.showToast({
            title: res.data.msg,
          })
        }
      }
    })
  },
 
 
 
 
})