From 8049e37d0cd7f1f1c548db17d25d4943bdf16e44 Mon Sep 17 00:00:00 2001 From: speakeloudest Date: Fri, 23 Jan 2026 05:32:48 -0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0android?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Home/components/DownloadButton.vue | 8 ++++---- src/utils/openinstall.ts | 6 +++--- src/utils/url-utils.ts | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/pages/Home/components/DownloadButton.vue b/src/pages/Home/components/DownloadButton.vue index 138128f..030feb2 100644 --- a/src/pages/Home/components/DownloadButton.vue +++ b/src/pages/Home/components/DownloadButton.vue @@ -33,20 +33,20 @@ import Icon3 from './Group 107.svg?component' import Icon4 from './Group 108.svg?component' import request from '@/utils/request' import {computed, ref} from "vue"; -import { getAllQuertString } from "@/utils/url-utils.ts"; -console.log(getAllQuertString('ic')); +import {getAllQueryString} from "@/utils/url-utils.ts"; +console.log(getAllQueryString('ic')); const downLoadWin = ref('') const downLoadMac = ref('') request.get('/api/v1/common/client/download', { - invite_code: getAllQuertString('ic'), + invite_code: getAllQueryString('ic'), platform: 'mac', }).then((res) => { downLoadMac.value = res.url }) request.get('/api/v1/common/client/download', { - invite_code: getAllQuertString('ic'), + invite_code: getAllQueryString('ic'), platform: 'windows', }).then((res) => { downLoadWin.value = res.url diff --git a/src/utils/openinstall.ts b/src/utils/openinstall.ts index 65faf54..abc7030 100644 --- a/src/utils/openinstall.ts +++ b/src/utils/openinstall.ts @@ -1,4 +1,4 @@ -import { getAllQuertString } from '@/utils/url-utils.ts' +import { getAllQueryString } from '@/utils/url-utils.ts' /** * OpenInstall sdk 用于上报h5邀请参数 @@ -23,7 +23,7 @@ class OpenInstallSdk { constructor() { this.OI = {} this.urlQuery = window.OpenInstall.parseUrlParams() - const id = getAllQuertString('id') + const id = getAllQueryString('id') if (id) { this.urlQuery = { platform: 'merchant', @@ -42,7 +42,7 @@ class OpenInstallSdk { const m = this const button = document.getElementById('downloadButton_apple') const button1 = document.getElementById('downloadButton_android') - const ic = getAllQuertString('ic') + const ic = getAllQueryString('ic') if (button) { button.onclick = function () { if (ic) { diff --git a/src/utils/url-utils.ts b/src/utils/url-utils.ts index c8c24d9..08eefd4 100644 --- a/src/utils/url-utils.ts +++ b/src/utils/url-utils.ts @@ -50,7 +50,7 @@ export const getQueryString = name => { * @param {*} name 需要获取的key * @param {*} isMerge 是否合并hash和search,search优先级高 */ -export const getAllQuertString = (name, isMerge = true) => { +export const getAllQueryString = (name, isMerge = true) => { const reg = `(?:^|&)${name}=([^&]*)(?:&|$)` const search = window.location.search.substr(1) const hash = window.location.hash.split('?')[1]