In the Internet of Vehicles (IoV) scenario of 5G mobile edge computing (MEC), a server selection scheme based on task priority is designed for the selection of vehicle task offloading targets. Considering the influence of time, energy consumption, costs, and other factors on the choice of offloading locations, a solution based on the multi-index auction game is proposed. Through the multi-index auction mechanism, the optimal MEC server is selected to provide task offloading services for vehicles, which realizes the Bayesian Nash equilibrium of the cooperation between vehicles and RSU. Simulations show that this scheme can reduce the total cost of task offloading and meet multiple performance indicators under the constraints of guaranteeing vehicle task offloading time and energy consumption.