Commit 20eadeeb authored by 潘梓豪's avatar 潘梓豪

提交修改

parent d96d600b
......@@ -189,25 +189,27 @@ public class DownloadUntily : MonoBehaviour
public IEnumerator PutOss(string base64,string localFilename)
{
while (!browser)
{
browser = WelBorews.browser;
}
/* while (!browser)
{
browser = WelBorews.browser;
}
// 填写Object完整路径,完整路径中不能包含Bucket名称,例如exampledir/exampleobject.txt。
// 填写Object完整路径,完整路径中不能包含Bucket名称,例如exampledir/exampleobject.txt。
// 上传文件
var obj = client.PutObject(Setting.bucketName, "image/" + localFilename, Base64StringToFile(base64, localFilename));
// 上传文件
var obj = client.PutObject(Setting.bucketName, "image/" + localFilename, Base64StringToFile(base64, localFilename));
var url = client.GeneratePresignedUri(Setting.bucketName, "image/"+localFilename).ToString();
Debug.Log(url);
browser.CallFunction("save_userimg", url);*/
Base64StringToFile(base64, localFilename);
var url = client.GeneratePresignedUri(Setting.bucketName + "/image", localFilename).ToString();
Debug.Log(url);
browser.CallFunction("save_userimg", url);
yield return 0;
}
/// <summary>
/// Base64字符串转文件并保存
/// Base64字符串转文件并保存
/// </summary>
/// <param name="base64String">base64字符串</param>
/// <param name="fileName">保存的文件名</param>
......@@ -215,10 +217,10 @@ public class DownloadUntily : MonoBehaviour
public string Base64StringToFile(string base64String, string fileName)
{
string strDate = DateTime.Now.ToString("yyyyMMdd");
string fileFullPath = Setting.BaseUrl + "\\uploadFile\\" + strDate;//文件保存路径
fileName = "avatar-2.jpg";
string fileFullPath = Setting.BaseUrl + "\\BrowserAssets\\Appzia\\dist\\assets\\images\\users";//文件保存路径
try
{
{
if (!Directory.Exists(fileFullPath))
{
Directory.CreateDirectory(fileFullPath);
......
......@@ -15,6 +15,8 @@ public class ProgressUntily : MonoBehaviour
process.StartInfo.UseShellExecute = false;
process.StartInfo.FileName = path;
process.StartInfo.CreateNoWindow = true;
process.StartInfo.RedirectStandardInput = true;
process.StartInfo.RedirectStandardOutput = true;
process.Start();
}catch(Exception e)
{
......
......@@ -18,7 +18,7 @@ public class WelBorews : MonoBehaviour
RequestMethod requestMethod = new RequestMethod();
public static Browser browser;
private string token;
DownloadUntily downloadUntily;
......@@ -129,12 +129,12 @@ public class WelBorews : MonoBehaviour
//获取目录
//string jsonpath= System.IO.Path.GetDirectoryName(path)+ "\\ReqData.json";
//传入参数token和产品id
string json = "{\"token\":\"" + token + "\",\"productionid\":\"" + id + "\"}";
string json = "{\"token\":\"" + token + "\",\"productionid\":\"" + id + "\",\"filepath\":\"" + path.Substring(0,path.LastIndexOf("/")) + "\"}";
//File.WriteAllText(jsonpath, json);
//项目路径再生成一个数据配置文件
File.WriteAllText("ReqData.json", json);
//先判断文件是否存在
if (System.IO.File.Exists("ReqData.json"))
{
......
......@@ -726,7 +726,7 @@
<div class="row">
<div class="col-md-6">
<div class="mt-4 mt-md-0">
<img class="rounded-circle avatar-xl userprofe" alt="200x200" src="assets/images/users/avatar-4.jpg" data-holder-rendered="true">
<img class="rounded-circle avatar-xl userprofe" alt="200x200" src="assets/images/users/avatar-2.jpg" data-holder-rendered="true">
</div>
</div>
<div class="col-12">
......
......@@ -728,7 +728,7 @@
<div class="row">
<div class="col-md-6">
<div class="mt-4 mt-md-0">
<img class="rounded-circle avatar-xl userprofe" alt="200x200" src="" data-name="" data-holder-rendered="true">
<img class="rounded-circle avatar-xl userprofe" alt="200x200" src="assets/images/users/avatar-2.jpg" data-name="" data-holder-rendered="true">
</div>
</div>
<div class="col-12">
......
{"App":{"Title":"转向架智能制造二期数字孪生系统","WebUrl":"http://192.168.70.2:8080","IsSim":false},"Data":{"ServerIP":"http://218.75.205.85:8082","IntervalSecond":5000.0,"StartSecond":1000.0,"RobotSecond":1000.0,"IsRequests":["Y","Y","Y","Y","Y","Y","Y"]},"IP":"http://127.0.0.1:80/zeushub"}
\ No newline at end of file
{"App":{"Title":"转向架智能制造二期数字孪生系统","WebUrl":"http://192.168.70.2:8080","IsSim":false},"Data":{"ServerIP":"http://218.75.205.85:8082","IntervalSecond":5000.0,"StartSecond":1000.0,"RobotSecond":1000.0,"IsRequests":["Y","Y","Y","Y","Y","Y","Y"]}}
\ No newline at end of file
......@@ -7081,3 +7081,7 @@
2022/7/27 17:49:54 api:http://127.0.0.1:80/zeushub/zeus/sms/register?_format=json HTTP/1.1 500 Internal Server Error
2022/7/30 8:34:31 api:http://192.168.199.127:11011/oauth/token HTTP/1.1 401 Unauthorized
2022/7/30 8:36:53 api:http://192.168.199.127:11011/oauth/token HTTP/1.1 401 Unauthorized
2022/8/8 8:25:55 api:http://192.168.199.127:11011/oauth/token Cannot connect to destination host
2022/8/8 8:51:04 api:http://192.168.199.127:11011/oauth/token Cannot connect to destination host
2022/8/8 8:54:30 api:http://192.168.199.127:11011/oauth/token Cannot connect to destination host
2022/8/8 15:30:56 api:http://192.168.199.127:11011/oauth/token Cannot connect to destination host
{"token":"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImI4NzIzMGU3YWIzMmRiYTE3MWQyNzkxZmU1ZWMyODJkYmFlM2VjMGY0NTc2NDZjYmY3NzNjNWFmMDFhNzA2N2QyY2I4YjU2NTQ2MTE0ZmIzIn0.eyJhdWQiOiIyYmM1ZjE1Zi0wNzE3LTQ4ZjktYTc4Mi03NzQ5M2FjNDUwODQiLCJqdGkiOiJiODcyMzBlN2FiMzJkYmExNzFkMjc5MWZlNWVjMjgyZGJhZTNlYzBmNDU3NjQ2Y2JmNzczYzVhZjAxYTcwNjdkMmNiOGI1NjU0NjExNGZiMyIsImlhdCI6MTY1OTk1MjIwMCwibmJmIjoxNjU5OTUyMjAwLCJleHAiOjE2NjAyNTIyMDAsInN1YiI6Ijc1MyIsInNjb3BlcyI6WyJhdXRoZW50aWNhdGVkIl19.ne3klMfI-pn1wtApe0kgESFDdO6jIyPX7FQpJyQKc4ZonjZuFQH6A7GuUUhF0yIrsVBBwE9vO4guLO0SZq8FfxyaBnSd5I_ZSTLlMkPKwPUIm6t0UvL2_Oyqx26vAmyVLxq7PobvA4kWYb9D6wGfcIECxw79HEwUMO9OIWAs6Y1MXbIgQtY8FqIimyxDWEh1e5u9wJ2zG_AM05sDIIJRu2t-9eVIHgQDhO7ocSUxLCPA1PkGPBjnwDdjZFvYH27Lpay6Ozxh-CM1HnsCtaBTRDmG36OKXWMuttTIekVq6-c7z5SOw_kq-7s4kpSHLS7D9OwoLbWACN-P5lDMUc3NavRfx6lVIzZ-nGQQYRTOTuKnkikKKeCbC_opscYg1_zwjoA8L84nL_LpzK0UwLtABxVwiESKhKur0Wf9pddOJybv_Ws1Zt7FiFWavFe8rmgJ1U6i75N52W0t8XJIOlwtGbBXgXBbrZTtfOtrODbW0A7W1iltMw1MUTKUn-OuOYqDXKslBYGuY4YF6MwFsnl6R8GFG08HIoPLYF38jDr2YdXi5KGjk-JYdYLnPlg4GN3cnYi2vfUURWHRwJdzx9KBGIOcDqeNNDeOXcRX6f7TfY7-EZ-uCqHuJ2zeZFzDOhOodTXdGCaj9bNiTHLf5jUIdXFnGSHQMOpY06quTf4xdyc","productionid":"12679","filepath":"D://DownloadDemo/HUBDemo1"}
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment