修改背景图片,新增弹窗提示
This commit is contained in:
parent
c338437564
commit
272adea0aa
@ -16,7 +16,8 @@
|
|||||||
height: 100vh;
|
height: 100vh;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #2c3e50;
|
color: #2c3e50;
|
||||||
background: #0f1013;
|
background: url('@/assets/common/Bg.png') no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
}
|
}
|
||||||
.grecaptcha-badge {
|
.grecaptcha-badge {
|
||||||
display: none !important
|
display: none !important
|
||||||
@ -25,7 +26,8 @@
|
|||||||
html,
|
html,
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-color: #0f1013;
|
background: url('@/assets/common/Bg.png') no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
margin: 0px;
|
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>
|
<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">
|
||||||
<div class="top-title"></div>
|
<div class="top-title"></div>
|
||||||
<div class="top-close" @click="handleClose">
|
<div class="top-close" @click="handleClose">
|
||||||
<img src="@/assets/common/CloseButton.png" alt />
|
<img src="@/assets/common/CloseButton.png" alt />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="confirm-box">
|
||||||
<div>{{ errorText }}</div>
|
<div class="confirm-context">{{message}}</div>
|
||||||
<div>{{message}}</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="btn" @click="handleClose">Confirm</div>
|
<div class="btn" @click="handleClose">Confirm</div>
|
||||||
<!-- <div class="confirm-box">
|
<!-- <div slot="footer" class="dialog-footer">
|
||||||
<div class="confirm-title">
|
<el-button @click="handleClose" type="primary">Confirm</el-button>
|
||||||
<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>-->
|
</div>-->
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "iErrorMessage",
|
name: "iErrorMessage",
|
||||||
props: {
|
|
||||||
dialogVisible: Boolean,
|
|
||||||
errorText: String
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleClose() {
|
handleClose() {
|
||||||
this.$emit('handleClose')
|
this.dialogVisible = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -43,15 +38,12 @@ export default {
|
|||||||
::v-deep .el-dialog {
|
::v-deep .el-dialog {
|
||||||
border: 1px solid #924df2;
|
border: 1px solid #924df2;
|
||||||
background: #1a1821;
|
background: #1a1821;
|
||||||
width: 600px;
|
|
||||||
border-radius: 80px;
|
border-radius: 80px;
|
||||||
padding: 0px 50px;
|
padding: 0px 50px;
|
||||||
.el-dialog__header {
|
.el-dialog__header {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
.el-dialog__body {
|
.el-dialog__body {
|
||||||
position: relative;
|
|
||||||
color: #fff;
|
|
||||||
.top {
|
.top {
|
||||||
display: flex;
|
display: flex;
|
||||||
height: 10px;
|
height: 10px;
|
||||||
@ -62,8 +54,8 @@ export default {
|
|||||||
}
|
}
|
||||||
.top-close {
|
.top-close {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -8%;
|
top: -15%;
|
||||||
right: -15%;
|
right: -2%;
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@ -73,12 +65,15 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.content {
|
.confirm-context {
|
||||||
margin: 20px 0;
|
min-height: 120px;
|
||||||
min-height: 100px;
|
margin-top: 20px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 14px;
|
||||||
|
padding-left: 21px;
|
||||||
}
|
}
|
||||||
.btn {
|
.btn {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
|
@ -2,14 +2,17 @@ import Vue from 'vue';
|
|||||||
import confirm from './errorDialog.vue';
|
import confirm from './errorDialog.vue';
|
||||||
const iErrorMessage = Vue.extend(confirm);
|
const iErrorMessage = Vue.extend(confirm);
|
||||||
function showErrMsg(err) {
|
function showErrMsg(err) {
|
||||||
let errmsg = err;
|
let errmsg = ''
|
||||||
if (typeof err === 'object') {
|
|
||||||
errmsg = JSON.stringify(err);
|
// alert(err,'----')
|
||||||
}
|
// let errmsg = err;
|
||||||
if (errmsg.indexOf('User denied message signature') > -1) {
|
// if (typeof err === 'object') {
|
||||||
errmsg = `User denied message signature`;
|
// errmsg = JSON.stringify(err);
|
||||||
} else if (errmsg.indexOf('insufficient funds') > -1) {
|
// }
|
||||||
errmsg = 'Insufficient funds';
|
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({
|
const _confirm = new iErrorMessage({
|
||||||
|
@ -81,7 +81,8 @@ export default {
|
|||||||
}
|
}
|
||||||
const preRes = await apiPreStep(step)
|
const preRes = await apiPreStep(step)
|
||||||
if (preRes.errcode) {
|
if (preRes.errcode) {
|
||||||
this.$message.error(preRes.errmsg)
|
// this.$message.error(preRes.errmsg)
|
||||||
|
this.$showErr(preRes.errmsg)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.isLoading = true
|
this.isLoading = true
|
||||||
@ -89,8 +90,9 @@ export default {
|
|||||||
try {
|
try {
|
||||||
storeageKey = await sendToChain('explore', address, preRes.data.id)
|
storeageKey = await sendToChain('explore', address, preRes.data.id)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
this.$showErr(err.data.message)
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
this.$message.error(`error send chain request`)
|
this.$showErr(err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let serTimeId = setInterval(async () => {
|
let serTimeId = setInterval(async () => {
|
||||||
|
@ -122,13 +122,13 @@
|
|||||||
</li>
|
</li>
|
||||||
</div>
|
</div>
|
||||||
<div class="wallet" @click="onWalletLogin">
|
<div class="wallet" @click="onWalletLogin">
|
||||||
<span v-if="!myAddress">X Connected</span>
|
<span v-if="!showAddress">X Connected</span>
|
||||||
<div
|
<div
|
||||||
class="wallet-address"
|
class="wallet-address"
|
||||||
v-else
|
v-else
|
||||||
>{{ myAddress }}</div>
|
>{{ showAddress }}</div>
|
||||||
<div class="wallet-btn">
|
<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 />
|
<img v-else class="hover-none" src="@/assets/home/ICON03.png" alt />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -527,13 +527,13 @@
|
|||||||
</li>
|
</li>
|
||||||
</div>
|
</div>
|
||||||
<div class="wallet" @click="onWalletLogin">
|
<div class="wallet" @click="onWalletLogin">
|
||||||
<span v-if="!myAddress">X Connected</span>
|
<span v-if="!showAddress">X Connected</span>
|
||||||
<div
|
<div
|
||||||
class="wallet-address"
|
class="wallet-address"
|
||||||
v-else
|
v-else
|
||||||
>{{ myAddress }}</div>
|
>{{ showAddress }}</div>
|
||||||
<div class="wallet-btn">
|
<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 />
|
<img v-else class="hover-none" src="@/assets/home/ICON03.png" alt />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -581,7 +581,6 @@
|
|||||||
<!-- Loading -->
|
<!-- Loading -->
|
||||||
<Loading :Loading="isLoading" />
|
<Loading :Loading="isLoading" />
|
||||||
|
|
||||||
<ErrDialog :dialogVisible="errDialogVisible" @handleClose="errorHandleClose" :errorText="errorText" />
|
|
||||||
<RuleDialog :ruleDialogVisible="ruleDialogVisible" @handleClose="ruleHandleClose" />
|
<RuleDialog :ruleDialogVisible="ruleDialogVisible" @handleClose="ruleHandleClose" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -599,7 +598,6 @@ import HelpDialog from './helpDialog.vue'
|
|||||||
import LogDialog from './logDialog.vue'
|
import LogDialog from './logDialog.vue'
|
||||||
import Loading from '@/components/loading.vue'
|
import Loading from '@/components/loading.vue'
|
||||||
import RuleDialog from './ruleDialog.vue'
|
import RuleDialog from './ruleDialog.vue'
|
||||||
import ErrDialog from '@/components/errorDialog/errorDialog.vue'
|
|
||||||
import { getToken } from '@/utils/cookies.js'
|
import { getToken } from '@/utils/cookies.js'
|
||||||
// import { getWalletAddress, isWalletConnected, linkWallet } from "@/wallet/index.js";
|
// import { getWalletAddress, isWalletConnected, linkWallet } from "@/wallet/index.js";
|
||||||
import {
|
import {
|
||||||
@ -634,7 +632,6 @@ export default {
|
|||||||
HelpDialog,
|
HelpDialog,
|
||||||
LogDialog,
|
LogDialog,
|
||||||
Loading,
|
Loading,
|
||||||
ErrDialog,
|
|
||||||
RuleDialog,
|
RuleDialog,
|
||||||
// ImgView,
|
// ImgView,
|
||||||
},
|
},
|
||||||
@ -728,8 +725,6 @@ export default {
|
|||||||
nftsList: [],
|
nftsList: [],
|
||||||
isNewUser: 0,
|
isNewUser: 0,
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
errDialogVisible: false,
|
|
||||||
errorText: '',
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -896,7 +891,7 @@ export default {
|
|||||||
const _address = this.$store.state.user.address;
|
const _address = this.$store.state.user.address;
|
||||||
const codeChallenge = Date.now();
|
const codeChallenge = Date.now();
|
||||||
console.log(location.href);
|
console.log(location.href);
|
||||||
const state = btoa(`${_address}|${codeChallenge}|${location.href}`);
|
const state = btoa(`${_address}|${codeChallenge}`);
|
||||||
console.log(state);
|
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=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}`;
|
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() {
|
var timer = setInterval(function() {
|
||||||
if (newwin.closed) {
|
if (newwin.closed) {
|
||||||
clearInterval(timer);
|
clearInterval(timer);
|
||||||
alert(newwin.closed, "window closed");
|
|
||||||
}
|
}
|
||||||
}, 10);
|
}, 10);
|
||||||
},
|
},
|
||||||
@ -926,8 +921,8 @@ export default {
|
|||||||
try {
|
try {
|
||||||
storeageKey = await sendToChain('task_claim', address, id)
|
storeageKey = await sendToChain('task_claim', address, id)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
this.$showErr(err.data.message)
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
this.$message.error(`error send chain request`)
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let serTimeId = setInterval(async () => {
|
let serTimeId = setInterval(async () => {
|
||||||
@ -983,12 +978,7 @@ export default {
|
|||||||
// 探索
|
// 探索
|
||||||
async exploreCli(amount) {
|
async exploreCli(amount) {
|
||||||
if(this.token) {
|
if(this.token) {
|
||||||
if(this.todayStepTicket == 0) {
|
this.$refs.stepId.sendOneAction(this.getTotalUsed, amount)
|
||||||
this.errorText = 'Exploration failed insufficient number of explorations'
|
|
||||||
this.errDialogVisible = true
|
|
||||||
} else {
|
|
||||||
this.$refs.stepId.sendOneAction(this.getTotalUsed, amount)
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
this.walletDialogVisible = true
|
this.walletDialogVisible = true
|
||||||
}
|
}
|
||||||
@ -1077,8 +1067,9 @@ export default {
|
|||||||
try {
|
try {
|
||||||
storeageKey = await sendToChain('check', address, '')
|
storeageKey = await sendToChain('check', address, '')
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
this.$showErr(err.data.message)
|
||||||
|
// console.log(err.data.message)
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
this.$message.error(`error send chain request`)
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let serTimeId = setInterval(async () => {
|
let serTimeId = setInterval(async () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user