From efad979b6fae76fb37a4de7e94e6bac0a85cb72c Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期二, 30 十一月 2021 13:14:28 +0800 Subject: [PATCH] 2021-11-30 1.修复乐橙Android,没调用拒接接口问题。 --- HDL_ON/Common/ImageUtlis.cs | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 53 insertions(+), 0 deletions(-) diff --git a/HDL_ON/Common/ImageUtlis.cs b/HDL_ON/Common/ImageUtlis.cs old mode 100755 new mode 100644 index f2b6cca..918483d --- a/HDL_ON/Common/ImageUtlis.cs +++ b/HDL_ON/Common/ImageUtlis.cs @@ -2,6 +2,7 @@ using Shared; using HDL_ON.DAL.Server; using System.IO; +using HDL_ON.Common; namespace HDL_ON { @@ -352,6 +353,58 @@ } } + + + /// <summary> + /// 2021-01-28 + /// 鍔犺浇绗笁鏂瑰搧鐗宨con + /// </summary> + /// <param name="imageKey">鍥剧墖璺緞銆佷簯绔笅杞藉浘鐗囩殑鏍囪瘑key</param> + /// <param name="imageView">闇�瑕佹樉绀哄浘鐗囩殑ImageView</param> + /// <param name="ignoreCache">鏄惁闇�瑕佸拷鐣ョ紦瀛�</param> + public void Load3tyBrandIconImages(string brandName, string imageKey, ImageView imageView) + { + try + { + System.Threading.Tasks.Task.Run(() => + { + //byte[] imageBytes = GetImageDownloadUrl(imageKey); + //if (imageBytes != null) + //{ + // WriteFileByBytes(imageKey, imageBytes); + // //2.3 涓嬭浇鎴愬姛锛屾樉绀哄苟缂撳瓨鏈湴 + // Application.RunOnMainThread(() => { + // if (imageView != null) + // { + // imageView.ImageBytes = imageBytes; + // //Utlis.WriteLine("imageKey 鍔犺浇浜戠涓嬭浇鍥剧墖鎴愬姛"); + // } + // }); + //} + + //var ddd = new Common.DownLoadImageAsync(imageKey,"1","1"); + //ddd.StartDownloadImageAsync(); + + Action action = () => { + Application.RunOnMainThread(() => + { + imageView.ImagePath = $"{brandName}.png"; + }); + }; + FileUtlis.Files.DownLoadImage($"{brandName}.png", imageKey, action); + + }); + } + catch (Exception ex) + { + Utlis.WriteLine("imageKey 鍔犺浇鍥剧墖寮傚父 catch"); + } + finally + { + } + } + + // /// <summary> ///// 鑾峰彇鎷兼帴鐢ㄦ埛澶村儚鐨処mageKey瑙勫垯 ///// </summary> -- Gitblit v1.8.0