国赛购买调整

This commit is contained in:
fan 2021-01-29 16:15:24 +08:00
parent c53000186a
commit 216e8f0f19
2 changed files with 11 additions and 3 deletions

View File

@ -1,6 +1,6 @@
<template> <template>
<el-dialog <el-dialog
title="购买详情" title="订单"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="30%" width="30%"
center center
@ -42,7 +42,7 @@
element-loading-background="rgba(255, 255, 255, 0.9)" element-loading-background="rgba(255, 255, 255, 0.9)"
/> />
</div> </div>
<div v-if="paySuccess" style="position: relative; top: -50px;color: #0B840B;z-index: 8888;font-size: 18px;text-align: center;width: 150px;"> <div v-if="paySuccess" style="position: relative; top: -50px;color: #0B840B;z-index: 8888;font-size: 18px;text-align: center;width: 150px;font-weight: bold;">
<div>订单支付成功!</div> <div>订单支付成功!</div>
<div>{{ `将在${countdown}后自动关闭` }}</div> <div>{{ `将在${countdown}后自动关闭` }}</div>
</div> </div>
@ -73,8 +73,9 @@ export default {
}, },
watch: { watch: {
'$store.state.socket.payOrder':function (val) { '$store.state.socket.payOrder':function (val) {
if (this.payOrder === val) { if (this.orderCode == val) {
this.paySuccess = true; this.paySuccess = true;
this.loading = true;
this.url = ''; this.url = '';
this.timer = setInterval(() => { this.timer = setInterval(() => {
this.countdown--; this.countdown--;

View File

@ -7,6 +7,10 @@
尊敬的用户您好由于您暂无场景权限现仅提供场景1试用如需使用其他场景请 尊敬的用户您好由于您暂无场景权限现仅提供场景1试用如需使用其他场景请
<el-button type="text" style="text-decoration: underline" @click="goToPay">购买权限</el-button> <el-button type="text" style="text-decoration: underline" @click="goToPay">购买权限</el-button>
</div> </div>
<div v-else style="margin-bottom: 10px;color: #f00;width: 100%;text-align: center;">
{{ `您的场景权限截止日期:${permisson.endTime || '永久'}` }}
<el-button v-if="permisson.endTime" type="text" style="text-decoration: underline" @click="goToPay">立即续费</el-button>
</div>
<el-table :data="mainSceneData" border :span-method="objectSpanMethod" height="465" stripe :cell-style="{padding: '8px 0'}"> <el-table :data="mainSceneData" border :span-method="objectSpanMethod" height="465" stripe :cell-style="{padding: '8px 0'}">
<el-table-column type="index" width="50" label="序号" /> <el-table-column type="index" width="50" label="序号" />
<el-table-column prop="type" width="200" label="类别" /> <el-table-column prop="type" width="200" label="类别" />
@ -40,6 +44,7 @@ export default {
dialogVisible: false, dialogVisible: false,
selectMapId:'', selectMapId:'',
hasPermission: false, hasPermission: false,
permisson: {},
form: { form: {
type: '' type: ''
}, },
@ -105,8 +110,10 @@ export default {
this.dialogVisible = false; this.dialogVisible = false;
}, },
queryPermission() { queryPermission() {
this.permisson = {};
queryCompetitionPracticalPermissions({mapId:this.$route.query.mapId}).then(res => { queryCompetitionPracticalPermissions({mapId:this.$route.query.mapId}).then(res => {
this.hasPermission = !!res.data; this.hasPermission = !!res.data;
if (res.data) { this.permisson = res.data; }
}).catch(() => { }).catch(() => {
this.$message.error('获取场景权限异常!'); this.$message.error('获取场景权限异常!');
}); });