Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
cms_sys
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
西魏
cms_sys
Commits
b5ba1bf1
Commit
b5ba1bf1
authored
Sep 29, 2019
by
sgjj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自定义文件夹
parent
1a1dd38d
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
7 deletions
+7
-7
ArticleAction.java
src/main/java/net/mingsoft/cms/action/ArticleAction.java
+1
-0
ColumnAction.java
src/main/java/net/mingsoft/cms/action/ColumnAction.java
+3
-0
WebConfig.java
src/main/java/net/mingsoft/config/WebConfig.java
+2
-2
application.yml
src/main/resources/application.yml
+0
-4
article_form.ftl
src/main/webapp/WEB-INF/manager/cms/article/article_form.ftl
+1
-1
No files found.
src/main/java/net/mingsoft/cms/action/ArticleAction.java
View file @
b5ba1bf1
...
...
@@ -535,6 +535,7 @@ public class ArticleAction extends BaseAction {
}
model
.
addAttribute
(
"columnType"
,
columnType
);
model
.
addAttribute
(
"categoryId"
,
column
.
getCategoryId
());
// 编辑封面
model
.
addAttribute
(
"websiteId"
,
BasicUtil
.
getAppId
());
return
"/cms/article/article_form"
;
}
else
{
// 非法
// return "/cms/article/article_form");
...
...
src/main/java/net/mingsoft/cms/action/ColumnAction.java
View file @
b5ba1bf1
...
...
@@ -93,6 +93,8 @@ public class ColumnAction extends BaseAction{
model
.
addAttribute
(
"column"
,
new
ColumnEntity
());
model
.
addAttribute
(
"listColumn"
,
JSONArray
.
toJSONString
(
list
));
model
.
addAttribute
(
"model"
,
"cms"
);
model
.
addAttribute
(
"websiteId"
,
appId
);
return
"/basic/column/form"
;
}
...
...
@@ -216,6 +218,7 @@ public class ColumnAction extends BaseAction{
model
.
addAttribute
(
"columnSuper"
,
columnSuper
);
model
.
addAttribute
(
"listColumn"
,
JSONArray
.
toJSONString
(
list
));
model
.
addAttribute
(
"model"
,
"cms"
);
model
.
addAttribute
(
"websiteId"
,
appId
);
return
"/basic/column/form"
;
}
...
...
src/main/java/net/mingsoft/config/WebConfig.java
View file @
b5ba1bf1
...
...
@@ -72,9 +72,9 @@ public class WebConfig implements WebMvcConfigurer {
registry
.
addResourceHandler
(
"/app/**"
).
addResourceLocations
(
"/app/"
,
"file:app/"
,
"classpath:/app/"
);
registry
.
addResourceHandler
(
"/static/**"
,
"/**"
).
addResourceLocations
(
"/static/"
,
"file:static/"
,
"classpath:/static/"
);
registry
.
addResourceHandler
(
"/api/**"
).
addResourceLocations
(
"/api/"
,
"file:api/"
,
"classpath:/api/"
);
if
(
uploadFloderPath
.
startsWith
(
"file:"
)){
if
(
new
File
(
uploadFloderPath
).
isAbsolute
(
)){
//如果指定了绝对路径,上传的文件都映射到uploadMapping下
registry
.
addResourceHandler
(
uploadMapping
).
addResourceLocations
(
uploadFloderPath
+
File
.
separator
registry
.
addResourceHandler
(
uploadMapping
).
addResourceLocations
(
"file:"
+
uploadFloderPath
+
File
.
separator
//映射其他路径文件
//,file:F://images
);
...
...
src/main/resources/application.yml
View file @
b5ba1bf1
...
...
@@ -15,12 +15,8 @@ ms:
path
:
/upload
mapping
:
/upload/**
denied
:
.exe,.jsp
allowed
:
jpg
max-size
:
1
memory-size
:
4096
spring
:
http.multipart.enabled
:
false
profiles
:
active
:
dev
mvc
:
...
...
src/main/webapp/WEB-INF/manager/cms/article/article_form.ftl
View file @
b5ba1bf1
...
...
@@ -18,7 +18,7 @@
listKey="id" listValue="value" label="是否显示" help="选择否后前端将不显示,需要重新生成才有效果"
/>
<@ms.formRow colSm="2" label="文章缩略图" width="400" >
<@ms.uploadImg path="
article" uploadFloderPath="${articleImagesUrl?default('')}
" inputName="basicThumbnails" size="1" msg="提示:文章缩略图,支持jpg格式" imgs="${article.basicThumbnails?default('')}" />
<@ms.uploadImg path="
${websiteId}/article
" inputName="basicThumbnails" size="1" msg="提示:文章缩略图,支持jpg格式" imgs="${article.basicThumbnails?default('')}" />
</@ms.formRow>
<@ms.text name="articleSource" colSm="2" width="200" label="文章来源" title="文章来源" size="5" placeholder="请输入文章来源" value="${article.articleSource?default('')}" validation={"maxlength":"300", "data-bv-stringlength-message":"文章来源在300个字符以内!"} />
<@ms.text name="articleAuthor" colSm="2" width="200" label="文章作者" title="文章作者" size="5" placeholder="请输入文章作者" value="${article.articleAuthor?default('')}" validation={"maxlength":"12", "data-bv-stringlength-message":"文章作者在12个字符以内!"} />
...
...
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