Ver código fonte

[add][toolbox落地页]

zhangwei 2 anos atrás
pai
commit
f9dd58430d

+ 46 - 0
components/InstallChrome.vue

@@ -0,0 +1,46 @@
+<template>
+    <div>
+        <img src="/svg/icon-install-chrome.svg" alt class="install_chrome" @click="clickOpenChrome()" />
+    </div>
+</template>
+<script>
+export default {
+    name: 'install_chrome',
+    data() {
+        return {
+        }
+    },
+    methods: {
+        clickOpenChrome() {
+            window.open('https://www.google.com/chrome')
+
+            // let extParams = this.isMobile() ? {} : { status: this.reportStatus }
+            // Report.reportLog({
+            //     baseInfo: {
+            //         appVersionCode: this.appVersionCode,
+            //         mid: this.mid,
+            //         pageSource: Report.pageSource.newUserLandingPage,
+            //         appType,
+            //         machineCode: this.mid
+            //     },
+            //     params: {
+            //         eventData: {
+            //             businessType: Report.businessType.buttonClick,
+            //             objectType: Report.objectType.installButton,
+            //             postId: this.detail.postId,
+            //             srcContentId: this.detail.srcContentId,
+            //             senderId: this.detail.srcUserId,
+            //         },
+            //         extParams: extParams
+            //     }
+            // })
+        },
+    }
+}
+
+</script>
+<style lang="scss" scoped>
+.install_chrome{
+    cursor: pointer;
+}
+</style>

+ 27 - 0
components/InstallExtension.vue

@@ -0,0 +1,27 @@
+<template>
+    <div>
+        <img @click="installExtension" src="/svg/icon-install-nft-plugin.svg" />
+    </div>
+</template>
+<script>
+export default {
+    name: 'install_chrome',
+    data() {
+        return {
+            config: {},
+        }
+    },
+    methods: {
+        installExtension() {
+            let { extensionsInstallUrl } = this.config;
+            window.open(extensionsInstallUrl)
+        }
+    }
+}
+
+</script>
+<style lang="scss" scoped>
+img{
+    cursor: pointer;
+}
+</style>

+ 19 - 0
components/logo.vue

@@ -0,0 +1,19 @@
+<template>
+    <div>
+        <img src="/svg/icon-logo.svg" />
+    </div>
+</template>
+<script>
+</script>
+<style lang="scss" scoped>
+div {
+    position: fixed;
+    top: 20px;
+    left: 25px;
+    z-index: 99;
+    img {
+        width: 100px;
+        height: 32px;
+    }
+}
+</style>

+ 11 - 6
nuxt.config.js

