Prechádzať zdrojové kódy

体验云存套餐,判断是否是4G设备

zhangdongming 2 rokov pred
rodič
commit
ca4b9efa5d
2 zmenil súbory, kde vykonal 5 pridanie a 1 odobranie
  1. 3 1
      Controller/CloudStorage.py
  2. 2 0
      Object/ResponseObject.py

+ 3 - 1
Controller/CloudStorage.py

@@ -1691,7 +1691,9 @@ class CloudStorageView(View):
         device_info_qs = Device_Info.objects.filter(userID_id=user_id, UID=uid, isShare=False, isExist=1)
         if not device_info_qs.exists():
             return response.json(12)
-
+        device_vo = device_info_qs.first()
+        if device_vo.Type == 103 or device_vo.Type == 26:
+            return response.json(10064)
         order_id = CommonService.createOrderID()
         now_time = int(time.time())
         order_type = 0

+ 2 - 0
Object/ResponseObject.py

@@ -128,6 +128,7 @@ class ResponseObject(object):
             10061: 'Add the limit reached',
             10062: 'This device has experienced the package',
             10063: 'Failed to claim',
+            10064: 'If the claim fails, please contact customer service',
         }
         data_cn = {
             0: '成功',
@@ -246,6 +247,7 @@ class ResponseObject(object):
             10061: '添加已达到上限',
             10062: '此设备已体验过套餐',
             10063: '领取失败',
+            10064: '领取失败,请联系客服',
         }
 
         msg = data_cn if self.lang == 'cn' or self.lang == 'zh-Hans' or self.lang == 'zh-Hant' else data_en