add
This commit is contained in:
parent
14d7b60982
commit
3141a3cea7
|
@ -1,10 +1,12 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
// 获取 URL 中的查询参数部分
|
|
||||||
const queryString = window.location.search;
|
|
||||||
|
|
||||||
|
|
||||||
|
// 获取 URL 中的查询参数部分
|
||||||
|
var queryString = window.location.hash.split("?")[1];
|
||||||
// 解析查询参数字符串
|
// 解析查询参数字符串
|
||||||
const searchParams = new URLSearchParams(queryString);
|
const searchParams = new URLSearchParams(queryString);
|
||||||
|
|
||||||
|
|
||||||
// 读取名为 id 的参数
|
// 读取名为 id 的参数
|
||||||
const uid = searchParams.get('local') || '';
|
const uid = searchParams.get('local') || '';
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { createRouter, createWebHistory } from 'vue-router'
|
import { createRouter, createWebHashHistory } from 'vue-router'
|
||||||
|
|
||||||
const routes = [
|
const routes = [
|
||||||
{
|
{
|
||||||
|
@ -51,8 +51,7 @@ const routes = [
|
||||||
]
|
]
|
||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
mode: 'hash',
|
history: createWebHashHistory(),
|
||||||
history: createWebHistory(),
|
|
||||||
routes
|
routes
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue