Commit 8cc7cec2 by crushh

udpate: dist

parent 21aa79a9
......@@ -156,5 +156,21 @@ export const getCouponStock = params => requests(PREFIX + 'get-coupon-stock', pa
// 游戏营销-- 获取游戏更新时间
export const getGameDataUpdatetime = params => requests(PREFIX + 'get-game-data-updatetime', params);
//游戏营销--拆盲盒游戏分页列表
export const cmhPage = params => requests(PREFIX + '/game-pro/page', params);
//游戏营销--拆盲盒游戏统计数据
export const cmhStatistics = params => requests(PREFIX + '/game-pro/page-statistics', params);
//游戏营销--拆盲盒游戏模板信息
export const getGameTemplate = params => requests(PREFIX + '/game-pro/getGameTemplate', params, true, false, 'get');
//游戏营销--拆盲盒游戏新建
export const initActivity = params => requests(PREFIX + '/game-pro/init-activity', params);
//游戏营销--拆盲盒-获取游戏详细信息
export const getGameDetail = params => requests(PREFIX + '/game-pro/getGameDetail', params, true, false, 'get');
// 生成小程序游戏链接
export const generateMiniProgramLink = params => requests('api-admin/get-page-link-game', params);
<template>
<section class="dm-wrap" v-loading="loading">
<div class="game" v-if="notShrink">
<div class="game" v-if="notShrink == 1">
<div class="game-content">
<div class="gameDemo">
<div class="title">游戏演示</div>
......@@ -27,15 +27,15 @@
</div>
</div>
</div>
<el-button type="text" @click="shrink" style="width:100%">收起 <i class="iconfont-components3 icon-cp-shangjiantou" style="font-size:12px"/></el-button>
<el-button type="text" @click="shrink(0)" style="width:100%">收起 <i class="iconfont-components3 icon-cp-shangjiantou" style="font-size:12px"/></el-button>
</div>
<dm-sub-title v-else>
<div class="gameName">
幸运盲盒
<img style="width: 240px;height: 50px;" src="https://pic01-10001430.cos.ap-shanghai.myqcloud.com/game/template1/banner_web.png" />
<img @click="shrink(1)" style="width: 240px;height: 50px;" src="https://pic01-10001430.cos.ap-shanghai.myqcloud.com/game/template1/banner_web.png" />
</div>
</dm-sub-title>
<div class="pt20 clearfix">
<div class="pt20 pb20 clearfix">
<el-date-picker class="w256" v-model="dateTime" type="daterange" start-placeholder="开始日期" range-separator="~" end-placeholder="结束日期" @change="refresh"></el-date-picker>
<el-input v-model="listParams.gameName" class="w260" placeholder="输入游戏名称" clearable @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-select class="w160" v-model="listParams.status" placeholder="所有游戏状态" @change="refresh">
......@@ -45,34 +45,42 @@
<el-button class="fr" type="primary" @click="$router.push('/game/cmh/add')">新建游戏</el-button>
</div>
<el-table tooltipEffect="light" :data="tableList" style="width:100%">
<el-table-column label="游戏名称" min-width="130px" prop="gameName" show-overflow-tooltip :formatter="(row, col, val) => val || '--'"></el-table-column>
<el-table-column label="游戏时间" min-width="90px">
<el-table-column label="游戏名称" min-width="183px" prop="gameName" show-overflow-tooltip :formatter="(row, col, val) => val || '--'"></el-table-column>
<el-table-column label="游戏时间" min-width="134px">
<template slot-scope="{ row }"> {{ row.startDate }} - {{ row.endDate }} </template>
</el-table-column>
<el-table-column label="游戏玩法" min-width="190px" prop="mainStoreName" :formatter="(row, col, val) => val || '--'"></el-table-column>
<el-table-column label="浏览人数" min-width="190px" prop="visitorNum" :formatter="(row, col, val) => val || '--'"></el-table-column>
<el-table-column label="参与人数" min-width="190px" prop="playNum" :formatter="(row, col, val) => val || '--'"></el-table-column>
<el-table-column label="中奖人数" min-width="190px" prop="winNum" :formatter="(row, col, val) => val || '--'"></el-table-column>
<el-table-column label="游戏状态" min-width="190px" prop="status">
<el-table-column label="参与门槛" min-width="96px" prop="playConditionFlag ">
<template slot-scope="{ row }">
{{ gameStatus[row.status] }}
{{ row.playConditionFlag == 1 ? '有门槛' : row.playConditionFlag == 0 ? '无门槛' : '- -' }}
</template>
</el-table-column>
<el-table-column label="创建人" min-width="190px" prop="creatorName"></el-table-column>
<el-table-column label="创建时间" min-width="190px" prop="createTime" :formatter="(row, col, val) => val || '--'"></el-table-column>
<el-table-column label="操作" align="left" width="220px" fixed="right">
<el-table-column label="浏览人数" min-width="96px" prop="visitorNum" :formatter="(row, col, val) => val || '--'"></el-table-column>
<el-table-column label="参与人数" min-width="96px" prop="playNum" :formatter="(row, col, val) => val || '--'"></el-table-column>
<el-table-column label="中奖人数" min-width="96px" prop="winNum" :formatter="(row, col, val) => val || '--'"></el-table-column>
<el-table-column label="游戏状态" min-width="96px" prop="status">
<template slot-scope="{ row }">
<div><span :class="gameStatusClass[row.status]"></span>{{ gameStatus[row.status] }}</div>
</template>
</el-table-column>
<el-table-column label="创建人" min-width="88px" prop="creatorName"></el-table-column>
<el-table-column label="创建时间" min-width="114px" prop="createTime" :formatter="(row, col, val) => val || '--'"></el-table-column>
<el-table-column label="操作" align="left" min-width="153px" fixed="right">
<template slot-scope="{ row }">
<dm-dropdown ref="drop" :scope-data="row" :configs="btnArr" @command="onCommand" />
</template>
</el-table-column>
</el-table>
<dm-pagination v-show="tableList.length" background class="dm-pagination" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="listParams.currentPage" :page-sizes="[20, 40, 60, 80]" :page-size="listParams.pageSize" layout="total, sizes, prev, pager, next" :total="total"></dm-pagination>
<links :show.sync="linkShow" :obj="linksObj" :gameTypeName="gameTypeName"></links>
</section>
</template>
<script>
import { api as viewerApi } from 'v-viewer';
import img from '../../../components/upload/img.vue';
import { cmhPage } from '@/service/api/gameApi.js';
import linksMixin from '../common/linksMixin.js';
import tableMethods from '@/mixins/tableMethods.js';
export default {
components: { img },
mixins: [linksMixin, tableMethods],
data() {
return {
listParams: {
......@@ -83,6 +91,7 @@ export default {
pageNum: 1,
pageSize: 20
},
total: 0,
tableList: [],
gameStatusOptions: [
{
......@@ -108,9 +117,15 @@ export default {
2: '已结束',
3: '已终止'
},
gameStatusClass: {
0: 'dm-status--info',
1: 'dm-status--primary--flash',
2: 'dm-status--info',
3: 'dm-status--error'
},
dateTime: [],
loading: false,
notShrink: true,
notShrink: 1,
btnArr: [
{
text: '查看',
......@@ -130,7 +145,7 @@ export default {
visible: row => {
return (row.status === 1 || row.status === 0) && this.$getButtonLimit(this.$buttonCode.marketingCmhEdit);
},
handler: row => this.editPlan(row)
handler: row => this.$router.push('/cmh/edit/' + row.gameId)
},
{
text: '复制',
......@@ -150,7 +165,7 @@ export default {
visible: row => {
return (row.status === 1 || row.status === 0) && this.$getButtonLimit(this.$buttonCode.marketingCmhUrl);
},
handler: row => this.showUrl(row)
handler: row => this.setLinks(row, 6)
},
{
text: '终止',
......@@ -185,8 +200,26 @@ export default {
}
});
},
shrink() {
this.notShrink = false;
shrink(val) {
this.notShrink = val;
},
getTableList() {
if (this.dateTime && this.dateTime.length) {
this.listParams.startTime = this.dateTime[0];
this.listParams.startTime = this.dateTime[0];
}
this.loading = true;
cmhPage(this.listParams)
.then(res => {
if (res.errorCode === 0) {
this.tableList = res.result.page.result || [];
this.total = res.result.page.totalCount || 0;
this.loading = false;
}
})
.catch(err => {
this.loading = false;
});
}
}
};
......
<template>
<el-dialog title="游戏链接下载" :visible.sync="show" width="600px" :before-close="close">
<el-dialog title="游戏预览" :visible.sync="show" width="600px" :before-close="close">
<div class="link-tip">
<i class="el-icon-info"></i>
非会员进入游戏页面将提示进行认证注册成为会员,认证成功后自动返回游戏页面
</div>
<div class="link-title">
<i class="icon iconfont icon-xiaochengxu4" style="color:#6457AD"></i>
小程序链接
</div>
<div v-loading="loading" class="links-block">
<div class="links__body">
<div class="links__body--url">{{ miniprogram.link }}</div>
......@@ -120,6 +116,9 @@ export default {
case '口令福利':
gameType = 'GAME_LINK_KLFL';
break;
case '拆盲盒':
gameType = 'GAME_LINK_CMH';
break;
}
generateMiniProgramLink({
id: this.obj.gameId || this.obj.gameActivityId,
......
......@@ -28,6 +28,9 @@ export default {
case 5:
this.gameTypeName = '口令福利';
break;
case 6:
this.gameTypeName = '拆盲盒';
break;
}
this.linksObj = row;
this.linkShow = true;
......
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