To improve the user experience, an increasing number of mobile applications offload their computing tasks to servers with powerful computing capabilities. The fog radio access network (F-RAN) incorporates the concept of "fog computing" into the access network architecture, endowing an edge network with computing, storage, communication and control functions. In this paper, we consider a multiple fog access point (F-AP) and a multiuser F-RAN, where each user generates two different tasks: communication and computation. To satisfy the diverse quality of service requirements of different users, we jointly optimize the spectrum access, computation offloading and radio resource allocation. The problem is modeled as a mixed integer nonlinear programming problem, which is difficult to solve. In view of this, we propose a genetic algorithm based on convex optimization, i.e., the genetic convex optimization algorithm (GCOA), which divides the mixed integer nonlinear programming problem into two parts, i.e., optimization and convex optimization, to solve it in polynomial time. Simulation results are provided to verify the effectiveness of the algorithm.