This commit is contained in:
parent
dde8735899
commit
8049e37d0c
@ -33,20 +33,20 @@ import Icon3 from './Group 107.svg?component'
|
|||||||
import Icon4 from './Group 108.svg?component'
|
import Icon4 from './Group 108.svg?component'
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
import {computed, ref} from "vue";
|
import {computed, ref} from "vue";
|
||||||
import { getAllQuertString } from "@/utils/url-utils.ts";
|
import {getAllQueryString} from "@/utils/url-utils.ts";
|
||||||
console.log(getAllQuertString('ic'));
|
console.log(getAllQueryString('ic'));
|
||||||
|
|
||||||
const downLoadWin = ref('')
|
const downLoadWin = ref('')
|
||||||
const downLoadMac = ref('')
|
const downLoadMac = ref('')
|
||||||
request.get('/api/v1/common/client/download', {
|
request.get('/api/v1/common/client/download', {
|
||||||
invite_code: getAllQuertString('ic'),
|
invite_code: getAllQueryString('ic'),
|
||||||
platform: 'mac',
|
platform: 'mac',
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
downLoadMac.value = res.url
|
downLoadMac.value = res.url
|
||||||
})
|
})
|
||||||
|
|
||||||
request.get('/api/v1/common/client/download', {
|
request.get('/api/v1/common/client/download', {
|
||||||
invite_code: getAllQuertString('ic'),
|
invite_code: getAllQueryString('ic'),
|
||||||
platform: 'windows',
|
platform: 'windows',
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
downLoadWin.value = res.url
|
downLoadWin.value = res.url
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { getAllQuertString } from '@/utils/url-utils.ts'
|
import { getAllQueryString } from '@/utils/url-utils.ts'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* OpenInstall sdk 用于上报h5邀请参数
|
* OpenInstall sdk 用于上报h5邀请参数
|
||||||
@ -23,7 +23,7 @@ class OpenInstallSdk {
|
|||||||
constructor() {
|
constructor() {
|
||||||
this.OI = {}
|
this.OI = {}
|
||||||
this.urlQuery = window.OpenInstall.parseUrlParams()
|
this.urlQuery = window.OpenInstall.parseUrlParams()
|
||||||
const id = getAllQuertString('id')
|
const id = getAllQueryString('id')
|
||||||
if (id) {
|
if (id) {
|
||||||
this.urlQuery = {
|
this.urlQuery = {
|
||||||
platform: 'merchant',
|
platform: 'merchant',
|
||||||
@ -42,7 +42,7 @@ class OpenInstallSdk {
|
|||||||
const m = this
|
const m = this
|
||||||
const button = document.getElementById('downloadButton_apple')
|
const button = document.getElementById('downloadButton_apple')
|
||||||
const button1 = document.getElementById('downloadButton_android')
|
const button1 = document.getElementById('downloadButton_android')
|
||||||
const ic = getAllQuertString('ic')
|
const ic = getAllQueryString('ic')
|
||||||
if (button) {
|
if (button) {
|
||||||
button.onclick = function () {
|
button.onclick = function () {
|
||||||
if (ic) {
|
if (ic) {
|
||||||
|
|||||||
@ -50,7 +50,7 @@ export const getQueryString = name => {
|
|||||||
* @param {*} name 需要获取的key
|
* @param {*} name 需要获取的key
|
||||||
* @param {*} isMerge 是否合并hash和search,search优先级高
|
* @param {*} isMerge 是否合并hash和search,search优先级高
|
||||||
*/
|
*/
|
||||||
export const getAllQuertString = (name, isMerge = true) => {
|
export const getAllQueryString = (name, isMerge = true) => {
|
||||||
const reg = `(?:^|&)${name}=([^&]*)(?:&|$)`
|
const reg = `(?:^|&)${name}=([^&]*)(?:&|$)`
|
||||||
const search = window.location.search.substr(1)
|
const search = window.location.search.substr(1)
|
||||||
const hash = window.location.hash.split('?')[1]
|
const hash = window.location.hash.split('?')[1]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user