diff --git a/pages/nft/url/index.vue b/pages/nft/url/index.vue index 560cbb3f..34b95ebc 100644 --- a/pages/nft/url/index.vue +++ b/pages/nft/url/index.vue @@ -355,6 +355,10 @@ export default class FetchIndex extends Vue { return new RegExp(ISCN_PREFIX_REGEX); } + get isNewsPress() { + return !!this.url.includes('news_press=1') + } + async mounted() { if (this.iscnId) { if (!this.isUpdateMode) { @@ -643,13 +647,12 @@ export default class FetchIndex extends Vue { } async crawlUrlData() { - const isNewsPress = !!this.$route.query.news_press && this.$route.query.news_press !== '0' try { logTrackerEvent(this, 'NFTUrlMint', 'CrawlUrlData', this.url, 1); const { data } = await this.$axios.get(`/crawler/?url=${encodeURIComponent(this.encodedURL)}&wallet=${this.address}`) const { title, description, author, body, images = [] } = data; let { keywords } = data; - if (isNewsPress) { + if (this.isNewsPress) { keywords = keywords ? `${keywords},NewsPress` : 'NewsPress'; } if (!body) { throw new Error('CANNOT_CRAWL_THIS_URL') }