Commit 2813f8ea authored by 罗林杰's avatar 罗林杰

修改bug

parent 9dbabdf4
...@@ -81,3 +81,10 @@ export function ossinfoDetail(id) { ...@@ -81,3 +81,10 @@ export function ossinfoDetail(id) {
method: 'get' method: 'get'
}) })
} }
export function uploadLocal(data) {
return request({
url: '/common/fileUploadLocal',
method: 'post',
data
})
}
export const options = { export const options = {
sex: [ sex: [
{ label: '男', value: 1 }, { label: '男', value: 0 },
{ label: '女', value: 0 } { label: '女', value: 1 }
], ],
education: [ education: [
{ label: '大专以下', value: 1 }, { label: '大专以下', value: 1 },
......
...@@ -365,8 +365,9 @@ import { ...@@ -365,8 +365,9 @@ import {
} from '@/api/contentManagement/activity' } from '@/api/contentManagement/activity'
import { VueEditor } from 'vue2-editor' import { VueEditor } from 'vue2-editor'
import { yesOrNo, enableOrDisable } from '@/utils/allPageData' import { yesOrNo, enableOrDisable } from '@/utils/allPageData'
import { uploadPublic } from '@/api/system/ossInfo' import {uploadLocal, uploadPublic} from '@/api/system/ossInfo'
import 'quill/dist/quill.core.css' import 'quill/dist/quill.core.css'
import { getOssUrl } from '@/api/contentManagement/opmArticle'
export default { export default {
components: { components: {
...@@ -539,9 +540,7 @@ export default { ...@@ -539,9 +540,7 @@ export default {
const formData = new FormData() const formData = new FormData()
formData.append('file', file) formData.append('file', file)
formData.append('temp', 'newInformation') formData.append('temp', 'newInformation')
formData.append('bucket', 'cust-91isoft') uploadLocal(formData).then(res => {
uploadPublic(formData).then(res => {
console.log('handleImageAdded', res)
const url = res.data.url const url = res.data.url
Editor.insertEmbed(cursorLocation, 'image', url) Editor.insertEmbed(cursorLocation, 'image', url)
}) })
...@@ -553,7 +552,11 @@ export default { ...@@ -553,7 +552,11 @@ export default {
getCmsActivity(this.$route.query.bussinessId).then(response => { getCmsActivity(this.$route.query.bussinessId).then(response => {
if (response.code === 200) { if (response.code === 200) {
this.form = response.data this.form = response.data
this.imageUrl = response.data.url if (response.data.pictureId !== '' && response.data.pictureId !== null) {
getOssUrl(response.data.pictureId).then(imgRes => {
this.imageUrl = imgRes.data
})
}
} }
}) })
} }
......
...@@ -27,10 +27,10 @@ ...@@ -27,10 +27,10 @@
</el-upload> </el-upload>
<div style="margin-left: 20px"> <div style="margin-left: 20px">
<img v-if="form.pictureUrls != null && form.pictureUrls.length > 0" :src="form.pictureUrls[0]" style="width: 80px;height: 80px" alt=""> <img v-if="form.pictureUrls != null && form.pictureUrls.length > 0" :src="form.pictureUrls[0]" style="width: 80px;height: 80px" alt="">
<img v-if="form.pictureUrls != null && form.pictureUrls.length > 2" :src="form.pictureUrls[2]" style="width: 80px;height: 80px" alt="">
</div>
<div>
<img v-if="form.pictureUrls != null && form.pictureUrls.length > 1" :src="form.pictureUrls[1]" style="width: 80px;height: 80px" alt=""> <img v-if="form.pictureUrls != null && form.pictureUrls.length > 1" :src="form.pictureUrls[1]" style="width: 80px;height: 80px" alt="">
</div>
<div style="margin-left: -30px">
<img v-if="form.pictureUrls != null && form.pictureUrls.length > 2" :src="form.pictureUrls[2]" style="width: 80px;height: 80px" alt="">
<img v-if="form.pictureUrls != null && form.pictureUrls.length > 3" :src="form.pictureUrls[3]" style="width: 80px;height: 80px" alt=""> <img v-if="form.pictureUrls != null && form.pictureUrls.length > 3" :src="form.pictureUrls[3]" style="width: 80px;height: 80px" alt="">
</div> </div>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment