In this paper, we investigate a resource allocation and computation offloading problem in a heterogeneous mobile edge computing (MEC) system. In the considered system, a wireless power transfer (WPT) base station (BS) with an MEC sever is able to deliver wireless energy to the mobile devices (MDs), and the MDs can utilize the harvested energy for local computing or task offloading to the WPT BS or a Macro BS (MBS) with a stronger computing server. In particular, we consider that the WPT BS can utilize full- or half-duplex wireless energy transmission mode to empower the MDs. The aim of this work focuses on optimizing the offloading decision, full/half-duplex energy harvesting mode and energy harvesting (EH) time allocation with the objective of minimizing the energy consumption of the MDs. As the formulate problem has a non-convex mixed integer programming structure, we use the quadratically constrained quadratic program (QCQP) and semi-definite relaxation (SDR) methods to solve it. The simulation results demonstrate the effectiveness of the proposed scheme.