修改背景图片,新增弹窗提示
This commit is contained in:
parent
c338437564
commit
272adea0aa
@ -16,7 +16,8 @@
|
||||
height: 100vh;
|
||||
text-align: center;
|
||||
color: #2c3e50;
|
||||
background: #0f1013;
|
||||
background: url('@/assets/common/Bg.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
.grecaptcha-badge {
|
||||
display: none !important
|
||||
@ -25,7 +26,8 @@
|
||||
html,
|
||||
|
||||
body {
|
||||
background-color: #0f1013;
|
||||
background: url('@/assets/common/Bg.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
|
BIN
src/assets/common/Bg.png
Normal file
BIN
src/assets/common/Bg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 187 KiB |
Binary file not shown.
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 107 KiB |
96
src/components/errorDialog/errorDialog copy.vue
Normal file
96
src/components/errorDialog/errorDialog copy.vue
Normal file
@ -0,0 +1,96 @@
|
||||
<template>
|
||||
<el-dialog :visible="dialogVisible" :before-close="handleClose" :closable="false" :show-close="false">
|
||||
<div class="top">
|
||||
<div class="top-title"></div>
|
||||
<div class="top-close" @click="handleClose">
|
||||
<img src="@/assets/common/CloseButton.png" alt />
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div>{{ errorText }}</div>
|
||||
<div>{{message}}</div>
|
||||
</div>
|
||||
<div class="btn" @click="handleClose">Confirm</div>
|
||||
<!-- <div class="confirm-box">
|
||||
<div class="confirm-title">
|
||||
<span>错误提示</span>
|
||||
</div>
|
||||
<div class="confirm-context"> {{message}}</div>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<a-button @click="handleClose" type="primary">Confirm</a-button>
|
||||
</div>-->
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: "iErrorMessage",
|
||||
props: {
|
||||
dialogVisible: Boolean,
|
||||
errorText: String
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
methods: {
|
||||
handleClose() {
|
||||
this.$emit('handleClose')
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .el-dialog {
|
||||
border: 1px solid #924df2;
|
||||
background: #1a1821;
|
||||
width: 600px;
|
||||
border-radius: 80px;
|
||||
padding: 0px 50px;
|
||||
.el-dialog__header {
|
||||
padding: 0;
|
||||
}
|
||||
.el-dialog__body {
|
||||
position: relative;
|
||||
color: #fff;
|
||||
.top {
|
||||
display: flex;
|
||||
height: 10px;
|
||||
.top-title {
|
||||
color: #fff;
|
||||
font-size: 28px;
|
||||
font-family: "Anton-Regular";
|
||||
}
|
||||
.top-close {
|
||||
position: absolute;
|
||||
top: -8%;
|
||||
right: -15%;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
cursor: pointer;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
.content {
|
||||
margin: 20px 0;
|
||||
min-height: 100px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.btn {
|
||||
width: 200px;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
margin: 0 auto;
|
||||
color: #000;
|
||||
background: url("./../../assets/home/explore map button.png") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,40 +1,35 @@
|
||||
<template>
|
||||
<el-dialog :visible="dialogVisible" :before-close="handleClose" :closable="false" :show-close="false">
|
||||
<el-dialog
|
||||
title
|
||||
:visible="dialogVisible"
|
||||
@cancel="handleClose"
|
||||
:closable="false"
|
||||
:show-close="false"
|
||||
>
|
||||
<div class="top">
|
||||
<div class="top-title"></div>
|
||||
<div class="top-close" @click="handleClose">
|
||||
<img src="@/assets/common/CloseButton.png" alt />
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div>{{ errorText }}</div>
|
||||
<div>{{message}}</div>
|
||||
<div class="confirm-box">
|
||||
<div class="confirm-context">{{message}}</div>
|
||||
</div>
|
||||
<div class="btn" @click="handleClose">Confirm</div>
|
||||
<!-- <div class="confirm-box">
|
||||
<div class="confirm-title">
|
||||
<span>错误提示</span>
|
||||
</div>
|
||||
<div class="confirm-context"> {{message}}</div>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<a-button @click="handleClose" type="primary">Confirm</a-button>
|
||||
<!-- <div slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleClose" type="primary">Confirm</el-button>
|
||||
</div>-->
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "iErrorMessage",
|
||||
props: {
|
||||
dialogVisible: Boolean,
|
||||
errorText: String
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
methods: {
|
||||
handleClose() {
|
||||
this.$emit('handleClose')
|
||||
this.dialogVisible = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -43,15 +38,12 @@ export default {
|
||||
::v-deep .el-dialog {
|
||||
border: 1px solid #924df2;
|
||||
background: #1a1821;
|
||||
width: 600px;
|
||||
border-radius: 80px;
|
||||
padding: 0px 50px;
|
||||
.el-dialog__header {
|
||||
padding: 0;
|
||||
}
|
||||
.el-dialog__body {
|
||||
position: relative;
|
||||
color: #fff;
|
||||
.top {
|
||||
display: flex;
|
||||
height: 10px;
|
||||
@ -62,8 +54,8 @@ export default {
|
||||
}
|
||||
.top-close {
|
||||
position: absolute;
|
||||
top: -8%;
|
||||
right: -15%;
|
||||
top: -15%;
|
||||
right: -2%;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
cursor: pointer;
|
||||
@ -73,12 +65,15 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.content {
|
||||
margin: 20px 0;
|
||||
min-height: 100px;
|
||||
.confirm-context {
|
||||
min-height: 120px;
|
||||
margin-top: 20px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
padding-left: 21px;
|
||||
}
|
||||
.btn {
|
||||
width: 200px;
|
||||
|
@ -2,14 +2,17 @@ import Vue from 'vue';
|
||||
import confirm from './errorDialog.vue';
|
||||
const iErrorMessage = Vue.extend(confirm);
|
||||
function showErrMsg(err) {
|
||||
let errmsg = err;
|
||||
if (typeof err === 'object') {
|
||||
errmsg = JSON.stringify(err);
|
||||
}
|
||||
if (errmsg.indexOf('User denied message signature') > -1) {
|
||||
errmsg = `User denied message signature`;
|
||||
} else if (errmsg.indexOf('insufficient funds') > -1) {
|
||||
errmsg = 'Insufficient funds';
|
||||
let errmsg = ''
|
||||
|
||||
// alert(err,'----')
|
||||
// let errmsg = err;
|
||||
// if (typeof err === 'object') {
|
||||
// errmsg = JSON.stringify(err);
|
||||
// }
|
||||
if (err.indexOf('insufficient tickets') > -1) {
|
||||
errmsg = 'Exploration failed, insufficient number of explorations.'
|
||||
} else if(err.indexOf('invalid opcode: opcode 0xd8 not defined') > -1) {
|
||||
errmsg = `Claim failed due to insufficient gas.`
|
||||
}
|
||||
|
||||
const _confirm = new iErrorMessage({
|
||||
|
@ -81,7 +81,8 @@ export default {
|
||||
}
|
||||
const preRes = await apiPreStep(step)
|
||||
if (preRes.errcode) {
|
||||
this.$message.error(preRes.errmsg)
|
||||
// this.$message.error(preRes.errmsg)
|
||||
this.$showErr(preRes.errmsg)
|
||||
return
|
||||
}
|
||||
this.isLoading = true
|
||||
@ -89,8 +90,9 @@ export default {
|
||||
try {
|
||||
storeageKey = await sendToChain('explore', address, preRes.data.id)
|
||||
} catch (err) {
|
||||
this.$showErr(err.data.message)
|
||||
this.isLoading = false
|
||||
this.$message.error(`error send chain request`)
|
||||
this.$showErr(err)
|
||||
return
|
||||
}
|
||||
let serTimeId = setInterval(async () => {
|
||||
|
@ -122,13 +122,13 @@
|
||||
</li>
|
||||
</div>
|
||||
<div class="wallet" @click="onWalletLogin">
|
||||
<span v-if="!myAddress">X Connected</span>
|
||||
<span v-if="!showAddress">X Connected</span>
|
||||
<div
|
||||
class="wallet-address"
|
||||
v-else
|
||||
>{{ myAddress }}</div>
|
||||
>{{ showAddress }}</div>
|
||||
<div class="wallet-btn">
|
||||
<img v-if="!myAddress" class="hover-show" src="./../../assets/home/Connect Menu1.png" alt />
|
||||
<img v-if="!showAddress" class="hover-show" src="./../../assets/home/Connect Menu1.png" alt />
|
||||
<img v-else class="hover-none" src="@/assets/home/ICON03.png" alt />
|
||||
</div>
|
||||
</div>
|
||||
@ -527,13 +527,13 @@
|
||||
</li>
|
||||
</div>
|
||||
<div class="wallet" @click="onWalletLogin">
|
||||
<span v-if="!myAddress">X Connected</span>
|
||||
<span v-if="!showAddress">X Connected</span>
|
||||
<div
|
||||
class="wallet-address"
|
||||
v-else
|
||||
>{{ myAddress }}</div>
|
||||
>{{ showAddress }}</div>
|
||||
<div class="wallet-btn">
|
||||
<img v-if="!myAddress" class="hover-show" src="./../../assets/home/Connect Menu1.png" alt />
|
||||
<img v-if="!showAddress" class="hover-show" src="./../../assets/home/Connect Menu1.png" alt />
|
||||
<img v-else class="hover-none" src="@/assets/home/ICON03.png" alt />
|
||||
</div>
|
||||
</div>
|
||||
@ -581,7 +581,6 @@
|
||||
<!-- Loading -->
|
||||
<Loading :Loading="isLoading" />
|
||||
|
||||
<ErrDialog :dialogVisible="errDialogVisible" @handleClose="errorHandleClose" :errorText="errorText" />
|
||||
<RuleDialog :ruleDialogVisible="ruleDialogVisible" @handleClose="ruleHandleClose" />
|
||||
</div>
|
||||
</template>
|
||||
@ -599,7 +598,6 @@ import HelpDialog from './helpDialog.vue'
|
||||
import LogDialog from './logDialog.vue'
|
||||
import Loading from '@/components/loading.vue'
|
||||
import RuleDialog from './ruleDialog.vue'
|
||||
import ErrDialog from '@/components/errorDialog/errorDialog.vue'
|
||||
import { getToken } from '@/utils/cookies.js'
|
||||
// import { getWalletAddress, isWalletConnected, linkWallet } from "@/wallet/index.js";
|
||||
import {
|
||||
@ -634,7 +632,6 @@ export default {
|
||||
HelpDialog,
|
||||
LogDialog,
|
||||
Loading,
|
||||
ErrDialog,
|
||||
RuleDialog,
|
||||
// ImgView,
|
||||
},
|
||||
@ -728,8 +725,6 @@ export default {
|
||||
nftsList: [],
|
||||
isNewUser: 0,
|
||||
isLoading: false,
|
||||
errDialogVisible: false,
|
||||
errorText: '',
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@ -896,7 +891,7 @@ export default {
|
||||
const _address = this.$store.state.user.address;
|
||||
const codeChallenge = Date.now();
|
||||
console.log(location.href);
|
||||
const state = btoa(`${_address}|${codeChallenge}|${location.href}`);
|
||||
const state = btoa(`${_address}|${codeChallenge}`);
|
||||
console.log(state);
|
||||
// const url = 'https://discord.com/api/oauth2/authorize?client_id=1116692240224501850&redirect_uri=http%3A%2F%2Flocalhost%3A3010%2Fdiscord%2Fredirect_uri&response_type=code&scope=guilds%20identify%20guilds.members.read'
|
||||
const url = `https://discord.com/api/oauth2/authorize?client_id=1117759635269636096&redirect_uri=https%3A%2F%2Foauth-svr.cebggame.com%2Fdiscord%2Fredirect_uri&response_type=code&scope=guilds%20identify%20guilds.members.read&state=${state}`;
|
||||
@ -909,7 +904,7 @@ export default {
|
||||
var timer = setInterval(function() {
|
||||
if (newwin.closed) {
|
||||
clearInterval(timer);
|
||||
alert(newwin.closed, "window closed");
|
||||
|
||||
}
|
||||
}, 10);
|
||||
},
|
||||
@ -926,8 +921,8 @@ export default {
|
||||
try {
|
||||
storeageKey = await sendToChain('task_claim', address, id)
|
||||
} catch (err) {
|
||||
this.$showErr(err.data.message)
|
||||
this.isLoading = false
|
||||
this.$message.error(`error send chain request`)
|
||||
return
|
||||
}
|
||||
let serTimeId = setInterval(async () => {
|
||||
@ -983,12 +978,7 @@ export default {
|
||||
// 探索
|
||||
async exploreCli(amount) {
|
||||
if(this.token) {
|
||||
if(this.todayStepTicket == 0) {
|
||||
this.errorText = 'Exploration failed insufficient number of explorations'
|
||||
this.errDialogVisible = true
|
||||
} else {
|
||||
this.$refs.stepId.sendOneAction(this.getTotalUsed, amount)
|
||||
}
|
||||
this.$refs.stepId.sendOneAction(this.getTotalUsed, amount)
|
||||
} else {
|
||||
this.walletDialogVisible = true
|
||||
}
|
||||
@ -1077,8 +1067,9 @@ export default {
|
||||
try {
|
||||
storeageKey = await sendToChain('check', address, '')
|
||||
} catch (err) {
|
||||
this.$showErr(err.data.message)
|
||||
// console.log(err.data.message)
|
||||
this.isLoading = false
|
||||
this.$message.error(`error send chain request`)
|
||||
return
|
||||
}
|
||||
let serTimeId = setInterval(async () => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user