2021-04-29 10:08:41 +08:00
|
|
|
// pages/institutions/institutionsdetail.js
|
|
|
|
const app = getApp()
|
|
|
|
Page({
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 页面的初始数据
|
|
|
|
*/
|
|
|
|
data: {
|
2021-07-23 11:18:54 +08:00
|
|
|
noticeContent: '',
|
|
|
|
inId: '',
|
|
|
|
detailBean: null
|
2021-04-29 10:08:41 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面加载
|
|
|
|
*/
|
|
|
|
onLoad: function (options) {
|
2021-07-23 11:18:54 +08:00
|
|
|
this.setData({
|
|
|
|
inId: options.id
|
|
|
|
})
|
|
|
|
this.getInstitutionDetail()
|
2021-04-29 10:08:41 +08:00
|
|
|
},
|
2021-07-23 11:18:54 +08:00
|
|
|
getInstitutionDetail() {
|
|
|
|
var _self = this
|
|
|
|
wx.showLoading({
|
|
|
|
title: '加载中...',
|
|
|
|
})
|
|
|
|
app.restAjax.get(app.restAjax.path(app.apis.getInstitutionDetailById, [app.baseUrls.cardUrl, _self.data.inId]), {}, {},
|
|
|
|
(code, data) => {
|
|
|
|
wx.hideLoading({})
|
|
|
|
if (code == 200) {
|
2022-06-08 16:49:02 +08:00
|
|
|
if (data.institutionImage) {
|
|
|
|
var ps = data.institutionImage.split(',')
|
|
|
|
var photos = []
|
|
|
|
for (var i = 0; i < ps.length; i++) {
|
|
|
|
var urls = app.baseUrls.cardUrl + app.baseUrls.baseImgUrl + ps[i]
|
|
|
|
photos = photos.concat(urls)
|
|
|
|
}
|
|
|
|
data.showPhoto = photos
|
2021-07-23 11:18:54 +08:00
|
|
|
}
|
|
|
|
_self.setData({
|
|
|
|
detailBean: data
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}, (code, error) => {
|
|
|
|
wx.hideLoading({})
|
|
|
|
})
|
|
|
|
}
|
2021-04-29 10:08:41 +08:00
|
|
|
})
|