chenjunkai 6 سال پیش
والد
کامیت
bc93cbff9a
3فایلهای تغییر یافته به همراه14 افزوده شده و 2 حذف شده
  1. 8 0
      Ansjer/test/util/spnsss.py
  2. 2 2
      Controller/CloudVod.py
  3. 4 0
      Object/ResponseObject.py

+ 8 - 0
Ansjer/test/util/spnsss.py

@@ -11,6 +11,14 @@
 @file: spnsss.py
 @Contact: chanjunkai@163.com
 """
+import json
+jsss="{\"cn\":\"中文\":\"en\":\"english\"}"
+res = json.loads()
+print(type(jsss))
+
+exit()
+
+
 from gcm import GCM
 
 gcm = GCM(API_KEY)

+ 2 - 2
Controller/CloudVod.py

@@ -212,9 +212,9 @@ class CloudVodView(View):
             values("bucket__storeDay", "bucket__region")
         if ubqs.exists():
             if ubqs[0]['bucket__region'] != smqs[0]['bucket__region']:
-                return response.json(10, '区域不一致')
+                return response.json(712) # 区域不一致
             elif ubqs[0]['bucket__storeDay'] > smqs[0]['bucket__storeDay']:
-                return response.json(10, '不可降级')
+                return response.json(711) # 不可降级
             # 续费流程
         nowTime = CommonService.get_utc()
         # 判断是否存在未完成订单

+ 4 - 0
Object/ResponseObject.py

@@ -46,6 +46,8 @@ class ResponseObject(object):
             500: 'Query Database Error:',
             700: 'Upload file error',
             701: 'The file does not exist!',
+            711: 'Do not downgrade',
+            712: 'Area needs to be consistent',
             900: 'There is no information about this version!',
             901: 'Getting URL failure!',
             902: 'No update!',
@@ -92,6 +94,8 @@ class ResponseObject(object):
             500: '查询数据库错误!',
             700: '上传文件错误',
             701: '文件不存在',
+            711: '不可降级',
+            712: '区域不一致',
             900: '版本信息不存在',
             901: '获取链接失败',
             902: '无更新!',