This commit is contained in:
Aiden 2024-10-22 18:42:21 +08:00
parent b513eb2535
commit 74b5ae75c1
3 changed files with 7 additions and 6 deletions

View File

@ -5,9 +5,10 @@ import globalComponents from "./components";
import VConsole from "vconsole";
const token = window?.plus?.storage.getItemAsync("token");
uni.setStorageSync("token", token);
if (import.meta.env.VITE_APP_MODE === "dev") {
new VConsole();
}
// if (import.meta.env.VITE_APP_MODE === "dev") {
// new VConsole();
// }
new VConsole();
export function createApp() {
const app = createSSRApp(App);
globalComponents(app);

View File

@ -22,7 +22,7 @@ export const OAorMc = () => {
const currentWebView = plus.webview.getWebviewById("wv");
return currentWebView.type;
} catch (e) {
return "";
return "MC";
}
};
export const hasPermission = (userPermission) => {

View File

@ -3,10 +3,10 @@ import useToast from "@/hooks/toast/useToast.js";
import { OAorMc } from "../index.js";
const { showMessage } = useToast();
console.log("webview", window?.plus?.webview.getWebviewById("wv").tokenScan);
console.log(123123, OAorMc());
const request = new Request({
baseURL:
OAorMc() === "OA"
OAorMc() === "MC"
? import.meta.env.VITE_API_URL
: import.meta.env.VITE_API_OA_URL,
timeout: 1000 * 60 * 5,