009_DI-Elec/newFront/c#前端/SWS.Service/ProjectSettingsService.cs
2025-09-02 11:27:57 +08:00

44 lines
1.1 KiB
C#

using System.Collections.Generic;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
using SWS.Commons;
using SWS.Model;
namespace SWS.Service
{
public class ProjectSettingsService : HttpService
{
public ProjectSettingsService() : base()
{
}
public async Task<List<ec_projectSettings>> GetList()
{
var res = await this.GetAsync<List<ec_projectSettings>>($"SettingsApi/GetList?projId={GlobalObject.curProject.ProjectId}");
if (res.code == 200)
{
return res.data;
}
else
{
}
return null;
}
public async Task<ec_projectSettings> GetEntity(string settingName)
{
var res = await this.GetAsync<ec_projectSettings>($"SettingsApi/GetEntity?settingName={settingName}&projId={GlobalObject.curProject.ProjectId}");
if (res.code == 200)
{
return res.data;
}
else
{
}
return null;
}
}
}