From c66edf6dd99f534c77294604bd7b5e73a5630336 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E7=AB=8B=E5=B8=AE?= <3294713004@qq.com> Date: Sun, 28 Sep 2025 18:11:27 +0800 Subject: [PATCH] =?UTF-8?q?chore(boards):=20=E8=B0=83=E6=95=B4micropython?= =?UTF-8?q?=E4=B8=8BTinyWebDB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../default_src/micropython/origin/build/lib/mixiot.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/boards/default_src/micropython/origin/build/lib/mixiot.py b/boards/default_src/micropython/origin/build/lib/mixiot.py index e5e2588b..28822d7d 100644 --- a/boards/default_src/micropython/origin/build/lib/mixiot.py +++ b/boards/default_src/micropython/origin/build/lib/mixiot.py @@ -355,9 +355,9 @@ class MQTTClient: self._tiny_web_db.set_url(url) return self._tiny_web_db.count() - def tiny_web_db_search(self, url, count): + def tiny_web_db_search(self, url, no=1, count=1, tag='', dtype='both'): self._tiny_web_db.set_url(url) - return self._tiny_web_db.search(count) + return self._tiny_web_db.search(no, count, tag, dtype) def tiny_web_db_delete(self, url, key): self._tiny_web_db.set_url(url) @@ -390,9 +390,10 @@ class TinyWebDB: raise RuntimeError(result["message"]) return int(result["count"]) - def search(self, count): + def search(self, no=1, count=1, tag='', dtype='both'): + no = str(no) count = str(count) - result = self._request("search", "count={}".format(count)) + result = self._request("search", "no={}&count={}&tag={}&type={}".format(no, count, tag, dtype)) if result["status"] == "error": raise RuntimeError(result["message"]) return result["data"]