Commit d02fd2c9 by 无尘

feat: 增加首页判断和配置接口

parent 4f1f94b3
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>分享有礼</title><link href=./static/css/app.13e458bdac4827b11d85f883afe1d09c.css rel=stylesheet></head><body style="background-color: #f0f2f5;min-width: 1400px;"><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/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.33.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.03.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-new.2.0.29.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-card.2.0.13.js></script><script src=//web-1251519181.file.myqcloud.com/components/people.2.0.38.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.11.js></script><script src=//web-1251519181.file.myqcloud.com/components/area-ab.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/selector.1.1.91.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.12.js></script><script type=text/javascript src=./static/js/manifest.a844c1f769f49bccb30e.js></script><script type=text/javascript src=./static/js/vendor.14f8172dd3290d7d86d8.js></script><script type=text/javascript src=./static/js/app.fea04cb8f4b9cb9f749e.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>分享有礼</title><link href=./static/css/app.f32f9ac0daccf04b5a57ee1815ddc55c.css rel=stylesheet></head><body style="background-color: #f0f2f5;min-width: 1400px;"><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/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.33.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.03.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-new.2.0.29.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-card.2.0.13.js></script><script src=//web-1251519181.file.myqcloud.com/components/people.2.0.38.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.11.js></script><script src=//web-1251519181.file.myqcloud.com/components/area-ab.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/selector.1.1.91.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.12.js></script><script type=text/javascript src=./static/js/manifest.b882b3dabcb3120bd3ad.js></script><script type=text/javascript src=./static/js/vendor.14f8172dd3290d7d86d8.js></script><script type=text/javascript src=./static/js/app.fea04cb8f4b9cb9f749e.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 n=window.webpackJsonp;window.webpackJsonp=function(r,c,a){for(var f,i,u,d=0,s=[];d<r.length;d++)i=r[d],t[i]&&s.push(t[i][0]),t[i]=0;for(f in c)Object.prototype.hasOwnProperty.call(c,f)&&(e[f]=c[f]);for(n&&n(r,c,a);s.length;)s.shift()();if(a)for(d=0;d<a.length;d++)u=o(o.s=a[d]);return u};var r={},t={15:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var c=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,o.nc&&a.setAttribute("nonce",o.nc),a.src=o.p+"static/js/"+e+"."+{0:"0e10d3a3345996000104",1:"5b546fa38466a0b05e37",2:"8047952b46a1c7414058",3:"d0027d91a91c09086609",4:"b1fce92cd9cf5ce634ec",5:"4426b0fcce1baf83ce11",6:"fda09ea240d5c03fd4f4",7:"b0fd74564cc799593b8f",8:"fe9ec49f63ecd8e527ba",9:"522a01ff8d619d2bf030",10:"e16b73d2d4b922255e52",11:"c11d02c33702d00b2e2e",12:"1a632fbab3e4cc65078b"}[e]+".js";var f=setTimeout(i,12e4);function i(){a.onerror=a.onload=null,clearTimeout(f);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return a.onerror=a.onload=i,c.appendChild(a),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="./",o.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,f){for(var a,i,u,d=0,b=[];d<r.length;d++)i=r[d],t[i]&&b.push(t[i][0]),t[i]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a]);for(n&&n(r,c,f);b.length;)b.shift()();if(f)for(d=0;d<f.length;d++)u=o(o.s=f[d]);return u};var r={},t={15:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var c=document.getElementsByTagName("head")[0],f=document.createElement("script");f.type="text/javascript",f.charset="utf-8",f.async=!0,f.timeout=12e4,o.nc&&f.setAttribute("nonce",o.nc),f.src=o.p+"static/js/"+e+"."+{0:"faf56cdf4f10498cbe2c",1:"5b546fa38466a0b05e37",2:"29c6003691290fe7d894",3:"1ac8a96ca84071b5bce2",4:"e42560cdcc9ef2f1fe8a",5:"8ecd133bf1cda0bdffb4",6:"fda09ea240d5c03fd4f4",7:"b0fd74564cc799593b8f",8:"fe9ec49f63ecd8e527ba",9:"522a01ff8d619d2bf030",10:"e16b73d2d4b922255e52",11:"c11d02c33702d00b2e2e",12:"b96af0829c134b12bfbb"}[e]+".js";var a=setTimeout(i,12e4);function i(){f.onerror=f.onload=null,clearTimeout(a);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return f.onerror=f.onload=i,c.appendChild(f),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="./",o.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
......@@ -151,3 +151,21 @@ export const postForm = (url, params) => {
headers: {} //'content-type': 'application/x-www-form-urlencoded'multipart/form-data{"token": token}
});
};
/**
* post excel
*/
export const postExcel = (url, params) => {
params.requestProject = 'share-config';
return Vue.axios({
method: 'post',
url: `${local}${url}`,
data: qs.stringify(params),
responseType: 'blob',
headers: {
'content-type': 'application/x-www-form-urlencoded'
} //multipart/form-data{"token": token}
});
};
......@@ -7,7 +7,7 @@ export default {
/*
* let storeBusinessTime="10:00-22:00" to
*/
timeToDate: function(val) {
timeToDate: function (val) {
let date = new Date();
let y = date.getFullYear();
let m = date.getMonth() + 1;
......@@ -16,7 +16,7 @@ export default {
let d = [];
let newArr = [];
let dArr = val.split('-');
dArr.forEach(function(ele, index) {
dArr.forEach(function (ele, index) {
newArr.push(ele.split(':'));
});
d = [new Date(y, m, day, newArr[0][0], newArr[0][1]), new Date(y, m, day, newArr[1][0], newArr[1][1])];
......@@ -59,5 +59,53 @@ export default {
return [year, month, day].map(formatNumber).join(sym || '-') + ' ' + [h, m, s].map(formatNumber).join(':');
}
return '--';
},
/**
* 时间戳---> 年.月.日 时:分:秒
* @param timestamp
*/
formatTimeYmdHms(data) {
if (!data) {
return;
}
let date = new Date(data);
let month = date.getMonth() + 1;
let day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate();
let newMonth = month < 10 ? '0' + month : month;
let hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours();
let minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes();
let seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();
return `${date.getFullYear()}.${newMonth}.${day} ${hours}:${minutes}:${seconds}`;
},
/**
* 时间戳---> 年-月-日
* @param timestamp
*/
timeStampToYmd(data) {
if (!data) {
return;
}
let date = new Date(data);
let month = date.getMonth() + 1;
let day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate();
let newMonth = month < 10 ? '0' + month : month;
return `${date.getFullYear()}-${newMonth}-${day}`;
},
/**
* 时间戳---> 时:分:秒
* @param timestamp
*/
timeStampToHms(data) {
if (!data) {
return;
}
let date = new Date(data);
let hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours();
let minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes();
let seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();
return `${hours}:${minutes}:${seconds}`;
}
};
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-11-18 10:37:02
* @LastEditors: 无尘
* @LastEditTime: 2019-11-26 20:44:42
* @LastEditTime: 2019-11-27 17:35:58
-->
<!--
<base-config @submitNext="submitNext"></base-config>
......@@ -21,27 +21,27 @@ import baseConfig from '@/components/active-config/base-config.vue';
:rules="rules"
>
<el-form-item
v-if="$route.query.acitivityId"
v-if="$route.query.activityId"
label="活动目的:"
prop=""
> </el-form-item>
<el-form-item
v-if="$route.query.acitivityId"
v-if="$route.query.activityId"
label="转化路径:"
prop=""
> </el-form-item>
<el-form-item
v-if="$route.query.acitivityId"
v-if="$route.query.activityId && activityMarketPageName"
label="活动营销页:"
prop=""
> </el-form-item>
<el-form-item
v-if="$route.query.acitivityId"
v-if="$route.query.activityId && gamePlanName"
label="游戏计划:"
prop=""
> </el-form-item>
<el-form-item
v-if="$route.query.acitivityId"
v-if="$route.query.activityId && cardCoupName"
label="卡券:"
prop=""
> </el-form-item>
......@@ -97,6 +97,7 @@ import limitInput from '@/components/limit-input.vue';
import { getRequest,postRequest } from '@/api/api';
// import showMsg from '@/common/js/showmsg';
import errMsg from '@/common/js/error';
import timeFormat from '@/common/js/timeFormat';
export default {
name: 'base-config',
props: {},
......@@ -106,12 +107,15 @@ export default {
data() {
return {
activeInfoData: {
acitivityId: '',
activityId: '',
parentGoalId: '',
goalId: '',
activityMarketPageId: '',
gamePlanId: '',
cardCoupId: '',
activityMarketPageName: '',
gamePlanName: '',
cardCoupName: '',
router: '',
activityName: '',
dateRange: []
......@@ -146,7 +150,6 @@ export default {
*/
changeDate(e) {
const that = this;
console.log(e)
if (!e) {
that.choiceDateCopy = [];
that.activeInfoData.dateRange = [];
......@@ -178,6 +181,7 @@ export default {
that.activeInfoData.dateRange = [];
}
let para = {
activityId: that.activeInfoData.activityId,
activityName: that.activeInfoData.activityName,
startDate: that.activeInfoData.dateRange[0],
endDate: that.activeInfoData.dateRange[1],
......@@ -192,8 +196,9 @@ export default {
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
that.activeInfoData.activityId = resData.result;
that.$emit('submitNext', that.activeInfoData);
// that.$store.dispatch('saveBaseInfo', that.activeInfoData);
that.$store.dispatch('saveBaseInfo', that.activeInfoData);
return;
}
errMsg.errorMsg(resData);
......@@ -212,15 +217,17 @@ export default {
getBaseData() {
const that = this;
let para = {
acitivityId: that.$route.query.acitivityId
activityId: that.$route.query.activityId
};
getRequest('/sharing-core-web/get-activity-base-info', para)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
if (resData.result) {
if (resData.result && resData.result.router) {
resData.result.router = JSON.parse(resData.result.router);
}
resData.result.startDate = timeFormat.timeToDateTime(resData.result.startDate);
resData.result.endDate = timeFormat.timeToDateTime(resData.result.endDate);
that.activeInfoData = resData.result;
return false;
}
......@@ -236,7 +243,7 @@ export default {
},
mounted() {
const that = this;
if (that.$route.query.hasOwnProperty('acitivityId')) {
if (that.$route.query.hasOwnProperty('activityId')) {
that.getBaseData();
}
if (Object.keys(that.$store.state.activeInfo).length) {
......@@ -244,10 +251,17 @@ export default {
that.activeInfoData.parentGoalId = info.firstGoal.goalId;
that.activeInfoData.goalId = info.secondGoal.goalId;
that.activeInfoData.activityMarketPageId = info.markingValue;
that.activeInfoData.activityMarketPageName = info.activityMarketPageName;
that.activeInfoData.gamePlanId = info.gameValue[1];
that.activeInfoData.gamePlanName = info.gamePlanName;
that.activeInfoData.cardCoupId = info.cardValue;
that.activeInfoData.cardCoupName = info.cardCoupName;
that.activeInfoData.router = info.pathArr
}
// 上一步获取状态内数据
if (Object.keys(that.$store.state.baseInfo).length) {
that.activeInfoData = JSON.parse(JSON.stringify(that.$store.state.baseInfo));
}
},
};
</script>
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-11-18 10:37:02
* @LastEditors: 无尘
* @LastEditTime: 2019-11-26 20:13:44
* @LastEditTime: 2019-11-27 16:54:50
-->
<!--
<card-config @submitBack="submitBack" @submitNext="submitNext"></card-config>
......@@ -154,10 +154,10 @@ export default {
/**
* 获取活动中心数据
*/
getData(acitivityId) {
getData(activityId) {
const that = this;
let para = {
acitivityId: acitivityId || that.$route.query.acitivityId
activityId: activityId || that.$route.query.activityId
};
getRequest('/sharing-core-web/get-activity-applet', para)
.then(res => {
......@@ -178,9 +178,12 @@ export default {
},
mounted() {
const that = this;
if (that.$route.query.hasOwnProperty('acitivityId')) {
if (that.$route.query.hasOwnProperty('activityId')) {
that.getData();
}
if (Object.keys(that.$store.state.baseInfo).length) {
that.activeInfoData.activityId = JSON.parse(JSON.stringify(that.$store.state.baseInfo)).activityId;
}
}
};
</script>
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-11-18 10:37:02
* @LastEditors: 无尘
* @LastEditTime: 2019-11-22 09:51:22
* @LastEditTime: 2019-11-27 20:48:16
-->
<!--
<center-config @submitBack="submitBack" @submitNext="submitNext"></center-config>
......@@ -207,7 +207,7 @@ export default {
changePage(e) {
const that = this;
let para = { pageId: e };
getRequest('/api-admin/page-detail?pageId=ff808081644fea4201644fedaf3e0040', para)
getRequest('/api-admin/page-detail', para)
.then(res => {
let resData = res.data;
if (resData.errorCode == 0) {
......@@ -247,7 +247,7 @@ export default {
getMarkingList() {
const that = this;
let para = {};
getRequest('/sharing-core-web/load-marking-page', para)
getRequest('/sharing-core-web/list-marking-page', para)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
......@@ -316,10 +316,10 @@ export default {
/**
* 获取活动中心数据
*/
getData(acitivityId) {
getData() {
const that = this;
let para = {
acitivityId: acitivityId || that.$route.query.acitivityId
activityId: that.$route.query.activityId
};
getRequest('/sharing-core-web/get-activity-center', para)
.then(res => {
......@@ -340,10 +340,16 @@ export default {
},
mounted() {
const that = this;
if (that.$route.query.hasOwnProperty('acitivityId')) {
if (that.$route.query.hasOwnProperty('activityId')) {
that.getData();
}
that.changePage();
if (Object.keys(that.$store.state.baseInfo).length) {
that.activeInfoData.activityId = JSON.parse(JSON.stringify(that.$store.state.baseInfo)).activityId;
}
if (Object.keys(that.$store.state.centerInfo).length) {
that.activeInfoData = JSON.parse(JSON.stringify(that.$store.state.centerInfo));
}
}
};
</script>
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-11-18 10:37:02
* @LastEditors: 无尘
* @LastEditTime: 2019-11-26 20:24:40
* @LastEditTime: 2019-11-27 09:41:49
-->
<!--
<poster-config @submitBack="submitBack" @submitNext="submitNext"></poster-config>
......@@ -263,10 +263,10 @@ export default {
/**
* 获取活动中心数据
*/
getData(acitivityId) {
getData(activityId) {
const that = this;
let para = {
acitivityId: acitivityId || that.$route.query.acitivityId
activityId: activityId || that.$route.query.activityId
};
getRequest('/sharing-core-web/get-activity-share', para)
.then(res => {
......@@ -287,9 +287,12 @@ export default {
},
mounted() {
const that = this;
if (that.$route.query.hasOwnProperty('acitivityId')) {
if (that.$route.query.hasOwnProperty('activityId')) {
that.getData();
}
if (Object.keys(that.$store.state.baseInfo).length) {
that.activeInfoData.activityId = JSON.parse(JSON.stringify(that.$store.state.baseInfo)).activityId;
}
}
};
</script>
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-11-18 10:37:02
* @LastEditors: 无尘
* @LastEditTime: 2019-11-26 20:14:25
* @LastEditTime: 2019-11-27 20:41:29
-->
<!--
<reward-config @submitBack="submitBack" @submitNext="submitNext"></reward-config>
......@@ -441,10 +441,10 @@ export default {
/**
* 获取活动中心数据
*/
getData(acitivityId) {
getData(activityId) {
const that = this;
let para = {
acitivityId: acitivityId || that.$route.query.acitivityId
activityId: activityId || that.$route.query.activityId
};
getRequest('/sharing-core-web/get-activity-award', para)
.then(res => {
......@@ -465,8 +465,14 @@ export default {
},
mounted() {
const that = this;
if (that.$route.query.hasOwnProperty('acitivityId')) {
that.getData();
if (that.$route.query.hasOwnProperty('activityId')) {
that.getData();
}
if (Object.keys(that.$store.state.baseInfo).length) {
that.activeInfoData.activityId = JSON.parse(JSON.stringify(that.$store.state.baseInfo)).activityId;
}
if (Object.keys(that.$store.state.rewardInfo).length) {
that.activeInfoData = JSON.parse(JSON.stringify(that.$store.state.rewardInfo));
}
}
};
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-11-13 16:37:02
* @LastEditors: 无尘
* @LastEditTime: 2019-11-26 19:47:15
* @LastEditTime: 2019-11-27 17:33:03
-->
<!--
<active-select></active-select>
......@@ -163,7 +163,10 @@ import activeSelect from '@/components/active/active-select.vue';
v-if="item.id=='game'"
class="li-cell-select"
>
<game-select v-mode="gameValue"></game-select>
<game-select
v-model="gameValue"
@changeGame="changeGame"
></game-select>
</div>
<div
v-if="item.id=='card'"
......@@ -300,10 +303,13 @@ export default {
// 三个卡片
markingList: [],
markingValue: '',
activityMarketPageName: '',
gameList: [],
gameValue: [],
gamePlanName: '',
cardList: [],
cardValue: '',
cardCoupName: '',
// 选择的路径
pathNames: [],
pathIds: [],
......@@ -445,6 +451,13 @@ export default {
that.getText(transIds)
},
/**
* 游戏改变
*/
changeGame(val) {
const that = this;
that.gamePlanName = val;
},
/**
* 跳转卡片创建页
*/
toRedirectPage(item) {
......@@ -468,6 +481,21 @@ export default {
showMsg.showmsg('请先完善活动创建前准备工作', 'warning');
return false;
}
if (that.pathNames.includes('访问活动营销页') && that.markingValue) {
that.markingList.forEach(ele => {
if (that.markingValue == ele.pageId) {
that.activityMarketPageName = ele.name;
}
})
}
if(that.pathNames.includes('卡券领取')&&that.cardValue) {
that.cardList.forEach(ele => {
if (that.cardValue == ele.coupCardId) {
that.cardCoupName = ele.cardName;
}
})
}
// 整理路径id和值
let pathArr = [];
that.thirdData.forEach(ele => {
......@@ -478,13 +506,37 @@ export default {
})
}
})
// 判断会员招募
if (that.secondGoal.goalId == 5 && pathArr.length == 1) {
showMsg.showmsg('请在可选项中至少选择一项', 'warning');
return false;
}
// 判断卡券营销
if (that.secondGoal.goalId == 8 &&( pathArr.length == 1 || (pathArr.length == 2&&pathArr.map(ele=>ele.transId).includes(4)))) {
showMsg.showmsg('请在可选项中至少选择一项', 'warning');
return false;
}
// 判断线下门店,微信商城
if ((that.secondGoal.goalId == 10 || that.secondGoal.goalId == 11) &&( pathArr.length == 1 || ((pathArr.length == 2 &&(pathArr.map(ele=>ele.transId).includes(4)|| pathArr.map(ele=>ele.transId).includes(16))) || (pathArr.length == 3 &&pathArr.map(ele=>ele.transId).includes(4)&& pathArr.map(ele=>ele.transId).includes(16)) ))) {
showMsg.showmsg('请在可选项中至少选择一项', 'warning');
return false;
}
// 判断全渠道
if (that.secondGoal.goalId == 9 &&( pathArr.length == 1 || ((pathArr.length == 2 &&(pathArr.map(ele=>ele.transId).includes(4)|| pathArr.map(ele=>ele.transId).includes(16))) ))) {
showMsg.showmsg('请在可选项中至少选择一项', 'warning');
return false;
}
let indexObj = {
firstGoal: that.firstGoal,
secondGoal: that.secondGoal,
pathArr: pathArr,
markingValue: that.markingValue,
activityMarketPageName: that.activityMarketPageName,
gameValue: that.gameValue,
cardValue: that.cardValue
gamePlanName: that.gamePlanName,
cardValue: that.cardValue,
cardCoupName: that.cardCoupName
}
that.judgeCreate(indexObj);
},
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-11-13 16:37:02
* @LastEditors: 无尘
* @LastEditTime: 2019-11-14 17:33:02
* @LastEditTime: 2019-11-27 11:16:04
-->
<!--
<bar-chart :funnelData="funnelData" :charHeight="charHeight"></bar-chart>
......@@ -43,9 +43,9 @@ export default {
components: { },
data() {
this.chartSettings = {
showLine: ['传播系数']
//showLine: ['传播系数']
}
this.colors = ['#1890FF','#5AD8A6', '#FF6383']
this.colors = ['#5B8FF9','#5AD8A6', '#FF6383']
return {};
}
/* methods() {
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-11-13 16:37:02
* @LastEditors: 无尘
* @LastEditTime: 2019-11-14 16:45:48
* @LastEditTime: 2019-11-27 11:13:08
-->
<!--
<data-statistics></data-statistics>
......@@ -18,7 +18,10 @@ import dataStatistics from '@/components/active/data-statistics.vue';
<div class="data-statistics-left">
<ul class="flex flex-pack-center flex-align-center">
<li class="flex-1 flex flex-pack-center flex-align-center">
<div class="data-statistics-icon"><img src="" alt="" /></div>
<div class="data-statistics-icon"><img
src=""
alt=""
/></div>
<div class="data-statistics-txt flex flex-column">
<div class="font-14 color-606266">活动曝光量</div>
......@@ -26,7 +29,10 @@ import dataStatistics from '@/components/active/data-statistics.vue';
</div>
</li>
<li class="flex-1 flex flex-pack-center flex-align-center">
<div class="data-statistics-icon"><img src="" alt="" /></div>
<div class="data-statistics-icon"><img
src=""
alt=""
/></div>
<div class="data-statistics-txt flex flex-column">
<div class="font-14 color-606266">参与人数</div>
......@@ -34,7 +40,10 @@ import dataStatistics from '@/components/active/data-statistics.vue';
</div>
</li>
<li class="flex-1 flex flex-pack-center flex-align-center">
<div class="data-statistics-icon"><img src="" alt="" /></div>
<div class="data-statistics-icon"><img
src=""
alt=""
/></div>
<div class="data-statistics-txt flex flex-column">
<div class="font-14 color-606266">受邀人数</div>
......@@ -47,7 +56,10 @@ import dataStatistics from '@/components/active/data-statistics.vue';
<div class="font-14 color-606266">参与率</div>
<div class="font-22 color-303133 p-t-5">70%</div>
<div class="data-percentage">
<div class="data-percentage-inner" :style="{ width: '70%' }"></div>
<div
class="data-percentage-inner"
:style="{ width: '70%' }"
></div>
</div>
</div>
<div class="data-statistics-right border-box m-l-20">
......@@ -77,7 +89,7 @@ export default {
components: {},
data() {
this.chartSettings = {
showLine: ['传播系数']
//showLine: ['传播系数']
};
this.colors = ['#1890FF', '#5AD8A6', '#FF6383'];
return {};
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-11-13 16:37:02
* @LastEditors: 无尘
* @LastEditTime: 2019-11-21 11:50:20
* @LastEditTime: 2019-11-27 11:14:01
-->
<!--
<finished-active></finished-active>
......@@ -17,7 +17,7 @@ import finishedActive from '@/components/active/finished-active.vue';
<ul>
<template v-for="(item, index) in finishedData">
<li
:class="['border-box', selectItem == item.acitivityId && index != 0 ? 'li-border' : '']"
:class="['border-box', selectItem == item.activityId && index != 0 ? 'li-border' : '']"
:key="index + 'data'"
>
<div
......@@ -25,7 +25,7 @@ import finishedActive from '@/components/active/finished-active.vue';
@click.stop="selectLi(item)"
>
<div class="active-title-left">
<div class="active-title-name font-18 color-303133">{{ item.acitivityName }}</div>
<div class="active-title-name font-18 color-303133">{{ item.activityName }}</div>
<div class="active-title-date font-14 color-909399 m-t-7">{{ item.startDate | formatTimeYmdHms }} - {{ item.endDate | formatTimeYmdHms }}</div>
</div>
<div class="active-title-right">
......@@ -47,7 +47,7 @@ import finishedActive from '@/components/active/finished-active.vue';
</div>
</div>
<div
v-if="selectItem == item.acitivityId"
v-if="selectItem == item.activityId"
class="finished-active-body"
>
<out-date-active
......@@ -89,14 +89,14 @@ export default {
return {
funnelData: [],
barChartData: {
columns: ['日期', '访问用户', '下单用户', '传播系数'],
rows: [{ 日期: '1/1', 访问用户: 1393, 下单用户: 1093, 传播系数: 0.32 }, { 日期: '1/2', 访问用户: 3530, 下单用户: 3230, 传播系数: 0.26 }, { 日期: '1/3', 访问用户: 2923, 下单用户: 2623, 传播系数: 0.76 }, { 日期: '1/4', 访问用户: 1723, 下单用户: 1423, 传播系数: 0.49 }, { 日期: '1/5', 访问用户: 3192, 下单用户: 3192, 传播系数: 0.323 }, { 日期: '1/6', 访问用户: 3593, 下单用户: 3293, 传播系数: 0.78 }]
columns: ['日期', '访问用户', '下单用户'],
rows: [{ 日期: '1/1', 访问用户: 1393, 下单用户: 1093, }, { 日期: '1/2', 访问用户: 3530, 下单用户: 3230 }, { 日期: '1/3', 访问用户: 2923, 下单用户: 2623 }, { 日期: '1/4', 访问用户: 1723, 下单用户: 1423 }, { 日期: '1/5', 访问用户: 3192, 下单用户: 3192}, { 日期: '1/6', 访问用户: 3593, 下单用户: 3293 }]
},
selectItem: '',
finishedData: [
{
acitivityId: 1,
acitivityName: '1',
activityId: 1,
activityName: '1',
startDate: 1574300553953,
endDate: 1574300553953
}
......@@ -113,17 +113,17 @@ export default {
*/
selectLi(item) {
const that = this;
that.selectItem = item.acitivityId;
that.getActivityData(item.acitivityId);
that.selectItem = item.activityId;
that.getActivityData(item.activityId);
},
/**
* 获取单个活动数据信息
* /sharing-core-web/get-activity-data-summary
*/
getActivityData(acitivityId) {
getActivityData(activityId) {
const that = this;
let para = {
acitivityId: acitivityId
activityId: activityId
};
getRequest('/sharing-core-web/get-activity-data-summary', para)
.then(res => {
......@@ -147,14 +147,14 @@ export default {
*/
toEdit(index, row) {
const that = this;
that.$router.push(`/createActive?activityId={row.activityId}&editFlag=show`)
that.$router.push(`/createActive?activityId=${row.activityId}&editFlag=show`)
},
/**
* 数据明细
*/
toDataList(index, row) {
const that = this;
that.$router.push(`/dataDetail?activityId={row.activityId}`)
that.$router.push(`/dataDetail?activityId=${row.activityId}`)
},
/**
* 复制路径
......
<!--
<game-select v-mode=""></game-select>
<game-select v-model=""></game-select>
import gameSelect from '@/components/active/game-select.vue'
-->
......@@ -82,6 +82,15 @@ export default {
handleChange(value) {
const that = this;
that.$emit('input', value);
that.options.forEach(ele => {
if (value.length == 2 && value[0] == ele.id) {
ele.children.forEach(child => {
if (value[1] == child.gameId) {
that.$emit('changeGame', child.gameName);
}
})
}
})
},
/**
*
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-11-13 16:37:02
* @LastEditors: 无尘
* @LastEditTime: 2019-11-21 12:42:40
* @LastEditTime: 2019-11-27 09:46:42
-->
<!--
<in-progress-active></in-progress-active>
......@@ -17,7 +17,7 @@ import inProgressActive from '@/components/active/in-progress-active.vue';
<ul>
<template v-for="(item, index) in inProgressData">
<li
:class="['border-box', selectItem == item.acitivityId && index != 0 ? 'li-border' : '']"
:class="['border-box', selectItem == item.activityId && index != 0 ? 'li-border' : '']"
:key="index + 'data'"
>
<div
......@@ -25,7 +25,7 @@ import inProgressActive from '@/components/active/in-progress-active.vue';
@click.stop="selectLi(item)"
>
<div class="active-title-left">
<div class="active-title-name font-18 color-303133">{{ item.acitivityName }}</div>
<div class="active-title-name font-18 color-303133">{{ item.activityName }}</div>
<div class="active-title-date font-14 color-909399 m-t-7">{{ item.startDate | formatTimeYmdHms }} - {{ item.endDate | formatTimeYmdHms }}</div>
</div>
<div class="active-title-right">
......@@ -78,8 +78,8 @@ export default {
selectItem: '',
inProgressData: [
{
acitivityId: 1,
acitivityName: '',
activityId: 1,
activityName: '',
startDate: '',
endDate: '',
acitivityUrl: ''
......@@ -93,17 +93,17 @@ export default {
*/
selectLi(item) {
const that = this;
that.selectItem = item.acitivityId;
that.getActivityData(item.acitivityId);
that.selectItem = item.activityId;
that.getActivityData(item.activityId);
},
/**
* 获取单个活动数据信息
* /sharing-core-web/get-activity-data-summary
*/
getActivityData(acitivityId) {
getActivityData(activityId) {
const that = this;
let para = {
acitivityId: acitivityId
activityId: activityId
};
getRequest('/sharing-core-web/get-activity-data-summary', para)
.then(res => {
......@@ -127,14 +127,14 @@ export default {
*/
toEdit(index, row) {
const that = this;
that.$router.push(`/createActive?activityId={row.activityId}`)
that.$router.push(`/createActive?activityId=${row.activityId}`)
},
/**
* 数据明细
*/
toDataList(index, row) {
const that = this;
that.$router.push(`/dataDetail?activityId={row.activityId}`)
that.$router.push(`/dataDetail?activityId=${row.activityId}`)
},
/**
* 复制路径
......@@ -178,7 +178,9 @@ export default {
});
}
that.inProgressData = arr || [];
that.getActivityData(arr[0].acitivityId);
if (arr.length) {
that.getActivityData(arr[0].activityId);
}
return false;
}
errMsg.errorMsg(resData);
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-11-20 13:44:22
* @LastEditors: 无尘
* @LastEditTime: 2019-11-21 20:29:49
* @LastEditTime: 2019-11-27 20:52:10
-->
<!--
单个上传组件
......@@ -116,7 +116,7 @@ export default {
} else {
baseUrl = host;
}
that.upUrl = `${baseUrl}/api-plug/upload-img?wxFlag=1&requestProject=share`;
that.upUrl = `${baseUrl}/sharing-core-web/upload?requestProject=share-config&wxFlag=1`;
return that.upUrl;
},
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-11-20 13:44:22
* @LastEditors: 无尘
* @LastEditTime: 2019-11-21 20:29:35
* @LastEditTime: 2019-11-27 20:52:25
-->
<!--
单个上传组件
......@@ -110,7 +110,7 @@ export default {
} else {
baseUrl = host;
}
that.upUrl = `${baseUrl}/api-plug/upload-img?wxFlag=1&requestProject=share`;
that.upUrl = `${baseUrl}/sharing-core-web/upload?requestProject=share-config&wxFlag=1`;
return that.upUrl;
},
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-11-15 10:10:08
* @LastEditors: 无尘
* @LastEditTime: 2019-11-15 13:58:13
* @LastEditTime: 2019-11-27 20:33:15
-->
<template>
......@@ -14,13 +14,19 @@
<div class="right-box border-box">
<div class="data-detail-tab flex flex-space-between">
<div class="data-detail-radios">
<el-radio-group v-model="tabName" style="margin-bottom: 30px;">
<el-radio-group
v-model="tabName"
style="margin-bottom: 30px;"
>
<el-radio-button label="invite">邀请人列表</el-radio-button>
<el-radio-button label="invited">受邀人列表</el-radio-button>
</el-radio-group>
</div>
<div class="data-detail-export">
<el-button type="primary"><i class="iconfont icon-icon_yunxiazai"></i> 导出数据</el-button>
<el-button
type="primary"
@click="exportData"
><i class="iconfont icon-icon_yunxiazai"></i> 导出数据</el-button>
</div>
</div>
<div class="data-detail-table">
......@@ -36,6 +42,8 @@
import navCrumb from '@/components/nav/nav.vue';
import inviteTable from '@/components/data-details/invite-table.vue';
import invitedTable from '@/components/data-details/invited-table.vue';
import { postExcel } from '@/api/api';
import errMsg from '@/common/js/error';
// import showMsg from '@/common/js/showmsg';
export default {
name: 'dataDetail',
......@@ -61,7 +69,42 @@ export default {
]
};
},
methods: {}
methods: {
/**
* 导出数据
*/
exportData() {
const that = this;
let para = {
activityId: that.$route.query.activityId
};
postExcel('/sharing-core-web/export-activity-invite', para)
.then(res => {
if (!res.data) {
errMsg.errorMsg('暂无数据');
return false;
}
// let resData = res.data;
const blob = new Blob([res.data], { type: 'application/vnd.ms-excel' });
const fileName = `报表.csv`;
const elink = document.createElement('a');
elink.download = fileName;
elink.style.display = 'none';
elink.href = URL.createObjectURL(blob);
document.body.appendChild(elink);
elink.click();
URL.revokeObjectURL(elink.href); // 释放URL 对象
document.body.removeChild(elink);
// errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
}
}
};
</script>
<style lang="less" scoped>
......
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