静态化
This commit is contained in:
parent
e6d1840763
commit
4c05f02b9f
|
@ -213,7 +213,10 @@ public class CmsParserUtil extends ParserUtil {
|
||||||
// 文章的模板路径
|
// 文章的模板路径
|
||||||
String columnUrl = articleIdList.get(artId).getCategoryUrl();
|
String columnUrl = articleIdList.get(artId).getCategoryUrl();
|
||||||
// 文章的栏目模型编号
|
// 文章的栏目模型编号
|
||||||
String columnContentModelId = articleIdList.get(artId).getMdiyModelId();
|
String columnContentModelId = "";
|
||||||
|
if(StringUtils.isNotBlank(articleIdList.get(artId).getMdiyModelId()) && Integer.parseInt(articleIdList.get(artId).getMdiyModelId())>0){
|
||||||
|
columnContentModelId = articleIdList.get(artId).getMdiyModelId();
|
||||||
|
}
|
||||||
// 文章是否已经生成了,生成了就跳过
|
// 文章是否已经生成了,生成了就跳过
|
||||||
if (generateIds.contains(articleId)) {
|
if (generateIds.contains(articleId)) {
|
||||||
artId++;
|
artId++;
|
||||||
|
|
|
@ -17,11 +17,11 @@
|
||||||
:closable="false"
|
:closable="false"
|
||||||
show-icon>
|
show-icon>
|
||||||
更新主页,如果系统存在引导页面可以手动修改主页位置文件名,default.html引导页面index.html主页。<br/>
|
更新主页,如果系统存在引导页面可以手动修改主页位置文件名,default.html引导页面index.html主页。<br/>
|
||||||
更新栏目列表,推荐使用指定栏目更新。系统提示“更新中...”请不要刷新页面或点击其他菜单。<br/>
|
更新栏目列表,推荐使用指定栏目更新。系统提示“更新中”请不要刷新页面或点击其他菜单。<br/>
|
||||||
根据时间与栏目类型生成文章
|
根据时间与栏目类型生成文章
|
||||||
</el-alert>
|
</el-alert>
|
||||||
</div>
|
</div>
|
||||||
<el-form ref="form" label-width="90px" size="mini" v-loading="loading">
|
<el-form ref="form" label-width="100px" size="mini">
|
||||||
<div class="class-2" >
|
<div class="class-2" >
|
||||||
<div class="class-3" >
|
<div class="class-3" >
|
||||||
<div class="class-4" >
|
<div class="class-4" >
|
||||||
|
@ -37,10 +37,10 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="class-7" >
|
<div class="class-7" >
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<template slot='label'>
|
<template slot='label'>主页位置
|
||||||
<el-popover slot="label" placement="top-start" title="提示" width="200" trigger="hover" content="主页位置htm文件名一般为index.html或default.html">
|
<el-popover slot="label" placement="top-start" title="提示" width="200" trigger="hover" content="主页位置htm文件名一般为index.html或default.html">
|
||||||
<i class="el-icon-question" slot="reference"></i>
|
<i class="el-icon-question" slot="reference"></i>
|
||||||
</el-popover>主页位置
|
</el-popover>
|
||||||
</template>
|
</template>
|
||||||
<el-input v-model="position"
|
<el-input v-model="position"
|
||||||
:disabled="false"
|
:disabled="false"
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="class-10" >
|
<div class="class-10" >
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="updataIndex">生成主页</el-button>
|
<el-button type="primary" @click="updataIndex" :loading="homeLoading">{{homeLoading?'更新中':'生成主页'}}</el-button>
|
||||||
<el-button plain @click="viewIndex">预览主页</el-button>
|
<el-button plain @click="viewIndex">预览主页</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
|
@ -69,10 +69,10 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="class-17" >
|
<div class="class-17" >
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<template slot='label'>
|
<template slot='label'>指定时间
|
||||||
<el-popover slot="label" placement="top-start" title="提示" width="200" trigger="hover" content="指定时间需要小于生成文章的发布时间">
|
<el-popover slot="label" placement="top-start" title="提示" width="200" trigger="hover" content="指定时间需要小于生成文章的发布时间">
|
||||||
<i class="el-icon-question" slot="reference"></i>
|
<i class="el-icon-question" slot="reference"></i>
|
||||||
</el-popover>指定时间
|
</el-popover>
|
||||||
</template>
|
</template>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="time"
|
v-model="time"
|
||||||
|
@ -92,7 +92,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="class-20" >
|
<div class="class-20" >
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="updateArticle">生成文章</el-button>
|
<el-button type="primary" @click="updateArticle" :loading="articleLoading">{{articleLoading?'更新中':'生成文章'}}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -109,7 +109,7 @@
|
||||||
|
|
||||||
<div class="class-30" >
|
<div class="class-30" >
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="updateColumn">生成栏目</el-button>
|
<el-button type="primary" @click="updateColumn" :loading="columnLoading">{{columnLoading?'更新中':'生成栏目'}}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -125,7 +125,9 @@
|
||||||
|
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
loading:false,
|
homeLoading:false,
|
||||||
|
articleLoading:false,
|
||||||
|
columnLoading:false,
|
||||||
template:'index.htm',//主题模板
|
template:'index.htm',//主题模板
|
||||||
templateOptions:[],
|
templateOptions:[],
|
||||||
position:'index', //位置
|
position:'index', //位置
|
||||||
|
@ -146,7 +148,7 @@
|
||||||
this.$notify({ title: '请输入主页位置!', type: 'warning' });
|
this.$notify({ title: '请输入主页位置!', type: 'warning' });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
that.loading = true;
|
that.homeLoading = true;
|
||||||
ms.http.post(ms.manager+'/cms/generate//generateIndex.do', {url:that.template,position:that.position}).then(function (data) {
|
ms.http.post(ms.manager+'/cms/generate//generateIndex.do', {url:that.template,position:that.position}).then(function (data) {
|
||||||
if(data.result){
|
if(data.result){
|
||||||
that.$notify({ title: '更新成功!', type: 'success' });
|
that.$notify({ title: '更新成功!', type: 'success' });
|
||||||
|
@ -155,7 +157,7 @@
|
||||||
that.$notify({ title: '更新失败!',message: err, type: 'error' });
|
that.$notify({ title: '更新失败!',message: err, type: 'error' });
|
||||||
console.log(err);
|
console.log(err);
|
||||||
}).finally(()=>{
|
}).finally(()=>{
|
||||||
that.loading = false;
|
that.homeLoading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//预览主页
|
//预览主页
|
||||||
|
@ -169,7 +171,7 @@
|
||||||
//更新栏目
|
//更新栏目
|
||||||
updateColumn(){
|
updateColumn(){
|
||||||
var that = this;
|
var that = this;
|
||||||
that.loading = true;
|
that.columnLoading = true;
|
||||||
ms.http.get(ms.manager+'/cms/generate/'+(that.section?that.section:0)+'/genernateColumn.do').then(function (data) {
|
ms.http.get(ms.manager+'/cms/generate/'+(that.section?that.section:0)+'/genernateColumn.do').then(function (data) {
|
||||||
if(data.result){
|
if(data.result){
|
||||||
that.$notify({ title: '更新成功!', type: 'success' });
|
that.$notify({ title: '更新成功!', type: 'success' });
|
||||||
|
@ -178,13 +180,13 @@
|
||||||
that.$notify({ title: '更新失败!',message: err, type: 'error' });
|
that.$notify({ title: '更新失败!',message: err, type: 'error' });
|
||||||
console.log(err);
|
console.log(err);
|
||||||
}).finally(()=>{
|
}).finally(()=>{
|
||||||
that.loading = false;
|
that.columnLoading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//生成文章栏目
|
//生成文章栏目
|
||||||
updateArticle(){
|
updateArticle(){
|
||||||
var that = this;
|
var that = this;
|
||||||
that.loading = true;
|
that.articleLoading = true;
|
||||||
ms.http.post(ms.manager+'/cms/generate/'+(that.contentSection?that.contentSection:0)+'/generateArticle.do', {dateTime:that.time}).then(function (data) {
|
ms.http.post(ms.manager+'/cms/generate/'+(that.contentSection?that.contentSection:0)+'/generateArticle.do', {dateTime:that.time}).then(function (data) {
|
||||||
if(data.result){
|
if(data.result){
|
||||||
that.$notify({ title: '更新成功!', type: 'success' });
|
that.$notify({ title: '更新成功!', type: 'success' });
|
||||||
|
@ -193,7 +195,7 @@
|
||||||
that.$notify({ title: '更新失败!',message: err, type: 'error' });
|
that.$notify({ title: '更新失败!',message: err, type: 'error' });
|
||||||
console.log(err);
|
console.log(err);
|
||||||
}).finally(()=>{
|
}).finally(()=>{
|
||||||
that.loading = false;
|
that.articleLoading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//获取主题模板数据源
|
//获取主题模板数据源
|
||||||
|
|
Loading…
Reference in New Issue