from dspt_api.util.api.cinema_hall_seats import ApiCinemaHallSeats from dspt_api.util.api.cinema_plays_increment import ApiCinemaPlaysIncrement # 通过api来匹配不同的接口文件获取推荐 # 返回推荐参数应该包含参数名,参数值,和是否勾选的状态 def suggest_params(member_type, api, ip): data = {'member_type': member_type, 'api': api, 'ip': ip} params = [] if api == 'cinema/hall-seats' and member_type == 'nonmember': print('cinema/hall-seats') params = ApiCinemaHallSeats(**data).get_suggestion() if api == 'cinema/plays-increment' and member_type == 'nonmember': print('cinema/plays-increment') params = ApiCinemaPlaysIncrement(**data).get_suggestion() return params