Commit 2cd0b9df authored by 王苓芝's avatar 王苓芝

运营系统功能同步

parent 3d1d248f
......@@ -5,7 +5,7 @@ Vue.use(VueRouter);
const home = r => require.ensure([], () => r(require('../view/common/Home.vue')), 'home');
const micro = r => require.ensure([], () => r(require('../view/common/Micro.vue')), 'microLayout');
// const adList = r => require.ensure([], () => r(require('../view/operation/AdList.vue')), 'adList');
const adList = r => require.ensure([], () => r(require('../view/operation/AdList.vue')), 'adList');
const newAdList = r => require.ensure([], () => r(require('../view/operation/newAdList.vue')), 'newAdList');
const userManage = r => require.ensure([], () => r(require('../view/userManage/index.vue')), 'userManage');
const dayConsumeAnalysis = r => require.ensure([], () => r(require('../view/statementManage/dayConsumeAnalysis.vue')), 'dayConsumeAnalysis');
......@@ -23,9 +23,11 @@ const sendPush = r => require.ensure([], () => r(require('../view/sendManagement
const sendMail = r => require.ensure([], () => r(require('../view/sendManagement/sendMail.vue')), 'sendMail');
const linkTransform = r => require.ensure([], () => r(require('../view/sendManagement/linkTransform.vue')), 'linkTransform');
// 积分系列
// 会员中心
const pointList = r => require.ensure([], () => r(require('../view/myPoint/pointList.vue')), 'pointList');
const pointRecord = r => require.ensure([], () => r(require('../view/myPoint/pointRecord.vue')), 'pointRecord');
const memberLevel = r => require.ensure([], () => r(require('../view/member/memberLevel.vue')), 'memberLevel');
const memberRights = r => require.ensure([], () => r(require('../view/member/memberRights.vue')), 'memberRights');
// 用户管理
const friendRecord = r => require.ensure([], () => r(require('../view/userManagement/friendRecord.vue')), 'friendRecord');
// 奖券管理
......@@ -54,10 +56,6 @@ const activeTemplateManage = r => require.ensure([], () => r(require('../view/ac
// 公众号通知消息模块
const wechatMessage = r => require.ensure([], () => r(require('../view/wechatMessage/wechatMessage.vue')), 'wechatMessage');
// 会员权益
const memberLevel = r => require.ensure([], () => r(require('../view/member/memberLevel.vue')), 'memberLevel');
const memberRights = r => require.ensure([], () => r(require('../view/member/memberRights.vue')), 'memberRights');
// 流量工厂模块
const kaManage = r => require.ensure([], () => r(require('../view/trafficFactory/kaManage.vue')), 'kaManage');
const userGroup = r => require.ensure([], () => r(require('../view/userGroup')), 'userGroup');
......@@ -98,6 +96,10 @@ const routes = [
path: 'userManage',
component: userManage,
},
{
path: 'adList',
component: adList,
},
{
path: 'specialList',
component: specialList,
......
......@@ -53,6 +53,19 @@ const menus = [
},
childNodes: [],
},
{
node: {
id: 'dbeaef7d-acf7-4d27-9432-9421bb5743f1',
name: '新广告位列表',
picture: null,
type: {
name: '菜单',
value: 2,
},
uri: 'newAdList',
},
childNodes: [],
},
],
},
{
......@@ -184,6 +197,19 @@ const menus = [
},
childNodes: [],
},
{
node: {
id: 'dde9bb49-97cb-417e-b890-5cdee4bd12e1',
name: '发送微信公众号通知',
picture: null,
type: {
name: '菜单',
value: 2,
},
uri: 'wechatMessage',
},
childNodes: [],
},
],
},
{
......@@ -211,6 +237,19 @@ const menus = [
},
childNodes: [],
},
{
node: {
id: '3a1cedbf-f4d6-4fe7-bcfc-8d2f327ca6cd', // 自己设置的id
name: '首页布局',
picture: null,
type: {
name: '菜单',
value: 2,
},
uri: 'homePageLayout',
},
childNodes: [],
},
{
node: {
id: '3a1cedbf-f4d6-4fe7-bcfc-8d2f327ca6cc',
......@@ -322,7 +361,7 @@ const menus = [
{
node: {
id: '119d1160-c446-4370-8d50-8fd749ebb39c',
name: '积分',
name: '会员中心',
picture: 'ios-list',
type: {
name: '资源组',
......@@ -334,7 +373,7 @@ const menus = [
{
node: {
id: '43a9714d-84da-459e-9182-55e06e5e717d',
name: '积分列表',
name: '会员任务',
picture: null,
type: {
name: '菜单',
......@@ -347,7 +386,7 @@ const menus = [
{
node: {
id: 'c13c3287-5580-4b2e-b979-bd58e5f11554',
name: '积分明细记录',
name: '成长值明细',
picture: null,
type: {
name: '菜单',
......@@ -357,6 +396,32 @@ const menus = [
},
childNodes: [],
},
{
node: {
id: 'f802681d-cf34-4eff-8838-1839ebe54bc3',
name: '会员等级',
picture: null,
type: {
name: '菜单',
value: 2,
},
uri: 'memberLevel',
},
childNodes: [],
},
{
node: {
id: 'f802681d-cf34-4eff-8838-1839ebe54bc3',
name: '会员权益',
picture: null,
type: {
name: '菜单',
value: 2,
},
uri: 'memberRights',
},
childNodes: [],
},
],
},
{
......@@ -371,6 +436,19 @@ const menus = [
uri: null,
},
childNodes: [
{
node: {
id: '7fec0d98-8693-9f90-7d8e-770f958fda4b', // 此处自己设置的
name: '用户管理',
picture: null,
type: {
name: '菜单',
value: 2,
},
uri: 'userManage',
},
childNodes: [],
},
{
node: {
id: '7fec0d98-8693-9f90-7d8e-770f958fda4a',
......@@ -403,7 +481,7 @@ const menus = [
node: {
id: '580b8099-2c3b-43a6-8c5d-0edfc757ee38',
name: '活动管理',
picture: null,
picture: 'checkmark-circled',
type: {
name: '资源组',
value: 1,
......@@ -443,7 +521,7 @@ const menus = [
node: {
id: '89deb3bc-f794-4dfa-b63f-5d0ce49a06eb',
name: '活动商品管理',
picture: null,
picture: 'checkmark-circled',
type: {
name: '资源组',
value: 1,
......@@ -490,30 +568,16 @@ const menus = [
},
childNodes: [],
},
],
},
{
node: {
id: '72f586b1-a65b-45fb-847a-cf11c3b56bc3',
name: '活动模版管理',
picture: 'ios-settings',
type: {
name: '资源组',
value: 1,
},
uri: null,
},
childNodes: [
{
node: {
id: 'f802681d-cf34-4eff-8838-1839ebe54bc3',
name: '活动模版管理',
id: 'e8be713e-aaf1-470a-81d3-67ad15d59c62', // 自己给的id
name: '支付限额商品列表',
picture: null,
type: {
name: '菜单',
value: 2,
},
uri: 'activeTemplateManage',
uri: 'cashPayList',
},
childNodes: [],
},
......@@ -522,7 +586,7 @@ const menus = [
{
node: {
id: '72f586b1-a65b-45fb-847a-cf11c3b56bc3',
name: '流量工厂',
name: '活动模版管理',
picture: 'ios-settings',
type: {
name: '资源组',
......@@ -534,26 +598,13 @@ const menus = [
{
node: {
id: 'f802681d-cf34-4eff-8838-1839ebe54bc3',
name: 'KA管理',
picture: null,
type: {
name: '菜单',
value: 2,
},
uri: 'kaManage',
},
childNodes: [],
},
{
node: {
id: 'f802681d-cf34-4eff-8838-1839ebe54bc3',
name: '营销配置',
name: '活动模版管理',
picture: null,
type: {
name: '菜单',
value: 2,
},
uri: 'marketingAllocation',
uri: 'activeTemplateManage',
},
childNodes: [],
},
......@@ -562,7 +613,7 @@ const menus = [
{
node: {
id: '72f586b1-a65b-45fb-847a-cf11c3b56bc3',
name: '会员权益',
name: '私域管理',
picture: 'ios-settings',
type: {
name: '资源组',
......@@ -573,27 +624,14 @@ const menus = [
childNodes: [
{
node: {
id: 'f802681d-cf34-4eff-8838-1839ebe54bc3',
name: '会员等级',
picture: null,
type: {
name: '菜单',
value: 2,
},
uri: 'memberLevel',
},
childNodes: [],
},
{
node: {
id: 'f802681d-cf34-4eff-8838-1839ebe54bc3',
name: '等级权益',
id: 'f802681d-cf34-4eff-8838-1839ebe54bc4', // 自己设置的id
name: '公众号登录页',
picture: null,
type: {
name: '菜单',
value: 2,
},
uri: 'memberRights',
uri: 'officialLanding',
},
childNodes: [],
},
......@@ -611,6 +649,7 @@ export function getMenuData() {
export function normalization(menuData = menus) {
const value = [];
const data = [...menuData];
console.log('data-menu', data);
data.forEach(item => {
let obj = {};
obj = { ...item.node };
......
......@@ -282,6 +282,7 @@
v-model="form.kaChannelNo"
ref="select"
filterable
:label="kaLabel"
class="select-width-280"
transfer
:disabled="readOnly"
......@@ -547,7 +548,6 @@ export default {
remoteMethod(query) {
if (query) {
api.getSimpleList({ kaChannelNameOrNo: query }).then(res => {
console.log(res, 'reskalist');
res.records.forEach(item => {
item.label = item.channelNo + '_' + item.channelName;
});
......@@ -588,7 +588,6 @@ export default {
}
const listDetail = [];
this.form.formModule.forEach(e => {
console.log('e', e, this.form.type);
const { startTime, endTime, bgcolor, img, cid1, activityGoodsSpecialId, timeRange, limitQuantity } = e;
const itemData = { startTime, bgcolor, endTime, img, cid1, activityGoodsSpecialId, timeRange, limitQuantity };
itemData.startTime = this.form.type !== 1 ? '' : this.form.timeSelectionFormat === 0 ? getTime(itemData.startTime) : getTime(timeRange[0]);
......@@ -601,7 +600,6 @@ export default {
itemData.img = this.form.type === 1 ? itemData && itemData.img[0] : '';
listDetail.push(itemData);
});
console.log(listDetail);
const param = deepCopy(this.form);
param.zeroBuyRule &&
param.zeroBuyRule.forEach(item => {
......@@ -610,7 +608,6 @@ export default {
delete item.specialCaseRatio;
}
});
console.log(param, 'param');
param.bannerUrl = param.bannerUrl && param.bannerUrl.join('');
// param.showBanner = +this.form.showBanner;
if (this.form.type === 1) {
......@@ -684,7 +681,7 @@ export default {
this.title = '新建';
},
async getInfo(params, type) {
this.firstEdit = true;
this.form = {};
this.kaChannelList = [];
this.readOnly = type;
this.title = type ? '查看' : '修改';
......@@ -695,10 +692,11 @@ export default {
if (item.channelNo === res.kaChannelNo) {
this.kaLabel = `${item.channelNo}_${item.channelName}`;
}
item.label = item.channelNo + '_' + item.channelName;
item.label = `${item.channelNo}_${item.channelName}`;
});
this.kaChannelList = Object.assign([], ...result.records);
this.kaChannelList = result.records;
}
this.changeChannel(res.kaChannelNo);
this.editContent = res;
// delete res.kaChannelNo;
const listDetail = [];
......@@ -714,7 +712,6 @@ export default {
this.form.img = (this.form.img && this.form.img.split(',')) || [];
this.form.bannerUrl = this.form.bannerUrl && this.form.bannerUrl.split(',');
this.form.couponMutex = res.couponMutex && res.couponMutex ? 1 : 0;
this.firstEdit = false;
this.modal = true;
},
newDel(index, isFormModule, crowd) {
......
This diff is collapsed.
......@@ -142,3 +142,13 @@ export const dynamicRules = {
pattern: /^[0-9]*[1-9][0-9]*$/,
},
};
export const limitgoodsList = [
{
id: 2,
name: '指定品类',
},
{
id: 1,
name: '指定标签',
},
];
......@@ -65,6 +65,7 @@
class="select-width-280"
:disabled="disabled()"
transfer
:label="kaLabel"
clearable
filterable
remote
......@@ -73,7 +74,7 @@
:not-found-text="kaChannelList.length !== 0 ? '' : '无匹配数据'"
placeholder="请输入"
>
<Option v-for="item in kaChannelList" :key="item.channelNo" :value="item.channelNo">{{ item.channelNo + '_' + item.channelName }}</Option>
<Option v-for="item in kaChannelList" :key="item.channelNo" :value="item.channelNo" :label="item.label"></Option>
</Select>
<p style="color: #ff6600">提示:此参数配置选中后,表示以上配置内容仅在此渠道生效;</p>
</FormItem>
......@@ -117,6 +118,7 @@ export default {
},
data() {
return {
kaLabel: '',
kaReminderModal: false,
channelTitle: '',
search: {
......@@ -133,7 +135,7 @@ export default {
activityTime: [],
kaChannelList: [],
form: {
kaChannelNo: [],
kaChannelNo: '',
listSpecialLabel: [
{
labelInfoId: null,
......@@ -311,14 +313,15 @@ export default {
remoteMethod(query) {
if (query) {
api.getSimpleList({ kaChannelNameOrNo: query }).then(res => {
// console.log(res, 'reskalist');
res.records.forEach(item => {
item.label = `${item.channelNo}_${item.channelName}`;
});
this.kaChannelList = res.records || [];
});
}
},
changeChannel(item) {
if (item) {
console.log(this.form.kaChannelNo, '0000000');
this.channelTitle = this.kaChannelList.find(i => i.channelNo === item).channelName;
}
},
......@@ -326,7 +329,6 @@ export default {
this.kaReminderModal = false;
this.form.startTime = getTime(this.activityTime && this.activityTime[0]);
this.form.endTime = getTime(this.activityTime && this.activityTime[1]);
console.log(this.form, 'this.form');
if (this.title === '新增') {
this.$refs['ruleForm'].validate(valid => {
if (valid) {
......@@ -403,32 +405,6 @@ export default {
onSure() {
this.kaReminderModal = true;
// this.form.startTime = getTime(this.activityTime && this.activityTime[0]);
// this.form.endTime = getTime(this.activityTime && this.activityTime[1]);
// if (this.title === '新增') {
// this.$refs['ruleForm'].validate(valid => {
// if (valid) {
// if (!this.form.startTime) {
// return this.$Message.error('请检查专题有效期!');
// }
// this.$refs.nextModalRef.openNextTemplateModal(this.form, 0);
// } else {
// this.$Message.error('请检查表单是否填写完整!');
// }
// });
// }
// if (this.title === '编辑') {
// const delItem = [];
// this.delNameList.forEach(item => {
// if (!this.labelNameList.includes(item)) {
// delItem.push(item.id);
// }
// });
// if (delItem.length) {
// activityApi.specialDeleteLabel({ ids: delItem.join(',') });
// }
// this.$refs.nextModalRef.openNextTemplateModal(this.form, 1);
// }
},
disabled() {
if (this.title === '编辑') return true;
......@@ -439,9 +415,18 @@ export default {
return true;
},
showEdit(e) {
this.form = {
listSpecialLabel: [
{
labelInfoId: null,
goodsCount: null,
},
],
};
this.kaChannelList = [];
this.kaLabel = '';
this.title = '编辑';
activityApi.specialGet({ id: e.id }).then(res => {
console.log(res, 'resres');
this.form.name = res.name;
this.form.id = res.id;
this.form.discount = res.discount * 10;
......@@ -449,14 +434,18 @@ export default {
this.activityTime = [res.startTime, res.endTime];
this.labelNameList = [...res.listSpecialLabel];
this.delNameList = [...res.listSpecialLabel];
console.log(this.form.kaChannelNo);
if (res.kaChannelNo) {
api.getSimpleList({ kaChannelNameOrNo: res.kaChannelNo }).then(result => {
console.log(result, 'reskalist');
result.records.forEach(item => {
if (item.channelNo === res.kaChannelNo) {
this.kaLabel = `${item.channelNo}_${item.channelName}`;
}
item.label = `${item.channelNo}_${item.channelName}`;
});
this.kaChannelList = result.records || [];
this.$nextTick(() => {
// this.$nextTick(() => {
this.form.kaChannelNo = res.kaChannelNo;
});
// });
});
}
});
......
......@@ -47,6 +47,7 @@
v-model="form.kaChannelNo"
class="select-width-280"
:disabled="isEdit"
:label="kaLabel"
filterable
remote
:remote-method="remoteMethod"
......@@ -56,7 +57,7 @@
:not-found-text="kaChannelList.length !== 0 ? '' : '无匹配数据'"
placeholder="请输入"
>
<Option v-for="item in kaChannelList" :key="item.channelNo" :value="item.channelNo">{{ item.channelNo + '_' + item.channelName }}</Option>
<Option v-for="item in kaChannelList" :key="item.channelNo" :value="item.channelNo" :label="item.label"></Option>
</Select>
<p style="color: #ff6600">提示:此参数配置选中后,表示以上配置内容仅在此渠道生效;</p>
</FormItem>
......@@ -143,6 +144,7 @@ export default {
},
data() {
return {
kaLabel: '',
channelTitle: '',
kaReminderModal: false,
search: {
......@@ -300,20 +302,17 @@ export default {
},
methods: {
remoteMethod(query) {
console.log('99999999999');
if (query) {
api.getSimpleList({ kaChannelNameOrNo: query }).then(res => {
res.records.forEach(item => {
item.label = `${item.channelNo}_${item.channelName}`;
});
this.kaChannelList = res.records || [];
});
}
},
changeChannel(item) {
if (item) {
setTimeout(() => {
console.log(this.kaChannelList, 'item888');
this.channelTitle = this.kaChannelList.find(i => i.channelNo === item).channelName;
}, 300);
console.log(item, 'item111');
activityApi.reductionList({ kaChannelNo: item }).then(res => {
this.templateList = res || [];
});
......@@ -368,9 +367,15 @@ export default {
this.search = {};
},
onSure() {
if (this.form.kaChannelNo) {
this.channelTitle = this.kaChannelList.find(i => i.channelNo === this.form.kaChannelNo).channelName;
}
this.kaReminderModal = true;
},
showDetail(data, isEdit) {
this.form = {};
this.kaChannelList = [];
// this.kaLabel = '';
this.editId = data.id;
this.title = isEdit ? '查看活动' : '编辑活动';
this.isEdit = isEdit;
......@@ -379,7 +384,12 @@ export default {
const { startTime, endTime, url, title, activityTemplateId, forward, shareTitle, shareSubTitle, iconUrl, kaChannelNo } = res;
if (res.kaChannelNo) {
api.getSimpleList({ kaChannelNameOrNo: res.kaChannelNo }).then(result => {
// console.log(res, 'reskalist');
result.records.forEach(item => {
if (item.channelNo === res.kaChannelNo) {
this.kaLabel = `${item.channelNo}_${item.channelName}`;
}
item.label = `${item.channelNo}_${item.channelName}`;
});
this.kaChannelList = result.records || [];
this.$nextTick(() => {
this.form.kaChannelNo = kaChannelNo;
......@@ -390,7 +400,6 @@ export default {
this.templateList = r || [];
this.form = { startTime, endTime, url, title, activityTemplateId, forward, shareTitle, shareSubTitle, iconUrl };
this.form = res;
console.log(this.form, 'this.form');
this.form.activityPlaybillUrl = (this.form.activityPlaybillUrl && this.form.activityPlaybillUrl.split(',')) || [];
this.form.iconUrl = (this.form.iconUrl && this.form.iconUrl.split(',')) || [];
this.form.terminal = res.terminal.split(',');
......
......@@ -43,6 +43,7 @@
class="select-width-280"
:disabled="!!form.id"
filterable
:label="kaLabel"
remote
:remote-method="remoteMethod"
transfer
......@@ -51,7 +52,7 @@
placeholder="请输入"
:not-found-text="kaChannelList.length !== 0 ? '' : '无匹配数据'"
>
<Option v-for="item in kaChannelList" :key="item.channelNo" :value="item.channelNo">{{ item.channelNo + '_' + item.channelName }}</Option>
<Option v-for="item in kaChannelList" :key="item.channelNo" :value="item.channelNo" :label="item.label"></Option>
</Select>
<p style="color: #ff6600">提示:此参数配置选中后,表示以上配置内容仅在此渠道生效;</p>
</FormItem>
......@@ -215,6 +216,7 @@ export default {
},
data() {
return {
kaLabel: '',
kaReminderModal: false,
channelTitle: '',
title: '',
......@@ -430,17 +432,24 @@ export default {
if (params.row.elementType === 101) {
this.form = {};
}
this.form = {};
this.kaLabel = '';
this.kaChannelList = [];
api.find({ id: params.row.id }).then(res => {
if (res.kaChannelNo) {
this.kaChannelNo = res.kaChannelNo;
delete res.kaChannelNo;
// delete res.kaChannelNo;
apis.getSimpleList({ kaChannelNameOrNo: this.kaChannelNo }).then(result => {
// console.log(res, 'reskalist');
result.records.forEach(item => {
if (item.channelNo === res.kaChannelNo) {
this.kaLabel = `${item.channelNo}_${item.channelName}`;
}
item.label = `${item.channelNo}_${item.channelName}`;
});
this.kaChannelList = result.records || [];
console.log(this.kaChannelList, 'this.kaChannelList');
this.$nextTick(() => {
// this.$nextTick(() => {
this.form.kaChannelNo = this.kaChannelNo;
});
// });
});
}
if (res.elementType === 101) {
......@@ -641,7 +650,9 @@ export default {
remoteMethod(query) {
if (query) {
apis.getSimpleList({ kaChannelNameOrNo: query }).then(res => {
// console.log(res, 'reskalist');
res.records.forEach(item => {
item.label = `${item.channelNo}_${item.channelName}`;
});
this.kaChannelList = res.records || [];
});
}
......@@ -1007,7 +1018,6 @@ export default {
img: (this.form.img && this.form.img.join(',')) || '',
badgeUrl: (this.form.badgeUrl && this.form.badgeUrl.join(',')) || '',
};
console.log(params, '888888888');
if (this.form.id) {
delete params.elementTypeEdit;
delete params.terminalEdit;
......
<template>
<div style="margin-left: 30px;margin-top: 30px;">
<p>上传介绍图一:<upload :uploadurl="upImgUri" :max="1" qiniu-host="" /></p>
<p style="margin-top:10px">上传介绍图二:<upload :uploadurl="downImgUri" :max="1" qiniu-host="" /></p>
<div style="margin-top: 10px">
<Button type="primary" @click="onSure" :disabled="isUpload">确认</Button>
<span v-if="uploadSuccess" style="display: inline-block" @click="showPreview"><Button>点击预览</Button></span>
</div>
<div v-if="isPreview" style="display:flex;flex-direction:column;margin-top:10px">
<h2>预览</h2>
<img src="./landingHead.png" alt="" style="height:auto;width:200px" />
<img :src="preview.upimg" style="height:auto;width:200px" />
<img :src="preview.downimg" style="height:auto;width:200px" />
</div>
</div>
</template>
<script>
import config from '../../../config/index.js';
import upload from '../../components/qn-upload.vue';
import api from '../../services/apis/offcialLanding';
const qiniuHost = config.qiniuHost;
export default {
components: {
upload,
},
computed: {
isUpload: function() {
return !(this.upImgUri.length && this.downImgUri.length);
},
},
data() {
return {
qiniuHost,
upImgUri: [],
downImgUri: [],
uploadSuccess: false,
preview: {},
isPreview: false,
id: 0,
};
},
methods: {
async onSure() {
const params = { upImgUri: this.upImgUri[0], downImgUri: this.downImgUri[0] };
try {
if (this.id) {
await api.update({ ...params, id: this.id });
} else {
await api.submit(params);
}
this.uploadSuccess = true;
this.upImgUri = [];
this.downImgUri = [];
} catch (err) {
console.log(err);
this.uploadSuccess = false;
}
},
async showPreview() {
this.isPreview = false;
const res = await api.getImg();
this.preview.upimg = res.upImgUri;
this.preview.downimg = res.downImgUri;
this.isPreview = true;
},
},
mounted() {
api.getImg().then(res => {
this.id = res.id || null;
this.preview.upimg = res.upImgUri;
this.preview.downimg = res.downImgUri;
this.isPreview = true;
});
},
};
</script>
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