class="lines-code">
+
21
+    userinfo = get_userinfo(appid=appid, secret=secret, code=code, encryptedData=encryptedData, iv=iv)
22
+
23
+    try:
24
+        user = UserInfo.objects.select_for_update().get(unionid=userinfo.get('unionid', ''))
25
+    except UserInfo.DoesNotExist:
26
+        return response(UserStatusCode.USER_NOT_FOUND)
27
+
28
+    return response(200, 'Mini App Login Success', u'微信小程序登录成功', user.data)

+ 1 - 0
pai2/settings.py

@@ -49,6 +49,7 @@ INSTALLED_APPS = (
49 49
     'geo',
50 50
     'group',
51 51
     'message',
52
+    'miniapp',
52 53
     'operation',
53 54
     'page',
54 55
     'pay',

+ 1 - 0
requirements.txt

@@ -27,6 +27,7 @@ isoweek==1.3.1
27 27
 jsonfield==1.0.3
28 28
 mock==2.0.0
29 29
 pep8==1.7.0
30
+pywe-miniapp==1.0.0
30 31
 pywe-oauth==1.0.2
31 32
 records==0.4.3
32 33
 redis-extensions==1.0.38

kodo - Gogs: Go Git Service

Нет описания

Brightcells: 212e3994d1 MP verify file лет %!s(int64=9): %!d(string=назад)
..
wx 212e3994d1 MP verify file лет %!s(int64=9): %!d(string=назад)