fix the chest boost record
This commit is contained in:
parent
e2648d912f
commit
967babba88
@ -62,6 +62,10 @@ let errmsg = err
|
||||
errmsg = "You do not hold the required role in the 'Delabs Game' Discord server"
|
||||
} else if(errmsg.indexOf('Please try again') > -1) {
|
||||
errmsg = "Verification failed due to high traffic. Please attempt to verify again or try later"
|
||||
} else if(errmsg.indexOf('You have already boosted the chest') > -1
|
||||
|| errmsg.indexOf('The chest’s boost count has reached the upper limit') > -1
|
||||
|| errmsg.indexOf('Today’s boost count has been exhausted') > -1) {
|
||||
// keep the errmsg
|
||||
} else {
|
||||
// 请重试
|
||||
errmsg = 'An unknown on-chain interaction error has occurred. Our technical team cannot resolve this issue directly. Please use a blockchain explorer to check your wallet address and determine if the transaction was recorded or if another issue exists.'
|
||||
|
@ -27,7 +27,7 @@
|
||||
</div>
|
||||
<div class="content-right">
|
||||
<div class="content-right-title">
|
||||
Boost Records
|
||||
Chest Boost Points
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
<div class="box-boosting-no" v-if="helpLogList == undefined || helpLogList.length <= 0">
|
||||
@ -130,10 +130,13 @@ export default {
|
||||
// 获取帮助的宝箱助力记录
|
||||
async getHelpBoxLog() {
|
||||
if (this.$route.params.code != undefined) {
|
||||
let rtoken = await checkReCaptcha("chest_share");
|
||||
// let rtoken = await checkReCaptcha("chest_share");
|
||||
let res = await this.$axios.post(
|
||||
process.env.VUE_APP_API_URL+"/api/chest/enhance/list",
|
||||
{ code: this.boxCode, rtoken: rtoken },
|
||||
{
|
||||
code: this.boxCode
|
||||
// , rtoken: rtoken
|
||||
},
|
||||
{
|
||||
headers: { Authorization: `Bearer ${this.token}` }
|
||||
}
|
||||
@ -146,23 +149,29 @@ export default {
|
||||
|
||||
// 宝箱助力
|
||||
async helpBtn() {
|
||||
// debugger
|
||||
if(this.boxState.isopened){
|
||||
//todo:
|
||||
this.$showErr('chest already opened')
|
||||
return
|
||||
}
|
||||
let address = localStorage.getItem("myAddress")
|
||||
// 3、是否已经助力此宝箱
|
||||
if(this.boxState.enhanced == 0) {
|
||||
// 1、助力次数是否用完
|
||||
if(this.boxState.userCurrent < this.boxState.userMax) {
|
||||
// 2、宝箱助力次数是否上限
|
||||
if(this.boxState.chestCurrent < this.boxState.chestMax) {
|
||||
// 4、开始助力
|
||||
await this.sendEnhanceReq(this.boxCode)
|
||||
// 2、宝箱助力次数是否上限
|
||||
if(this.boxState.chestCurrent < this.boxState.chestMax) {
|
||||
// 4、开始助力
|
||||
await this.sendEnhanceReq(this.boxCode)
|
||||
} else {
|
||||
this.$showErr('The chest’s boost count has reached the upper limit.')
|
||||
}
|
||||
} else {
|
||||
this.$showErr('Boost limit reached.')
|
||||
this.$showErr('Today’s boost count has been exhausted.')
|
||||
}
|
||||
} else {
|
||||
this.$showErr('Not enough boosts available.')
|
||||
}
|
||||
} else {
|
||||
this.$showErr('You have already boosted the chest once.')
|
||||
this.$showErr('You have already boosted the chest.')
|
||||
}
|
||||
|
||||
|
||||
@ -228,7 +237,11 @@ export default {
|
||||
// 助力状态查询
|
||||
async initBoxState(boxCode) {
|
||||
let res = await this.$axios.post(process.env.VUE_APP_API_URL+'/api/chest/enhance/state',{code: boxCode, },{headers: { Authorization: `Bearer ${this.token}` }})
|
||||
this.boxState = res.data.data
|
||||
if(res.data.errcode == 0){
|
||||
this.boxState = res.data.data
|
||||
}else if(res.data.errcode == 14){
|
||||
this.boxState.isopened = true
|
||||
}
|
||||
},
|
||||
|
||||
// 关闭弹窗
|
||||
|
Loading…
x
Reference in New Issue
Block a user