刘翔宇-旅管家 3 years ago
parent 430e3ab5be
commit f6c3cf7af9

@ -2,5 +2,5 @@
ENV = 'development' ENV = 'development'
# base api # base api
#VUE_APP_BASE_API = http://yybtest.ali251.langye.net/ VUE_APP_BASE_API = http://yybtest.ali251.langye.net/
VUE_APP_BASE_API = https://yunyubang.ali251.langye.net/ #VUE_APP_BASE_API = https://yunyubang.ali251.langye.net/

@ -73,7 +73,7 @@
<div slot="content" style="display:flex;flex-direction: column"> <div slot="content" style="display:flex;flex-direction: column">
<Button size="small" type="primary" @click="editorClick(scope.row)" style="margin: 0 6px 4px 0">产品编辑</Button> <Button size="small" type="primary" @click="editorClick(scope.row)" style="margin: 0 6px 4px 0">产品编辑</Button>
<Button size="small" type="primary" style="margin: 0 6px 4px 0" @click="comboClick(scope.row)"></Button> <Button size="small" type="primary" style="margin: 0 6px 4px 0" @click="comboClick(scope.row)"></Button>
<Button size="small" type="primary" style="margin: 0 6px 4px 0" @click="picClick(scope.row)"></Button> <Button size="small" type="primary" style="margin: 0 6px 4px 0" @click="picClick(scope.row)"></Button>
</div> </div>
</Poptip> </Poptip>

