import path_setting
from in_common.base_request import BaseRequest


class search_request(BaseRequest):
    def __init__(self):
        self.data = self.api_load(path_setting.KEYWORDS_CONFIG)
        #品类聚合页面医生tab列表
        self.data = self.api_load(path_setting.HOSPITAL_CONFIG)

    #搜索首页-热门搜索模块（点击搜索框即调接口）
    def keywords(self,current_city_id,search_tab):
        self.params["current_city_id"] = current_city_id
        self.params["search_tab"] = search_tab
        return self.api_send(self.data["keywords"])

    # 品类聚合页面医生tab列表
    def hospital(self, cp_id, tag_id, q, count, device_id):
        self.params["cp_id"] = cp_id
        self.params["tag_id"] = tag_id
        self.params["q"] = q
        self.params["count"] = count
        self.params["device_id"] = device_id

        return self.api_send(self.data["hospital"])
if __name__ == '__main__':

    # 打印购物车-猜你喜欢列表接口返回
    print(search_request().hospital(82, [], "眼部整形", 10,  "869378034450718"))
