build(boards): micropython板卡执行 npm run build:prod

This commit is contained in:
王立帮
2025-06-18 23:43:04 +08:00
parent e42a129714
commit 0d8b8b3170
61 changed files with 867 additions and 124 deletions

View File

@@ -30,6 +30,15 @@ def wlan_connect(ssid='MYSSID', password='MYPASS', timeout=10):
print('\nnetwork config:', wlan.ifconfig())
return wlan
def image_base64(path="mixly.jpg"):
from base64 import b64encode
if isinstance(path, str):
with open(path, 'rb') as f:
_data = f.read()
return 'data:image/{};base64,'.format(path.split('.')[-1]).encode() + b64encode(_data)
else:
return b'data:image/jpg;base64,' + b64encode(path)
def ntp(url='mixio.mixly.cn'):
import urequests
try: