In this work, we study a new spectral Petrov-Galerkin approximation of space-time fractional reactiondiffusion equations with viscosity terms built by Riemann-Liouville fractional-order derivatives. The proposed method is reliant on generalized Jacobi functions (GJFs) for our problems. The contributions are threefold: First, thanks to the theoretical framework of variational problems, the well-posedness of the problem is proved. Second, new GJF-basis functions are established to fit weak solutions, which take full advantages of the global properties of fractional derivatives. Moreover, the basis functions conclude singular terms, in order to solve our problems with given smooth source term. Finally, we get a numerical analysis of error estimates to depend on GJF-basis functions. Numerical experiments confirm the expected convergence. In addition, they are given to show the effect of the viscosity terms in anomalous diffusion.