- Debug 模式:使用固定的 http://192.168.0.113 和 ws://192.168.0.113
- Release 模式:使用动态域名逻辑
This commit is contained in:
@@ -51,7 +51,9 @@ class KrNodeListItem {
|
||||
final String startTime;
|
||||
final String expireTime;
|
||||
final double latitude;
|
||||
final double latitudeCountry;
|
||||
final double longitude;
|
||||
final double longitudeCountry;
|
||||
|
||||
KrNodeListItem({
|
||||
required this.id,
|
||||
@@ -74,7 +76,9 @@ class KrNodeListItem {
|
||||
required this.startTime,
|
||||
required this.expireTime,
|
||||
required this.latitude,
|
||||
required this.latitudeCountry,
|
||||
required this.longitude,
|
||||
required this.longitudeCountry,
|
||||
});
|
||||
|
||||
factory KrNodeListItem.fromJson(Map<String, dynamic> json) {
|
||||
@@ -100,7 +104,9 @@ class KrNodeListItem {
|
||||
startTime: json['start_time']?.toString() ?? '',
|
||||
expireTime: json['expire_time']?.toString() ?? '',
|
||||
latitude: _parseDoubleSafely(json['latitude']),
|
||||
latitudeCountry: _parseDoubleSafely(json['latitude_country']),
|
||||
longitude: _parseDoubleSafely(json['longitude']),
|
||||
longitudeCountry: _parseDoubleSafely(json['longitude_country']),
|
||||
);
|
||||
} catch (err) {
|
||||
KRLogUtil.kr_e('KrNodeListItem解析错误: $err', tag: 'NodeList');
|
||||
@@ -122,7 +128,9 @@ class KrNodeListItem {
|
||||
startTime: '',
|
||||
expireTime: '',
|
||||
latitude: 0.0,
|
||||
latitudeCountry: 0.0,
|
||||
longitude: 0.0,
|
||||
longitudeCountry: 0.0,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user