|
@@ -74,13 +74,16 @@ export default {
|
|
|
avatarUrl: '',
|
|
|
nickName: '',
|
|
|
},
|
|
|
+ amountValue: '',
|
|
|
+ currencySymbol: '',
|
|
|
+ amountUsdValue: '',
|
|
|
+ totalCount: '',
|
|
|
},
|
|
|
config: {},
|
|
|
title: 'Treasure Hunt',
|
|
|
isMobile: false,
|
|
|
isChrome: false,
|
|
|
linkHref: '',
|
|
|
- metaTitle: 'DeNet: An Easy Web3 Tool For GIVEAWAY / AIRDROP',
|
|
|
};
|
|
|
},
|
|
|
components: {
|
|
@@ -95,7 +98,7 @@ export default {
|
|
|
// facebook
|
|
|
{
|
|
|
name: 'og:title',
|
|
|
- content: this.metaTitle,
|
|
|
+ content: `Treasure Chest: ${this.detail.amountValue} ${this.detail.currencySymbol} (worth $${this.detail.amountUsdValue}) for ${this.detail.totalCount} winners`,
|
|
|
},
|
|
|
{
|
|
|
name: 'og:image',
|
|
@@ -108,7 +111,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
name: 'twitter:title',
|
|
|
- content: this.metaTitle,
|
|
|
+ content: `Treasure Chest: ${this.detail.amountValue} ${this.detail.currencySymbol} (worth $${this.detail.amountUsdValue}) for ${this.detail.totalCount} winners`,
|
|
|
},
|
|
|
{
|
|
|
name: 'twitter:image',
|
|
@@ -146,20 +149,21 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
Cookies.set(this.detail.postId, JSON.stringify({ inviteCode: this.$route.params.id }), { expires: 100 });
|
|
|
+ this.setTreasureInfo();
|
|
|
+
|
|
|
setTimeout(() => {
|
|
|
this.checkInstall()
|
|
|
.then(() => {
|
|
|
- if (this.detail.srcContentId && this.detail.postUserInfo && this.detail.postUserInfo.postNickName) {
|
|
|
- let url = `https://twitter.com/${this.detail.postUserInfo.postNickName}/status/${this.detail.srcContentId}`;
|
|
|
- window.open(url);
|
|
|
+ console.log(this.detail);
|
|
|
+ if (this.detail.repostSrcContentId && this.detail.inviteUserInfo && this.detail.inviteUserInfo.nickName) {
|
|
|
+ let url = `https://twitter.com/${this.detail.inviteUserInfo.nickName}/status/${this.detail.repostSrcContentId}`;
|
|
|
+ window.location.replace(url);
|
|
|
}
|
|
|
+ this.isLoading = false;
|
|
|
})
|
|
|
- .catch(() => {
|
|
|
- this.setTreasureInfo();
|
|
|
- });
|
|
|
- }, 600);
|
|
|
+ .catch(() => {});
|
|
|
+ }, 1000);
|
|
|
this.checkBrowser();
|
|
|
- this.isLoading = false;
|
|
|
|
|
|
var clipboard = new ClipboardJS('.btn');
|
|
|
let that = this;
|
|
@@ -205,6 +209,7 @@ export default {
|
|
|
checkInstall() {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
let dom = document.querySelector('#denet_message');
|
|
|
+ console.log('denet_message', dom);
|
|
|
if (dom) {
|
|
|
resolve(true);
|
|
|
} else {
|
|
@@ -279,8 +284,8 @@ export default {
|
|
|
let treasureInfo = {
|
|
|
createTime: Date.now(),
|
|
|
jump_type: 'treasure_info',
|
|
|
- srcContentId: this.detail.srcContentId || '',
|
|
|
- postNickName: this.detail.postUserInfo.nickName,
|
|
|
+ srcContentId: this.detail.repostSrcContentId || '',
|
|
|
+ postNickName: this.detail.inviteUserInfo.nickName,
|
|
|
};
|
|
|
Cookies.set('jump_info', JSON.stringify(treasureInfo), { expires: 100 });
|
|
|
},
|