IP和路径增加了可配置

This commit is contained in:
2026-04-15 17:32:39 +08:00
parent 4b89afed5b
commit 9f2d380897
3 changed files with 16 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
using MoviconHub.App.Com;
using MoviconHub.App.Models;
using System;
using System.Configuration;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -20,7 +21,11 @@ namespace MoviconHub.App.Services
{
//_apiConfig = ApiConfig.LoadConfig();
//string baseUrl = $"http://{_apiConfig.ServerAddress}:{_apiConfig.ServerPort}/";
string baseUrl = $"http://172.16.3.203:8000";
string baseUrl = ConfigurationManager.AppSettings["ApiBaseUrl"];
if (string.IsNullOrWhiteSpace(baseUrl))
{
baseUrl = "http://172.16.3.203:8000";
}
_apiService = new ApiService(baseUrl);
}