Not the smartest thing in the world. I mean, if you want to up your intensity, why not just ride harder? Do your weights when you are weight training- then you'll get the benefits of weight training. Doing it while riding? To me, that's taking away from the quality of both.
Still, better to do something for exercise than nothing, so it's better than doing no weights at all.
Spinning and doing weights isn't spinning. It's a cycling class where your instructor has no real skills, and instead of working to create a quality spin ride, they get bored and throw in the weights. I bet the instructor says "whoo whoo! feel the burn!" at least three times in class. If they worked for me at my gym, they'd be fired already. I don't have time for gimmicks and all that crap, and neither do my members. They want as close to a simulated bike ride as they can get in a spin class, dammit!