Browse Source

修复ios网络请求,设备名中文导致请示错误bug

tags/0.0.2+6
Weller 4 years ago
parent
commit
646bb242d7
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      lib/util/net_util.dart

+ 4
- 2
lib/util/net_util.dart View File

@@ -13,6 +13,7 @@ import 'package:package_info/package_info.dart';
import 'package:zhiying_comm/util/empty_util.dart'; import 'package:zhiying_comm/util/empty_util.dart';
import 'package:zhiying_comm/zhiying_comm.dart'; import 'package:zhiying_comm/zhiying_comm.dart';


import 'encode_util.dart';
import 'global_config.dart'; import 'global_config.dart';
import 'shared_prefe_util.dart'; import 'shared_prefe_util.dart';
import 'time_util.dart'; import 'time_util.dart';
@@ -285,13 +286,14 @@ class NetUtil {
// 设备系统版本 // 设备系统版本
params["os_version"] = iosInfo?.systemVersion?.toString(); params["os_version"] = iosInfo?.systemVersion?.toString();
// 设备型号 如:iPhone 11pro // 设备型号 如:iPhone 11pro
params['device_model'] = iosInfo?.name?.toString();

params['device_model'] =
EncodeUtil.encodeBase64(iosInfo?.name?.toString() ?? '');
// 设备ID // 设备ID
params['device_id'] = iosInfo?.identifierForVendor?.toString(); params['device_id'] = iosInfo?.identifierForVendor?.toString();


// idfa // idfa
params['idfa'] = iosInfo?.identifierForVendor?.toString(); params['idfa'] = iosInfo?.identifierForVendor?.toString();

} else if (Platform.isAndroid) { } else if (Platform.isAndroid) {
AndroidDeviceInfo androidInfo = await DeviceInfoPlugin().androidInfo; AndroidDeviceInfo androidInfo = await DeviceInfoPlugin().androidInfo;
// 设备 // 设备


Loading…
Cancel
Save