How to effectively utilize edge nodes with limited computing resources to ensure quality of service is a key issue for many end users in Internet of Things. To address this problem, we propose a new cloud-edge computing network architecture, which enables the system to meet the requirements of computing resource and response time. The architecture consists of a powerful cloud computing center, multiple mobile edge computing servers and users in Internet of Things. We jointly optimize the task offloading and resource allocation of end users, thereby constructing a mixed integer nonlinear programming problem in the proposed architecture. To further solve this problem, a joint optimization strategy based on binary custom fireworks algorithm is proposed. This algorithm improves the Gaussian mutation operation in traditional fireworks algorithm by introducing Gaussian mutation probability and elite selection strategy, which makes the mutation directional. Finally, simulation results verify the effectiveness of our proposed joint optimization strategy. Compared with several other newer offloading strategies, the proposed joint optimization strategy can obtain significant performance gains.