Exact results for the first-passage properties in a class of fractal networks