Compare commits

..

2 Commits

Author SHA1 Message Date
lpf 9d5e0d0ed4 Merge branch 'master' of http://47.104.102.122:3000/panhf/CNCEC_SUBQHSE_WUHUAN 2024-11-20 18:48:54 +08:00
lpf b8941a01d7 在线文档编辑修改 2024-11-20 18:48:45 +08:00
4 changed files with 95 additions and 70 deletions
Binary file not shown.
+20
View File
@@ -10,6 +10,7 @@ namespace BLL
using System.Linq;
using System.Net;
using System.Reflection;
using System.Security.Cryptography;
using System.Text;
/// <summary>
@@ -1281,6 +1282,25 @@ namespace BLL
IRestResponse response = client.Execute(request);
return response.Content;
}
public static string GetMD5(string str)
{
using (MD5 md5 = MD5.Create())
{
// 将输入字符串转换为字节数组并计算哈希值
byte[] inputBytes = Encoding.ASCII.GetBytes(str);
byte[] hashBytes = md5.ComputeHash(inputBytes);
// 将字节数组转换为十六进制字符串
StringBuilder sb = new StringBuilder();
for (int i = 0; i < hashBytes.Length; i++)
{
sb.Append(hashBytes[i].ToString("X2"));
}
return sb.ToString();
}
}
}
}
@@ -1,4 +1,5 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OnlineEditingPrivate.aspx.cs" Inherits="FineUIPro.Web.AttachFile.OnlineEditingPrivate" %>
<%@ Import Namespace="BLL" %>
<!DOCTYPE html>
@@ -159,7 +160,8 @@
}
};
// var urlString = "https://cloud.e-iceblue.cn/demo/sample.docx";
var urlString = "<%=BLL.Funs.SGGLUrl%>" + "<%=PCUrl%>";
<%-- //var urlString = "<%=BLL.Funs.SGGLUrl%>" + "<%=PCUrl%>";--%>
var urlString = "<%=urlString%>";
var arrfn = urlString.split(".");
var strp = arrfn[arrfn.length - 1];
@@ -201,7 +203,7 @@
fileInfo: {
name: '',
ext: '',
primary: urlString,
primary: '<%=urlStringMD5%>',
creator: '',
createTime: new Date('20210505')
},
@@ -60,6 +60,8 @@ namespace FineUIPro.Web.AttachFile
ViewState["editorMode"] = value;
}
}
public string urlString = String.Empty;
public string urlStringMD5 = String.Empty;
#endregion
protected void Page_Load(object sender, EventArgs e)
@@ -72,7 +74,8 @@ namespace FineUIPro.Web.AttachFile
PCUrl = Request.Params["fileUrl"];
editorMode = Request.Params["editorMode"];
urlString = Funs.SGGLUrl + PCUrl;
urlStringMD5 = Funs.GetMD5(urlString);
}
}
}