+
-
+
@@ -194,7 +195,7 @@
No Data
-
Open the Treasure
+
Open the Treasure
{
+ localStorage.setItem('userData', JSON.stringify(res.data.data))
+ })
+ },
// 复制助力链接
copyLink(data) {
@@ -700,6 +720,7 @@ export default {
.box-log {
display: flex;
margin: 20px 0;
+ margin-top: 40px;
.btn {
display: flex;
align-items: center;
@@ -899,8 +920,6 @@ export default {
width: 380px;
height: 600px;
padding: 30px;
- background: url("./../../assets/common/Right_box.png") no-repeat;
- background-size: 100% 100%;
.box-page {
.box-title {
.box-title-top {
diff --git a/src/views/home/gameView.vue b/src/views/home/gameView.vue
index 21180fa..a3d712e 100644
--- a/src/views/home/gameView.vue
+++ b/src/views/home/gameView.vue
@@ -110,9 +110,10 @@ export default {
this.isLoading = false
cc.mainAnim.setCurrPos(getTotalUsed)
cc.mainAnim.setData(step)
- setTimeout(
- this.$emit('awardDialog', data),
- step*2000)
+ let stepTimeId = setInterval(() => {
+ this.$emit('awardDialog', data)
+ clearInterval(stepTimeId)
+ },step*2000)
localStorage.removeItem(storeageKey)
clearInterval(serTimeId)
}
diff --git a/src/views/home/helpDialog.vue b/src/views/home/helpDialog.vue
index 4159f92..5aeca4a 100644
--- a/src/views/home/helpDialog.vue
+++ b/src/views/home/helpDialog.vue
@@ -227,8 +227,8 @@ export default {
try {
storeageKey = await sendToChain('chest_enhance', address, boxCode)
} catch (err) {
+ this.$showErr(err.data.message)
this.isLoading = false;
- this.$message.error(`error send chain request`)
return
}
let serTimeId = setInterval(async () => {
@@ -248,6 +248,7 @@ export default {
this.$emit('awardDialog', this.awardData)
this.$emit('handleClose')
}
+ this.getUserState()
localStorage.removeItem(storeageKey)
clearInterval(serTimeId)
} else if (errcode !== 14) {
@@ -273,6 +274,14 @@ export default {
}
}
},
+ // 获取用户状态
+ getUserState() {
+ this.$axios.get(process.env.VUE_APP_API_URL+'/api/user/state',{ params: '',
+ headers: { Authorization: `Bearer ${this.token}` },
+ }).then(res => {
+ localStorage.setItem('userData', JSON.stringify(res.data.data))
+ })
+ },
// 关闭弹窗
helpDialog() {
diff --git a/src/views/home/index.vue b/src/views/home/index.vue
index ea818a5..037f436 100644
--- a/src/views/home/index.vue
+++ b/src/views/home/index.vue
@@ -84,7 +84,7 @@
How it works
Every step is filled with possibilities; every movement might begin a new chapter All on-chain activities are built on opBNB Click on the smiley face to view more details on Medium
+ >Every step is filled with possibilities; every movement might begin a new chapter.
All on-chain activities are built on opBNB.
Click on the smiley face to view more details on Medium
@@ -203,7 +203,7 @@
{{ item.actionTitle }}
-
Verify
+
Verify
Claim
+{{ item.score }}
.png)
@@ -557,7 +557,7 @@
-
+
@@ -1013,9 +1013,11 @@ export default {
}
});
this.dialogTitle = 'Explore successfully and get rewards'
+ this.$refs.boxList.rewBoxList()
} else {
this.dialogTitle = 'Congratulations'
}
+ this.getUserState()
this.getGameStat()
this.ExploreDialogVisible = true
},
@@ -1035,6 +1037,7 @@ export default {
this.awardData = val
this.eventName = 'help_event'
this.dialogTitle = 'Congratulations'
+ this.getUserState()
this.ExploreDialogVisible = true
},
@@ -1110,17 +1113,18 @@ export default {
// return
// ToDo
let res = await apiCheckinClaimSeq(day)
- console.log(res)
+ console.info(res)
this.getGameStat();
},
// 获取累计签到奖励
async getCheckClaim(days) {
let res = await apiCheckinClaim(days);
- if (res.ticket) {
+ // if (res.ticket) {
+ console.info(res)
this.getGameStat();
- this.$message.success('Received successfully')
- }
+ // this.$message.success('Received successfully')
+ // }
},
// 获取钱包地址
@@ -1234,6 +1238,15 @@ export default {
}
},
+ // 获取用户状态
+ getUserState() {
+ this.$axios.get(process.env.VUE_APP_API_URL+'/api/user/state',{ params: '',
+ headers: { Authorization: `Bearer ${this.token}` },
+ }).then(res => {
+ localStorage.setItem('userData', JSON.stringify(res.data.data))
+ })
+ },
+
// nav 导航
navBtn(index) {
this.navIndex = index;
diff --git a/src/views/home/logDialog.vue b/src/views/home/logDialog.vue
index e8833fc..bb90105 100644
--- a/src/views/home/logDialog.vue
+++ b/src/views/home/logDialog.vue
@@ -78,6 +78,9 @@ export default {
computed: {
// 计算我的助力分页
logCurrentPageItems() {
+ if(this.invitationList.length == 0){
+ return this.invitationList
+ }
let start = (this.logCurrentPage - 1) * this.logPageSize;
let end = start + this.logPageSize;
return this.invitationList.slice(start, end)
diff --git a/src/views/home/ranking.vue b/src/views/home/ranking.vue
index e61d647..071e7fc 100644
--- a/src/views/home/ranking.vue
+++ b/src/views/home/ranking.vue
@@ -12,7 +12,8 @@
-
{{ userData.scoreTotal }}
+
{{ userData.scoreTotal }}
+
{{ userData.scoreTotal }}
@@ -22,12 +23,18 @@
{{ userData.rankTotal }}
Not in the top 100 yet
-
{{ userData.rankTotal+1 }}
+
{{ userData.rankTotal+1 }}
+
-