1
This commit is contained in:
@@ -80,17 +80,21 @@ namespace BLL.Common
|
||||
/// <param name="validateCode"></param>
|
||||
/// <param name="access_token"></param>
|
||||
/// <returns></returns>
|
||||
public static string addDevices(string deviceSerial, string groupNo, string validateCode, string access_token)
|
||||
public static string addDevices(string deviceSerial, string groupNo, string validateCode, string access_token,out string res)
|
||||
{
|
||||
string data = "{\"deviceSerial\":\"" + deviceSerial + "\",\"groupNo\":\"" + groupNo + "\",\"validateCode\":\"" + validateCode + "\"}";
|
||||
string result = Post(YunMouUrl + "api/v1/open/basic/devices/create", data, "application/json;charset=UTF-8", access_token);
|
||||
ErrLogInfo.WriteLog(result);
|
||||
|
||||
|
||||
var j2 = JsonConvert.DeserializeObject<dynamic>(result);
|
||||
if (j2.code == "200")
|
||||
{
|
||||
res = j2.message;
|
||||
return j2.data.groupId;
|
||||
}
|
||||
else
|
||||
{
|
||||
res = j2.message;
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user