Periodic orbits of perturbed non-axially symmetric potentials in 1:1:1 and 1:1:2 resonances