a> Pull-Anforderung 0 Commits 1553 Veröffentlichungen 0

Keine Beschreibung

wx_views.py 1.2KB

    # -*- coding: utf-8 -*- from __future__ import division from django.conf import settings from django_response import response from pywe_component_authorizer_token import authorizer_access_token from pywe_qrcode import qrcode_limit_str_scene, qrcode_url from pywe_storage import RedisStorage from utils.error.errno_utils import ParamStatusCode from utils.redis.connect import r CFG = settings.WECHAT.get('COMPONENT', {}) def get_limit_scene_qrcode_url(request): appid = request.GET.get('appid', '') scene = request.GET.get('scene', '') if not appid or not scene: return response(ParamStatusCode.PARAM_NOT_FOUND) try: token = authorizer_access_token( component_appid=CFG['appID'], component_secret=CFG['appsecret'], authorizer_appid=appid, storage=RedisStorage(r) ) qrinfo = qrcode_limit_str_scene( scene_str=scene, appid=appid, secret=None, token=token, storage=RedisStorage(r) ) qrurl = qrcode_url(qrinfo.get('ticket')) except Exception: qrurl = '' return response(data={ 'qrurl': qrurl, })
kodo - Gogs: Go Git Service

Nav apraksta

FFIB: c0e75a540a 新增摄影师积分体系 2 gadi atpakaļ
..
migrations c0e75a540a 新增摄影师积分体系 2 gadi atpakaļ
__init__.py 4defb80fdc gogs first init 10 gadi atpakaļ
admin.py b2c06ede0d 新增摄影师模块 2 gadi atpakaļ
models.py c0e75a540a 新增摄影师积分体系 2 gadi atpakaļ
serializers.py e7da55aaf2 :art: Add complement_code 5 gadi atpakaļ
tests.py fabef63211 set line_length=200 for isort 10 gadi atpakaļ
views.py e7da55aaf2 :art: Add complement_code 5 gadi atpakaļ