From 0c21105c7aea10a6207131d28aec8d76a3df7332 Mon Sep 17 00:00:00 2001 From: ivan deng Date: Mon, 15 May 2023 19:35:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=20app=5Fmobile=5Fapi=20?= =?UTF-8?q?=EF=BC=8C=E5=8F=AF=E5=9C=A8=2016=E4=B8=8A=E5=BA=94=E7=94=A8?= =?UTF-8?q?=EF=BC=8C=E5=8F=AF=E4=BB=A5=E8=84=B1=E7=A6=BB=E5=B0=8F=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=20h5=E5=85=B1=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app_common/controllers/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app_common/controllers/main.py b/app_common/controllers/main.py index fe720a53..8fc58761 100644 --- a/app_common/controllers/main.py +++ b/app_common/controllers/main.py @@ -26,7 +26,7 @@ class AppController(http.Controller): # 返回这个图片的base64编码 return base64.b64encode(BytesIO(response.content).read()) - @http.route('/web/ua/show', auth='public', methods=['GET']) + @http.route(['/web/ua', '/web/ua/show'], auth='public', methods=['GET']) def app_ua_show(self): # https://github.com/selwin/python-user-agents ua_string = request.httprequest.headers.get('User-Agent') @@ -67,7 +67,7 @@ class AppController(http.Controller): utype = 'wxapp' elif 'MicroMessenger' in ua: # 微信浏览器 - utype = 'wxweb' + utype = 'wx' elif 'cn.erpapp.o20sticks.App' in ua: # 安卓app utype = 'native_android'