所有设备ID获取方式统一为使用 KRDeviceInfoService().deviceId(基于 device_info_plus
库)。这确保了全局使用一致的设备标识
This commit is contained in:
@@ -12,7 +12,6 @@ import 'package:kaer_with_panels/app/model/response/kr_login_data.dart';
|
||||
import 'package:kaer_with_panels/app/network/base_response.dart';
|
||||
import 'package:kaer_with_panels/app/network/http_error.dart';
|
||||
import 'package:kaer_with_panels/app/network/http_util.dart';
|
||||
import 'package:kaer_with_panels/app/utils/kr_device_util.dart';
|
||||
|
||||
import '../../utils/kr_common_util.dart';
|
||||
import '../../utils/kr_log_util.dart';
|
||||
@@ -28,7 +27,7 @@ class KRAuthApi {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['email'] = email;
|
||||
|
||||
final deviceId = await KRDeviceUtil().kr_getDeviceId();
|
||||
final deviceId = KRDeviceInfoService().deviceId ?? 'unknown';
|
||||
KRLogUtil.kr_i('设备ID: $deviceId', tag: 'KRAuthApi');
|
||||
data["identifier"] = deviceId;
|
||||
|
||||
@@ -53,7 +52,7 @@ class KRAuthApi {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['email'] = email;
|
||||
data['password'] = password;
|
||||
data["identifier"] = await KRDeviceUtil().kr_getDeviceId();
|
||||
data["identifier"] = KRDeviceInfoService().deviceId ?? 'unknown';
|
||||
|
||||
// 验证码是可选的,只有在提供时才发送
|
||||
if (code != null && code.isNotEmpty) {
|
||||
@@ -105,7 +104,7 @@ class KRAuthApi {
|
||||
data['email'] = email;
|
||||
data['password'] = password;
|
||||
|
||||
final deviceId = await KRDeviceUtil().kr_getDeviceId();
|
||||
final deviceId = KRDeviceInfoService().deviceId ?? 'unknown';
|
||||
KRLogUtil.kr_i('设备ID: $deviceId', tag: 'KRAuthApi');
|
||||
data["identifier"] = deviceId;
|
||||
|
||||
@@ -161,7 +160,7 @@ class KRAuthApi {
|
||||
data['email'] = email;
|
||||
data['password'] = password;
|
||||
data["code"] = code;
|
||||
data["identifier"] = await KRDeviceUtil().kr_getDeviceId();
|
||||
data["identifier"] = KRDeviceInfoService().deviceId ?? 'unknown';
|
||||
|
||||
BaseResponse<KRLoginData> baseResponse = await HttpUtil.getInstance()
|
||||
.request<KRLoginData>(Api.kr_setNewPsdByForgetPsd, data,
|
||||
|
||||
Reference in New Issue
Block a user