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