fix 扫码逻辑与底层模块解耦

This commit is contained in:
jxxghp
2024-11-20 20:17:18 +08:00
parent 8d5e0b26d5
commit a3172d7503
6 changed files with 102 additions and 49 deletions
@@ -16,6 +16,13 @@ class StorageBase(metaclass=ABCMeta):
def __init__(self):
self.storagehelper = StorageHelper()
@abstractmethod
def init_storage(self):
"""
初始化
"""
pass
def generate_qrcode(self, *args, **kwargs) -> Optional[Tuple[dict, str]]:
pass
@@ -40,6 +47,7 @@ class StorageBase(metaclass=ABCMeta):
设置配置
"""
self.storagehelper.set_storage(self.schema.value, conf)
self.init_storage()
def support_transtype(self) -> dict:
"""