瀏覽代碼

主次用户,返回code

chenshibin 4 年之前
父節點
當前提交
bc745f68ad
共有 2 個文件被更改,包括 3 次插入1 次删除
  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(13, '非设备主用户无法购买')
+            return response.json(10033)
         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

@@ -85,6 +85,7 @@ class ResponseObject(object):
             10030: 'No purchase of cloud storage',
             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',
         }
         data_cn = {
             0: '成功',
@@ -165,6 +166,7 @@ class ResponseObject(object):
             10030: '未购买云存',
             10031: '云存已过期',
             10032: '切换的云存套餐ID不能与正在使用中的相同',
+            10033: '非设备主用户无法购买',
         }
         if self.lang == 'cn':
             msg = data_cn