فهرست منبع

Merge branch 'dev_1.1.7' into dev_1.1.7_test_branch

zhangwei 2 سال پیش
والد
کامیت
1d51b3414b
8فایلهای تغییر یافته به همراه643 افزوده شده و 529 حذف شده
  1. 47 32
      nuxt.config.js
  2. 10 0
      pages/ach_pay/pay_notice.vue
  3. 245 224
      pages/index.vue
  4. 253 211
      pages/luckdraw.vue
  5. 1 0
      pages/nft/group.vue
  6. 1 0
      pages/nft/index.vue
  7. 86 62
      pages/toolbox/index.vue
  8. BIN
      static/img/img-default.png

+ 47 - 32
nuxt.config.js

@@ -15,9 +15,24 @@ export default {
     ],
     link: [
       { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
-    ]
+    ],
+    script: [
+      {
+        src: "https://www.googletagmanager.com/gtag/js?id=G-S376V42WBS",
+        async: true
+      },
+      {
+        type: 'text/javascript', charset: 'utf-8',
+        innerHTML: `window.dataLayer = window.dataLayer || [];
+        function gtag() { dataLayer.push(arguments); }
+        gtag('js', new Date());
+        gtag('config', 'G-S376V42WBS');`
+      }
+    ],
+    __dangerouslyDisableSanitizers: ['script']
   },
 
+
   // Global CSS: https://go.nuxtjs.dev/config-css
   css: [
   ],
@@ -43,7 +58,7 @@ export default {
   // Build Configuration: https://go.nuxtjs.dev/config-build
   build: {
   },
-  
+
   router: {
     extendRoutes(routes, resolve) {
       routes.push({
@@ -51,36 +66,36 @@ export default {
         path: '/:id?',
         component: resolve(__dirname, 'pages/index.vue')
       },
-      {
-        name: 'LuckDraw',
-        path: '/luckdraw/:id?',
-        component: resolve(__dirname, 'pages/luckdraw.vue')
-      },
-      {
-        name:'ToolBox',
-        path: '/toolbox/:id',
-        component: resolve(__dirname, 'pages/toolbox/index.vue')
-      },
-      {
-        name: 'Install',
-        path: '/install',
-        component: resolve(__dirname, 'pages/install.vue')
-      },
-      {
-        name: 'NFT',
-        path: '/nft/:id/:account',
-        component: resolve(__dirname, 'pages/nft/index.vue')
-      },
-      {
-        name: 'NftGroup',
-        path: '/nft_group/:id',
-        component: resolve(__dirname, 'pages/nft/group.vue')
-      },
-      {
-        name: 'custom',
-        path: '*',
-        component: resolve(__dirname, 'pages/404.vue')
-      })
+        {
+          name: 'LuckDraw',
+          path: '/luckdraw/:id?',
+          component: resolve(__dirname, 'pages/luckdraw.vue')
+        },
+        {
+          name: 'ToolBox',
+          path: '/toolbox/:id',
+          component: resolve(__dirname, 'pages/toolbox/index.vue')
+        },
+        {
+          name: 'Install',
+          path: '/install',
+          component: resolve(__dirname, 'pages/install.vue')
+        },
+        {
+          name: 'NFT',
+          path: '/nft/:id/:account',
+          component: resolve(__dirname, 'pages/nft/index.vue')
+        },
+        {
+          name: 'NftGroup',
+          path: '/nft_group/:id',
+          component: resolve(__dirname, 'pages/nft/group.vue')
+        },
+        {
+          name: 'custom',
+          path: '*',
+          component: resolve(__dirname, 'pages/404.vue')
+        })
     }
   },
   env: {

+ 10 - 0
pages/ach_pay/pay_notice.vue

@@ -0,0 +1,10 @@
+<template>
+    <div></div>
+</template>
+
+<script>
+
+</script>
+
+<style lang="scss" >
+</style>

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 245 - 224
pages/index.vue


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 253 - 211
pages/luckdraw.vue


+ 1 - 0
pages/nft/group.vue

@@ -269,6 +269,7 @@ export default {
                 twitterAccount: this.postBizData.defaultTwitterAccount || '',
                 createTime: Date.now(),
                 jump_type: 'nft_group_info',
+                postId: this.detail.postId || ''
             };
             Cookies.set('jump_info', JSON.stringify(nftGroupInfo), { expires: 100 });
         },

+ 1 - 0
pages/nft/index.vue

@@ -250,6 +250,7 @@ export default {
                 twitterAccount: atob(this.$route.params.account || ''),
                 createTime: Date.now(),
                 jump_type: 'nft_info',
+                postId: this.detail.postId || ''
             };
             Cookies.set('jump_info', JSON.stringify(nftInfo), { expires: 100 });
         },

