修复头像不加载显示默认头像,nft合作弹窗提示

This commit is contained in:
yuyongdong 2024-04-26 15:23:09 +08:00
parent c5b322887d
commit d4d0054289
4 changed files with 19 additions and 20 deletions

View File

@ -34,10 +34,8 @@ let errmsg = err
errmsg = 'Redemption Code is required' errmsg = 'Redemption Code is required'
} else if(errmsg.indexOf('need connect discord first') > -1) { } else if(errmsg.indexOf('need connect discord first') > -1) {
errmsg = `Discord account unlinked. Please ensure the 'Connect Your Discord' quest is complete.` errmsg = `Discord account unlinked. Please ensure the 'Connect Your Discord' quest is complete.`
} else if(errmsg.indexOf("You do not hold the required role in the 'Ink' Discord server") > -1) { } else if(errmsg.indexOf("You do not hold the required role in the") > -1) {
errmsg = `You do not hold the required role in the 'Ink' Discord server` errmsg = errmsg
} else if(errmsg.indexOf("You do not hold the required role in the 'Counter Fire' Discord server") > -1) {
errmsg = `"You do not hold the required role in the 'Counter Fire' Discord server"`
} else if(errmsg.indexOf('Invalid Voucher Code') > -1) { } else if(errmsg.indexOf('Invalid Voucher Code') > -1) {
errmsg = 'Invalid Redemption Code' errmsg = 'Invalid Redemption Code'
} else if(errmsg.indexOf('voucher already used') > -1) { } else if(errmsg.indexOf('voucher already used') > -1) {
@ -58,8 +56,6 @@ let errmsg = err
errmsg = "Please complete the 'Connect Your Discord' quest first" errmsg = "Please complete the 'Connect Your Discord' quest first"
} else if(errmsg.indexOf("maintance now, please try later") > -1) { } else if(errmsg.indexOf("maintance now, please try later") > -1) {
errmsg = "maintance now, please try later" errmsg = "maintance now, please try later"
} else if(errmsg.indexOf("Delabs Game") > -1) {
errmsg = "You do not hold the required role in the 'Delabs Game' Discord server"
} else if(errmsg.indexOf('Please try again') > -1) { } else if(errmsg.indexOf('Please try again') > -1) {
errmsg = "Verification failed due to high traffic. Please attempt to verify again or try later" errmsg = "Verification failed due to high traffic. Please attempt to verify again or try later"
} else if(errmsg.indexOf('already claimed') > -1) { } else if(errmsg.indexOf('already claimed') > -1) {

View File

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<img v-if="imgSrc" :src="imgSrc" alt=""> <img v-if="imgSrc" :src="imgSrc" alt="" :onerror="defalutUrl">
<img v-else src="@/assets/common/head_default.jpg" alt=""> <img v-else src="@/assets/common/head_default.jpg" alt="">
</div> </div>
</template> </template>
@ -10,7 +10,11 @@ export default {
props: { props: {
imgSrc: String, imgSrc: String,
}, },
data() {
return {
defalutUrl: 'this.src="' + require('@/assets/common/head_default.jpg') + '"',
}
},
} }
</script> </script>

View File

@ -1137,8 +1137,12 @@ export default {
toReconnection(val) { toReconnection(val) {
if(val.task == "DiscordConnect" || val.task == "TwitterConnect") { if(val.task == "DiscordConnect" || val.task == "TwitterConnect") {
this.activeList.forEach(item => { this.activeList.forEach(item => {
if(item.task == "DiscordConnect" || val.task == "TwitterConnect") { if(item.task == "DiscordConnect") {
item.status = 0 item.status = 0
} else if(val.task == "TwitterConnect") {
item.status = 0
} else {
return
} }
}); });
} }

View File

@ -191,24 +191,19 @@ export default {
} else if(errcode == 13) { } else if(errcode == 13) {
this.$showErr(`${errmsg}`) this.$showErr(`${errmsg}`)
} else if(errcode == 14) { } else if(errcode == 14) {
if(itemData.contract == 'INK') { if(itemData.guild !== '930002266868555827') {
this.$showErr("You do not hold the required role in the 'Ink' Discord server") this.$showErr(`You do not hold the required role in the '${itemData.projectName}' Discord server`)
} else if(itemData.projectName == "Delabs Games") {
this.$showErr(`${itemData.projectName}`)
} else { } else {
this.$showErr("had no role") this.$showErr(`You do not hold the required role in the 'Counter Fire' Discord server`)
} }
} else if(errcode == 20) { } else if(errcode == 20) {
this.$showErr(errmsg) this.$showErr(errmsg)
} else if(errcode == 21) { } else if(errcode == 21) {
// this.$showErr(errmsg, nextAction) // this.$showErr(errmsg, nextAction)
if(itemData.contract == 'INK') { if(itemData.guild !== '930002266868555827') {
this.$showErr("You do not hold the required role in the 'Ink' Discord server") this.$showErr(`You do not hold the required role in the '${itemData.projectName}' Discord server`)
} else if(itemData.projectName == "Delabs Games") {
this.$showErr(`${itemData.projectName}`)
} else { } else {
this.$showErr("You do not hold the required role in the 'Counter Fire' Discord server") this.$showErr(`You do not hold the required role in the 'Counter Fire' Discord server`)
this.$emit('toNavIndex')
} }
} }
} catch (err) { } catch (err) {