Commit dbfde54e by 王志慧

commit

1 parent 7dde2753
...@@ -73,17 +73,20 @@ export default { ...@@ -73,17 +73,20 @@ export default {
picOptions: { picOptions: {
width: '104px', width: '104px',
height: '104px', height: '104px',
key: 'channelImg' key: 'channelImg',
isClose: true
}, },
shareOptions: { shareOptions: {
width: '120px', width: '120px',
height: '90px', height: '90px',
key: 'publicityImg' key: 'publicityImg',
isClose: true
}, },
posterOptions: { posterOptions: {
width: '104px', width: '104px',
height: '104px', height: '104px',
key: 'posterImg' key: 'posterImg',
isClose: true
}, },
rules: { rules: {
channelName: [ channelName: [
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
<div class="text-tip">建议尺寸:184*230</div> <div class="text-tip">建议尺寸:184*230</div>
<el-form-item label="页面路径:" prop="pagePathContent"> <el-form-item label="页面路径:" prop="pagePathContent">
<el-button type="default" class="el-icon-plus" @click="handlePath">选择路径</el-button> <el-button type="default" class="el-icon-plus" @click="handlePath">选择路径</el-button>
{{activityForm.activityDetails}}
<div class="activity-box" v-if="activityForm.activityDetails"> <div class="activity-box" v-if="activityForm.activityDetails">
<div class="activity-box-title">{{ activityForm.activityDetails.contentName }}</div> <div class="activity-box-title">{{ activityForm.activityDetails.contentName }}</div>
<div class="time">开始时间:{{ activityForm.activityDetails.startTime }}</div> <div class="time">开始时间:{{ activityForm.activityDetails.startTime }}</div>
...@@ -49,7 +48,7 @@ ...@@ -49,7 +48,7 @@
</div> --> </div> -->
</el-form-item> </el-form-item>
<el-form-item label="产品价值/元:"> <el-form-item label="产品价值/元:">
<el-input v-model="activityForm.activityPrice" disabled></el-input> <el-input v-model="activityForm.activityDetails.activityPrice" disabled></el-input>
</el-form-item> </el-form-item>
<!-- <el-form-item label="活动价/元:" prop="goodsStock"> <!-- <el-form-item label="活动价/元:" prop="goodsStock">
<el-input v-model="activityForm.goodsStock" disabled></el-input> <el-input v-model="activityForm.goodsStock" disabled></el-input>
...@@ -186,9 +185,10 @@ export default { ...@@ -186,9 +185,10 @@ export default {
changeBackgroundType(val) { changeBackgroundType(val) {
this.activityForm.mediaUrlArr = [] this.activityForm.mediaUrlArr = []
this.activityForm.mediaUrl = '' this.activityForm.mediaUrl = ''
this.activityForm.activityDetails = ''
this.activityForm.pagePathContent = ''
}, },
selectActivity(data) { selectActivity(data) {
console.log(data)
this.activityForm.activityDetails = { this.activityForm.activityDetails = {
data, data,
...data.marketingContent, ...data.marketingContent,
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<div class="gl-form-page"> <div class="gl-form-page">
<el-form ref="ruleForm" :model="editForm" :rules="rules"> <el-form ref="ruleForm" :model="editForm" :rules="rules">
<span v-for="(item, index) in editForm.contentList" :key="index" class="line-item"> <span v-for="(item, index) in editForm.contentList" :key="index" class="line-item">
<div class="delect-box"> <div class="delect-box" @click="delectContent(index)">
<img class="icon-dele" src="@/assets/channel/dele.png" /> <img class="icon-dele" src="@/assets/channel/dele.png" />
</div> </div>
<el-form-item label="选择视频:" :prop="'contentList.' + index + '.mediaUrl'" :rules="rules.mediaUrl"> <el-form-item label="选择视频:" :prop="'contentList.' + index + '.mediaUrl'" :rules="rules.mediaUrl">
...@@ -471,20 +471,23 @@ export default { ...@@ -471,20 +471,23 @@ export default {
handleDelePraise(index) { handleDelePraise(index) {
this.editForm.contentList[0].publicPraise.splice(index, 1) this.editForm.contentList[0].publicPraise.splice(index, 1)
}, },
delectContent(index) {
this.editForm.contentList.splice(index, 1)
},
//上传类型 //上传类型
changeMediaType(val) { changeMediaType(val) {
console.log(val) console.log(val)
if (val == 2) { if (val == 2) {
this.membraneForm.mediaCoverArr = [] this.editForm.mediaCoverArr = []
this.membraneForm.mediaName = '' this.editForm.mediaName = ''
this.membraneForm.mediaCover = '' this.editForm.mediaCover = ''
this.membraneForm.mediaUrl = '' this.editForm.mediaUrl = ''
this.membraneForm.promotion = '' this.editForm.promotion = ''
this.membraneForm.mediaId = '' this.editForm.mediaId = ''
} else { } else {
this.membraneForm.mediaCover = '' this.editForm.mediaCover = ''
this.membraneForm.promotion = '' this.editForm.promotion = ''
this.membraneForm.mediaUrlArr = [] this.editForm.mediaUrlArr = []
} }
}, },
handleSave() { handleSave() {
...@@ -647,6 +650,35 @@ export default { ...@@ -647,6 +650,35 @@ export default {
} }
}, },
changeTopicStyle() { changeTopicStyle() {
this.editForm.contentList = [
{
mediaType: '',
mediaUrl: '',
mediaCover: '',
pagePathContent: '',
pagePathType: '1',
promotion: '',
activityDetails: '',
mediaCoverArr: [],
mediaUrlArr: [],
buttonRegistration: '立即参加', //报名按钮
publicPraise: [{ value: '' }]
}
]
if (this.editForm.topicStyle != 3) {
this.editForm.mediaType = 1
this.editForm.mediaUrlArr = []
this.editForm.mediaName = ''
this.editForm.mediaCover = ''
this.editForm.mediaUrl = ''
this.editForm.promotion = ''
this.editForm.activityDetails = ''
this.editForm.activityPrice = ''
this.editForm.pagePathContent = ''
} else {
this.editForm.mediaType = 2
}
this.initParams() this.initParams()
}, },
initParams() { initParams() {
...@@ -723,7 +755,7 @@ export default { ...@@ -723,7 +755,7 @@ export default {
} }
.delect-box { .delect-box {
width: 40px; width: 40px;
height: 480px; height: 100%;
background: #f1f1f1; background: #f1f1f1;
position: absolute; position: absolute;
top: 0; top: 0;
...@@ -746,10 +778,10 @@ export default { ...@@ -746,10 +778,10 @@ export default {
} }
.line-item { .line-item {
position: relative; position: relative;
height: 482px; height: 100%;
display: inline-block; display: block;
padding-top: 20px; padding-top: 20px;
box-sizing: border-box; // box-sizing: border-box;
// margin-top: 1px; // margin-top: 1px;
} }
} }
......
...@@ -125,16 +125,17 @@ export default { ...@@ -125,16 +125,17 @@ export default {
changeMediaType(val) { changeMediaType(val) {
console.log(val) console.log(val)
if (val == 2) { if (val == 2) {
this.membraneForm.mediaCoverArr = [] this.membraneForm.mediaUrlArr = []
this.membraneForm.mediaName = '' this.membraneForm.mediaName = ''
this.membraneForm.mediaCover = '' this.membraneForm.mediaCover = ''
this.membraneForm.mediaUrl = '' this.membraneForm.mediaUrl = ''
this.membraneForm.promotion = '' this.membraneForm.promotion = ''
this.membraneForm.mediaId = ''
} else { } else {
this.membraneForm.mediaCover = '' this.membraneForm.mediaCover = ''
this.membraneForm.mediaCoverArr = []
this.membraneForm.promotion = '' this.membraneForm.promotion = ''
this.membraneForm.mediaUrlArr = [] this.membraneForm.mediaUrlArr = []
this.membraneForm.mediaUrl = ''
} }
}, },
changeVideo(value) { changeVideo(value) {
......
...@@ -28,13 +28,8 @@ export default { ...@@ -28,13 +28,8 @@ export default {
return { return {
merchantChannelId: this.$route.query.channelId ? this.$route.query.channelId : '', //门店频道id merchantChannelId: this.$route.query.channelId ? this.$route.query.channelId : '', //门店频道id
topicId: this.$route.query.topicId ? this.$route.query.topicId : '', //频道主题ID topicId: this.$route.query.topicId ? this.$route.query.topicId : '', //频道主题ID
channelType: this.$route.query.channelType ? this.$route.query.channelType : '', //频道类型
currentComponent: 'carChannel', currentComponent: 'carChannel',
channelList: [
{ name: '新车专区', id: 1 },
{ name: '膜类专区', id: 2 },
{ name: '限时众筹', id: 3 },
{ name: '定保专区', id: 4 }
],
relateStoreVisible: false // 选择门店 relateStoreVisible: false // 选择门店
} }
}, },
...@@ -66,7 +61,7 @@ export default { ...@@ -66,7 +61,7 @@ export default {
3: 'activity', 3: 'activity',
4: 'activity' 4: 'activity'
} }
this.currentComponent = arr[this.merchantChannelId] this.currentComponent = arr[this.channelType]
console.log(this.currentComponent, '77777777') console.log(this.currentComponent, '77777777')
}, },
handleCancel() { handleCancel() {
......
...@@ -265,11 +265,12 @@ export default { ...@@ -265,11 +265,12 @@ export default {
res.forEach(item => { res.forEach(item => {
this.tabPaneList.push({ this.tabPaneList.push({
label: item.channelName, label: item.channelName,
name: item.channelId name: item.channelType,
channelId: item.channelId
}) })
}) })
this.SET_MERCHANT_ID({ id: this.merchantId }) this.SET_MERCHANT_ID({ id: this.merchantId })
this.activeName = res[0].channelId this.activeName = res[0].channelType
this.isFlag = true this.isFlag = true
this.initParams() this.initParams()
}) })
...@@ -277,16 +278,19 @@ export default { ...@@ -277,16 +278,19 @@ export default {
//新增编辑内容 //新增编辑内容
handleAddContent(val) { handleAddContent(val) {
if (val) { if (val) {
this.$router.push(`/store/content?channelId=${this.activeName}&topicId=${val.topicId}`) this.$router.push(`/store/content?channelId=${this.channelId}&topicId=${val.topicId}&channelType=${this.activeName}`)
} else { } else {
this.$router.push(`/store/content?channelId=${this.activeName}`) this.$router.push(`/store/content?channelId=${this.channelId}&channelType=${this.activeName}`)
} }
}, },
//膜类待配置 //膜类待配置
handleConfig(val) { handleConfig(val) {
this.$router.push(`/store/content?channelId=-1&topicId=${val.topicId}`) this.$router.push(`/store/content?topicId=${val.topicId}&channelType=-1`)
}, },
handleClick() { handleClick() {
this.tabPaneList.forEach(item => {
item.name == this.activeName ? (this.channelId = item.channelId) : ''
})
this.initParams() this.initParams()
this.handleSearch() this.handleSearch()
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!