Nowadays, a large number of civilian unmanned aerial vehicles (UAVs) are increasingly being used in many of our daily applications. However, there are many kinds of UAVs that need to enhance their endurance due to their limited resources. In order to make the UAVs operate efficiently, it is necessary to schedule UAVs with charging requirements. In this paper, renewable energy production and storage equipment on the basis of traditional charging stations is adopted to reduce the power purchase from the distribution network as much as possible. An online algorithm based on Lyapunov optimization is proposed to schedule the charging of UAVs and the energy management of the charging station. Meanwhile, contract theory is used to design the optimal charging strategy in the case of information asymmetry. Hence, local renewable energy can be utilized to the greatest extent, and electricity purchase costs can be reduced. Through the incentive system, users can spontaneously charge at low peak times and avoid the risk of grid overload and high energy cost. The simulation results show that the algorithm can improve the efficiency of charging station operators, allowing users to avoid charging at peak times, and only use real-time information to schedule UAVs. Compared to other algorithms, the proposed scheme can bring good revenue to operators while ensuring long-lasting operations of charging stations.