Commit 3bca1255 by crushh

update: dist

parent f180a0b1
......@@ -21,18 +21,24 @@
{{ scope.row.activityStatus === 0 ? '未开始' : '已结束' }}
</div>
</template>
<template v-else-if="'status' in scope.row">
<div v-if="scope.row.status === 1"><span class="dm-status--primary--flash"></span>进行中</div>
<div v-else :class="scope.row.status === 0 ? 'dm-status--warning' : 'dm-status--info'">
{{ scope.row.status === 0 ? '未开始' : '已结束' }}
</div>
</template>
</template>
</el-table-column>
<el-table-column label="开始时间">
<template slot-scope="scope">
<p style="line-height: 18px;">{{ formatDateTimeByType(scope.row.gameStartTime, 'yyyy-MM-dd') }}</p>
<p style="line-height: 18px;">{{ formatDateTimeByType(scope.row.gameStartTime, 'HH:mm:ss') }}</p>
<template slot-scope="{ row }">
<p style="line-height: 18px;">{{ formatDateTimeByType(row.gameStartTime || row.startDate, 'yyyy-MM-dd') }}</p>
<p style="line-height: 18px;">{{ formatDateTimeByType(row.gameStartTime || row.startDate, 'HH:mm:ss') }}</p>
</template>
</el-table-column>
<el-table-column label="结束时间">
<template slot-scope="scope">
<p style="line-height: 18px;">{{ formatDateTimeByType(scope.row.gameEndTime, 'yyyy-MM-dd') }}</p>
<p style="line-height: 18px;">{{ formatDateTimeByType(scope.row.gameEndTime, 'HH:mm:ss') }}</p>
<template slot-scope="{ row }">
<p style="line-height: 18px;">{{ formatDateTimeByType(row.gameEndTime || row.endDate, 'yyyy-MM-dd') }}</p>
<p style="line-height: 18px;">{{ formatDateTimeByType(row.gameEndTime || row.endDate, 'HH:mm:ss') }}</p>
</template>
</el-table-column>
</el-table>
......@@ -94,21 +100,23 @@ export default {
getList(gameType) {
const setResponse = (res, type) => {
//type 0 大转盘/刮刮卡 ----- 1 其他游戏
const { errorCode, message, result } = res.data || {};
if (errorCode != 0) {
const { errorCode, message, result, code } = res.data || {};
if (errorCode != 0 && code != 0) {
return this.$message.error(message);
} else {
if (type === 0) {
this.list = result.page.result || [];
this.total = result.page.totalCount || 0;
} else {
} else if (type === 1) {
this.list = (result.result || []).map(item => ({ ...item, gameId: item.gameActivityId }));
this.total = result.totalCount || 0;
} else if (type === 2) {
this.list = result.list || [];
this.total = result.total || 0;
}
}
};
console.log(this.gameType);
console.log(this.gameId);
switch (gameType) {
case 'GAME_LINK_DZP':
this.axios.post(`/api-marketing/page-lottery-game`, qs.stringify({ ...this.query, gameType: 1 })).then(res => {
......@@ -136,13 +144,14 @@ export default {
});
break;
case 'GAME_LINK_XYMH':
const para = { ...this.query };
para.status = 1;
console.log(para);
// delete para.gameStatus
this.axios.post(`/api-marketing/game-pro/page`, qs.stringify(para)).then(res => {
console.log(res);
setResponse(res, 1);
const para = {
gameName: this.query.searchParam,
pageNum: this.query.currentPage,
pageSize: this.query.pageSize,
status: 1
};
this.axios.post(`/api-marketing/game-pro/page?requestProject=marketing`, para).then(res => {
setResponse(res, 2);
});
break;
}
......
......@@ -114,7 +114,8 @@ const requests = (url, data = {}, contentTypeIsJSON = false, isSilence = false,
} else {
_opts.params = Object.assign({ requestProject: 'gic-web' }, data);
}
console.log(url, data, contentTypeIsJSON, isSilence, method, urlData);
console.log(_opts);
let key = JSON.stringify(_opts);
if (!pendingRequest.has(key)) {
pendingRequest.set(key, Date.now());
......
......@@ -139,18 +139,17 @@ export default {
break;
case 'GAME_LINK_KLFL':
this.axios.post(`/api-marketing/page-klfl-game`, qs.stringify({ ...this.query })).then(res => {
setResponse(res, 2);
setResponse(res, 1);
});
break;
case 'GAME_LINK_XYMH':
const para = {
gameName: this.query.searchParam,
pageNum: this.query.currentPage,
pageSize: 6,
pageSize: this.query.pageSize,
status: 1
};
this.axios.post(`/api-marketing/game-pro/page?requestProject=marketing`, para).then(res => {
console.log(res);
setResponse(res, 2);
});
break;
......
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