From 17581c366bbcf7629bf0a0765176c4470cdc0fc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98Aos=E2=80=99?= <9068149@qq.com> Date: Tue, 28 Mar 2023 16:47:08 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 48 ++++++++ src/App.vue | 20 +++- .../componentscom/graphicnavigation/index.vue | 9 +- .../componentscom/magiccube/index.vue | 51 ++++++--- .../componentscom/pictureads/index.vue | 106 ++++++++---------- src/components/componentscom/tabBar/index.vue | 21 ++-- 6 files changed, 168 insertions(+), 87 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4cbe094..2491062 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3520,6 +3520,16 @@ "node": ">=8" } }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dev": true, + "optional": true, + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, "node_modules/bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", @@ -6691,6 +6701,13 @@ "webpack": "^4.0.0" } }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true, + "optional": true + }, "node_modules/filesize": { "version": "3.6.1", "resolved": "https://registry.npmjs.org/filesize/-/filesize-3.6.1.tgz", @@ -9345,6 +9362,13 @@ "thenify-all": "^1.0.0" } }, + "node_modules/nan": { + "version": "2.17.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", + "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==", + "dev": true, + "optional": true + }, "node_modules/nanomatch": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", @@ -17306,6 +17330,16 @@ "dev": true, "optional": true }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dev": true, + "optional": true, + "requires": { + "file-uri-to-path": "1.0.0" + } + }, "bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", @@ -19892,6 +19926,13 @@ "schema-utils": "^2.5.0" } }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true, + "optional": true + }, "filesize": { "version": "3.6.1", "resolved": "https://registry.npmjs.org/filesize/-/filesize-3.6.1.tgz", @@ -21969,6 +22010,13 @@ "thenify-all": "^1.0.0" } }, + "nan": { + "version": "2.17.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", + "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==", + "dev": true, + "optional": true + }, "nanomatch": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", diff --git a/src/App.vue b/src/App.vue index 85c6849..a7af921 100644 --- a/src/App.vue +++ b/src/App.vue @@ -9,11 +9,12 @@ export default { provide() { return { reload: this.reload, + productJump: this.productJump } }, data() { return { - isRouterAlive: true, + isRouterAlive: true } }, methods: { @@ -24,6 +25,21 @@ export default { this.isRouterAlive = true }) }, + // 跳转事件 + productJump(res) { + if (res.http) { + switch (res.linktype) { + case '10': // 内部链接 + this.$router.push({ + path: res.http.externalLink + }) + break + case '11': // 外部链接 + window.location.href = res.http.externalLink + break + } + } + } }, mounted() { // 判断是否为移动端 @@ -39,7 +55,7 @@ export default { html.style = 'font-size: 37.5px;width: 375px; margin: 0 auto;' } } - }, + } }