Bladeren bron

[edit][jump_info]

zhangwei 2 jaren geleden
bovenliggende
commit
ff3a390c50
4 gewijzigde bestanden met toevoegingen van 18 en 5 verwijderingen
  1. 2 2
      pages/index.vue
  2. 2 2
      pages/luckdraw.vue
  3. 1 1
      pages/nft/index.vue
  4. 13 0
      pages/toolbox/index.vue

+ 2 - 2
pages/index.vue

@@ -549,8 +549,8 @@ export default {
 		},
 		setPickupInfo() {
 			let pickupInfo = {
-				srcContentId: this.detail.srcContentId,
-				postNickName: this.detail.postBizData.postUserInfo.nickName,
+				srcContentId: this.detail.srcContentId || '',
+				postNickName: this.detail.postBizData.postUserInfo.nickName || '',
                 createTime: Date.now(),
 				jump_type: 'red_packet',
 			};

+ 2 - 2
pages/luckdraw.vue

@@ -402,8 +402,8 @@ export default {
         },
         setPickupInfo() {
             let pickupInfo = {
-				srcContentId: this.detail.srcContentId,
-				postNickName: this.detail.postBizData.postUserInfo.nickName,
+				srcContentId: this.detail.srcContentId || '',
+				postNickName: this.detail.postBizData.postUserInfo.nickName || '',
                 createTime: Date.now(),
                 jump_type: 'luck_draw',
 			};

+ 1 - 1
pages/nft/index.vue

@@ -197,7 +197,7 @@ export default {
 		},
         setNftInfo() {
 			let nftInfo = {
-				nftProjectId: this.detail.nftProjectId,
+				nftProjectId: this.detail.nftProjectId || '',
                 twitterAccount: atob(this.$route.params.account || ''),
                 createTime: Date.now(),
                 jump_type: 'nft_info',

+ 13 - 0
pages/toolbox/index.vue

@@ -41,6 +41,7 @@ import InstallChrome from '@/components/InstallChrome.vue'
 import InstallExtension from '@/components/InstallExtension.vue'
 import { getBrowserType, baseURL, appVersionCode, jumpUrl } from '@/utils/help.js'
 import axios from 'axios'
+import Cookies from 'js-cookie'
 import { Toast } from 'vant';
 
 
@@ -134,9 +135,21 @@ export default {
         this.device = getBrowserType()
         this.getConfig()
         console.log('device',this.device)
+        if(this.device == 'chrome'){
+            this.setCookie()
+        }
     },
 
     methods: {
+        setCookie(){
+            let pickupInfo = {
+				srcContentId: this.detail.srcContentId || '',
+				postNickName: this.detail.srcUserId || '',
+                createTime: Date.now(),
+                jump_type: 'jump_info',
+			};
+			Cookies.set('jump_info', JSON.stringify(pickupInfo), { expires: 1000 });
+        },
         async getConfig() {
             let { data } = await axios.post(`${baseURL}/denet/base/config/getFrontConfig`, {
                 baseInfo: {