tmp
zhaoqingang
2025-02-18 a7edbb743cc26d1daafbb0c48ce584b1964a5c5f
app/service/v2/app_driver/chat_data.py
@@ -16,15 +16,6 @@
        else:
            return {}
    async def chat_ping(self, url, params, headers):
        res = await self.http_get(url, params, headers)
        if res.status_code != 200:
            return 0
        if res.json().get("code") == "unauthorized" or res.json().get("code") == 401:
            return 0
        return 200
    async def chat_post(self, url, data, headers):
        res = await self.http_post(url, data, headers)
@@ -32,6 +23,14 @@
            return res.json()
        else:
            return {}
    async def chat_ping(self, url, params, headers):
        res = await self.http_get(url, params, headers)
        if res.status_code != 200:
            return 0
        if res.json().get("code") == "unauthorized" or res.json().get("code") == 401:
            return 0
        return 200
    async def chat_login(self, url, data, headers):
@@ -45,6 +44,14 @@
        else:
            return {}
    async def chat_upload(self, url, files, data,  headers):
        res = await self.http_upload_file(url, headers=headers, files=files, data=data)
        if res.status_code == 200 or res.status_code == 201:
            return res.json()
        else:
            return {}
    @staticmethod
    async def password_encrypt(password):