| | |
| | | @classmethod |
| | | def can_buy(cls, code): |
| | | if constant.TEST: |
| | | return ["测试"], True, cls.BLOCK_TYPE_NONE, [], set() |
| | | return ["测试"], True, cls.BLOCK_TYPE_NONE, [], set(),["化工"] |
| | | # if True: |
| | | # # 测试 |
| | | # return True, "不判断板块身位" |
| | |
| | | if money > 30000: |
| | | raise Exception("最多只能设置3w") |
| | | constant.BUY_MONEY_PER_CODE = money |
| | | self.send_response({"code": 0, "data": {"money": money}}, client_id, request_id) |
| | | self.send_response({"code": 0, "data": {"money": constant.BUY_MONEY_PER_CODE}}, client_id, request_id) |
| | | elif ctype == "get_per_code_buy_money": |
| | | self.send_response({"code": 0, "data": {"money": constant.BUY_MONEY_PER_CODE}}, client_id, request_id) |
| | | except Exception as e: |
| | | logging.exception(e) |
| | | self.send_response({"code": 1, "msg": f"数据处理出错:{e}"}, client_id, request_id) |