Commit 6281ae6e by chenwq

众筹模式

1 parent 3a9ee282
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<template> <template>
<div class="edit-share marketing p-t-20 edit-box edit-activity"> <div class="edit-share marketing p-t-20 edit-box edit-activity">
<div class="container edit-container"> <div class="container edit-container">
<!-- 基本信息 -->
<p class="edit-title">基本信息</p> <p class="edit-title">基本信息</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"> <glsx-combi-form class="edit-form-container" ref="editFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<div slot="activityImg" class="edit-tips m-t-8">展示在首页的活动详情页</div> <div slot="activityImg" class="edit-tips m-t-8">展示在首页的活动详情页</div>
...@@ -66,6 +67,13 @@ ...@@ -66,6 +67,13 @@
</p> </p>
</template> </template>
</glsx-combi-form> </glsx-combi-form>
<!-- 活动配置 -->
<p class="edit-title">活动配置</p>
<glsx-combi-form class="edit-form-container" ref="configEditFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="configEditFormData" :formRules="editRule">
<div slot="activityBigImg" class="edit-tips m-t-8">建议尺寸750*1258</div>
<div slot="activityVideo" class="edit-tips m-t-8">最多上传六个视频</div>
<div slot="posterImg" class="edit-tips m-t-8">建议尺寸640*1008</div>
</glsx-combi-form>
</div> </div>
<div class="wechat-box"> <div class="wechat-box">
<img class="w-100-percent" src="@/assets/wechat-activity.png" /> <img class="w-100-percent" src="@/assets/wechat-activity.png" />
...@@ -131,7 +139,11 @@ export default { ...@@ -131,7 +139,11 @@ export default {
goodsStock: '', goodsStock: '',
goodsId: '', goodsId: '',
limitPurchaseFlag: 1, limitPurchaseFlag: 1,
limitPurchaseNumber: '' limitPurchaseNumber: '',
// 活动配置
sponsorName: '',
activityBigImg: '',
activityVideo: []
}, },
//商品列表 //商品列表
tableParams: { tableParams: {
...@@ -195,6 +207,7 @@ export default { ...@@ -195,6 +207,7 @@ export default {
} }
] ]
}, },
// 基本信息
editFormData: [ editFormData: [
{ {
label: '活动名称', label: '活动名称',
...@@ -265,7 +278,102 @@ export default { ...@@ -265,7 +278,102 @@ export default {
confName: '是', confName: '是',
isDisabled: false isDisabled: false
} }
], ]
}
],
// 活动配置
configEditFormData: [
{
label: '客服设置'
},
{
label: '主办方',
name: 'sponsorName',
width: '474px',
type: 'input',
maxlength: 100,
tips: '默认展示门店名称',
isDisabled: false
},
{
label: '活动地址'
},
{
label: '活动大图',
name: 'activityBigImg',
type: 'upload',
width: '320px',
tips: '进入活动页的图片',
limitSize: 10,
maxPhotoNum: 1,
isDisabled: false,
suffixSlot: 'activityBigImg',
handleUpload: (e, file, targetItem) => {
const imgFile = e.target.result
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
this.$apis.common.uploadImgApi({ file: base64, fileType: 'image' }).then(res => {
this.editForm[targetItem.name] = res
this.$refs.configEditFormRef.$refs[this.editChildRef].validateField(targetItem.name)
})
}
},
{
label: '活动视频',
name: 'activityVideo',
type: 'upload',
uploadType: 'video',
suffixSlot: 'activityVideo',
tips: '大图下可以展示视频,不上传则不显示',
limitSize: 50,
maxPhotoNum: 6,
isDisabled: false,
handleUpload: (e, file, targetItem) => {
const imgFile = e.target.result
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
this.$apis.common.uploadVideoApi({ file: base64 }).then(res => {
this.editForm[targetItem.name] = res
})
}
},
{
label: '活动详情',
tips: '展示活动的详细内容'
},
{
label: '音乐文件',
tips: '活动页背景音乐'
},
{
label: '预估销量',
name: 'predictVolume',
width: '474px',
type: 'input',
maxlength: 20,
tips: '用作战报的销量展示'
},
{
label: '虚拟设置'
},
{
label: '海报图片',
name: 'posterImg',
type: 'upload',
width: '320px',
limitSize: 10,
maxPhotoNum: 1,
isDisabled: false,
suffixSlot: 'posterImg',
handleUpload: (e, file, targetItem) => {
const imgFile = e.target.result
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
this.$apis.common.uploadImgApi({ file: base64, fileType: 'image' }).then(res => {
this.editForm[targetItem.name] = res
this.$refs.configEditFormRef.$refs[this.editChildRef].validateField(targetItem.name)
})
}
},
{
label: '表单设置'
} }
] ]
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!