The answer to that question is yes to both because it depends on what your goal is.
If your goal is general health then it isn’t that important which you do first although a combination of both would generally be the most effective. If your goal is to increase your cardiovascular endurance then do cardio first, adding weight training afterwards two or three times a week. You also might want to alternate cardio and weights by the day. For example, you could spin/cycle on Monday, Wednesday and Friday and do weight training on Tuesday and Thursday.
If your goal is to build muscle size and strength, do weights before cardio. It makes sense to do weights first because you will have more glycogen available and will be able to do a more powerful work-out. Also, your muscles will be able to contract more strongly.
If your goal is to burn calories, do cardio first. It is easier to burn more calories per session when you do cardio then weights and some people find that they keep sweating well into the weight-training portion of their work-out. But don’t skip the weights because while cardio burns calories during exercise, building muscle will burn more calories throughout the day. Ultimately, the most effective way to lose body fat is to combine cardio and weight training – along with changes in your diet.
“Things that matter most must never be at the mercy of things that matter least.” ~Goethe