Commit 5863cb47 by 杨明

众筹

1 parent 4820ef7c
...@@ -3,8 +3,7 @@ ...@@ -3,8 +3,7 @@
<GLDialog bigTitle="选择活动" :hasFooter="true" :visible.sync="dialogVisible" width="1088px" :before-close="handleClose" mode="big"> <GLDialog bigTitle="选择活动" :hasFooter="true" :visible.sync="dialogVisible" width="1088px" :before-close="handleClose" mode="big">
<div class="model-panel" v-loading="loading"> <div class="model-panel" v-loading="loading">
<div class="model-panel-tab"> <div class="model-panel-tab">
<label>活动类型:</label> <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tabs v-model="activeName" @tab-click="handleClick" type="card">
<template v-for="(item, index) in activityList"> <template v-for="(item, index) in activityList">
<el-tab-pane :label="item.itemName" :name="item.itemValue" v-if="itemType != 'merchant'" :key="index"></el-tab-pane> <el-tab-pane :label="item.itemName" :name="item.itemValue" v-if="itemType != 'merchant'" :key="index"></el-tab-pane>
<el-tab-pane :label="item.itemName" v-if="openFlag && itemType == 'itemType'" :key="index"></el-tab-pane> <el-tab-pane :label="item.itemName" v-if="openFlag && itemType == 'itemType'" :key="index"></el-tab-pane>
...@@ -13,6 +12,11 @@ ...@@ -13,6 +12,11 @@
</div> </div>
<div class="model-item-panel" v-if="modelList.length > 0"> <div class="model-item-panel" v-if="modelList.length > 0">
<div class="model-item" :class="{ checked: selectItem == item }" v-for="(item, index) in modelList" :key="index" @click="handleSelectItem(item)"> <div class="model-item" :class="{ checked: selectItem == item }" v-for="(item, index) in modelList" :key="index" @click="handleSelectItem(item)">
<div class="item-icon" v-if="selectItem == item"><i class="el-icon-check"></i></div>
<div class="item-icon-b" v-else>
<img src="../../../assets/welcomeWord/coupon.png" alt="" v-if="selectType == 'coupon'" />
<img src="../../../assets/welcomeWord/gift.png" alt="" v-else />
</div>
<template v-if="selectType == 'card'"> <template v-if="selectType == 'card'">
<div class="model-item-title" :title="item.equityName">{{ item.equityName }}</div> <div class="model-item-title" :title="item.equityName">{{ item.equityName }}</div>
<div class="model-item-content">领取方式:免费领用</div> <div class="model-item-content">领取方式:免费领用</div>
...@@ -57,6 +61,12 @@ ...@@ -57,6 +61,12 @@
{{ item.endTime }} {{ item.endTime }}
</div> </div>
</template> </template>
<template v-else-if="selectType == 'crowdfunding'">
<div class="model-item-title" :title="item.activityName">{{ item.activityName }}</div>
<div class="model-item-content"></div>
<div class="model-item-content">开始时间: {{ item.startTime }}</div>
<div class="model-item-content">结束时间:{{ item.endTime }}</div>
</template>
<template v-else> <template v-else>
<div class="model-item-title" :title="item.couponName">{{ item.equityName }}</div> <div class="model-item-title" :title="item.couponName">{{ item.equityName }}</div>
<div class="model-item-content">获取方式:需先购买无忧服务套餐</div> <div class="model-item-content">获取方式:需先购买无忧服务套餐</div>
...@@ -141,9 +151,16 @@ export default { ...@@ -141,9 +151,16 @@ export default {
} }
this.dialogVisible = false this.dialogVisible = false
const marketingId = this.selectItem.id ? this.selectItem.id : this.selectItem.equityClassId const marketingId = this.selectItem.id ? this.selectItem.id : this.selectItem.equityClassId
const marketingName = this.selectType == 'card' ? this.selectItem.equityName : this.selectType == 'package' ? this.selectItem.packageName : this.selectType == 'activity' ? this.selectItem.activityName : this.selectType == 'coupon' ? this.selectItem.couponName : this.selectItem.equityName const marketingName = this.selectType == 'card' ? this.selectItem.equityName : this.selectType == 'package' ? this.selectItem.packageName : this.selectType == 'activity' || this.selectType == 'crowdfunding' ? this.selectItem.activityName : this.selectType == 'coupon' ? this.selectItem.couponName : this.selectItem.equityName
const marketingContent = { ...this.selectItem, selectType: this.selectType } const marketingContent = { ...this.selectItem, selectType: this.selectType }
this.$emit('selectActivity', { marketingId, marketingType: this.activeName, marketingName, marketingContent }) const params = {}
if (this.selectType == 'crowdfunding') {
params.url = this.selectItem.url
params.desc = this.selectItem.promotion
params.title = this.selectItem.forwardTitle
params.picurl = this.selectItem.activityImg
}
this.$emit('selectActivity', { marketingId, marketingType: this.activeName, marketingName, marketingContent, ...params })
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.pageSize = val this.pageSize = val
...@@ -177,6 +194,10 @@ export default { ...@@ -177,6 +194,10 @@ export default {
pageNum: this.pageNum pageNum: this.pageNum
} }
const activityChecked = this.activityList.find(act => act.itemValue == this.activeName) const activityChecked = this.activityList.find(act => act.itemValue == this.activeName)
if (activityChecked && activityChecked.params && activityChecked.params.currentPage) {
console.log(activityChecked.params.currentPage)
activityChecked.params.currentPage = this.pageNum
}
Object.assign(params, activityChecked.params) Object.assign(params, activityChecked.params)
activityChecked activityChecked
.getInterfaceApi(params) .getInterfaceApi(params)
...@@ -246,39 +267,36 @@ export default { ...@@ -246,39 +267,36 @@ export default {
} }
.model-panel { .model-panel {
.model-panel-tab { .model-panel-tab {
display: flex;
align-items: center;
margin-bottom: 18px; margin-bottom: 18px;
label { label {
font-size: 16px; // font-size: 16px;
font-weight: 400; // font-weight: 400;
color: #000000; // color: #000000;
line-height: 24px; // line-height: 24px;
} }
/deep/ { /deep/ {
.el-checkbox:last-of-type { .el-checkbox:last-of-type {
margin-right: 8px; margin-right: 8px;
} }
.el-tabs__nav { .el-tabs__nav {
border: 0; // border: 0;
} }
.el-tabs__header { .el-tabs__header {
border: 0; // border: 0;
background-color: #f4f6fc; // background-color: #f4f6fc;
margin: 0px; // margin: 0px;
} }
.el-tabs__item { .el-tabs__item {
border: none; // border: none;
width: 180px; // width: 180px;
height: 32px; // height: 32px;
line-height: 32px; // line-height: 32px;
margin: 2px; // margin: 2px;
text-align: center; // text-align: center;
} }
.el-tabs__item.is-active { .el-tabs__item.is-active {
background-color: #fff;
border-radius: 4px;
font-weight: 600; font-weight: 600;
border-bottom: 2px solid #5850ff;
} }
} }
} }
...@@ -315,17 +333,40 @@ export default { ...@@ -315,17 +333,40 @@ export default {
padding: 12px 16px; padding: 12px 16px;
position: relative; position: relative;
height: 128px; height: 128px;
background: #ffffff; background: #f9f9f9;
border-radius: 4px; border-radius: 4px;
border: 1px solid #e6e6e6; border: 1px solid #e6e6e6;
padding: 14px 24px; padding: 14px 24px;
box-sizing: border-box; box-sizing: border-box;
.item-icon {
position: absolute;
right: 0px;
bottom: 0px;
width: 16px;
height: 16px;
background: #5850ff;
border-radius: 4px 0px 0px 0px;
display: flex;
justify-content: center;
align-items: center;
i {
color: #fff;
}
}
.item-icon-b {
position: absolute;
right: -1px;
bottom: -1px;
img {
width: 30px;
height: 30px;
}
}
&:nth-child(4n) { &:nth-child(4n) {
margin-right: 0px; margin-right: 0px;
} }
&.checked { &.checked {
background: rgba(88, 80, 255, 0.1); border: 2px solid #5850ff;
border: 1px solid #5850ff;
} }
&-qrcode { &-qrcode {
position: absolute; position: absolute;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!