public async Task <NewErrorModel> Bintang(string authCode) { try { DingTalkServersController dingTalkServersController = new DingTalkServersController(); string accessToken = await GetAccessToken(); string userId = await GetUserId(accessToken, authCode); string accessTokenT = await GetAccessToken(); UserInfoMobileModel userInfo = await GetUserInfo(accessTokenT, userId); string DeptInfo = await dingTalkServersController.departmentQuaryByUserId(userInfo.userid); DeptModel dept = JsonConvert.DeserializeObject <DeptModel>(DeptInfo); if (dept.errcode == 0) { userInfo.dept = dept.name; } else { userInfo.dept = dept.errmsg; } return(new NewErrorModel() { data = userInfo, error = new Error(0, "读取成功!", "") { }, }); } catch (Exception ex) { return(new NewErrorModel() { error = new Error(2, ex.Message, "") { }, }); } }