关闭活动,所有页面显示已结束
This commit is contained in:
parent
32d75b4a7c
commit
513de7894f
@ -1,6 +1,9 @@
|
||||
<template>
|
||||
<div class="download">
|
||||
<Header :descText="'Play 5 Games in any mode with your registered E-mail'" />
|
||||
<Event />
|
||||
|
||||
<div v-if="false">
|
||||
<h5>
|
||||
Complete this task to win a share of the
|
||||
<span>180,000 $CEC</span> prize pool
|
||||
@ -95,16 +98,19 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Header from "@/components/header.vue";
|
||||
import Event from "@/components/event.vue"
|
||||
import { BitgetWallet } from "@/wallet/BitgetWallet.js";
|
||||
import { apiProgress, getEmail } from "@/utils/request";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Header
|
||||
Header,
|
||||
Event
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -1,6 +1,10 @@
|
||||
<template>
|
||||
<div class="login">
|
||||
<Header :descText="'Connect your Bitget Wallet and register'" />
|
||||
<Event />
|
||||
|
||||
|
||||
<div v-if="false">
|
||||
<h5>
|
||||
Register to win a share of the
|
||||
<span>45,000 $CEC</span> prize pool
|
||||
@ -91,10 +95,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Header from "@/components/header.vue";
|
||||
import Event from "@/components/event.vue"
|
||||
import { providers } from "ethers";
|
||||
import { signLogin } from "@/wallet/utils";
|
||||
import { BitgetWallet } from "@/wallet/BitgetWallet.js";
|
||||
@ -104,7 +110,8 @@ import { FirebaseUtil } from "@/utils/firebase.util";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Header
|
||||
Header,
|
||||
Event
|
||||
},
|
||||
|
||||
data() {
|
||||
|
@ -1,6 +1,9 @@
|
||||
<template>
|
||||
<div class="diamonds">
|
||||
<Header :descText="'Purchase any amount of diamonds'" />
|
||||
<Event />
|
||||
|
||||
<div v-if="false">
|
||||
<TipsDialog v-if="isTips" :text="tipsText" :status="tipsStatus" />
|
||||
<h5>
|
||||
Complete this task to win a share of the
|
||||
@ -109,7 +112,7 @@
|
||||
</div>
|
||||
<div class="top-up-dialog" v-if="isDownloadDialog">
|
||||
<div class="close" @click="closeDownload">
|
||||
<img src="@/assets/Close_counter.png" alt="">
|
||||
<img src="@/assets/Close_counter.png" alt />
|
||||
</div>
|
||||
<h2>Task completed</h2>
|
||||
<div class="logo">
|
||||
@ -148,21 +151,23 @@
|
||||
</div>
|
||||
<LoadingDialog v-if="loadingDialogVisible" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { providers } from "ethers";
|
||||
import Header from "@/components/header.vue";
|
||||
import Event from "@/components/event.vue"
|
||||
import { BitgetWallet } from "@/wallet/BitgetWallet.js";
|
||||
import { getEmail, apiGoods } from "@/utils/request";
|
||||
import TipsDialog from "./tipsDialog.vue"
|
||||
import LoadingDialog from "./loadingDialog.vue"
|
||||
import TipsDialog from "./tipsDialog.vue";
|
||||
import LoadingDialog from "./loadingDialog.vue";
|
||||
import { FirebaseUtil } from "@/utils/firebase.util";
|
||||
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Header,
|
||||
Event,
|
||||
TipsDialog,
|
||||
LoadingDialog
|
||||
},
|
||||
@ -212,11 +217,11 @@ export default {
|
||||
email: "",
|
||||
net_id: process.env.VUE_APP_ETH_ID,
|
||||
buyData: {},
|
||||
tipsText: '',
|
||||
tipsText: "",
|
||||
tipsStatus: 0,
|
||||
isTips: false,
|
||||
tipsTime: 3,
|
||||
loadingDialogVisible: false,
|
||||
loadingDialogVisible: false
|
||||
};
|
||||
},
|
||||
|
||||
@ -249,7 +254,7 @@ export default {
|
||||
this.currencyData.imgSrc = this.buyData.currency_list[0].name;
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
console.log(e);
|
||||
}
|
||||
},
|
||||
|
||||
@ -309,42 +314,46 @@ export default {
|
||||
account_address: this.address,
|
||||
currency_address: this.currencyData.address
|
||||
};
|
||||
this.loadingDialogVisible = true
|
||||
this.loadingDialogVisible = true;
|
||||
if (email) {
|
||||
setImmediate(() => {
|
||||
new FirebaseUtil().uploadEvent('begin_charge', { email, data })
|
||||
})
|
||||
new FirebaseUtil().uploadEvent("begin_charge", { email, data });
|
||||
});
|
||||
try {
|
||||
let bitgetWallet = new BitgetWallet();
|
||||
let res = await bitgetWallet.execBuyItem(data);
|
||||
this.loadingDialogVisible = false
|
||||
this.isDownloadDialog = true
|
||||
this.tipsText = 'Top-Up Successful'
|
||||
this.tipsTime = 3
|
||||
this.tipsStatus = 0
|
||||
this.loadingDialogVisible = false;
|
||||
this.isDownloadDialog = true;
|
||||
this.tipsText = "Top-Up Successful";
|
||||
this.tipsTime = 3;
|
||||
this.tipsStatus = 0;
|
||||
} catch (e) {
|
||||
this.tipsStatus = 1
|
||||
this.loadingDialogVisible = false
|
||||
this.countTime()
|
||||
if(e.message.indexOf('request') > -1) {
|
||||
this.tipsText = 'Top-Up Cancelled by User'
|
||||
this.tipsTime = 3
|
||||
this.tipsStatus = 1;
|
||||
this.loadingDialogVisible = false;
|
||||
this.countTime();
|
||||
if (e.message.indexOf("request") > -1) {
|
||||
this.tipsText = "Top-Up Cancelled by User";
|
||||
this.tipsTime = 3;
|
||||
} else {
|
||||
this.tipsText = 'Top-Up fail.'
|
||||
this.tipsText = "Top-Up fail.";
|
||||
}
|
||||
new FirebaseUtil().uploadEvent('charge_error', {email, data, error: e.message || e})
|
||||
new FirebaseUtil().uploadEvent("charge_error", {
|
||||
email,
|
||||
data,
|
||||
error: e.message || e
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.loadingDialogVisible = false
|
||||
this.loadingDialogVisible = false;
|
||||
this.isLoginDialog = true;
|
||||
}
|
||||
},
|
||||
|
||||
// 链接钱包
|
||||
async walletLink() {
|
||||
var isBitgetWallet = navigator.userAgent.indexOf('BitKeep') > 0
|
||||
var isBitgetWallet = navigator.userAgent.indexOf("BitKeep") > 0;
|
||||
if (!isBitgetWallet) {
|
||||
window.location.href = `https://bkcode.vip?action=dapp&url=${location.origin}/register`
|
||||
window.location.href = `https://bkcode.vip?action=dapp&url=${location.origin}/register`;
|
||||
} else {
|
||||
let bitgetWallet = new BitgetWallet();
|
||||
let res = await bitgetWallet.getAccessToken();
|
||||
@ -354,7 +363,7 @@ export default {
|
||||
this.token = res.token;
|
||||
this.address = res.accounts[0];
|
||||
this.email = getEmail(this.token);
|
||||
this.getGoodsList()
|
||||
this.getGoodsList();
|
||||
}
|
||||
},
|
||||
|
||||
@ -371,18 +380,17 @@ export default {
|
||||
// 弹窗倒计时
|
||||
countTime: function() {
|
||||
if (this.tipsTime == 0) {
|
||||
this.isTips = false
|
||||
this.isTips = false;
|
||||
} else {
|
||||
this.isTips = true
|
||||
this.tipsTime--
|
||||
this.isTips = true;
|
||||
this.tipsTime--;
|
||||
}
|
||||
setTimeout(this.countTime, 1000)
|
||||
setTimeout(this.countTime, 1000);
|
||||
},
|
||||
closeDownload() {
|
||||
this.isDownloadDialog = false
|
||||
this.getGoodsList()
|
||||
|
||||
},
|
||||
this.isDownloadDialog = false;
|
||||
this.getGoodsList();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@ -713,7 +721,7 @@ export default {
|
||||
left: 18px;
|
||||
width: 1px;
|
||||
height: calc(100% - 30px);
|
||||
background: #3CEEFE;
|
||||
background: #3ceefe;
|
||||
z-index: 1;
|
||||
}
|
||||
&:last-child {
|
||||
|
104
src/components/event.vue
Normal file
104
src/components/event.vue
Normal file
File diff suppressed because one or more lines are too long
@ -3,9 +3,9 @@
|
||||
<div class="home-header-logo">
|
||||
<img src="@/assets/logo1.png" alt />
|
||||
</div>
|
||||
<div class="home-header-tips">
|
||||
<!-- <div class="home-header-tips">
|
||||
<p>{{ descText }}</p>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user