+ 86 - 62
pages/toolbox/index.vue

@@ -4,43 +4,48 @@
 		<div v-if="device == 'chrome' || device == 'no-chrome'" class="content">
 			<v-logo></v-logo>
 			<div class="tool-cover">
-				<img :src="detail.postBizData.linkImagePath" alt="" />
+				<img :src="img_url" alt="">
 			</div>
 			<!-- 非chrome -->
 			<div v-if="device == 'no-chrome'">
-				<div class="txt">Use chrome browser to access Subway Surfers</div>
+				<div class="txt">Use chrome browser to access {{ detail.postBizData.linkTitle || '' }}</div>
 				<install-chrome></install-chrome>
 			</div>
 			<!-- chrome -->
 			<div v-if="device == 'chrome'">
-				<div class="txt">Use chrome browser to access Subway Surfers</div>
+				<div class="txt">Use chrome browser to access {{ detail.postBizData.linkTitle || '' }}</div>
 				<install-extension :extensionsInstallUrl="config.extensionsInstallUrl"></install-extension>
 			</div>
 		</div>
 
 		<!-- 移动端 -->
-		<div v-if="device == 'ios' || device == '安卓'" class="mobile">
-			<div class="mobile-content">
-				<img :src="detail.postBizData.linkImagePath" alt="" />
-				<div class="title">Open link on PC to use Subway Surfers</div>
-			</div>
-			<div class="area-button">
-				<div class="btn1" @click="clickExtension">Install Chrome Extension</div>
-				<div class="btn2" @click="clickCopy" :data-clipboard-text="copy_link">Copy Link</div>
-			</div>
-		</div>
+		<!-- <div v-if="device == 'ios' || device == '安卓'" class="mobile">
+            <div class="mobile-content">
+                <img :src="detail.postBizData.linkImagePath" alt="">
+                <div class="title">Open link on PC to use Subway Surfers</div>
+            </div>
+            <div class="area-button">
+                <div class="btn1" @click="clickExtension">
+                    Install Chrome Extension
+                </div>
+                <div class="btn2" @click="clickCopy" :data-clipboard-text="copy_link">
+                    Copy Link
+                </div>
+            </div>
+        </div> -->
 	</div>
 </template>
 <script>
-import VLogo from '@/components/logo.vue';
-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 VLogo from '@/components/logo.vue'
+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';
 
-var ClipboardJS = require('clipboard');
+
+var ClipboardJS = require('clipboard')
 
 export default {
 	name: 'tool_box',
@@ -52,7 +57,8 @@ export default {
 			metaTitle: 'Install DeNet Plugin to Participate',
 			device: '',
 			detail: {},
-		};
+			img_url: ''
+		}
 	},
 	head() {
 		return {
@@ -60,43 +66,43 @@ export default {
 			title: this.title,
 			appVersionCode: appVersionCode,
 			meta: [
-				// facebook
+				// facebook 
 				{
 					name: 'og:url',
-					content: jumpUrl + 'toolbox/' + this.$route.params.id,
+					content: jumpUrl + 'toolbox/' + this.$route.params.id
 				},
 				{
 					name: 'og:title',
-					content: this.metaTitle,
+					content: this.metaTitle
 				},
 				{
 					name: 'og:image',
-					content: this.detail.postBizData.linkImagePath || '',
+					content: this.detail.postBizData.linkImagePath || ''
 				},
 				// twitter
 				{
 					name: 'twitter:card',
-					content: 'summary_large_image',
+					content: 'summary_large_image'
 				},
 				{
 					name: 'twitter:url',
-					content: jumpUrl + 'toolbox/' + this.$route.params.id,
+					content: jumpUrl + 'toolbox/' + this.$route.params.id
 				},
 				{
 					name: 'twitter:title',
-					content: this.detail.postBizData.linkTitle || this.metaTitle,
+					content: this.detail.postBizData.linkTitle || this.metaTitle
 				},
 				{
 					name: 'twitter:image',
-					content: this.detail.postBizData.linkImagePath || '',
-				},
-			],
-		};
+					content: this.detail.postBizData.linkImagePath || ''
+				}
+			]
+		}
 	},
 	components: {
 		VLogo,
 		InstallChrome,
-		InstallExtension,
+		InstallExtension
 	},
 	async asyncData(params) {
 		let { route } = params;
@@ -106,32 +112,42 @@ export default {
 				mid: '00000000-0000-0000-0000-000000000000',
 			},
 			params: {
-				postId: route.params.id || '',
-			},
-		});
+				postId: route.params.id || ''
+			}
+		})
 		if (data.code == 0) {
 			if (data.data && data.data.postBizData && typeof data.data.postBizData == 'string') {
-				data.data.postBizData = JSON.parse(data.data.postBizData);
+				data.data.postBizData = JSON.parse(data.data.postBizData)
 			}
 			if (data.data.postBizData === null) {
 				data.data.postBizData = {
-					postUserInfo: {},
-				};
+					postUserInfo: {}
+				}
 			}
