Dynamics of a consumer–resource reaction–diffusion model