Mobile edge computing (MEC) is capable of providing services to smart devices nearby through radio access networks and thus improving service experience of users. In this paper, an offloading strategy for the joint optimization of computing and communication resources in multi-user and multi-MEC overlapping scene was proposed. In addition, under the condition that wireless transmission resources and MEC computing resources were limited and task completion delay was within the maximum tolerance time, the optimization problem of minimizing energy consumption of all users was created, which was then further divided into two subproblems, i.e. offloading strategy and resource allocation. These two subproblems were then solved by the game theory and Lagrangian function to obtain the optimal task offloading strategy and resource allocation plan, and the Nash equilibrium of user offloading strategy games and convex optimization of resource allocation were proved. The simulation results showed that the proposed algorithm could effectively reduce the energy consumption of users.