diff --git a/src-tauri/src/client.rs b/src-tauri/src/client.rs index 934b825e..5a1352cd 100644 --- a/src-tauri/src/client.rs +++ b/src-tauri/src/client.rs @@ -1,6 +1,6 @@ //! @file src/client.rs //! @desc 客户端模块,负责操作米游社客户端 -//! @since Beta v0.3.3 +//! @since Beta v0.3.4 use tauri::{AppHandle, Manager, WindowBuilder, WindowUrl}; use url::Url; @@ -25,6 +25,7 @@ pub async fn create_mhy_client(handle: AppHandle, func: String) { mhy_window_config.url = get_mhy_client_url(func.clone()); let has_mhy_client = handle.get_window("mhy_client").is_some(); if has_mhy_client { + dbg!("mhy_client exists"); return; } let js_bridge = r#" diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 57978985..03b4dbb1 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -1,6 +1,6 @@ //! @file src/main.rs //! @desc 主模块,用于启动应用 -//! @since Beta v0.3.3 +//! @since Beta v0.3.4 // Prevents additional console window on Windows in release, DO NOT REMOVE!! #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] @@ -48,6 +48,7 @@ async fn register_deep_link(app_handle: tauri::AppHandle) { #[tauri::command] async fn execute_js(app_handle: tauri::AppHandle, label: String, js: String) { let window = app_handle.get_window(&label).unwrap(); + dbg!(&js); window.eval(&js).ok().unwrap(); } diff --git a/src/pages/common/Test.vue b/src/pages/common/Test.vue index e514684b..5e56b6a7 100644 --- a/src/pages/common/Test.vue +++ b/src/pages/common/Test.vue @@ -41,7 +41,8 @@ async function getGC(): Promise { } async function tryNewWindow(): Promise { - await mhyClient.open("game_record"); + await mhyClient.open("sign_in"); + // await mhyClient.open("game_record"); }