feat:更新记录UI布局
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:food_hub_app/config/app_config.dart';
|
||||
import 'package:food_hub_app/utils/sp_util.dart';
|
||||
import 'package:food_hub_app/widgets/common/index.dart';
|
||||
|
||||
@@ -11,7 +11,6 @@ class HttpUtil {
|
||||
factory HttpUtil() => _instance;
|
||||
|
||||
late Dio _dio;
|
||||
String baseUrl = kDebugMode ? "http://172.29.101.108:8100" : "http://14.103.235.151:81";
|
||||
|
||||
// 请求头配置
|
||||
Map<String, dynamic> headers = {
|
||||
@@ -25,7 +24,7 @@ class HttpUtil {
|
||||
HttpUtil._internal() {
|
||||
// 初始化Dio实例
|
||||
BaseOptions options = BaseOptions(
|
||||
baseUrl: baseUrl,
|
||||
baseUrl: AppConfig.baseApiUrl,
|
||||
connectTimeout: Duration(seconds: timeout),
|
||||
receiveTimeout: Duration(seconds: timeout),
|
||||
headers: headers,
|
||||
@@ -81,10 +80,6 @@ class HttpUtil {
|
||||
T Function(dynamic data)? converter,
|
||||
}) async {
|
||||
try {
|
||||
if (kDebugMode) {
|
||||
path = path.replaceFirst('/food-service', '');
|
||||
}
|
||||
|
||||
Response response = await _dio.request(
|
||||
path,
|
||||
data: data,
|
||||
|
||||
Reference in New Issue
Block a user