nieyuge 2 년 전
부모
커밋
b86c0e0b25
3개의 변경된 파일22개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 1
      nuxt.config.js
  2. 20 0
      pages/index.vue
  3. 1 3
      pages/nft.vue

+ 1 - 1
nuxt.config.js

@@ -57,7 +57,7 @@ export default {
       },
       {
         name: 'nft',
-        path: '/nft/:id?',
+        path: '/nft/:id/:nft',
         component: resolve(__dirname, 'pages/nft.vue')
       },
       {

+ 20 - 0
pages/index.vue

@@ -698,6 +698,26 @@ export default {
 		} else {
 			this.show_home = true
 			this.status = 'no-chrome'
+            Report.reportLog({
+				baseInfo: {
+					appVersionCode: this.appVersionCode,
+					mid: this.mid,
+					pageSource: Report.pageSource.newUserLandingPage,
+					appType,
+					machineCode: this.mid
+				},
+				params: {
+					eventData: {
+						businessType: Report.businessType.pageView,
+					},
+                    extParams: {
+                        postId: this.detail.postId,
+                        srcContentId: this.detail.srcContentId,
+                        senderId: this.detail.srcUserId,
+                        status: this.status,
+                    }
+				}
+			})
 		}
 	}
 }

+ 1 - 3
pages/nft.vue

@@ -196,11 +196,9 @@ export default {
 			this.isMobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);
 		},
         setNftInfo() {
-            let urlParams = new URL(location.href);
-            let searchParams = new URLSearchParams(urlParams.search);
 			let nftInfo = {
 				nftProjectId: this.detail.nftProjectId,
-                twitterAccount: atob(searchParams.get('twitterAccount') || ''),
+                twitterAccount: atob(this.$route.params.nft || ''),
                 createTime: Date.now(),
 			};
 			Cookies.set('nft_info', JSON.stringify(nftInfo), { expires: 100 });