@@ -3,7 +3,7 @@ const env = require('./env')
 export default {
   // Global page headers: https://go.nuxtjs.dev/config-head
   head: {
-    title: 'de-net-official1',
+    title: 'de-net-official',
     htmlAttrs: {
       lang: 'en'
     },
@@ -47,27 +47,32 @@ export default {
   router: {
     extendRoutes(routes, resolve) {
       routes.push({
-        name: 'index',
+        name: 'RedPackage',
         path: '/:id?',
         component: resolve(__dirname, 'pages/index.vue')
       },
       {
-        name: 'luckdraw',
+        name: 'LuckDraw',
         path: '/luckdraw/:id?',
         component: resolve(__dirname, 'pages/luckdraw.vue')
       },
       {
-        name: 'install',
+        name:'ToolBox',
+        path: '/tool_box/:id',
+        component: resolve(__dirname, 'pages/tool_box/index.vue')
+      },
+      {
+        name: 'Install',
         path: '/install',
         component: resolve(__dirname, 'pages/install.vue')
       },
       {
-        name: 'nft',
+        name: 'NFT',
         path: '/nft/:id/:account',
         component: resolve(__dirname, 'pages/nft/index.vue')
       },
       {
-        name: 'nft_group',
+        name: 'NftGroup',
         path: '/nft_group/:id',
         component: resolve(__dirname, 'pages/nft/group.vue')
       },

+ 220 - 0
pages/tool_box/index.vue

@@ -0,0 +1,220 @@
+<template>
+    <div class="main">
+        <!-- pc -->
+        <div v-if="device == 'chrome' || device == 'no-chrome'" class="content">
+            <v-logo></v-logo>
+            <div class="tool-cover">
+                <img :src="detail.cover" alt="">
+            </div>
+            <!-- 非chrome -->
+            <div v-if="device == 'no-chrome'">
+                <div class="txt">Use chrome browser to access Subway Surfers</div>
+                <install-chrome></install-chrome>
+            </div>
+            <!-- chrome -->
+            <div v-if="device == 'chrome'">
+                <div class="txt">Use chrome browser to access Subway Surfers</div>
+                <install-extension></install-extension>
+            </div>
+        </div>
+
+        <!-- 移动端 -->
+        <div v-if="device == 'ios' || device == '安卓'" class="mobile">
+            <div class="mobile-content">
+                <img :src="detail.cover" 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">
+                    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 } from '../../utils/help.js'
+import axios from 'axios'
+
+export default {
+    name: 'tool_box',
+    data() {
+        return {
+            device: '',
+            detail: {
+                cover: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2F4k%2Fs%2F02%2F2109242306111155-0-lp.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1659266146&t=f2eab2e388056d2799b66cdf2e0e39b8'
+            }
+        }
+    },
+    components: {
+        VLogo,
+        InstallChrome,
+        InstallExtension
+    },
+    async asyncData(params) {
+        let { route } = params;
+        let { data } = await axios.post(`${baseURL}/denet/post/getDetail`, {
+            baseInfo: {
+                appVersionCode: appVersionCode,
+                mid: function () {
+                    return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
+                        var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
+                        return v.toString(16);
+                    });
+                }()
+            },
+            params: {
+                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)
+            }
+            if (data.data.postBizData === null) {
+                data.data.postBizData = {
+                    postUserInfo: {}
+                }
+            }
+            console.log('detail', data.data)
+
+            return {
+                detail: data.data,
+            }
+        }
+    },
+    mounted() {
+        this.device = getBrowserType()
+        console.log(this.device)
+    },
+
+    methods: {
+        clickCopy() {
+
+        },
+        clickExtension() {
+            window.open('https://chrome.google.com/webstore/detail/denet/inlfbeejfdgkknpiodhemfcokbdgofja')
+        }
+    }
+}
+
+</script>
+<style lang="scss" >
+html,
+body,
+#__nuxt,
+#__layout {
+    margin: 0;
+    padding: 0;
+    width: 100%;
+    height: 100%;
+    background: #F5FAFF;
+
+
+}
+
+.main {
+    width: 100%;
+    height: 100%;
+
+    .tool-cover {
+        min-width: 400px;
+        margin-right: 90px;
+
+        img {
+            height: 270px;
+        }
+    }
+
+    .content {
+        width: 100%;
+        height: 100%;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        padding-bottom: 70px;
+
+        .txt {
+            width: 400px;
+            font-weight: 700;
+            font-size: 36px;
+            line-height: 44px;
+            /* or 122% */
+
+            letter-spacing: 0.3px;
+
+            color: #323232;
+            margin-bottom: 40px;
+        }
+    }
+
+    .mobile {
+        .mobile-content {
+            padding: 36px 16px 0 16px;
+
+            img {
+                width: 100%;
+                margin-bottom: 25px;
+                border-radius: 5px;
+            }
+
+            .title {
+                font-weight: 700;
+                font-size: 22px;
+                line-height: 26px;
+                text-align: center;
+                letter-spacing: 0.3px;
+                color: #000000;
+                width: 240px;
+                margin: 0 auto;
+            }
+        }
+
+
+
+        .area-button {
+            position: fixed;
+            width: 100%;
+            padding: 27px 16px 25px 16px;
+            bottom: 0;
+            height: 170px;
+
+            .btn1 {
+                height: 50px;
+                line-height: 50px;
+                background: #1D9BF0;
+                border-radius: 100px;
+                width: 100%;
+                font-weight: 600;
+                font-size: 18px;
+                text-align: center;
+                letter-spacing: 0.3px;
+
+                color: #FFFFFF;
+                margin-bottom: 16px;
+            }
+
+            .btn2 {
+                height: 50px;
+                line-height: 50px;
+                background: rgba(29, 155, 240, 0.01);
+                border: 1px solid #1D9BF0;
+                border-radius: 100px;
+                width: 100%;
+                font-weight: 600;
+                font-size: 18px;
+                text-align: center;
+                letter-spacing: 0.3px;
+                color: #1D9BF0;
+
+            }
+        }
+    }
+}
+</style>

Diferenças do arquivo suprimidas por serem muito extensas
+ 3 - 0
static/svg/icon-install-chrome.svg


+ 7 - 18
static/svg/icon-logo.svg

@@ -1,19 +1,8 @@
-<svg width="96" height="30" viewBox="0 0 96 30" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path opacity="0.7" d="M41.2988 7.9082V22H46.2695C50.4688 22 52.9395 19.3828 52.9395 14.9297C52.9395 10.4863 50.459 7.9082 46.2695 7.9082H41.2988ZM43.4863 9.79297H46.0645C49.043 9.79297 50.7031 11.6289 50.7031 14.9492C50.7031 18.2793 49.0527 20.1055 46.0645 20.1055H43.4863V9.79297ZM59.0723 13.2402C60.5469 13.2402 61.543 14.3438 61.5918 15.916H56.4551C56.5625 14.3633 57.5977 13.2402 59.0723 13.2402ZM61.582 18.9824C61.2988 19.8809 60.4102 20.4863 59.209 20.4863C57.5195 20.4863 56.4453 19.3047 56.4453 17.5176V17.3906H63.7012V16.668C63.7012 13.5527 61.9238 11.541 59.0723 11.541C56.1719 11.541 54.3164 13.6895 54.3164 16.9121C54.3164 20.1543 56.1426 22.1953 59.1602 22.1953C61.5137 22.1953 63.291 20.8574 63.584 18.9824H61.582ZM67.7246 22V11.6191H67.8125L75.1172 22H77.0898V7.9082H74.9609V18.2988H74.8828L67.5781 7.9082H65.5957V22H67.7246ZM83.7402 13.2402C85.2148 13.2402 86.2109 14.3438 86.2598 15.916H81.123C81.2305 14.3633 82.2656 13.2402 83.7402 13.2402ZM86.25 18.9824C85.9668 19.8809 85.0781 20.4863 83.877 20.4863C82.1875 20.4863 81.1133 19.3047 81.1133 17.5176V17.3906H88.3691V16.668C88.3691 13.5527 86.5918 11.541 83.7402 11.541C80.8398 11.541 78.9844 13.6895 78.9844 16.9121C78.9844 20.1543 80.8105 22.1953 83.8281 22.1953C86.1816 22.1953 87.959 20.8574 88.252 18.9824H86.25ZM90.625 9.29492V11.7266H89.1309V13.3965H90.625V19.2949C90.625 21.2773 91.4355 22.0684 93.5156 22.0684C93.9844 22.0684 94.4531 22.0293 94.6875 21.9707V20.3008C94.5508 20.3301 94.209 20.3496 93.9941 20.3496C93.1348 20.3496 92.7441 19.9492 92.7441 19.0605V13.3965H94.6973V11.7266H92.7441V9.29492H90.625Z" fill="black"/>
-<g clip-path="url(#clip0_14299_11434)">
-<circle cx="14.6621" cy="14.0625" r="13.125" fill="url(#paint0_linear_14299_11434)" stroke="#28ACFC" stroke-width="1.875"/>
-<path opacity="0.7" fill-rule="evenodd" clip-rule="evenodd" d="M14.6602 24.375C20.3556 24.375 24.9727 19.7579 24.9727 14.0625C24.9727 8.36706 20.3556 3.75 14.6602 3.75V24.375Z" fill="#00A3FF"/>
-<path d="M3.41211 9.84375C5.22429 9.84375 6.69336 8.37468 6.69336 6.5625C6.69336 4.75032 5.22429 3.28125 3.41211 3.28125C1.59992 3.28125 0.130859 4.75032 0.130859 6.5625C0.130859 8.37468 1.59992 9.84375 3.41211 9.84375Z" fill="#44BBFF" stroke="#F7FCFF" stroke-width="0.9375"/>
-<path d="M14.6621 30.4688C16.4743 30.4688 17.9434 28.9997 17.9434 27.1875C17.9434 25.3753 16.4743 23.9062 14.6621 23.9062C12.8499 23.9062 11.3809 25.3753 11.3809 27.1875C11.3809 28.9997 12.8499 30.4688 14.6621 30.4688Z" fill="#44BBFF" stroke="#F7FCFF" stroke-width="0.9375"/>
-<path d="M26.8496 9.84375C28.6618 9.84375 30.1309 8.37468 30.1309 6.5625C30.1309 4.75032 28.6618 3.28125 26.8496 3.28125C25.0374 3.28125 23.5684 4.75032 23.5684 6.5625C23.5684 8.37468 25.0374 9.84375 26.8496 9.84375Z" fill="#44BBFF" stroke="#F7FCFF" stroke-width="0.9375"/>
-</g>
-<defs>
-<linearGradient id="paint0_linear_14299_11434" x1="14.6621" y1="0" x2="14.6621" y2="28.125" gradientUnits="userSpaceOnUse">
-<stop stop-color="#ADE0FF"/>
-<stop offset="1" stop-color="#ADE0FF" stop-opacity="0"/>
-</linearGradient>
-<clipPath id="clip0_14299_11434">
-<rect width="30" height="30" fill="white"/>
-</clipPath>
-</defs>
+<svg width="99" height="32" viewBox="0 0 99 32" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M16 25.75C16 25.75 16 25.75 16 25.75C21.3848 25.75 25.75 21.3848 25.75 16C25.75 10.6152 21.3848 6.25 16 6.25C16 6.25 16 6.25 16 6.25V25.75Z" fill="#1D9BF0"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M19.2664 27.6943C19.4175 28.1009 19.5 28.5408 19.5 29C19.5 29.1938 19.4853 29.3841 19.457 29.5699C25.5171 28.0308 30 22.5389 30 16C30 15.0837 29.912 14.1879 29.7439 13.3207C29.2229 13.5948 28.6296 13.75 28 13.75L27.9815 13.75C28.1196 14.4801 28.1917 15.2323 28.1917 16C28.1917 21.5357 24.4421 26.268 19.2664 27.6943ZM12.0241 29.4274C12.0082 29.2871 12 29.1445 12 29C12 28.4904 12.1017 28.0045 12.2858 27.5616C7.34302 25.9921 3.80833 21.3748 3.80833 16C3.80833 15.2299 3.8809 14.4753 4.01978 13.743C3.3848 13.7046 2.79247 13.5081 2.28159 13.1924C2.09694 14.0995 2 15.0384 2 16C2 22.3508 6.22874 27.714 12.0241 29.4274ZM16 3.86667C12.505 3.86667 9.37698 5.3215 7.16455 7.64016C6.77394 7.15834 6.26628 6.77529 5.68483 6.53429C8.24388 3.74708 11.9179 2 16 2C20.1206 2 23.8254 3.78022 26.3873 6.6135C25.8239 6.88227 25.3382 7.28749 24.9727 7.7864C22.7534 5.38284 19.5679 3.86667 16 3.86667Z" fill="#1D9BF0"/>
+<circle cx="28" cy="10" r="2.75" fill="#1D9BF0"/>
+<circle cx="4.25" cy="10" r="2.75" fill="#1D9BF0"/>
+<circle cx="15.75" cy="29" r="2.75" fill="#1D9BF0"/>
+<path d="M44.2988 9.9082V24H49.2695C53.4688 24 55.9395 21.3828 55.9395 16.9297C55.9395 12.4863 53.459 9.9082 49.2695 9.9082H44.2988ZM46.4863 11.793H49.0645C52.043 11.793 53.7031 13.6289 53.7031 16.9492C53.7031 20.2793 52.0527 22.1055 49.0645 22.1055H46.4863V11.793ZM62.0723 15.2402C63.5469 15.2402 64.543 16.3438 64.5918 17.916H59.4551C59.5625 16.3633 60.5977 15.2402 62.0723 15.2402ZM64.582 20.9824C64.2988 21.8809 63.4102 22.4863 62.209 22.4863C60.5195 22.4863 59.4453 21.3047 59.4453 19.5176V19.3906H66.7012V18.668C66.7012 15.5527 64.9238 13.541 62.0723 13.541C59.1719 13.541 57.3164 15.6895 57.3164 18.9121C57.3164 22.1543 59.1426 24.1953 62.1602 24.1953C64.5137 24.1953 66.291 22.8574 66.584 20.9824H64.582ZM70.7246 24V13.6191H70.8125L78.1172 24H80.0898V9.9082H77.9609V20.2988H77.8828L70.5781 9.9082H68.5957V24H70.7246ZM86.7402 15.2402C88.2148 15.2402 89.2109 16.3438 89.2598 17.916H84.123C84.2305 16.3633 85.2656 15.2402 86.7402 15.2402ZM89.25 20.9824C88.9668 21.8809 88.0781 22.4863 86.877 22.4863C85.1875 22.4863 84.1133 21.3047 84.1133 19.5176V19.3906H91.3691V18.668C91.3691 15.5527 89.5918 13.541 86.7402 13.541C83.8398 13.541 81.9844 15.6895 81.9844 18.9121C81.9844 22.1543 83.8105 24.1953 86.8281 24.1953C89.1816 24.1953 90.959 22.8574 91.252 20.9824H89.25ZM93.625 11.2949V13.7266H92.1309V15.3965H93.625V21.2949C93.625 23.2773 94.4355 24.0684 96.5156 24.0684C96.9844 24.0684 97.4531 24.0293 97.6875 23.9707V22.3008C97.5508 22.3301 97.209 22.3496 96.9941 22.3496C96.1348 22.3496 95.7441 21.9492 95.7441 21.0605V15.3965H97.6973V13.7266H95.7441V11.2949H93.625Z" fill="#313131"/>
 </svg>

+ 30 - 1
utils/help.js

@@ -106,4 +106,33 @@ export function formatSecondsAsDaysOrTime(secs) {
 
 export const appVersionCode = 12;
 
-export const appType = 1;
+export const appType = 1;
+
+export function getBrowserType(){
+    let device =  '' // ios 安卓 chrome no-chrome
+    if(/android/i.test(navigator.userAgent)){
+        device = '安卓'
+	}else if(/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)){
+		 device = 'ios'
+	}else if(isBrowser() == 'chrome'){
+        device = 'chrome'
+    }else{
+        device = 'no-chrome'
+    }
+    return device
+}
+
+
+const api = {
+	prod: 'https://api.denetme.net',
+	pre: 'https://preapi.denetme.net',
+	test: 'https://testapi.denetme.net'
+}
+const page = {
+	prod: "https://h5.denetme.net",
+	pre: "https://preh5.denetme.net",
+	test: 'https://testh5.denetme.net'
+}
+
+export const jumpUrl = page[process.env.NUXT_ENV.MODE] + '/'
+export const baseURL = api[process.env.NUXT_ENV.MODE]

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff