{
"operateSuccess": true,
"id": 0,
"opFlg": "200",
"pageNo": 1,
"pageSize": 20,
"hospIds": [],
"deptVos": [
{
"deptName": "l室",
"deptId": "ff80818168f0b9b50169045d5d08000e"
}
],
"deptNamePinYin": "D",
"branchId": "1"
}
我想调用完接口后,把上面返参deptld的值存到全局变量。能把键存进去,值存不进去显示的空。
apt.globals.set("deptId1", response.json.deptVos.deptId);这个语句该什么写。
你的deptVos是个数组,需要加个下标[0]
apt.globals.set("deptId1", response.json.deptVos[0].deptId);