opt import

This commit is contained in:
Ivan Office
2025-02-14 16:57:53 +08:00
parent 1a9145ad55
commit 5d0d18d917
2 changed files with 6 additions and 0 deletions

View File

@@ -275,6 +275,9 @@ def get_ua_type():
# web 表示普通浏览器,后续更深入处理
utype = 'web'
if not ua:
return utype
# todo: 引入现成 py lib处理企业微信
if 'MicroMessenger' in ua and 'webdebugger' not in ua \
and ('miniProgram' in ua or 'MiniProgram' in ua or 'MiniProgramEnv' in ua or 'wechatdevtools' in ua):

View File

@@ -70,6 +70,9 @@ def get_ua_type(self):
# web 表示普通浏览器,后续更深入处理
utype = 'web'
if not ua:
return utype
# todo: 引入现成 py lib处理企业微信
if 'MicroMessenger' in ua and 'webdebugger' not in ua \
and ('miniProgram' in ua or 'MiniProgram' in ua or 'MiniProgramEnv' in ua or 'wechatdevtools' in ua):