Skip to content

Commit

Permalink
fix(wechat): reorder proxy setup
Browse files Browse the repository at this point in the history
  • Loading branch information
InfinityPacer committed Sep 26, 2024
1 parent 1a36d9f commit efb3bd9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/modules/wechat/wechat.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ def __init__(self, WECHAT_CORPID: str = None, WECHAT_APP_SECRET: str = None, WEC
self._appid = WECHAT_APP_ID
self._proxy = WECHAT_PROXY or "https://qyapi.weixin.qq.com"

if self._corpid and self._appsecret and self._appid:
self.__get_access_token()

if self._proxy:
self._proxy = self._proxy.rstrip("/")
self._send_msg_url = f"{self._proxy}/{self._send_msg_url}"
self._token_url = f"{self._proxy}/{self._token_url}"
self._create_menu_url = f"{self._proxy}/{self._create_menu_url}"

if self._corpid and self._appsecret and self._appid:
self.__get_access_token()

def get_state(self):
"""
获取状态
Expand Down

0 comments on commit efb3bd9

Please sign in to comment.