瀏覽代碼

fix:支付宝支付限制

chenjunkai 6 年之前
父節點
當前提交
984da47c40
共有 1 個文件被更改,包括 5 次插入3 次删除
  1. 5 3
      Controller/CloudVod.py

+ 5 - 3
Controller/CloudVod.py

@@ -198,9 +198,11 @@ class CloudVodView(View):
         if not channel or not rank:
             return response.json(444, 'channel,rank')
         smqs = Store_Meal.objects.filter(id=rank). \
-            values("currency", "price", "content", "day", "bucket__storeDay", "bucket__region")
+            values("currency", "price", "content", "day", "bucket__storeDay", "bucket__region", "type")
         if not smqs.exists():
             return response.json(10, '套餐不存在')
+        if smqs[0]['type'] != 1:
+            return response.json(10, '不支持支付宝支付')
         currency = smqs[0]['currency']
         price = smqs[0]['price']
         content = smqs[0]['content']
@@ -433,11 +435,11 @@ class CloudVodView(View):
         if not qs.exists():
             return response.json(12)
         smqs = Store_Meal.objects.filter(id=rank). \
-            values("currency", "price", "content", "day", "bucket__storeDay", "bucket__region","type")
+            values("currency", "price", "content", "day", "bucket__storeDay", "bucket__region", "type")
         if not smqs.exists():
             return response.json(10, '套餐不存在')
         if smqs[0]['type'] != 0:
-            return response.json(10,'套餐不支持paypal支付')
+            return response.json(10, '套餐不支持paypal支付')
         currency = smqs[0]['currency']
         price = smqs[0]['price']
         content = smqs[0]['content']