浏览代码

整合Bing图片模型

yuzhengyang 6 年之前
父节点
当前提交
45f5ceba55

+ 1 - 0
Azylee.Utils/Azylee.YeahWeb/Azylee.YeahWeb.csproj

@@ -54,6 +54,7 @@
     <Compile Include="BaiDuWebAPI\IPLocationAPI\IPLocationTool.cs" />
     <Compile Include="EmailUtils\EmailTool.cs" />
     <Compile Include="ExtWebAPI\BingWebAPI\WallpaperUtils\WallpaperModel.cs" />
+    <Compile Include="ExtWebAPI\BingWebAPI\WallpaperUtils\WallpaperWebModel.cs" />
     <Compile Include="ExtWebAPI\BingWebAPI\WallpaperUtils\WallpaperTool.cs" />
     <Compile Include="FTPUtils\FTPTool.cs" />
     <Compile Include="HttpUtils\MethodUtils\ExtendUtils\HeaderTool.cs" />

+ 12 - 0
Azylee.Utils/Azylee.YeahWeb/ExtWebAPI/BingWebAPI/WallpaperUtils/WallpaperModel2.cs

@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Azylee.YeahWeb.ExtWebAPI.BingWebAPI.WallpaperUtils
+{
+    public class WallpaperModel
+    {
+        public string  Name { get; set; }
+    }
+}

+ 5 - 5
Azylee.Utils/Azylee.YeahWeb/ExtWebAPI/BingWebAPI/WallpaperUtils/WallpaperTool.cs

@@ -23,7 +23,7 @@ namespace Azylee.YeahWeb.ExtWebAPI.BingWebAPI.WallpaperUtils
         /// 获取今天的壁纸
         /// </summary>
         /// <returns></returns>
-        public static WallpaperModel GetToday()
+        public static WallpaperWebModel GetToday()
         {
             return GetSomeday(0);
         }
@@ -31,7 +31,7 @@ namespace Azylee.YeahWeb.ExtWebAPI.BingWebAPI.WallpaperUtils
         /// 获取昨天的壁纸
         /// </summary>
         /// <returns></returns>
-        public static WallpaperModel GetYesterday()
+        public static WallpaperWebModel GetYesterday()
         {
             return GetSomeday(1);
         }
@@ -40,13 +40,13 @@ namespace Azylee.YeahWeb.ExtWebAPI.BingWebAPI.WallpaperUtils
         /// </summary>
         /// <param name="day"></param>
         /// <returns></returns>
-        public static WallpaperModel GetSomeday(int day)
+        public static WallpaperWebModel GetSomeday(int day)
         {
-            WallpaperModel model = null;
+            WallpaperWebModel model = null;
             try
             {
                 string rs = HttpTool.Get(string.Format(URL, day));
-                model = Json.String2Object<WallpaperModel>(rs);
+                model = Json.String2Object<WallpaperWebModel>(rs);
                 return model;
             }
             catch (Exception e) { return null; }