Explorar o código

更新订单描述接口

lang %!s(int64=4) %!d(string=hai) anos
pai
achega
5242345ed6
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  1. 4 2
      Controller/OrderContrller.py

+ 4 - 2
Controller/OrderContrller.py

@@ -109,7 +109,7 @@ class OrderView(View):
                                                               "addTime",
                                                               "addTime",
                                                               "updTime", "paypal", "rank__day", "payType",
                                                               "updTime", "paypal", "rank__day", "payType",
                                                               "rank__price", "status",
                                                               "rank__price", "status",
-                                                              "rank__content", "rank__title", "rank__currency",
+                                                              "rank__lang__content", "rank__title", "rank__currency",
                                                               "rank_id","rank__expire")
                                                               "rank_id","rank__expire")
         order_list = list(order_ql)
         order_list = list(order_ql)
         data = []
         data = []
@@ -128,7 +128,9 @@ class OrderView(View):
                     d['did'] = did['id']
                     d['did'] = did['id']
                     d['Type'] = did['Type']
                     d['Type'] = did['Type']
                     data.append(d)
                     data.append(d)
-            d['rank__expire_unit'] = '月' if lang == 'cn' else 'month'
+            d['rank__content'] = d['rank__lang__content']
+            del d['rank__lang__content']
+            # d['rank__lang__content'] = '月' if lang == 'cn' else 'month'
         return response.json(0, {'data': data, 'count': count})
         return response.json(0, {'data': data, 'count': count})
 
 
     # admins ^^^^^^^^^^^^
     # admins ^^^^^^^^^^^^