-			console.log('detail', data.data);
+			console.log('detail', data.data)
 
 			return {
 				detail: data.data,
-			};
+			}
 		}
 	},
 	mounted() {
-		this.copy_link = window.location.href;
-		this.device = getBrowserType();
-		this.getConfig();
-		console.log('device', this.device);
+		if (this.detail.postBizData.linkImagePath.indexOf('default') > 0) {
+			this.img_url = '/img/img-default.png'
+		} else {
+			this.img_url = this.detail.postBizData.linkImagePath
+		}
+
+
+		this.copy_link = window.location.href
+		this.device = getBrowserType()
+		console.log('device', this.device)
+		if (this.device == 'ios' || this.device == '安卓') {
+			return window.location = this.detail.postBizData.convertUrl
+		}
+		this.getConfig()
 		if (this.device == 'chrome') {
-			this.setCookie();
+			this.setCookie()
 		}
 	},
 
@@ -141,7 +157,8 @@ export default {
 				srcContentId: this.detail.srcContentId || '',
 				postNickName: this.detail.srcUserId || '',
 				createTime: Date.now(),
-				jump_type: 'jump_info',
+				jump_type: 'tool_box',
+				postId: this.detail.postBizData.postId || ''
 			};
 			Cookies.set('jump_info', JSON.stringify(pickupInfo), { expires: 1000 });
 		},
@@ -149,10 +166,11 @@ export default {
 			let { data } = await axios.post(`${baseURL}/denet/base/config/getFrontConfig`, {
 				baseInfo: {
 					appVersionCode: this.appVersionCode,
-					mid: this.mid,
+					mid: this.mid
 				},
-				params: {},
-			});
+				params: {
+				}
+			})
 			if (data.code == 0) {
 				this.config = data.data;
 			}
@@ -165,17 +183,18 @@ export default {
 				e.clearSelection();
 			});
 
-			clipboard.on('error', function () {
+			clipboard.on('error', function (e) {
 				Toast('copy error');
 			});
 		},
 		clickExtension() {
-			window.open(this.config.extensionsInstallUrl);
-		},
-	},
-};
+			window.open(this.config.extensionsInstallUrl)
+		}
+	}
+}
+
 </script>
-<style lang="scss">
+<style lang="scss" >
 html,
 body,
 #__nuxt,
@@ -184,7 +203,9 @@ body,
 	padding: 0;
 	width: 100%;
 	height: 100%;
-	background: #f5faff;
+	background: #F5FAFF;
+
+
 }
 
 .main {
@@ -244,6 +265,8 @@ body,
 			}
 		}
 
+
+
 		.area-button {
 			position: fixed;
 			width: 100%;
@@ -254,7 +277,7 @@ body,
 			.btn1 {
 				height: 50px;
 				line-height: 50px;
-				background: #1d9bf0;
+				background: #1D9BF0;
 				border-radius: 100px;
 				width: 100%;
 				font-weight: 600;
@@ -262,7 +285,7 @@ body,
 				text-align: center;
 				letter-spacing: 0.3px;
 
-				color: #ffffff;
+				color: #FFFFFF;
 				margin-bottom: 16px;
 			}
 
@@ -270,16 +293,17 @@ body,
 				height: 50px;
 				line-height: 50px;
 				background: rgba(29, 155, 240, 0.01);
-				border: 1px solid #1d9bf0;
+				border: 1px solid #1D9BF0;
 				border-radius: 100px;
 				width: 100%;
 				font-weight: 600;
 				font-size: 18px;
 				text-align: center;
 				letter-spacing: 0.3px;
-				color: #1d9bf0;
+				color: #1D9BF0;
+
 			}
 		}
 	}
 }
-</style>
+</style>

BIN
static/img/img-default.png


برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است