Commit d52078de by chenxin

Merge branch 'dev'

# Conflicts:
#	dist/index.html
#	dist/static/js/game.0ea5eee276916402d464.js
#	dist/static/js/game.16d82a0a928ab6daa70a.js
#	dist/static/js/game.aa5b7f6cc58d8219de3a.js
#	dist/static/js/manifest.30475d8d0831dc68db20.js
#	src/views/game/ptyx/form.vue
parents 4b56f59f 59c7b602
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" href=./static/img/favicon.ico><title>GIC后台</title><link rel=stylesheet type=text/css href=static/css/iconfont.css><link rel=stylesheet type=text/css href=static/css/common.css><link href=/marketing/static/css/main.55b33a80cc38edbe81498a9c86570b07.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.22.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/member-group.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-card.2.0.03.js></script><script src=//web-1251519181.file.myqcloud.com/components/confirm-people.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/people.2.0.31.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.04.js></script><script src=//web-1251519181.file.myqcloud.com/components/input.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/delete.2.0.00.js></script><script type=text/javascript src=/marketing/static/js/manifest.30475d8d0831dc68db20.js></script><script type=text/javascript src=/marketing/static/js/vendor.4f54dc53154967b3adc7.js></script><script type=text/javascript src=/marketing/static/js/main.949fc9b6a672743a453a.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" href=./static/img/favicon.ico><title>GIC后台</title><link rel=stylesheet type=text/css href=static/css/iconfont.css><link rel=stylesheet type=text/css href=static/css/common.css><link href=/marketing/static/css/main.b9209162bf3ae541711821c0c090f854.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.22.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/member-group.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-card.2.0.03.js></script><script src=//web-1251519181.file.myqcloud.com/components/confirm-people.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/people.2.0.31.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.04.js></script><script src=//web-1251519181.file.myqcloud.com/components/input.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/delete.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/selector.1.1.90.js></script><script type=text/javascript src=/marketing/static/js/manifest.a05863445f57a6a99ffc.js></script><script type=text/javascript src=/marketing/static/js/vendor.33cafa0134aa152d9bdc.js></script><script type=text/javascript src=/marketing/static/js/main.f6c96c61c0ecf8dae639.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
!function(e){var r=window.webpackJsonp;window.webpackJsonp=function(n,o,c){for(var f,i,u,s=0,l=[];s<n.length;s++)i=n[s],t[i]&&l.push(t[i][0]),t[i]=0;for(f in o)Object.prototype.hasOwnProperty.call(o,f)&&(e[f]=o[f]);for(r&&r(n,o,c);l.length;)l.shift()();if(c)for(s=0;s<c.length;s++)u=a(a.s=c[s]);return u};var n={},t={11:0};function a(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.e=function(e){var r=t[e];if(0===r)return new Promise(function(e){e()});if(r)return r[2];var n=new Promise(function(n,a){r=t[e]=[n,a]});r[2]=n;var o=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.async=!0,c.timeout=12e4,a.nc&&c.setAttribute("nonce",a.nc),c.src=a.p+"static/js/"+({0:"game",1:"card",2:"wechat",3:"evaluation",4:"message",5:"ecm",6:"recharge",7:"msg",8:"calllog"}[e]||e)+"."+{0:"aa5b7f6cc58d8219de3a",1:"3019f63f20abe9bd6773",2:"5aa3ca7e326ef2ff5b56",3:"650a38a154a63ff404db",4:"b240fe6b93138b5f102a",5:"b557a0d0fc31be27a314",6:"727cccae0b80bca129d5",7:"8b5caebf83a79ac810ca",8:"73199fa96bf2a53581b9"}[e]+".js";var f=setTimeout(i,12e4);function i(){c.onerror=c.onload=null,clearTimeout(f);var r=t[e];0!==r&&(r&&r[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return c.onerror=c.onload=i,o.appendChild(c),n},a.m=e,a.c=n,a.d=function(e,r,n){a.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},a.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(r,"a",r),r},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},a.p="/marketing/",a.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
!function(e){var r=window.webpackJsonp;window.webpackJsonp=function(n,a,c){for(var i,u,f,d=0,s=[];d<n.length;d++)u=n[d],t[u]&&s.push(t[u][0]),t[u]=0;for(i in a)Object.prototype.hasOwnProperty.call(a,i)&&(e[i]=a[i]);for(r&&r(n,a,c);s.length;)s.shift()();if(c)for(d=0;d<c.length;d++)f=o(o.s=c[d]);return f};var n={},t={11:0};function o(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var r=t[e];if(0===r)return new Promise(function(e){e()});if(r)return r[2];var n=new Promise(function(n,o){r=t[e]=[n,o]});r[2]=n;var a=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.async=!0,c.timeout=12e4,o.nc&&c.setAttribute("nonce",o.nc),c.src=o.p+"static/js/"+({0:"game",1:"card",2:"wechat",3:"evaluation",4:"message",5:"ecm",6:"recharge",7:"msg",8:"calllog"}[e]||e)+"."+{0:"512107bbe5a951fc40a1",1:"1a606c5eb5bc4957c065",2:"2ff8e05cd51470875928",3:"c59c0098bd52da5edb26",4:"9a09a2ca69a10dd4b1cb",5:"7e86f78a71685dfde625",6:"bb4c60b1af82de26c84a",7:"78d26db17068eec22a7c",8:"5eed9786deb616aedcf4"}[e]+".js";var i=setTimeout(u,12e4);function u(){c.onerror=c.onload=null,clearTimeout(i);var r=t[e];0!==r&&(r&&r[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return c.onerror=c.onload=u,a.appendChild(c),n},o.m=e,o.c=n,o.d=function(e,r,n){o.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},o.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(r,"a",r),r},o.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},o.p="/marketing/",o.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
......@@ -31,5 +31,6 @@
<script src="//web-1251519181.file.myqcloud.com/components/export-excel.2.0.04.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/input.2.0.00.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/delete.2.0.00.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/selector.1.1.90.js"></script>
</body>
</html>
......@@ -109,7 +109,9 @@ a:hover {
.pr30{
padding-right: 30px!important;
}
.ml25{
margin-left: 25px!important;
}
.ml30{
margin-left: 30px!important;
}
......@@ -125,6 +127,9 @@ a:hover {
.mt10{
margin-top: 10px!important;
}
.mt15{
margin-top: 15px!important;
}
.mt20{
margin-top: 20px!important;
}
......@@ -146,6 +151,9 @@ a:hover {
.mb10{
margin-bottom: 10px!important;
}
.mr5{
margin-right: 5px!important;
}
.mr10{
margin-right: 10px!important;
}
......
......@@ -205,4 +205,26 @@
.el-tag__close{
top: -8px;
}
}
// 商品选择器
.sysp__content {
width: calc(100% - 170px);
display: inline-block;
> div {
margin-right: 10px;
display: inline-block;
vertical-align: middle;
max-width: 80%;
}
.item {
display: inline-block;
// height: 12px;
padding: 5px 10px;
font-size: 12px;
color: #8d8d8d;
background-color: #f5f7fa;
border-radius: 5px;
line-height: 16px;
}
}
\ No newline at end of file
......@@ -114,7 +114,11 @@ export default {
try {
let res = await loadImgTextList(this.listParams);
if (res.errorCode === 0) {
this.textImgList = res.result.result || [];
this.textImgList =
res.result.result.filter(v => {
return v.itemList ? v.itemList.length !== 0 : true; // 从页面上过滤itemList为[]的错误数据,原因:微信导入错误
}) || [];
this.total = res.result.totalCount;
this.textImgList.map(v => {
v.createTimeStr = v.createTime;
......
// 商品选择器方法
export default {
data() {
return {
// ----线下适用商品开始----
xxSysp: {
visible: false, // 适用商品选择器dialog
goodsEnable: false,
filterAbbrInfo: [], // 选择后回显的label数据
goodsFilterId: null,
conditionList: null, // 商品选择器的回显值
conditionList_copy: [], // 没有只读功能,备份数据
isResign: false // 编辑后赋值
}
// ----线下适用商品结束----
};
},
methods: {
// ------线下适用商品开始-------
// 清空线下适用商品 ,重置商品选择器
handleXxSyspReset() {
this.$refs.selector.conditions[0].goodsList = [];
this.xxSysp.filterAbbrInfo = [];
this.xxSysp.conditionList = null;
this.xxSysp.goodsFilterId = null;
},
// 编辑查看btn点击
handleXxSyspClick(visible = true) {
this.xxSysp.visible = visible;
// refs.selector放在modal里,初始化的时候并没有渲染
if (!this.xxSysp.isResign && this.isEdit) {
this.$nextTick(() => {
this.$refs.selector.conditions = this.xxSysp.conditionList;
this.xxSysp.isResign = true;
});
}
if (this.xxSysp.filterAbbrInfo.length !== 0) {
this.$refs.selector.changeComplexInfo(); // 强制展开
}
},
// 商品选择器反显label
xxSyspLabel(filterAbbrInfo) {
let _filterAbbrInfo = [];
// 设置显示label
filterAbbrInfo &&
filterAbbrInfo.forEach(y => {
_filterAbbrInfo = y.map(v => {
return {
optName: v.optName,
text: `${v.typeName}${v.belong}${v.childNames
.map(v => {
return `【${v}】`;
})
.join('')}`
};
});
});
return _filterAbbrInfo;
},
// 商品选择器确认
xxSyspConfirm() {
this.$refs.selector
.collectConditions()
.then(res => {
if (res == false) {
throw new Error('商品选择器条件不能为空!');
} else {
this.xxSysp.goodsFilterId = res.id; // 保存id
this.xxSysp.conditionList = res.conditionList; // 保存回显list
this.xxSysp.filterAbbrInfo = this.xxSyspLabel(res.filterAbbrInfo);
this.handleXxSyspClick(false); // 强制展开
this.xxSysp.visible = false;
}
})
.catch(err => {
this.$tips({ message: err.message, type: 'error' });
});
}
// ------线下适用商品开始-------
}
};
......@@ -265,3 +265,8 @@ export const findAnyComponent = (context, componentName, root = null) => {
}
return children;
};
// 序列化反序列化法 深拷贝对象
export const deepClone = obj => {
return JSON.parse(JSON.stringify(obj));
};
......@@ -3,7 +3,8 @@
*/
import dmUploadImg from '@/components/upload/img';
import imgTextDrag from './partials/imgtext-drag';
import { formatDateTimeByType } from '@/utils/index.js';
import { formatDateTimeByType, deepClone } from '@/utils/index.js';
import xxSysp_mix from '@/mixins/selector.js'; // 商品选择器方法
import { cardGetShelfs, getCardDetail, saveUpdateCard, copyCardDetailService, getCategoryList, getPropertyList, getPropertyValueList } from '@/service/api/cardApi.js';
import dmGoodsInput from '@/components/goods-input/index.vue';
const initForm = {
......@@ -48,6 +49,7 @@ const initForm = {
const sale_limit = { fee: 0, goods: '', flag: false, type: 0 }; //最低消费
const goods = { ok: '', no: '', flag: false };
export default {
mixins: [xxSysp_mix],
data() {
return {
requestProject: 'marketing',
......@@ -157,17 +159,6 @@ export default {
'img-text-drag': imgTextDrag,
'dm-goods-input': dmGoodsInput
},
created() {
this.cardGetShelfs();
this.getCardDetail();
this.getCategoryList(); // 获取适用商品第一层数据
this.$store.commit('mutations_breadcrumb', [{ name: '营销管理', path: '' }, { name: '卡券营销', path: '' }, { name: '卡券库', path: '/card/list' }, { name: '卡券详情', path: '' }]);
},
mounted() {
if (this.isAdd) {
this.$refs.storeCard.init();
}
},
computed: {
asideShow() {
return this.$store.state.marketing.asideShow;
......@@ -223,6 +214,11 @@ export default {
this.cardApplyChannelOptions = res.result.allChannelList;
}
// 支持的品牌-商品选择器
if (res.result.goodsEnable) {
this.xxSysp.goodsEnable = res.result.goodsEnable;
}
// 新增情况下,如果配置了线下门店,默认选中线下门店
if (this.isAdd && this.cardApplyChannelOptions.some(v => v.value === 'offlineStore')) {
this.form.cardApplyChannel = ['offlineStore'];
......@@ -304,6 +300,16 @@ export default {
this.coupGoodsWeimobList = card.coupGoodsWeimobList;
}
// 线下适用商品
if (card.goodsSearchDetail && card.goodsFilterId) {
this.xxSysp.goodsFilterId = card.goodsFilterId;
const goodsSearchDetail = JSON.parse(card.goodsSearchDetail);
this.xxSysp.conditionList = this.xxSysp.conditionList_copy = goodsSearchDetail.conditionList; // ref selector此时放在modal里并没有渲染,之后赋值
this.xxSysp.conditionList = goodsSearchDetail.conditionList; // ref selector此时放在modal里并没有渲染,之后赋值
this.xxSysp.conditionList_copy = deepClone(goodsSearchDetail.conditionList); // 备份数据
this.xxSysp.filterAbbrInfo = goodsSearchDetail.filterAbbrInfo || [];
}
this.form.cardLimit = card.cardLimit;
if (this.form.cardLimit === 1) {
this.cardLimitRadio = 1;
......@@ -514,7 +520,18 @@ export default {
if ((this.form.cardType === 0 || this.form.cardType === 1) && this.form.cardApplyChannel.indexOf('WMmicroMall') !== -1 && this.coupGoodsWeimobList.length !== 0) {
card.coupGoodsWeimobList = this.coupGoodsWeimobList;
}
console.log(card.coupGoodsWeimobList);
// 线下适用商品
if (this.xxSysp.goodsEnable && this.xxSysp.goodsFilterId) {
card.goodsFilterId = this.xxSysp.goodsFilterId;
if (this.xxSysp.conditionList) {
card.goodsSearchDetail = JSON.stringify({
conditionList: this.isEdit ? this.xxSysp.conditionList_copy : this.xxSysp.conditionList, // 编辑保存备份数据
filterAbbrInfo: this.xxSysp.filterAbbrInfo
}); // 反显数据
}
}
//卡券限制
if (this.cardLimitRadio === 1) {
card.cardLimit = 1;
......@@ -596,7 +613,8 @@ export default {
// 这里判断部分门店是否为空
if (card.storeMode) {
let data = await this.$refs.storeCard.getRightList();
console.log('1' + data.length);
console.log(this.$refs.storeCard.newUuid);
console.log(this.uuid);
if (!data.length) {
this.$tips({ type: 'warning', message: '部分门店不能为空' });
return;
......@@ -607,7 +625,6 @@ export default {
params.shelfIds = JSON.stringify(this.form.shelfIds);
params.card = JSON.stringify(card);
this.submitLoading = true;
// console.log(params);
saveUpdateCard(params)
.then(res => {
this.submitLoading = false;
......@@ -792,7 +809,6 @@ export default {
}
return new Promise((resolve, reject) => {
let arr_f2 = [];
console.log(this.goodsList);
if (this.goodsList.length === 1 && this.goodsList[0].v1 === '' && this.goodsList[0].v2 === '' && this.goodsList[0].v3.length === 0) {
resolve('empty');
}
......@@ -851,5 +867,16 @@ export default {
});
}
// ------微盟适用商品结束-------
},
mounted() {
this.cardGetShelfs();
this.getCardDetail();
this.getCategoryList(); // 获取适用商品第一层数据
if (this.isAdd) {
this.$refs.storeCard.init();
}
},
created() {
this.$store.commit('mutations_breadcrumb', [{ name: '营销管理', path: '' }, { name: '卡券营销', path: '' }, { name: '卡券库', path: '/card/list' }, { name: '卡券详情', path: '' }]);
}
};
......@@ -47,7 +47,7 @@ export default {
let that = this;
return {
dateTime: [Date.now() - 30 * 24 * 60 * 60 * 1000, Date.now()],
typeOptions: [{ value: '', label: '所有营销方式' }, { value: 'teletext', label: '图文' }, { value: 'text', label: '文本' }, { value: 'image', label: '图片' }, { value: 'card', label: '卡券' }, { value: 'wxa', label: '小程序' }, { value: 'message', label: '短信' }, { value: 'teltask', label: '话务' }],
typeOptions: [{ value: '', label: '所有营销方式' }, { value: 'teletext', label: '图文' }, { value: 'text', label: '文本' }, { value: 'image', label: '图片' }, { value: 'card', label: '卡券' }, { value: 'wxa', label: '小程序' }, { value: 'message', label: '短信' }, { value: 'teltask', label: '话务' }, { value: 'integral', label: '积分' }],
listParams: {
ecmPlanId: this.$route.params.id,
beginTime: '',
......
......@@ -49,7 +49,7 @@
import { ecmCurrentSendInfos, ecmCurrentSendDetails, exportCurrentSendDetails } from '@/service/api/ecmApi.js';
import { formatDateTimeByType } from '@/utils/index.js';
import memberInfo from '@/components/member-info/index.vue';
const typeOptions = [{ value: '', label: '所有类型' }, { value: 'teletext', label: '图文' }, { value: 'text', label: '文本' }, { value: 'image', label: '图片' }, { value: 'card', label: '卡券' }, { value: 'wxa', label: '小程序' }, { value: 'message', label: '短信' }, { value: 'teltask', label: '话务' }];
const typeOptions = [{ value: '', label: '所有类型' }, { value: 'teletext', label: '图文' }, { value: 'text', label: '文本' }, { value: 'image', label: '图片' }, { value: 'card', label: '卡券' }, { value: 'wxa', label: '小程序' }, { value: 'message', label: '短信' }, { value: 'teltask', label: '话务' }, { value: 'integral', label: '积分' }];
export default {
name: 'ecm-current-list',
components: {
......
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 204.9 200" style="enable-background:new 0 0 204.9 200;" xml:space="preserve">
<style type="text/css">
.st0{fill:#909399;}
</style>
<path class="st0" d="M204,139c0-10-7.5-19-21-26V95.5v-1V93c0-1.5,0-3-0.5-4.5c14-7,21.5-16.5,21.5-26v-18v-1V42
c0-22.5-39-39.5-90.5-39.5c-52,0-91,17-91,39.5v20c0,1.5,0,3,0.5,4.5C9,73.5,1.5,83,1.5,92.5v20c0,10,7.5,19,21,26v20
c0,22.5,39,39.5,90.5,39.5s90.5-17,90.5-39.5v-18v-1C204,140,204,139.5,204,139L204,139z M190.5,43c-1,4-4,7.5-9.5,11
c-14.5,9.5-40,15-68,15c-47,0-75-14.5-77.5-25.5v-1C35.5,29,73,16,113,16s77.5,13,77.5,26.5L190.5,43L190.5,43z M41.5,67
c1.5,1,3,1.5,5,2.5l1,0.5c1.5,0.5,2.5,1,4,2l1.5,0.5l4.5,1.5l1,0.5c2,0.5,4,1,6,2L66,77c1.5,0.5,3.5,1,5,1l2,0.5
c1.5,0.5,3.5,0.5,5,1l2,0.5c2.5,0.5,4.5,0.5,7,1h1.5c2,0,4,0.5,6,0.5H97c1.5,0,3.5,0,5.5,0.5h21c1.5,0,3.5,0,5-0.5h3
c2,0,3.5-0.5,5.5-0.5h2c2.5-0.5,4.5-0.5,7-1l2.5-0.5c1.5-0.5,3-0.5,4.5-1l2.5-0.5c1.5-0.5,3-0.5,4.5-1l2-0.5l6-1.5l1-0.5l4.5-1.5
l1.5-0.5c1.5-0.5,3-1,4-2l1-0.5c3.5-1.5,6.5-3.5,9.5-5l1-0.5c0,0,0.5,0,0.5-0.5c-0.5,5.5-7.5,11.5-19.5,16c-15,6.5-36,9.5-58,9.5
C73,89.5,44,78,37.5,67c-1-1.5-1.5-2.5-1.5-3.5c0,0,0.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1
v1c-2.5,10.5-31,25-77,25c-15,0-29.5-1.5-42.5-5c-6.5-1.5-12.5-3.5-17.5-5.5c-10.5-4.5-17-10.5-17.5-15.5c0,0,0.5,0,0.5,0.5H16
C17.5,116,18.5,117,20,117.5L20,117.5z M36.5,160.5l1,0.5c1,1,2.5,1.5,4.5,2.5c1.5,1,3,1.5,4.5,2.5l1.5,0.5c1,0.5,2.5,1,4,1.5l2,0.5
c1.5,0.5,3,1,5,1.5l1,0.5l6,1.5l1.5,0.5c1.5,0.5,3,1,5,1L74,175c1.5,0.5,3,0.5,5,1l2,0.5c2.5,0.5,4.5,0.5,7,1h2c2,0,3.5,0.5,5.5,0.5
h3c1.5,0,3,0,5,0.5h21c1.5,0,3,0,4.5-0.5h3c1.5,0,3-0.5,5-0.5l2.5-0.5c2.5-0.5,4.5-0.5,6.5-1l2.5-0.5c1.5-0.5,3-0.5,4.5-1l2.5-0.5
c1.5-0.5,3-0.5,4.5-1l2-0.5l6-1.5l1.5-0.5l4.5-1.5c0.5,0,1-0.5,1.5-0.5c1.5-0.5,2.5-1,4-2l1-0.5c1.5-1,3.5-1.5,5-2.5s3-1.5,4.5-2.5
l1-0.5h0.5c-1,11-30.5,26-77.5,26S37.5,171.5,36.5,160.5C36,160,36,160.5,36.5,160.5L36.5,160.5z"/>
</svg>
......@@ -162,6 +162,7 @@
vertical-align: middle;
height: 17px;
width: auto;
overflow:hidden;
color: #909399;
}
.dm-marketing__opt__item > span {
......@@ -450,3 +451,11 @@
-webkit-box-orient: vertical;
}
.dm-integral__item__wrap {
width: 250px;
padding: 18px 20px;
border: 1px solid rgba(228,231,237,1);
border-radius:4px;
display: inline-block;
position: relative;
}
\ No newline at end of file
<template>
<div class="dm-integral__item__wrap">
<span class="fz16">赠送积分<span class="fz12 gray ml20">* 仅支持给认证会员赠送积分</span></span>
<p class="mt15">
<span class="fz24 mr5 primary-font-color">{{ item.integralCount }}</span>
<span>积分</span>
</p>
</div>
</template>
<script>
export default {
name: 'item-integral',
props: {
item: {
type: Object,
default() {
return {};
}
}
}
};
</script>
<template>
<el-dialog title="赠送积分" :visible.sync="show" width="420px" :before-close="close">
<p class="regular-font-color mb20">请输入需要赠送的积分<span class="fz12 gray ml10">* 仅支持给认证会员赠送积分</span></p>
<el-form :model="form" :rules="rules" ref="form" label-width="0">
<el-form-item prop="integral">
<el-input v-model.number="form.integral" maxLength="7" />
</el-form-item>
</el-form>
<p class="minor-font-color mt10 line-height1_5 fz12">赠送积分无自动通知。如有通知需要,请额外添加【文本】、【图片】、【小程序】或【短信】营销事件。</p>
<span slot="footer" class="dialog-footer">
<el-button @click="close">关 闭</el-button>
<el-button type="primary" @click="addItem">确 定</el-button>
</span>
</el-dialog>
</template>
<script>
export default {
name: 'lib-integral',
props: {
item: {
type: Object,
default() {
return {};
}
},
show: {
type: Boolean,
default: false
}
},
data() {
const validInteral = (rule, value, callback) => {
if (!Number.isInteger(value)) {
callback(new Error('积分值为数字值'));
} else if (value <= 0) {
callback(new Error('积分值最小为1'));
} else if (value > 1000000) {
callback(new Error('单次赠送值最大值为1000000'));
} else {
callback();
}
};
return {
ecmMarketingTypeRelationId: '',
form: {
integral: '',
comName: 'integral'
},
rules: {
integral: [{ required: true, message: '请输入积分值', trigger: 'blur' }, { validator: validInteral, trigger: 'blur' }]
},
loading: false
};
},
watch: {
show(val) {
if (val) {
this.form.integral = this.item.integralCount;
this.ecmMarketingTypeRelationId = this.item.ecmMarketingTypeRelationId;
} else {
this.form.integral = '';
this.ecmMarketingTypeRelationId = '';
}
}
},
methods: {
close() {
this.$refs.form.resetFields();
this.$emit('update:show', false);
},
addItem() {
this.$refs['form'].validate(valid => {
if (valid) {
this.$emit('sendItem', { ...this.form, ...{ ecmMarketingTypeRelationId: this.ecmMarketingTypeRelationId } });
this.close();
}
});
}
}
};
</script>
<template>
<el-dialog title="添加小程序链接" :visible.sync="show" width="600px" class="add-replay-content" :before-close="close">
<el-form label-position="right" ref="form" :model="form" label-width="100px">
<el-form label-position="right" ref="form" :model="form" label-width="100px" v-loading="loading">
<el-form-item class="text-content" label="文本内容">
<el-input v-model="form.title" @keyup.native="toInput(form.title, $event)"></el-input>
<span class="text-num">{{ inputNum }}/{{ inputLength }}</span>
......@@ -54,6 +54,7 @@ export default {
},
data() {
return {
loading: false,
form: {
title: '',
linkStyle: '0',
......@@ -73,6 +74,10 @@ export default {
{
value: 4,
label: '二级功能页'
},
{
value: 5,
label: '自定义页面'
}
],
options2: [],
......@@ -93,16 +98,24 @@ export default {
this.wechatContent = {};
if (val && this.item.ecmMarketingTypeRelationId) {
this.form = JSON.parse(JSON.stringify(this.item));
console.log('编辑', this.item);
// console.log('编辑', this.item);
const pagePath = this.form.pagePath ? JSON.parse(this.form.pagePath) : {};
this.wechatContent.type = pagePath.type;
this.wechatContent.objId = '';
this.wechatContent.title = pagePath.title;
this.wechatContent.pageType = pagePath.pageType;
this.preValue = pagePath.pageType;
this.getNextList(this.preValue).then(res => {
this.nextValue = pagePath.type;
});
if (pagePath.pageType === 5) {
// 自定义链接
this.getCustonList().then(res => {
this.nextValue = pagePath.pageId;
});
} else {
this.getNextList(this.preValue).then(res => {
this.nextValue = pagePath.type;
});
}
}
}
},
......@@ -144,9 +157,12 @@ export default {
},
// 链接类型
changePreValue(val) {
// val==3 导航tabbar页 val==4 二级功能页
if (val) {
this.nextValue = '';
// val==3 导航tabbar页 val==4 二级功能页 val==5 自定义链接
this.nextValue = '';
this.options2 = [];
if (val === 5) {
this.getCustonList();
} else {
this.getNextList(val);
}
},
......@@ -162,6 +178,40 @@ export default {
this.wechatContent.pageType = this.preValue;
}
},
// 获取自定义链接list
getCustonList() {
return new Promise((resolve, reject) => {
this.loading = true;
this.axios
.post(
'/api-admin/list-custom-page',
qs.stringify({
requestProject: 'gic-web'
})
)
.then(res => {
this.loading = false;
//成功后回调
var data = res.data;
if (data.errorCode == 0) {
this.options2 = data.result.map(v => {
return {
linkId: v.pageId,
name: v.name,
url: v.url
};
});
resolve();
} else {
this.loading = false;
this.$message({
type: 'error',
message: data.message
});
}
});
});
},
// 获得链接类型的二级
getNextList(type) {
return new Promise((resolve, reject) => {
......@@ -176,7 +226,6 @@ export default {
.then(res => {
//成功后回调
var data = res.data;
console.log(data);
if (data.errorCode == 0) {
this.options2 = data.result;
resolve();
......@@ -194,9 +243,21 @@ export default {
ecmMarketingTypeRelationId: this.item.ecmMarketingTypeRelationId,
comName: 'wxa',
title: this.form.title,
mediaId: this.form.mediaId,
pagePath: JSON.stringify(this.wechatContent)
mediaId: this.form.mediaId
};
// 自定义链接
if (this.preValue === 5) {
sendData.pagePath = JSON.stringify({
customUrl: this.options2.find(v => {
return v.linkId === this.nextValue;
}).url,
pageId: this.nextValue,
pageType: 5
});
} else {
sendData.pagePath = JSON.stringify(this.wechatContent);
}
if (!sendData.title) {
this.$message({ type: 'warning', message: '简介未填写' });
return;
......@@ -205,10 +266,11 @@ export default {
this.$message({ type: 'warning', message: '图片未上传' });
return;
}
if (!sendData.pagePath) {
if (!this.preValue || !this.nextValue) {
this.$message({ type: 'warning', message: '链接选择' });
return;
}
this.$emit('sendItem', sendData);
this.close();
},
......
......@@ -16,7 +16,7 @@
<div class="dm-marketing__content__item" v-for="(v, i) in list" :key="i">
<i class="dm-marketing__content--index">{{ i + 1 }}</i>
<component :is="v.comName" :item="v.item" :isSupportVar="isSupportVar"></component>
<i class="el-icon-edit dm-marketing__opt--icon" v-if="v.comName === 'item-teltask' || v.comName === 'item-text' || v.comName === 'item-wxa'" @click="editItem(v)"></i>
<i class="el-icon-edit dm-marketing__opt--icon" v-if="v.comName === 'item-teltask' || v.comName === 'item-text' || v.comName === 'item-wxa' || v.comName === 'item-integral'" @click="editItem(v)"></i>
<dm-delete @confirm="delItem(v)">
<i class="el-icon-delete dm-marketing__opt--icon"></i>
</dm-delete>
......@@ -26,7 +26,7 @@
<div class="dm-marketing__opt--wrap" @mouseleave="optShow = false">
<i class="el-icon-plus dm-marketing__opt--icon--bottom" v-if="list.length && list.length < maxEventCount" @mouseover="optShow = true"></i>
<transition name="fade">
<opt @addItem="addItem" :options="options" v-if="list.length && list.length < maxEventCount && optShow" style="margin:20px 0 0 15px;"></opt>
<opt @addItem="addItem" :options="options" v-if="list.length && list.length < maxEventCount && optShow" style="margin:0px 0 0 15px;position:relative;top:10px;"></opt>
</transition>
</div>
<!-- 弹窗组件 -->
......@@ -48,6 +48,7 @@ import itemText from './components/item-text.vue';
import itemImage from './components/item-image.vue';
import itemMessage from './components/item-Message.vue';
import itemTeltask from './components/item-teltask.vue';
import itemIntegral from './components/item-integral.vue';
//弹窗组件
import libTeletext from './components/lib-teletext.vue';
import libMessage from './components/lib-Message.vue';
......@@ -56,10 +57,11 @@ import libText from './components/lib-text.vue';
import libWxa from './components/lib-wxa.vue';
import libImage from './components/lib-image.vue';
import libTeltask from './components/lib-teltask.vue';
import libIntegral from './components/lib-integral.vue';
// 全部的操作项
// eslint-disable-next-line
const allOptions = [{ name: '图文', value: 'teletext', key: 1, img: require('./assets/img/teletext.svg') }, { name: '文本', value: 'text', key: 2, img: require('./assets/img/text.svg') }, { name: '小程序', value: 'wxa', key: 3, img: require('./assets/img/wxa.svg') }, { name: '图片', value: 'image', key: 4, img: require('./assets/img/image.svg') }, { name: '卡券', value: 'card', key: 5, img: require('./assets/img/card.svg') }, { name: '短信', value: 'message', key: 6, img: require('./assets/img/message.svg') }, { name: '话务', value: 'teltask', key: 7, img: require('./assets/img/teltask.svg') }];
const allOptions = [{ name: '图文', value: 'teletext', key: 1, img: require('./assets/img/teletext.svg') }, { name: '文本', value: 'text', key: 2, img: require('./assets/img/text.svg') }, { name: '小程序', value: 'wxa', key: 3, img: require('./assets/img/wxa.svg') }, { name: '图片', value: 'image', key: 4, img: require('./assets/img/image.svg') }, { name: '卡券', value: 'card', key: 5, img: require('./assets/img/card.svg') }, { name: '短信', value: 'message', key: 6, img: require('./assets/img/message.svg') }, { name: '话务', value: 'teltask', key: 7, img: require('./assets/img/teltask.svg')}, { name: '积分', value: 'integral', key: 8, img: require('./assets/img/integral.svg') }];
export default {
name: 'vue-gic-marketing-event',
components: {
......@@ -73,6 +75,7 @@ export default {
'item-image': itemImage,
'item-message': itemMessage,
'item-teltask': itemTeltask,
'item-integral': itemIntegral,
'lib-teletext': libTeletext,
'lib-message': libMessage,
......@@ -80,7 +83,8 @@ export default {
'lib-text': libText,
'lib-wxa': libWxa,
'lib-image': libImage,
'lib-teltask': libTeltask
'lib-teltask': libTeltask,
'lib-integral': libIntegral
},
props: {
// 页面编码——- 1001-智能引擎; 1002-微信营销; 1003-被关注回复; 1004-关键字回复
......@@ -122,6 +126,7 @@ export default {
// 初始化获取配置项
init() {
getMarketingEvent({ pageCode: this.code }).then(res => {
console.log(res);
if (res.errorCode === 0) {
this.maxEventCount = Number(res.result.maxEventCount || 0);
let list = res.result.list || [];
......@@ -140,13 +145,13 @@ export default {
},
// 初始化获取列表
getMarketingList() {
console.log(this.ecmPlanId);
// console.log(this.ecmPlanId);
getMarketingTypeDetails({ ecmPlanId: this.ecmPlanId }).then(res => {
if (res.errorCode === 0) {
this.list = [];
let result = res.result.typeRelationList || [];
let brandInfo = res.result.enterprise || {};
// 种类型 处理
// 种类型 处理
result.map(v => {
switch (v.marketingType) {
case 'teletext': // 1 图文
......@@ -170,6 +175,10 @@ export default {
case 'teltask': // 7 话务
this.list.push({ comName: 'item-teltask', item: { ...v.teltask, ecmMarketingTypeRelationId: v.ecmMarketingTypeRelationId, relationId: v.relationId, ecmPlanId: v.ecmPlanId } });
break;
case 'integral': // 8 积分
this.list.push({ comName: 'item-integral', item: { integralCount: v.integralCount, ecmMarketingTypeRelationId: v.ecmMarketingTypeRelationId, relationId: v.relationId, ecmPlanId: v.ecmPlanId } });
// this.list.push({ comName: 'item-teltask', item: { ...v.teltask, ecmMarketingTypeRelationId: v.ecmMarketingTypeRelationId, relationId: v.relationId, ecmPlanId: v.ecmPlanId } });
break;
}
});
......@@ -191,7 +200,7 @@ export default {
if (val.ecmMarketingTypeRelationId) {
params.ecmMarketingTypeRelationId = val.ecmMarketingTypeRelationId;
}
// 种传值 1.话务
// 种传值 1.话务
if (val.comName === 'teltask') {
params.title = val.title;
params.teltask = {
......@@ -244,6 +253,12 @@ export default {
params.relationId = val.smsTemplateId;
}
//8.积分
if (val.comName === 'integral') {
params.title = `${val.integral}积分`;
params.integralCount = val.integral;
}
// 接口请求 保存
saveUpdateMarketingType({ marketingType: JSON.stringify(params) }).then(res => {
this.getMarketingList();
......
......@@ -218,7 +218,7 @@ export default {
}
},
created() {
gameInfo = {}; // 清空闭包
gameInfo = {};
if (this.$route.meta.type === 'edit') {
this.ptyxDetail();
this.$store.commit('mutations_breadcrumb', [{ name: '营销管理', path: '' }, { name: '游戏营销', path: '/game' }, { name: '拼图游戏', path: '/game/ptyx' }, { name: '拼图游戏编辑', path: '' }]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment