chore: flatten web project structure

This commit is contained in:
duanshuwen
2026-05-26 12:14:31 +08:00
parent 30b9100b4a
commit aff380dad9
569 changed files with 1081 additions and 74985 deletions

View File

@@ -1,21 +0,0 @@
import { objectToUrlParams } from "../utils/UrlParams.js";
export function navigateTo(url, args) {
let targetUrl = url;
if (args && typeof args === "object") {
// 如果有额外参数拼接到URL后面
const paramString = objectToUrlParams(args);
if (paramString) {
if (typeof targetUrl === "string" && targetUrl.includes("?")) {
targetUrl += "&";
} else {
targetUrl += "?";
}
targetUrl += paramString;
}
}
console.log("Navigating to URL:", targetUrl);
uni.navigateTo({
url: "/pages/webview/index?url=" + encodeURIComponent(targetUrl),
});
}

12
src/router/index.ts Normal file
View File

@@ -0,0 +1,12 @@
import { createRouter, createWebHistory } from "vue-router";
import type { RouteRecordRaw } from "vue-router";
export const routes = [] satisfies RouteRecordRaw[];
export const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes,
scrollBehavior() {
return { top: 0 };
},
});