+
+ app_version = models.IntegerField(_(u'app_version'), default=0, help_text=u'APP 版本号', db_index=True)
+
+ class Meta:
+ verbose_name = _(u'mchloginfo')
+ verbose_name_plural = _(u'mchloginfo')
+
+ def __unicode__(self):
+ return unicode(self.pk)
@@ -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. |
@@ -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. |
@@ -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')
|
@@ -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): |