using System.Application.Services.CloudService; namespace System.Application { public static class ImageUrlHelper { static string ApiBaseUrl { get { var client = DI.Get(); return client.ApiBaseUrl; } } /// /// 获取图片的APIURL(相对路径) /// const string GetImageApiUrl = "{1}/api/images/{0}"; /// /// 根据图片Id获取APIURL(绝对路径) /// /// /// public static string GetImageApiUrlById(Guid imageId) => string.Format(GetImageApiUrl, imageId, ApiBaseUrl); } }