Skip to content

Commit a1d7b39

Browse files
committed
* support
1 parent 7486b8c commit a1d7b39

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

wechatrobot/Api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from wechatrobot import ChatRoomData_pb2 as ChatRoom
77

88
class Api:
9+
host : str = 'wechatpchook'
910
port : int = 18888
1011
db_handle : Dict[str, int] = 0
1112

@@ -228,7 +229,7 @@ def GetContactBySql(self, wxid):
228229
#自定义]
229230

230231
def post(self , type : int, params : Body) -> Dict:
231-
return json.loads(requests.post( f"http://127.0.0.1:{self.port}/api/?type={type}", data = params.json()).content.decode("utf-8"),strict=False)
232+
return json.loads(requests.post( f"http://{self.host}:{self.port}/api/?type={type}", data = params.json()).content.decode("utf-8"),strict=False)
232233

233234
def exec_command(self , item: str) -> Callable:
234235
return eval(f"self.{item}")

wechatrobot/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.0.2"
1+
__version__ = "1.0.2-1"

0 commit comments

Comments
 (0)