logo和名称替换
This commit is contained in:
@@ -4,8 +4,8 @@ import 'dart:io';
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:dio/io.dart';
|
||||
import 'package:hgmj/tools_base/debug_log.dart';
|
||||
import 'package:hgmj/tools_base/net/http_manager.dart';
|
||||
import 'package:wydj/tools_base/debug_log.dart';
|
||||
import 'package:wydj/tools_base/net/http_manager.dart';
|
||||
|
||||
import '../../config/address.dart';
|
||||
import '../../hj_utils/light_model.dart';
|
||||
@@ -56,7 +56,8 @@ class NetManager {
|
||||
Future<String> userAgent() => DeviceInfoService.getCachedUserAgent();
|
||||
|
||||
/// 强制重新生成并写回缓存(扫码登录、设备切换等场景)。
|
||||
Future<String> refreshUserAgent() => DeviceInfoService.getCachedUserAgent(deviceId: DeviceInfoService.deviceId);
|
||||
Future<String> refreshUserAgent() => DeviceInfoService.getCachedUserAgent(
|
||||
deviceId: DeviceInfoService.deviceId);
|
||||
|
||||
/// 清除ua
|
||||
Future clearUserAgent() => DeviceInfoService.clearCachedUserAgent();
|
||||
@@ -81,7 +82,8 @@ class NetManager {
|
||||
if (TextUtil.isNotEmpty(serverTimeS)) {
|
||||
_serverTime = DateTime.parse(serverTimeS!);
|
||||
_diffTimeInSeconds = DateTime.now().difference(_serverTime!).inSeconds;
|
||||
debugLog("============>server diff from local in seconds:$_diffTimeInSeconds");
|
||||
debugLog(
|
||||
"============>server diff from local in seconds:$_diffTimeInSeconds");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,7 +108,8 @@ Dio createDio({BaseOptions? options}) {
|
||||
var adapter = DefaultHttpClientAdapter();
|
||||
// var adapter = DefaultHttpClientAdapter();
|
||||
adapter.onHttpClientCreate = (client) {
|
||||
client.badCertificateCallback = (X509Certificate cert, String host, int port) => true;
|
||||
client.badCertificateCallback =
|
||||
(X509Certificate cert, String host, int port) => true;
|
||||
return client;
|
||||
};
|
||||
dio.httpClientAdapter = adapter;
|
||||
|
||||
Reference in New Issue
Block a user