|
@ -215,6 +215,35 @@
|
|
var timer = null;
|
|
var timer = null;
|
|
|
|
|
|
if(userAgent) {
|
|
if(userAgent) {
|
|
|
|
$.ajax(server +'doctor/doctorRole',{
|
|
|
|
data:{},
|
|
|
|
dataType: 'json',
|
|
|
|
type:'get',
|
|
|
|
beforeSend: function(request) {
|
|
|
|
request.setRequestHeader("userAgent", userAgent);
|
|
|
|
},
|
|
|
|
timeout: 30000,
|
|
|
|
success: function(res) {
|
|
|
|
if(res.status == 200){
|
|
|
|
var agentObj = JSON.parse(userAgent)
|
|
|
|
var data = res.data;
|
|
|
|
window.localStorage.setItem('WLYY_IMEI',agentObj.imei)
|
|
|
|
//添加医生到userRole
|
|
|
|
var addData = {
|
|
|
|
areas:data.hospital,
|
|
|
|
authOperate:data.doctorAuthOperate,
|
|
|
|
code:data.hospital,
|
|
|
|
isManage:0,
|
|
|
|
level:4,
|
|
|
|
name:data.name
|
|
|
|
}
|
|
|
|
data.token = agentObj.token
|
|
|
|
data.userRole.push(addData)
|
|
|
|
localStorage.setItem('wlyyAgent',JSON.stringify(data))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
userAgent = decodeURIComponent(userAgent)
|
|
userAgent = decodeURIComponent(userAgent)
|
|
localStorage.setItem(agentName, userAgent)
|
|
localStorage.setItem(agentName, userAgent)
|
|
if(userAgent){
|
|
if(userAgent){
|