hospitalDetail.js 1.36 KB
  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
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
//hospitalDetail.js 医院详情介绍

// 网络请求工具类
var networkUtil = require('../../utils/network_util.js')
var api = require('../../utils/apiFile.js')

Page({
data: {
hosiptalInfo: {},
isShowOne: false,
isShowTwo: false,
isShowThree: false,
},
onLoad: function (option) {
},
isShowMore:function(e){
var self=this
console.log(e)
var index =e.currentTarget.dataset.index
console.log(index)
if(index==1){
self.setData({
isShowOne: !self.data.isShowOne,
isShowTwo: false,
isShowThree: false,
})
} if (index == 2) {
self.setData({
isShowOne: false ,
isShowTwo: !self.data.isShowTwo,
isShowThree: false,
})
} if (index == 3) {
self.setData({
isShowOne: false,
isShowTwo: false,
isShowThree: !self.data.isShowThree,
})
}
},
getArticleInfo(days) {
var self = this
// 文章列表
networkUtil._get(api.homeArtList, { page: 0, limit: 100, days: days }, function (res) {
console.log('获取文章信息', res.data.list)
app.globalData.artList = res.data.list
self.setData({
list: res.data.list
})
}, function (res) {
wx.stopPullDownRefresh()
})
},

})