Commit dbfde54e by 王志慧

commit

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