Compare commits
2
Commits
1a65450134
...
ea1c70e1aa
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ea1c70e1aa | ||
|
|
1011cb9253 |
@@ -66,7 +66,9 @@ public class CulturalSportsBoardServiceImpl implements CulturalSportsBoardServic
|
|||||||
private static final String FITNESS_WALK_SOURCE = "fitnessWalk";
|
private static final String FITNESS_WALK_SOURCE = "fitnessWalk";
|
||||||
private static final int CLOUD_PAGE_SIZE = 100;
|
private static final int CLOUD_PAGE_SIZE = 100;
|
||||||
private static final int CLOUD_AGGREGATE_PAGE_SIZE = 1000;
|
private static final int CLOUD_AGGREGATE_PAGE_SIZE = 1000;
|
||||||
private static final int FITNESS_WALK_ACTIVITY_CACHE_SECONDS = 300;
|
//健身走活动列表缓存
|
||||||
|
private static final int FITNESS_WALK_ACTIVITY_CACHE_SECONDS = 60;
|
||||||
|
//健身走报名统计缓存
|
||||||
private static final int FITNESS_WALK_PARTICIPANT_CACHE_SECONDS = 60;
|
private static final int FITNESS_WALK_PARTICIPANT_CACHE_SECONDS = 60;
|
||||||
private static final String FITNESS_WALK_ACTIVITY_CACHE_KEY = "DataBoard:FitnessWalk:Activities";
|
private static final String FITNESS_WALK_ACTIVITY_CACHE_KEY = "DataBoard:FitnessWalk:Activities";
|
||||||
private static final String FITNESS_WALK_PARTICIPANT_CACHE_PREFIX = "DataBoard:FitnessWalk:Participants:v2:";
|
private static final String FITNESS_WALK_PARTICIPANT_CACHE_PREFIX = "DataBoard:FitnessWalk:Participants:v2:";
|
||||||
|
|||||||
@@ -120,6 +120,45 @@ layout("/layouts/platform.html"){
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
initIntroduceEditor(content) {
|
||||||
|
$("#introduce").html("")
|
||||||
|
const editor = new E("#introduce")
|
||||||
|
editor.config.onchange = (html) => {
|
||||||
|
this.formData.introduce = html.replace(/<p\><\/p>/g, '')
|
||||||
|
}
|
||||||
|
editor.config.customUploadImg = (resultFiles, insertImgFn) => {
|
||||||
|
Promise.all(this.uploadIntroduceImages(resultFiles)).then(res => {
|
||||||
|
res.forEach(v => {
|
||||||
|
if (v.code === 0) {
|
||||||
|
insertImgFn(APP_DOMAIN + CREATE_PREVIEW_URL(v.data.filepath))
|
||||||
|
} else {
|
||||||
|
this.$message.warning(v.msg || '图片上传失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message.warning('图片上传失败')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
editor.config.showLinkImg = true
|
||||||
|
editor.create()
|
||||||
|
if (content) {
|
||||||
|
editor.txt.html(content)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
uploadIntroduceImages(resultFiles) {
|
||||||
|
return resultFiles.map(file => {
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('file', file, file.name)
|
||||||
|
formData.append('folderPath', '/wangEditorImg/')
|
||||||
|
return jQuery.ajax({
|
||||||
|
url: '/file_server/uploadFile',
|
||||||
|
type: 'post',
|
||||||
|
data: formData,
|
||||||
|
processData: false,
|
||||||
|
contentType: false
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
openUserScope() {
|
openUserScope() {
|
||||||
this.userScopeDialog = true
|
this.userScopeDialog = true
|
||||||
},
|
},
|
||||||
@@ -491,23 +530,12 @@ layout("/layouts/platform.html"){
|
|||||||
const type = this.trainTypeList.find(o => o.code === this.formData.trainType)
|
const type = this.trainTypeList.find(o => o.code === this.formData.trainType)
|
||||||
this.trainType = type ? type.name : '培训班'
|
this.trainType = type ? type.name : '培训班'
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
$("#introduce").html("")
|
this.initIntroduceEditor(resp.data.introduce)
|
||||||
var editor = new E("#introduce")
|
|
||||||
editor.config.onchange = (html) => {
|
|
||||||
this.formData.introduce = html.replace(/<p\><\/p>/g, '')
|
|
||||||
}
|
|
||||||
editor.create()
|
|
||||||
editor.txt.html(resp.data.introduce)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
$("#introduce").html("")
|
this.initIntroduceEditor()
|
||||||
var editor = new E("#introduce")
|
|
||||||
editor.config.onchange = (html) => {
|
|
||||||
this.formData.introduce = html.replace(/<p\><\/p>/g, '')
|
|
||||||
}
|
|
||||||
editor.create()
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -684,13 +712,7 @@ layout("/layouts/platform.html"){
|
|||||||
const type = this.trainTypeList.find(o => o.code === this.formData.trainType)
|
const type = this.trainTypeList.find(o => o.code === this.formData.trainType)
|
||||||
this.trainType = type ? type.name : '培训班'
|
this.trainType = type ? type.name : '培训班'
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
$("#introduce").html("")
|
this.initIntroduceEditor(resp.data.introduce)
|
||||||
var editor = new E("#introduce")
|
|
||||||
editor.config.onchange = (html) => {
|
|
||||||
this.formData.introduce = html.replace(/<p\><\/p>/g, '')
|
|
||||||
}
|
|
||||||
editor.create()
|
|
||||||
editor.txt.html(resp.data.introduce)
|
|
||||||
})
|
})
|
||||||
this.formData.id = ''
|
this.formData.id = ''
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user