Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
aserver
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
15所TongWeb
aserver
Commits
d57b1d83
Commit
d57b1d83
authored
Dec 18, 2020
by
陈勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文件不存在时,就不显示图标
parent
6a1b6bf0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
SettingController.java
...ava/com/archser/aserver/controller/SettingController.java
+7
-0
No files found.
src/main/java/com/archser/aserver/controller/SettingController.java
View file @
d57b1d83
...
@@ -122,7 +122,14 @@ public class SettingController extends Controller {
...
@@ -122,7 +122,14 @@ public class SettingController extends Controller {
public
void
logoUrl
()
{
public
void
logoUrl
()
{
String
filePath
=
String
filePath
=
PathKit
.
getRootClassPath
()+
File
.
separator
+
"logo.png"
;
PathKit
.
getRootClassPath
()+
File
.
separator
+
"logo.png"
;
/**chenyong 20201218 文件不存在时,就不显示图标**/
File
file
=
new
File
(
filePath
);
if
(
file
.
exists
())
{
this
.
renderJson
(
Ret
.
ok
(
"logoUrl"
,
ImageToBase64
(
filePath
)));
this
.
renderJson
(
Ret
.
ok
(
"logoUrl"
,
ImageToBase64
(
filePath
)));
}
else
{
this
.
renderJson
(
Ret
.
fail
(
"logoUrl"
,
ImageToBase64
(
""
)));
}
}
}
private
static
String
ImageToBase64
(
String
imgPath
)
{
private
static
String
ImageToBase64
(
String
imgPath
)
{
...
...
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