Commit bd5d9560 by crushh

Merge branch 'feature/游戏营销' into dev

parents de8a20d4 148c1eff
......@@ -192,6 +192,9 @@ a:hover {
.mr10{
margin-right: 10px!important;
}
.mr16{
margin-right: 16px!important;
}
.mr20{
margin-right: 20px!important;
}
......@@ -663,4 +666,16 @@ img::after {
}
}
\ No newline at end of file
.wxapp {
width: 253px;
height: 32px;
background: #f2f3f5;
border-radius: 2px;
border: 1px solid #dcdfe6;
padding: 0 11px;
box-sizing: border-box;
display: inline-flex;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
\ No newline at end of file
......@@ -2,7 +2,7 @@ import Vue from 'vue';
import Router from 'vue-router';
import routes from './routes';
import store from '@/store';
import axios from 'axios';
// import axios from 'axios';
Vue.use(Router);
......@@ -32,25 +32,26 @@ router.beforeEach((to, from, next) => {
if (to.meta.hiddenLayout) {
store.dispatch('setShowLayout', false);
}
axios
.get(`/api-plug/rate-limit?requestPath=${path}&enterpriseId=${store.state.marketing.enterpriseId}`)
.then(limitRes => {
// 这个接口不规范 不用封装的request
// code: 0正常 1必填参数未填写 2限流
if (limitRes.data.resultCode == 1) {
store.commit('updateLimit', true); // 更新正在限流
next({ path: '/limit' });
} else {
store.commit('updateLimit', false);
if (to.path == '/limit') {
next('/');
}
next();
}
})
.catch(() => {
next();
});
// axios
// .get(`/api-plug/rate-limit?requestPath=${path}&enterpriseId=${store.state.marketing.enterpriseId}`)
// .then(limitRes => {
// // 这个接口不规范 不用封装的request
// // code: 0正常 1必填参数未填写 2限流
// if (limitRes.data.resultCode == 1) {
// store.commit('updateLimit', true); // 更新正在限流
// next({ path: '/limit' });
// } else {
// store.commit('updateLimit', false);
// if (to.path == '/limit') {
// next('/');
// }
// next();
// }
// })
// .catch(() => {
// next();
// });
next();
});
export default router;
......@@ -223,7 +223,11 @@ export default {
{
path: 'cmh',
name: '拆盲盒列表',
component: () => import(/* webpackChunkName: "game" */ '../../views/game/cmh/index.vue')
component: () => import(/* webpackChunkName: "game" */ '../../views/game/cmh/index.vue'),
meta: {
path: '/game/cmh',
keepAlive: true
}
},
{
path: 'cmh/add',
......@@ -231,6 +235,7 @@ export default {
component: () => import(/* webpackChunkName: "game" */ '../../views/game/cmh/form.vue'),
meta: {
type: 'add',
path: '/game/cmh',
hiddenLayout: true
}
},
......@@ -239,7 +244,8 @@ export default {
name: '编辑拆盲盒',
component: () => import(/* webpackChunkName: "game" */ '../../views/game/cmh/form.vue'),
meta: {
type: 'edit'
type: 'edit',
hiddenLayout: true
}
},
{
......@@ -255,7 +261,8 @@ export default {
name: '复制拆盲盒',
component: () => import(/* webpackChunkName: "game" */ '../../views/game/cmh/form.vue'),
meta: {
type: 'copy'
type: 'copy',
hiddenLayout: true
}
},
{
......@@ -265,6 +272,22 @@ export default {
meta: {
type: 'statistics'
}
},
{
path: 'cmh/statistics/activityDetail/:id',
name: '拆盲盒数据统计-活动明细',
component: () => import(/* webpackChunkName: "game" */ '../../views/game/cmh/form.vue'),
meta: {
type: 'statistics'
}
},
{
path: 'cmh/statistics/prizeDetail/:id',
name: '拆盲盒数据统计-奖品明细',
component: () => import(/* webpackChunkName: "game" */ '../../views/game/cmh/form.vue'),
meta: {
type: 'statistics'
}
}
]
};
......@@ -164,10 +164,10 @@ export const cmhPage = params => requests(PREFIX + '/game-pro/page', params, tru
export const cmhStatistics = params => requests(PREFIX + '/game-pro/page-statistics', params);
//游戏营销--拆盲盒游戏新建
export const initActivity = params => requests(PREFIX + '/game-pro/init-activity', params);
export const initActivity = params => requests(PREFIX + '/game-pro/init-game', params, true);
//游戏营销--拆盲盒-获取游戏详细信息
export const getGameDetail = params => requests(PREFIX + '/game-pro/getGameDetail', params, true, false, 'get');
export const getGameDetail = params => requests(PREFIX + '/game-pro/get-game-detail', params, true, false, 'get');
//游戏营销--拆盲盒-根据类型获取游戏模板信息
export const getGameTemplateByType = params => requests(PREFIX + '/game-pro/get-game-template-by-type', params, true, false, 'get');
......
......@@ -151,7 +151,7 @@ export default {
return true;
return this.$getButtonLimit(this.$buttonCode.marketingCmhInfo);
},
handler: row => this.$router.push('/cmh/info/' + row.gameId)
handler: row => this.$router.push('/game/cmh/info/' + row.gameId)
},
{
text: '编辑',
......@@ -162,7 +162,7 @@ export default {
return true;
return (row.status === 1 || row.status === 0) && this.$getButtonLimit(this.$buttonCode.marketingCmhEdit);
},
handler: row => this.$router.push('/cmh/edit/' + row.gameId)
handler: row => this.$router.push(`/game/cmh/edit/${row.gameId}`)
},
{
text: '复制',
......@@ -173,7 +173,7 @@ export default {
return true;
return this.$getButtonLimit(this.$buttonCode.marketingCmhCopy);
},
handler: row => this.$router.push('/cmh/copy/' + row.gameId)
handler: row => this.$router.push('/game/cmh/copy/' + row.gameId)
},
{
text: '链接',
......@@ -228,8 +228,7 @@ export default {
this.getTableList();
},
addGame() {
this.$store.dispatch('setShowLayout', false);
this.$router.push('cmh/add');
this.$router.push('/game/cmh/add');
},
onView() {
let qrImg = 'https://pic01-10001430.cos.ap-shanghai.myqcloud.com/game/template1/bill_pic.png' + '?imageMogr2/thumbnail/800x800';
......
......@@ -72,10 +72,17 @@ export default {
cardLimitType: {
type: Number,
default: 3
},
cardLimit: {
type: Number,
default: 0
}
},
computed: {
limitTips() {
if (this.cardLimit == 1) {
return '该选择器可筛选所有限制领取张数>1的卡券,共';
}
if (this.cardLimitType === 2) {
return '领取限制领取1~100的卡券,系统已过滤,符合条件共';
} else if (this.cardLimitType === 3) {
......@@ -102,8 +109,9 @@ export default {
pageSize: 5,
cardTypes: '', // 0:抵金券,1:折扣券,2:兑换券
requestProject: 'gic-web',
cardLimitType: 3,
cardType: ''
cardLimitType: this.cardLimitType,
cardType: '',
cardLimit: this.cardLimit
},
total: 0,
tableList: [],
......
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