Skip to content

Commit

Permalink
fix nav url bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ycg5250 committed Aug 8, 2024
1 parent c609b1d commit 8107e32
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 17 deletions.
19 changes: 8 additions & 11 deletions src/components/common/Footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export default {
data: [
{
title: this.$t('COMMON.LAYOUT.mobileWallet'),
url: `https://tokenpocket.pro/`
url: this.homeUrl
},
{
title: this.$t('COMMON.LAYOUT.hardwareWallet'),
Expand Down Expand Up @@ -253,18 +253,17 @@ export default {
},
{
title: this.$t('COMMON.LAYOUT.subDApp'),
url: `https://tokenpocket.pro/${this.$i18n.locale}/submit/dapp`
url: this.dappUrl
},
{
title: this.$t('COMMON.LAYOUT.subToken'),
url: `https://tokenpocket.pro/${this.$i18n.locale}/submit/token`
url: this.tokenUrl
},
{
title: this.$t('COMMON.LAYOUT.subNFT'),
url: `https://tokenpocket.pro/${this.$i18n.locale}/submit/nft`
url: this.nftUrl
},
{
local: true,
title: this.$t('COMMON.LAYOUT.subChain'),
url: 'https://github.com/TP-Lab/networklist-org'
},
Expand Down Expand Up @@ -306,15 +305,15 @@ export default {
var list = [
{
title: this.$t('COMMON.LAYOUT.about'),
url: `https://tokenpocket.pro/${this.$i18n.locale}/about`
url: this.aboutUrl
},
{
title: this.$t('COMMON.LAYOUT.careers'),
url: this.joinUsUrl
},
{
title: this.$t('COMMON.LAYOUT.tpMan'),
url: `https://tokenpocket.pro/${this.$i18n.locale}/recruiting`
url: this.recruitingUrl
},
{
title: this.$t('COMMON.LAYOUT.pressKit'),
Expand Down Expand Up @@ -351,13 +350,11 @@ export default {
data: [
{
title: this.$t('COMMON.LAYOUT.privacyPolicy'),
url: this.isZH
? '/privacy-zh/index.html'
: '/privacy-en/index.html'
url: this.privacyUrl
},
{
title: this.$t('COMMON.LAYOUT.terms'),
url: this.isZH ? '/terms-zh/index.html' : '/terms-en/index.html'
url: this.termsUrl
}
]
}
Expand Down
10 changes: 5 additions & 5 deletions src/components/common/NavIndex.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export default {
class: 'nav-icon-1',
desc: this.$t('COMMON.LAYOUT.mobileWalletDesc'),
title: this.$t('COMMON.LAYOUT.mobileWallet'),
url: `https://tokenpocket.pro/`
url: this.homeUrl
},
{
class: 'nav-icon-2',
Expand Down Expand Up @@ -196,7 +196,7 @@ export default {
// dappstore
{
title: this.$t('COMMON.LAYOUT.dappStore'),
url: `https://tokenpocket.pro/${this.$i18n.locale}/dappstore`
url: this.dappStoreUrl
},
// 项目提交
{
Expand All @@ -208,19 +208,19 @@ export default {
class: 'nav-icon-19',
desc: this.$t('COMMON.LAYOUT.subDAppDesc'),
title: this.$t('COMMON.LAYOUT.subDApp'),
url: `https://tokenpocket.pro/${this.$i18n.locale}/submit/dapp`
url: this.dappUrl
},
{
class: 'nav-icon-18',
desc: this.$t('COMMON.LAYOUT.subNFTDesc'),
title: this.$t('COMMON.LAYOUT.subNFT'),
url: `https://tokenpocket.pro/${this.$i18n.locale}/submit/nft`
url: this.nftUrl
},
{
class: 'nav-icon-21',
desc: this.$t('COMMON.LAYOUT.subTokenDesc'),
title: this.$t('COMMON.LAYOUT.subToken'),
url: `https://tokenpocket.pro/${this.$i18n.locale}/submit/token`
url: this.tokenUrl
},
{
class: 'nav-icon-20',
Expand Down
39 changes: 38 additions & 1 deletion src/mixins/NavUrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,43 @@ export default {
},
tokenClaimUrl() {
return `https://claim.tokenpocket.pro/?locale=${this.$i18n.locale}#/`
}
},
dappStoreUrl() {
if (this.isTokenPocketPro) {
return `https://tokenpocket.pro/${this.$i18n.locale}/dappstore`;
} else {
return `https://tpwallet.io/${this.$i18n.locale}/dappstore`;
}
},
privacyUrl() {
if (this.isTokenPocketPro) {
if (this.isZH) {
return `https://tokenpocket.pro/privacy-zh/index.html`;
} else {
return `https://tokenpocket.pro/privacy-en/index.html`;
}
} else {
if (this.isZH) {
return `https://tpwallet.io/privacy-zh/index.html`;
} else {
return `https://tpwallet.io/privacy-en/index.html`;
}
}
},
termsUrl() {
if (this.isTokenPocketPro) {
if (this.isZH) {
return `https://tokenpocket.pro/terms-zh/index.html`;
} else {
return `https://tokenpocket.pro/terms-en/index.html`;
}
} else {
if (this.isZH) {
return `https://tpwallet.io/terms-zh/index.html`;
} else {
return `https://tpwallet.io/terms-en/index.html`;
}
}
},
}
}

0 comments on commit 8107e32

Please sign in to comment.