Browse Source

主次用户查看云存,返回code

chenshibin 4 years ago
parent
commit
ee570b3e40
2 changed files with 3 additions and 1 deletions
  1. 1 1
      Controller/CloudStorage.py
  2. 2 0
      Object/ResponseObject.py

+ 1 - 1
Controller/CloudStorage.py

@@ -479,7 +479,7 @@ class CloudStorageView(View):
         if not dv_qs.exists():
             return response.json(12)
         if dv_qs[0]['primaryUserID'] != '' and dv_qs[0]['primaryUserID'] != userID:
-            return response.json(10033)
+            return response.json(10034)
         now_time = int(time.time())
         bv_qs = UID_Bucket.objects.filter(uid=uid,channel=channel, endTime__gte=now_time).order_by('addTime')
         if not bv_qs.exists():

+ 2 - 0
Object/ResponseObject.py

@@ -86,6 +86,7 @@ class ResponseObject(object):
             10031: 'The cloud storage has expired',
             10032: 'The switched cloud storage package ID cannot be the same as the one in use',
             10033: 'The primary user of the device cannot purchase it',
+            10034: 'Non device primary users cannot view cloud storage',
         }
         data_cn = {
             0: '成功',
@@ -167,6 +168,7 @@ class ResponseObject(object):
             10031: '云存已过期',
             10032: '切换的云存套餐ID不能与正在使用中的相同',
             10033: '非设备主用户无法购买',
+            10034: '非设备主用户无法查看云存',
         }
         if self.lang == 'cn':
             msg = data_cn