Corpses are considered objects, and the Mending cantrip can do the following:
This spell repairs a single break or tear in an object you touch, such as a broken chain link, two halves of a broken key, a torn cloak, or a leaking wineskin. As long as the break or tear is no larger than 1 foot in any dimension, you mend it, leaving no trace of the former damage.
This spell can physically repair a magic item or construct, but the spell can't restore magic to such an object.
Could you, therefore, use the Mending cantrip on your dead party member who had his body parts chopped off, to reattach those body parts?
The benefit of doing so would be to be able to use a spell such as Revivify, instead of having to resort to higher level spells like Resurrection or a Regenerate + Revivify combo.
Best Answer
RAW yes, RAI probably not.
RAW:
Let's analyze Mending's description:
Therefore, we can conclude, that RAW, Mending can be used to "heal" / repair dismembered corpses. The corpse will still be a corpse, but it now qualifies for spells like Revivify or Raise Dead (none of which could otherwise restore missing body parts).
Note that, due to Mending's 1-minute casting time, you'll have to take measures such as casting Gentle Repose, otherwise, you won't be able to use Revivify, which only works within 1 minute of the target's death.
RAI:
There is a spell dedicated to restoring or reattaching dismembered body parts, Regenerate, which is a 7th-level spell. Granted, it also restores hit points when cast and over time, but still way higher level than an at-will cantrip.
Furthermore, the higher-level resurrection spells like Resurrection and True Resurrection explicitly specify that they restore missing body parts, while Revivify and Raise Dead explicitly specify that they cannot. The intent seems to be that restoring missing body parts is a high-level feature.
In conclusion, using a cantrip and a 3rd-level-spell to partly emulate the effects of the 7th-level spell Resurrection (without restoring all hit points or curing poisons and diseases) does not seem to be the intent. In addition, the language of the Mending spells suggests that it is meant for objects other than corpses, since it makes no mention of those.
Conclusion:
Whether or not you can use this combination therefore depends on your DM. I personally don't think I would allow it - but then again, introducing any limb-loss mechanics into the game is homebrew territory anyways and, if at all, will only happen due to RP reasons in games that I DM, such as a thief choosing to have his hand chopped off instead of going to prison.