处理未登录情况
This commit is contained in:
parent
5d88d43bec
commit
9b1799b98a
@ -102,7 +102,7 @@
|
||||
<div class="max" v-else>MAX</div>
|
||||
</div>
|
||||
<div class="box-btm-con-btn-tips">* Unlock the treasure will consume a small amount of gas </div>
|
||||
<div class="box-btn" @click="turnBox(boxData.id)">Turn On</div>
|
||||
<div class="box-btn" @click="openBoxToChain(boxData.id)">Turn On</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -258,85 +258,88 @@ export default {
|
||||
recordsPageSize: 8,
|
||||
recordsCurrentPage: 1,
|
||||
boostingDialogVisible: false,
|
||||
myRecordsList: [
|
||||
{
|
||||
username: 'username',
|
||||
name: 'username',
|
||||
points: '12',
|
||||
address: 'addressaddress',
|
||||
post: '0000',
|
||||
},
|
||||
{
|
||||
username: 'username',
|
||||
name: 'username',
|
||||
points: '12',
|
||||
address: 'addressaddress',
|
||||
post: '0000',
|
||||
},
|
||||
{
|
||||
username: 'username',
|
||||
name: 'username',
|
||||
points: '12',
|
||||
address: 'addressaddress',
|
||||
post: '0000',
|
||||
},
|
||||
{
|
||||
username: 'username',
|
||||
name: 'username',
|
||||
points: '12',
|
||||
address: 'addressaddress',
|
||||
post: '0000',
|
||||
},
|
||||
{
|
||||
username: 'username',
|
||||
name: 'username',
|
||||
points: '12',
|
||||
address: 'addressaddress',
|
||||
post: '0000',
|
||||
},
|
||||
{
|
||||
username: 'username',
|
||||
name: 'username',
|
||||
points: '12',
|
||||
address: 'addressaddress',
|
||||
post: '0000',
|
||||
},
|
||||
{
|
||||
username: 'username',
|
||||
name: 'username',
|
||||
points: '12',
|
||||
address: 'addressaddress',
|
||||
post: '0000',
|
||||
},
|
||||
{
|
||||
username: 'username',
|
||||
name: 'username',
|
||||
points: '12',
|
||||
address: 'addressaddress',
|
||||
post: '0000',
|
||||
},
|
||||
{
|
||||
username: 'username',
|
||||
name: 'username',
|
||||
points: '12',
|
||||
address: 'addressaddress',
|
||||
post: '0000',
|
||||
},
|
||||
{
|
||||
username: 'username',
|
||||
name: 'username',
|
||||
points: '12',
|
||||
address: 'addressaddress',
|
||||
post: '0000',
|
||||
},
|
||||
{
|
||||
username: 'username',
|
||||
name: 'username',
|
||||
points: '12',
|
||||
address: 'addressaddress',
|
||||
post: '0000',
|
||||
}
|
||||
],
|
||||
|
||||
// myRecordsList: [
|
||||
// {
|
||||
// username: 'username',
|
||||
// name: 'username',
|
||||
// points: '12',
|
||||
// address: 'addressaddress',
|
||||
// post: '0000',
|
||||
// },
|
||||
// {
|
||||
// username: 'username',
|
||||
// name: 'username',
|
||||
// points: '12',
|
||||
// address: 'addressaddress',
|
||||
// post: '0000',
|
||||
// },
|
||||
// {
|
||||
// username: 'username',
|
||||
// name: 'username',
|
||||
// points: '12',
|
||||
// address: 'addressaddress',
|
||||
// post: '0000',
|
||||
// },
|
||||
// {
|
||||
// username: 'username',
|
||||
// name: 'username',
|
||||
// points: '12',
|
||||
// address: 'addressaddress',
|
||||
// post: '0000',
|
||||
// },
|
||||
// {
|
||||
// username: 'username',
|
||||
// name: 'username',
|
||||
// points: '12',
|
||||
// address: 'addressaddress',
|
||||
// post: '0000',
|
||||
// },
|
||||
// {
|
||||
// username: 'username',
|
||||
// name: 'username',
|
||||
// points: '12',
|
||||
// address: 'addressaddress',
|
||||
// post: '0000',
|
||||
// },
|
||||
// {
|
||||
// username: 'username',
|
||||
// name: 'username',
|
||||
// points: '12',
|
||||
// address: 'addressaddress',
|
||||
// post: '0000',
|
||||
// },
|
||||
// {
|
||||
// username: 'username',
|
||||
// name: 'username',
|
||||
// points: '12',
|
||||
// address: 'addressaddress',
|
||||
// post: '0000',
|
||||
// },
|
||||
// {
|
||||
// username: 'username',
|
||||
// name: 'username',
|
||||
// points: '12',
|
||||
// address: 'addressaddress',
|
||||
// post: '0000',
|
||||
// },
|
||||
// {
|
||||
// username: 'username',
|
||||
// name: 'username',
|
||||
// points: '12',
|
||||
// address: 'addressaddress',
|
||||
// post: '0000',
|
||||
// },
|
||||
// {
|
||||
// username: 'username',
|
||||
// name: 'username',
|
||||
// points: '12',
|
||||
// address: 'addressaddress',
|
||||
// post: '0000',
|
||||
// }
|
||||
// ],
|
||||
|
||||
myRecordsList: [],
|
||||
boostingPageSize: 6,
|
||||
boostingCurrentPage: 1,
|
||||
}
|
||||
@ -367,11 +370,13 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.token = getToken()
|
||||
this.$nextTick(() => {
|
||||
this.getMyBoxList()
|
||||
this.openBoxLog()
|
||||
this.getMyHistoricalLog()
|
||||
})
|
||||
if(this.token) {
|
||||
this.$nextTick(() => {
|
||||
this.getMyBoxList()
|
||||
this.openBoxLog()
|
||||
this.getMyHistoricalLog()
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 我的宝箱
|
||||
@ -425,6 +430,7 @@ export default {
|
||||
console.log('助力记录', this.boostingList)
|
||||
}
|
||||
},
|
||||
|
||||
async openBoxToChain(id) {
|
||||
let address = this.$store.state.user.address;
|
||||
if (!this.$store.state.wallet.connected || !address) {
|
||||
@ -448,7 +454,10 @@ export default {
|
||||
clearInterval(serTimeId)
|
||||
}
|
||||
} else {
|
||||
alert(`领取成功,显示奖励: ${JSON.stringify(data)}`)
|
||||
// alert(`领取成功,显示奖励: ${JSON.stringify(data)}`)
|
||||
this.getMyBoxList()
|
||||
this.openBoxLog()
|
||||
this.$emit('awardDialog', data)
|
||||
localStorage.removeItem(storeageKey)
|
||||
clearInterval(serTimeId)
|
||||
}
|
||||
|
@ -57,8 +57,8 @@
|
||||
<div class="left-title-right">
|
||||
<p>Invite friends to earn</p>
|
||||
<p>more rewards</p>
|
||||
<div class="copy-btn" @click="copyLink(userData.code)"><img src="./../../assets/common/Icon_Explore.png" alt=""> Copy referral code</div>
|
||||
<div class="copy-see" @click="logDialogVisible = true">
|
||||
<div class="copy-btn" @click="copyLinkCode"><img src="./../../assets/common/Icon_Explore.png" alt=""> Copy referral code</div>
|
||||
<div class="copy-see" @click="isLogin">
|
||||
See invites
|
||||
</div>
|
||||
</div>
|
||||
@ -213,7 +213,7 @@
|
||||
<Calen ref="renewCheck" :activityData='activityData' />
|
||||
<div class="rewards">
|
||||
<p>Cumulative Rewards</p>
|
||||
<div class="rewards-list">
|
||||
<div v-if="gameStateData.totalStat" class="rewards-list">
|
||||
<li v-for="(item, index) in gameStateData.totalStat" :key="index">
|
||||
<div class="center no-state" v-if="item.state == 0">
|
||||
<div>
|
||||
@ -244,10 +244,56 @@
|
||||
</div>
|
||||
</li>
|
||||
</div>
|
||||
<div v-else class="rewards-list">
|
||||
<li>
|
||||
<div class="center no-state">
|
||||
<div>
|
||||
<div class="top">
|
||||
<img src="./../../assets/common/Icon_Explore.png" alt="">
|
||||
<span>× 1</span>
|
||||
</div>
|
||||
<div class="btm">5 Days</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="center no-state">
|
||||
<div>
|
||||
<div class="top">
|
||||
<img src="./../../assets/common/Icon_Explore.png" alt="">
|
||||
<span>× 2</span>
|
||||
</div>
|
||||
<div class="btm">10 Days</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="center no-state">
|
||||
<div>
|
||||
<div class="top">
|
||||
<img src="./../../assets/common/Icon_Explore.png" alt="">
|
||||
<span>× 3</span>
|
||||
</div>
|
||||
<div class="btm">20 Days</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="center no-state">
|
||||
<div>
|
||||
<div class="top">
|
||||
<img src="./../../assets/common/Icon_Explore.png" alt="">
|
||||
<span>× 4</span>
|
||||
</div>
|
||||
<div class="btm">30 Days</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rewards">
|
||||
<p>Bonus Rewards</p>
|
||||
<div class="rewards-list">
|
||||
<div v-if="gameStateData.seqStat" class="rewards-list">
|
||||
<li v-for="(item, index) in gameStateData.seqStat" :key="index">
|
||||
<div class="center no-state" v-if="item.state == 0">
|
||||
<div>
|
||||
@ -278,6 +324,52 @@
|
||||
</div>
|
||||
</li>
|
||||
</div>
|
||||
<div v-else class="rewards-list">
|
||||
<li>
|
||||
<div class="center no-state">
|
||||
<div>
|
||||
<div class="top">
|
||||
<img src="./../../assets/common/Icon_Explore.png" alt="">
|
||||
<span>× 1</span>
|
||||
</div>
|
||||
<div class="btm">3 Days</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="center no-state">
|
||||
<div>
|
||||
<div class="top">
|
||||
<img src="./../../assets/common/Icon_Explore.png" alt="">
|
||||
<span>× 2</span>
|
||||
</div>
|
||||
<div class="btm">7 Days</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="center no-state">
|
||||
<div>
|
||||
<div class="top">
|
||||
<img src="./../../assets/common/Icon_Explore.png" alt="">
|
||||
<span>× 3</span>
|
||||
</div>
|
||||
<div class="btm">15 Days</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="center no-state">
|
||||
<div>
|
||||
<div class="top">
|
||||
<img src="./../../assets/common/Icon_Explore.png" alt="">
|
||||
<span>× 4</span>
|
||||
</div>
|
||||
<div class="btm">30 Days</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="check">
|
||||
@ -395,7 +487,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-btm">
|
||||
<BoxBtm @toExplore="toExplore" />
|
||||
<BoxBtm @toExplore="toExplore" @awardDialog="activityDialog" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -503,7 +595,7 @@ export default {
|
||||
],
|
||||
navIndex: 0,
|
||||
walletDialogVisible: false,
|
||||
gameStateData: [],
|
||||
gameStateData: {},
|
||||
activityName: "",
|
||||
activityId: "uaw_activity",
|
||||
isWallet: false,
|
||||
@ -795,6 +887,11 @@ export default {
|
||||
this.ExploreDialogVisible = true
|
||||
},
|
||||
|
||||
// // 开宝箱奖励
|
||||
// boxAwardDialog(val) {
|
||||
|
||||
// },
|
||||
|
||||
// 关闭奖励弹窗
|
||||
ExploreHandleClose() {
|
||||
this.ExploreDialogVisible = false;
|
||||
@ -919,16 +1016,29 @@ export default {
|
||||
},
|
||||
|
||||
// 复制链接
|
||||
copyLink(text) {
|
||||
let url = `http://192.168.100.216:8030/home/new=${text}/box=undefined/id=undefined`;
|
||||
let oInput = document.createElement("input");
|
||||
oInput.value = url;
|
||||
document.body.appendChild(oInput);
|
||||
oInput.select();
|
||||
document.execCommand("Copy");
|
||||
oInput.className = "oInput";
|
||||
oInput.style.display = "none";
|
||||
this.$message.success("Copy succeeded");
|
||||
copyLinkCode() {
|
||||
if(this.token) {
|
||||
let text = this.userData.code
|
||||
let url = `http://192.168.100.216:8030/home/new=${text}/box=undefined/id=undefined`;
|
||||
let oInput = document.createElement("input");
|
||||
oInput.value = url;
|
||||
document.body.appendChild(oInput);
|
||||
oInput.select();
|
||||
document.execCommand("Copy");
|
||||
oInput.className = "oInput";
|
||||
oInput.style.display = "none";
|
||||
this.$message.success("Copy succeeded");
|
||||
} else {
|
||||
this.walletDialogVisible = true
|
||||
}
|
||||
|
||||
},
|
||||
isLogin() {
|
||||
if(this.token) {
|
||||
this.logDialogVisible = true
|
||||
} else {
|
||||
this.walletDialogVisible = true
|
||||
}
|
||||
},
|
||||
|
||||
// nav 导航
|
||||
@ -1338,7 +1448,7 @@ export default {
|
||||
.bar {
|
||||
margin-bottom: 10px;
|
||||
.bar-top {
|
||||
|
||||
display: flex;
|
||||
}
|
||||
.bar-btm {
|
||||
font-size: 10px;
|
||||
@ -2022,6 +2132,10 @@ export default {
|
||||
z-index: 1;
|
||||
}
|
||||
.light-btn{
|
||||
background: #ffc35b;
|
||||
color: #000;
|
||||
padding: 5px 10px;
|
||||
border-radius: 20px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.Explore-dialog {
|
||||
|
@ -65,13 +65,14 @@ export default {
|
||||
return {
|
||||
logPageSize: 6,
|
||||
logCurrentPage: 1,
|
||||
invitationList: [
|
||||
{
|
||||
level: 1, // 段位
|
||||
nickname: "用户昵称",
|
||||
score: 100 // 获得的积分
|
||||
}
|
||||
],
|
||||
// invitationList: [
|
||||
// {
|
||||
// level: 1, // 段位
|
||||
// nickname: "用户昵称",
|
||||
// score: 100 // 获得的积分
|
||||
// }
|
||||
// ],
|
||||
invitationList: [],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user