From 87a345ffa7393921f3fac8daafb73fd616ca5da5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9B=AE=E6=A3=83?= Date: Mon, 24 Feb 2025 15:02:09 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E4=BF=AE=E6=AD=A3=E6=B5=8F?= =?UTF-8?q?=E8=A7=88=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-tauri/src/client/mod.rs | 4 ++-- src/plugins/Mys/request/postReq.ts | 10 +++++++--- src/web/request/apiHubReq.ts | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src-tauri/src/client/mod.rs b/src-tauri/src/client/mod.rs index ad5bbfec..b66e8c14 100644 --- a/src-tauri/src/client/mod.rs +++ b/src-tauri/src/client/mod.rs @@ -1,6 +1,6 @@ //! @file src/client/mod.rs //! @desc 客户端模块,负责操作米游社客户端 -//! @since Beta v0.6.10 +//! @since Beta v0.6.10/v0.7.0 mod menu; mod utils; @@ -8,7 +8,7 @@ mod utils; use tauri::{AppHandle, Manager, WebviewWindowBuilder}; use tauri_utils::config::WebviewUrl; -static BBS_VERSION: &'static str = "2.81.1"; +static BBS_VERSION: &'static str = "2.82.0"; #[tauri::command] pub async fn create_mhy_client(handle: AppHandle, func: String, url: String) { diff --git a/src/plugins/Mys/request/postReq.ts b/src/plugins/Mys/request/postReq.ts index a26b6b5e..45f8c62d 100644 --- a/src/plugins/Mys/request/postReq.ts +++ b/src/plugins/Mys/request/postReq.ts @@ -24,10 +24,14 @@ export async function getPostFull( postId: number, cookie?: Record, ): Promise { - const param = { post_id: postId }; + const param = { post_id: postId, read: 1 }; let header; - if (cookie) header = getRequestHeader(cookie, "GET", param); - else header = { referer: Referer }; + if (cookie) { + header = { + ...getRequestHeader(cookie, "GET", param, "K2", true), + "x-rpc-client_type": "2", + }; + } else header = { referer: Referer }; const resp = await TGHttp(`${Mpabu}getPostFull`, { method: "GET", headers: header, diff --git a/src/web/request/apiHubReq.ts b/src/web/request/apiHubReq.ts index 761c7314..8567e2cf 100644 --- a/src/web/request/apiHubReq.ts +++ b/src/web/request/apiHubReq.ts @@ -134,7 +134,7 @@ const apiHubReq = { forum: getAllGamesForums, game: getGameList, mission: getMissions, - post: { like: upVotePost }, + post: { like: upVotePost, share: getShareConf }, }; export default apiHubReq;