Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
Z
ZeusHub_Unity
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
潘梓豪
ZeusHub_Unity
Commits
20eadeeb
Commit
20eadeeb
authored
Aug 09, 2022
by
潘梓豪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交修改
parent
d96d600b
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
30 additions
and
21 deletions
+30
-21
DownloadUntily.cs
Assets/Scripts/unit/DownloadUntily.cs
+17
-15
ProgressUntily.cs
Assets/Scripts/unit/ProgressUntily.cs
+2
-0
WelBorews.cs
Assets/Scripts/unit/WelBorews.cs
+3
-3
avatar-2.jpg
BrowserAssets/Appzia/dist/assets/images/users/avatar-2.jpg
+0
-0
index.html
BrowserAssets/Appzia/dist/index.html
+1
-1
index2.html
BrowserAssets/Appzia/dist/index2.html
+1
-1
Config.json
Config.json
+1
-1
log.txt
Log/log.txt
+4
-0
ReqData.json
ReqData.json
+1
-0
Default.jpg
uploadFile/20220808/Default.jpg
+0
-0
No files found.
Assets/Scripts/unit/DownloadUntily.cs
View file @
20eadeeb
...
...
@@ -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
);
...
...
Assets/Scripts/unit/ProgressUntily.cs
View file @
20eadeeb
...
...
@@ -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
)
{
...
...
Assets/Scripts/unit/WelBorews.cs
View file @
20eadeeb
...
...
@@ -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"
))
{
...
...
BrowserAssets/Appzia/dist/assets/images/users/avatar-2.jpg
View replaced file @
d96d600b
View file @
20eadeeb
This diff is collapsed.
Click to expand it.
BrowserAssets/Appzia/dist/index.html
View file @
20eadeeb
...
...
@@ -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"
>
...
...
BrowserAssets/Appzia/dist/index2.html
View file @
20eadeeb
...
...
@@ -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"
>
...
...
Config.json
View file @
20eadeeb
{
"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
Log/log.txt
View file @
20eadeeb
...
...
@@ -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
ReqData.json
0 → 100644
View file @
20eadeeb
{
"token"
:
"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6Im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OodTXdGCaj9bNiTHLf5jUIdXFnGSHQMOpY06quTf4xdyc"
,
"productionid"
:
"12679"
,
"filepath"
:
"D://DownloadDemo/HUBDemo1"
}
\ No newline at end of file
uploadFile/20220808/Default.jpg
0 → 100644
View file @
20eadeeb
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment