Skip to content

Let's use AI to Earn!

fix: 视频号api登录状态失效捕获

gaoSir18da81b8ee07
diff --git a/electron/main/plat/platforms/wxSph/index.ts b/electron/main/plat/platforms/wxSph/index.ts
index 60e2a148..6fd123a9 100644
--- a/electron/main/plat/platforms/wxSph/index.ts
+++ b/electron/main/plat/platforms/wxSph/index.ts
@@ -182,7 +182,7 @@ export class WxSph extends PlatformBase {
cookie: params.cookie!,
});
return {
- status: locationRes.data.errCode === 300334 ? 401 : locationRes.status,
+ status: locationRes.data.errCode === 300334 || locationRes.data.errCode === 300333 ? 401 : locationRes.status,
data: locationRes?.data?.data?.list?.map((v) => {
return {
name: v.name,
diff --git a/electron/main/views.ts b/electron/main/views.ts
index 90c9d374..b4400184 100644
--- a/electron/main/views.ts
+++ b/electron/main/views.ts
@@ -28,8 +28,7 @@ export function views(win: Electron.BrowserWindow) {
const res = await requestNet({
url: `https://map.baidu.com/?qt=ipLocation&t=${Date.now()}`,
headers: {
- cookie:
- 'BAIDUID=C6DFA184EA0E181B507D36D4E39DE552:FG=1; BAIDUID_BFESS=C6DFA184EA0E181BFB22AB6E4BC30249:FG=1',
+ cookie: `BAIDUID=C6DFA184EA0E181B507D36D4E39DE552:FG=1; BAIDUID_BFESS=C6DFA184EA0E181B507D36D4E39DE552:FG=1; BAIDU_WISE_UID=wapp_1740893445646_358; ZFY=gFmlsByYQo2uV:A8KgAXQ5Ou6usNB8S4rufvkkSZ9WfE:C; arialoadData=false; RT="z=1&dm=baidu.com&si=6acd8df5-273b-4d7b-a273-72762d6a27a7&ss=m7snsitx&sl=0&tt=0&bcn=https%3A%2F%2Ffclog.baidu.com%2Flog%2Fweirwood%3Ftype%3Dperf&r=32ngg0aq&ul=3pfv&hd=3pg5"; PSTM=1740990133; H_PS_PSSID=61027_61680_62126_62169_62200_62278_62325_62344_62345_62328_62367_62369_62372_62246_62391; BA_HECTOR=24a02la1al052hag8g01a0a1bclj991jsaplo1v; BIDUPSID=256707C2A28F613DE9EA4FC5C7347285`
},
method: 'GET',
});
diff --git a/src/views/publish/children/videoPage/components/VideoPubSetModal/children/VideoPubSetModal_WxSph.tsx b/src/views/publish/children/videoPage/components/VideoPubSetModal/children/VideoPubSetModal_WxSph.tsx
index f69ec288..c9f222a0 100644
--- a/src/views/publish/children/videoPage/components/VideoPubSetModal/children/VideoPubSetModal_WxSph.tsx
+++ b/src/views/publish/children/videoPage/components/VideoPubSetModal/children/VideoPubSetModal_WxSph.tsx
@@ -31,7 +31,7 @@ const WXSphActivity = ({ currChooseAccount }: IVideoPubSetModalChildProps) => {
const { fetching, options, debounceFetcher } =
useDebounceFetcher<WxSphEventList>(async (keywords) => {
const res = await getSphActivity(currChooseAccount.account!, keywords);
- if (res.data.errCode === 300334) {
+ if (res.data.errCode === 300334 || res.data.errCode === 300333) {
currChooseAccount.account!.status = AccountStatus.DISABLE;
updateAccounts({ accounts: [currChooseAccount.account!] });
await ipcUpdateAccountStatus(
@@ -40,8 +40,7 @@ const WXSphActivity = ({ currChooseAccount }: IVideoPubSetModalChildProps) => {
);
return [];
}
- console.log(res);
- return res.data.data.eventList;
+ return res?.data?.data?.eventList || [];
});
return (