Let's use AI to Earn!
TypeScript auto-publishdouyindouyin-apielectron-appelectron-reactkuaishoukwaipublishedshipinhaotoolxiaohongshu
fix: 解决了视频号因为登录状态消失位置数据没有反馈的问题
gaoSira402504b9d84
diff --git a/electron/main/plat/platforms/wxSph/index.ts b/electron/main/plat/platforms/wxSph/index.tsindex a71339f4..c11ac31a 100644--- a/electron/main/plat/platforms/wxSph/index.ts+++ b/electron/main/plat/platforms/wxSph/index.ts@@ -165,7 +165,7 @@ export class WxSph extends PlatformBase {async getLocationData(params: IGetLocationDataParams) {const locationRes = await shipinhaoService.getLocation({...params,- keyword: params.keywords,+ query: params.keywords,cookie: params.cookie!,});return {diff --git a/electron/plat/shipinhao/index.ts b/electron/plat/shipinhao/index.tsindex 34f0b1c7..d72fa1b6 100644--- a/electron/plat/shipinhao/index.ts+++ b/electron/plat/shipinhao/index.ts@@ -1317,7 +1317,7 @@ export class ShipinhaoService {// 获取位置数据async getLocation(params: {- keyword: string;+ query: string;longitude: number;latitude: number;cookie: Electron.Cookie[];@@ -1325,7 +1325,11 @@ export class ShipinhaoService {return await requestNet<WeChatLocationData>({url: `https://channels.weixin.qq.com/cgi-bin/mmfinderassistant-bin/helper/helper_search_location`,method: 'POST',- body: params,+ body: {+ ...params,+ reqScene: 7,+ scene: 7,+ },headers: {cookie: CookieToString(params.cookie),},diff --git a/src/views/publish/children/videoPage/components/VideoPubSetModal/components/LocationSelect.tsx b/src/views/publish/children/videoPage/components/VideoPubSetModal/components/LocationSelect.tsxindex 7edd2788..efbacaa5 100644--- a/src/views/publish/children/videoPage/components/VideoPubSetModal/components/LocationSelect.tsx+++ b/src/views/publish/children/videoPage/components/VideoPubSetModal/components/LocationSelect.tsx@@ -39,7 +39,7 @@ export default function LocationSelect({longitude: location.current[0],});if (locationData.status !== 200 && locationData.status !== 201) {- if (locationData.status === 401) {+ if (locationData.status === 401 || locationData.data === undefined) {currChooseAccount.account!.status = AccountStatus.DISABLE;updateAccounts({ accounts: [currChooseAccount.account!] });await ipcUpdateAccountStatus(