@ -347,15 +347,14 @@
}, },
pichandleRemove(file, fileList) { pichandleRemove(file, fileList) {
//console.log(file, fileList); //console.log(file, fileList);
this.picfileList = fileList;
}, },
pichandleBeforeRemove(file, fileList) {},
pichandlePreview(file) { pichandlePreview(file) {
console.log(file); console.log(file);
}, },
pichandleSuccess(response, file, fileList) { pichandleSuccess(response, file, fileList) {
this.picfileList.push(response.url) this.picfileList = fileList;
},
pichandleBeforeRemove(file) {
this.picfileList.splice(this.picfileList.indexOf(file.response.id), 1)
}, },
addListCombo() { addListCombo() {
@ -464,11 +463,13 @@
coverPicture: res?.cover_picture, coverPicture: res?.cover_picture,
timeLimit: res?.time_limit?.split(','), timeLimit: res?.time_limit?.split(','),
content: res?.content, content: res?.content,
video: res?.video, video: res?.video,
set_list: [], set_list: [],
picture_list: [] picture_list: []
} }
this.$refs['tinymce'].setContent(this.form.content) this.$refs['tinymce'].setContent(this.form.content);
this.picfileList = this.getPic();
this.set_list = this.getCombo();
}, },
loadMoreClub() { loadMoreClub() {
@ -506,7 +507,11 @@
let list = []; let list = [];
this.picfileList.map(item => {
list.push({
picture: item.response.url,type:0
});
})
let _form = { let _form = {
name: this.form.name, name: this.form.name,
@ -556,8 +561,6 @@
isShow(newVal) { isShow(newVal) {
if (newVal) { if (newVal) {
this.getClubs() this.getClubs()
this.getEquips()
this.getRoomTypes()
if (this.type === 'editor') { if (this.type === 'editor') {
this.getDetail() this.getDetail()

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<xy-dialog :is-show.sync="isShow" title="商户图片" ok-text="" @on-ok="submit"> <xy-dialog :is-show.sync="isShow" title="商户文件" ok-text="" @on-ok="submit">
<el-upload <el-upload
:multiple="true" :multiple="true"
class="upload-demo" class="upload-demo"
@ -13,7 +13,7 @@
:file-list="fileList" :file-list="fileList"
list-type="picture" multiple> list-type="picture" multiple>
<el-button size="small" type="primary">点击上传</el-button> <el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件且不超过2M</div> <div slot="tip" class="el-upload__tip">只能上传jpg/png/mp4文件且不超过10M</div>
</el-upload> </el-upload>
</xy-dialog> </xy-dialog>
</div> </div>
@ -30,7 +30,7 @@ export default {
action:`${process.env.VUE_APP_BASE_API}api/admin/upload-file`, action:`${process.env.VUE_APP_BASE_API}api/admin/upload-file`,
fileList:[], fileList:[],
pics:[],// pics:[],//
} }
}, },
methods: { methods: {
@ -45,10 +45,10 @@ export default {
handleBefore(file){ handleBefore(file){
console.log(file) console.log(file)
if((file.size/1000) > 2048){ if((file.size/1000) > 10240){
Message({ Message({
type:'warning', type:'warning',
message:'上传图片大小超过2M' message:'上传文件/视频大小超过10M'
}) })
return false return false
} }
@ -68,7 +68,7 @@ export default {
destroyPicture({id:file.id}).then(res => { destroyPicture({id:file.id}).then(res => {
Message({ Message({
type:'success', type:'success',
message:'删除图片成功' message:'删除文件成功'
}) })
}).catch(err => { }).catch(err => {
this.getPic() this.getPic()
@ -87,7 +87,7 @@ export default {
})).then(res => { })).then(res => {
Message({ Message({
type:'success', type:'success',
message:`新增${res.length}图片` message:`新增${res.length}文件`
}) })
this.isShow = false this.isShow = false
}).catch(err => { }).catch(err => {

@ -82,7 +82,7 @@
<template v-slot:video> <template v-slot:video>
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label"> <div class="xy-table-item-label">
宣传视频 探店视频
</div> </div>
<div class="xy-table-item-content"> <div class="xy-table-item-content">
<div v-if="form.video" style="position: relative;"> <div v-if="form.video" style="position: relative;">

@ -144,7 +144,7 @@
<template v-slot:videoFile> <template v-slot:videoFile>
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label"> <div class="xy-table-item-label">
宣传视频 探店视频
</div> </div>
<div class="xy-table-item-content"> <div class="xy-table-item-content">
<div v-if="form.videoFile" style="position: relative;"> <div v-if="form.videoFile" style="position: relative;">

@ -13,7 +13,7 @@
:file-list="fileList" :file-list="fileList"
list-type="picture" multiple> list-type="picture" multiple>
<el-button size="small" type="primary">点击上传</el-button> <el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件且不超过2M</div> <div slot="tip" class="el-upload__tip">只能上传jpg/png/mp4文件且不超过10M</div>
</el-upload> </el-upload>
</xy-dialog> </xy-dialog>
</div> </div>
@ -49,10 +49,10 @@ export default {
handleBefore(file){ handleBefore(file){
console.log(file) console.log(file)
if((file.size/1000) > 2048){ if((file.size/1000) > 10240){
Message({ Message({
type:'warning', type:'warning',
message:'上传图片大小超过2M' message:'上传文件大小超过10M'
}) })
return false return false
} }
@ -72,7 +72,7 @@ export default {
destroyPicture({id:file.id}).then(res => { destroyPicture({id:file.id}).then(res => {
Message({ Message({
type:'success', type:'success',
message:'删除图片成功' message:'删除文件成功'
}) })
}).catch(err => { }).catch(err => {
this.getPic() this.getPic()
@ -91,7 +91,7 @@ export default {
})).then(res => { })).then(res => {
Message({ Message({
type:'success', type:'success',
message:`新增${res.length}图片` message:`新增${res.length}文件`
}) })
this.isShow = false this.isShow = false
}).catch(err => { }).catch(err => {

@ -30,7 +30,7 @@
<div slot="content" style="display:flex;flex-direction: column"> <div slot="content" style="display:flex;flex-direction: column">
<Button size="small" type="primary" @click="editorClub(scope.row)" style="margin: 0 6px 4px 0">信息编辑</Button> <Button size="small" type="primary" @click="editorClub(scope.row)" style="margin: 0 6px 4px 0">信息编辑</Button>
<Button size="small" type="primary" @click="showInfo(scope.row)" style="margin: 0 6px 4px 0;">商户简介</Button> <Button size="small" type="primary" @click="showInfo(scope.row)" style="margin: 0 6px 4px 0;">商户简介</Button>
<Button size="small" type="primary" @click="showPic(scope.row)" style="margin: 0 6px 4px 0;">商户图片</Button> <Button size="small" type="primary" @click="showPic(scope.row)" style="margin: 0 6px 4px 0;">商户附件</Button>
</div> </div>
</Poptip> </Poptip>
@ -143,6 +143,7 @@ export default {
console.log(res) console.log(res)
this.list = res.rows this.list = res.rows
this.total = res.total this.total = res.total
}, },
pageChange(e){ pageChange(e){
this.select.page = e this.select.page = e

Loading…
Cancel
Save