Browse Source

修改返回值

peng 1 year ago
parent
commit
9207f787c2
1 changed files with 3 additions and 4 deletions
  1. 3 4
      Controller/CloudStorage.py

+ 3 - 4
Controller/CloudStorage.py

@@ -1400,7 +1400,7 @@ class CloudStorageView(View):
                 if lang != 'cn':
                     red_url = red_url.replace('fail.html', 'en_fail.html')
                 redis_obj.del_data(key=order_id + 'do_notify')
-                return HttpResponseRedirect(red_url)
+                return response.json(0, {'url': red_url})
 
             trade_no = verify_result['transactionId']
             order_list = order_qs.values("UID", "channel", "commodity_code", "rank", "isSelectDiscounts",
@@ -1515,7 +1515,7 @@ class CloudStorageView(View):
                 if lang != 'cn':
                     red_url = red_url.replace('success.html', 'en_success.html')
                 redis_obj.del_data(key=order_id + 'do_notify')
-                return HttpResponseRedirect(red_url)
+                return response.json(0, {'url': red_url})
         except Exception as e:
             logger.info('apple支付失败:----')
             logger.info("错误行数:{errLine}".format(errLine=e.__traceback__.tb_lineno))
@@ -1526,8 +1526,7 @@ class CloudStorageView(View):
             if lang != 'cn':
                 red_url = red_url.replace('fail.html', 'en_fail.html')
             redis_obj.del_data(key=order_id + 'do_notify')
-            return HttpResponseRedirect(red_url)
-
+            return response.json(0, {'url': red_url})
 
     @staticmethod
     def do_create_pay_order(request_dict, user_id, ip, response):  # 创建支付订单