l2_test.py
@@ -28,6 +28,7 @@
        url = urlparse.urlparse(path)
        response_data = ""
        if url.path == "/get_block_codes_money":
            # 获取板块对应的代码与该代码的净流入
            ps_dict = dict([(k, v[0]) for k, v in parse_qs(url.query).items()])
            block = ps_dict.get('block')
            try:
@@ -35,6 +36,17 @@
                response_data = json.dumps({"code": 0, "data": fdatas})
            except Exception as e:
                response_data = json.dumps({"code": 1, "msg": str(e)})
        elif url.path == "/get_big_buy_order_list":
            # 获获取代码的大买单列表
            ps_dict = dict([(k, v[0]) for k, v in parse_qs(url.query).items()])
            code = ps_dict.get('code')
            try:
                fdatas = CodeInMoneyManager().get_big_buy_money_list(code)
                if fdatas is None:
                    fdatas = []
                response_data = json.dumps({"code": 0, "data": fdatas})
            except Exception as e:
                response_data = json.dumps({"code": 1, "msg": str(e)})
        self.send_response(200)
        # 发给请求客户端的响应数据
        self.send_header('Content-type', 'application/json')