doctor.js 932 Bytes
  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
// 医生信息页面

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

Page({
data: {
doctorInfo: {},
hospitalName: '',
doctorLevel: '',
deptName: '',
hxName: '',
member: []
},
/*---------生命周期--------*/
onLoad: function (options) {

networkUtil.showLoading()
this.requestData(options.hospitalId, options.doctorId)
},
/*---------自定义函数--------*/
requestData(hospitalId, doctorId) {
var self = this
networkUtil._get(api.doctorInfo, { hospitalId: hospitalId, id: doctorId, }, function (res) {
self.setData({
doctorInfo: res.data.doctorObj,
hospitalName: res.data.hospitalName,
deptName: res.data.deptName,
doctorLevel: res.data.doctorLevel,
hxName: res.data.hxName
})
console.log(res)
}, function (res) {

})
},
})