From fbc8b8a3017797ca625669a1b57e5e8fee8c17c0 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期五, 18 四月 2025 17:01:17 +0800
Subject: [PATCH] 委外
---
DevApp/Gs.DevApp/UserControl/ShowFile.cs | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/DevApp/Gs.DevApp/UserControl/ShowFile.cs b/DevApp/Gs.DevApp/UserControl/ShowFile.cs
index 479b224..eefa5e3 100644
--- a/DevApp/Gs.DevApp/UserControl/ShowFile.cs
+++ b/DevApp/Gs.DevApp/UserControl/ShowFile.cs
@@ -1,5 +1,4 @@
-锘縰sing CefSharp;
-using CefSharp.WinForms;
+锘縰sing CefSharp.WinForms;
using System;
using System.Configuration;
using System.IO;
@@ -28,8 +27,9 @@
private void ShowFile_Load(object sender, EventArgs e)
{
- string _h5 = GetFileType(urlPath);
- string _url = WebApiUrl + "upload/" + _h5 + "?filePath=" + urlPath + "&mid=" + Guid.NewGuid().ToString();
+ string filePath = System.Uri.EscapeUriString(urlPath);
+ string fileType = GetFileType(urlPath);
+ string _url = WebApiUrl + "upload/h5/site.html?fileType=" + fileType + "&filePath=" + filePath + "&mid=" + Guid.NewGuid().ToString();
chromeBrowser = new ChromiumWebBrowser(_url);
this.pane1.Controls.Add(chromeBrowser);
chromeBrowser.Dock = DockStyle.Fill;
@@ -47,13 +47,13 @@
case ".jpg":
case ".jpeg":
case ".png":
- return "h5Image.html";
+ return "img";
case ".pdf":
- return "h5Pdf.html";
- // 娣诲姞鍏朵粬鏂囦欢绫诲瀷
- // ...
+ return "pdf";
+ case ".mp4":
+ return "mp4";
default:
- return "h5Other.html";
+ return "other";
}
}
}
--
Gitblit v1.9.3