Skip to content

Commit ffc14a0

Browse files
author
ccharlesren
committed
修复link sdk请求接口缺少agent和lan参数导致的设备面板数据不正确的问题,iOS同步修改
Change-Id: Ia386252f298d2ef2c2cc83b530e6069750c7843c
1 parent 8d369b3 commit ffc14a0

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

Source/SDK/LinkCore/QCAPISets/Public/TIoTCoreDeviceSet.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ - (void)getDeviceDetailWithProductId:(NSString *)productId deviceName:(NSString
442442

443443
- (DeviceInfo *)zipData:(NSDictionary *)uiInfo baseInfo:(NSDictionary *)baseInfo deviceData:(NSDictionary *)deviceInfo
444444
{
445-
NSDictionary *standard = uiInfo[@"APP_zh"][@"Panel"][@"standard"];
445+
NSDictionary *standard = uiInfo[@"Panel"][@"standard"];
446446
if (standard && baseInfo && deviceInfo) {
447447

448448
DeviceInfo *obj = [[DeviceInfo alloc] init];

Source/SDK/LinkCore/QCFoundation/TIoTCoreRequestClient.m

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,18 @@ + (void)sendRequestWithBuild:(NSDictionary *)build success:(SuccessResponseHandl
1414
{
1515
BOOL useToken = [build[@"useToken"] boolValue];
1616
NSString *action = build[@"action"];
17-
NSDictionary *params = build[@"params"];
17+
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithDictionary:build[@"params"]];
18+
19+
//接口中英文语言国际化返回判断参数
20+
NSString *langAndRegionStr = [[NSLocale currentLocale] localeIdentifier];
21+
22+
NSString *regionStr = [[langAndRegionStr componentsSeparatedByString:@"_"] objectAtIndex:1];
23+
24+
NSString *langStr = [[langAndRegionStr componentsSeparatedByString:@"_"] objectAtIndex:0];
25+
26+
NSString *langValueString = [NSString stringWithFormat:@"%@-%@",langStr,regionStr];
27+
[params setValue:langValueString forKey:@"lang"];
28+
[params setValue:@"iOS" forKey:@"Agent"];
1829

1930
if ([action isEqualToString:@"AppCosAuth"]) {
2031

0 commit comments

Comments
 (0)