+
15
+    app_version = models.IntegerField(_(u'app_version'), default=0, help_text=u'APP 版本号', db_index=True)
16
+
17
+    class Meta:
18
+        verbose_name = _(u'mchloginfo')
19
+        verbose_name_plural = _(u'mchloginfo')
20
+
21
+    def __unicode__(self):
22
+        return unicode(self.pk)

+ 7 - 0
logs/tests.py

@@ -0,0 +1,7 @@
1
+# -*- coding: utf-8 -*-
2
+from __future__ import unicode_literals
3
+
4
+from django.test import TestCase
5
+
6
+
7
+# Create your tests here.

+ 7 - 0
logs/views.py

@@ -0,0 +1,7 @@
1
+# -*- coding: utf-8 -*-
2
+from __future__ import unicode_literals
3
+
4
+from django.shortcuts import render
5
+
6
+
7
+# Create your views here.

+ 6 - 0
miniapp/views.py

@@ -13,6 +13,7 @@ from TimeConvert import TimeConvert as tc
13 13
 
14 14
 from account.models import UserInfo
15 15
 from statistic.models import RegisterStatisticInfo
16
+from utils.error.errno_utils import ProductBrandStatusCode
16 17
 from utils.redis.connect import r
17 18
 from utils.redis.rprofile import set_profile_info
18 19
 
@@ -23,6 +24,11 @@ WECHAT = settings.WECHAT
23 24
 @logit
24 25
 @transaction.atomic
25 26
 def get_userinfo_api(request):
27
+    brand_id = request.POST.get('brand_id', settings.KODO_DEFAULT_BRAND_ID)
28
+
29
+    if brand_id != settings.KODO_DEFAULT_BRAND_ID:
30
+        return response(ProductBrandStatusCode.BRAND_NOT_MATCH)
31
+
26 32
     wxcfg = WECHAT.get('MINIAPP', {})
27 33
 
28 34
     appid = wxcfg.get('appID')

+ 1 - 0
utils/error/errno_utils.py

@@ -18,6 +18,7 @@ class SaleclerkStatusCode(BaseStatusCode):
18 18
 class ProductBrandStatusCode(BaseStatusCode):
19 19
     """ 品牌相关错误码 5010xx """
20 20
     BRAND_NOT_FOUND = StatusCodeField(501001, 'Brand Not Found', description=u'品牌不存在')
21
+    BRAND_NOT_MATCH = StatusCodeField(501011, 'Brand Not Match', description=u'品牌不匹配')
21 22
 
22 23
 
23 24
 class ProductModelStatusCode(BaseStatusCode):

kodo - Gogs: Go Git Service

説明なし

Brightcells: 6626af8a8d add api lensman_wx_authorize_api 10 年 前
account 6626af8a8d add api lensman_wx_authorize_api 10 年 前
api 6626af8a8d add api lensman_wx_authorize_api 10 年 前
group 6626af8a8d add api lensman_wx_authorize_api 10 年 前
message 9618c6d3bd add var for jswe.js 10 年 前
operation 2f29afecbd modify version in operation 10 年 前
page 30d24179d9 add refused relative 10 年 前
pai2 6fb6025912 hideOptionMenu in wx & display status & forbidden modify after Actived 10 年 前
pay 6102143d8e reduce balance 10 年 前
photo d3fd6adf70 add api lensman_login_api/lensman_upload_photo_api 10 年 前
utils 6626af8a8d add api lensman_wx_authorize_api 10 年 前
website 8263625d9c new website 10 年 前
wechat d0affd4b01 add lensman_oauth page 10 年 前
.editorconfig 4defb80fdc gogs first init 11 年 前
.gitignore 2f29afecbd modify version in operation 10 年 前
.isort.cfg afcdf74a49 add api group_data_api 10 年 前
check.sh 95c1d32792 put isort and pep8 in check.sh 10 年 前
isort.sh 6626af8a8d add api lensman_wx_authorize_api 10 年 前
manage.py fabef63211 set line_length=200 for isort 10 年 前
pep8.sh 4defb80fdc gogs first init 11 年 前
requirements.txt 6626af8a8d add api lensman_wx_authorize_api 10 年 前