You can benefit from the 24-hours Transit WithOut a Visa scheme as a Moroccan citizen, and therefore you do not need a visa:
1. 24-Hour Direct Transit
Under the 24-hour visa-free transit rule, no visa is required for international flight, ship, or train passengers who transit directly through mainland China and will stay for less than 24 hours. Passengers should hold tickets to a third country or region and have a confirmed seat.
Those who transfer in more than one city of China within 24 hours can also enjoy this policy. For instance, if one's trip is Moscow – Lanzhou – Guangzhou – Bangkok and the total time in China is less than 24 hours, the passenger can still enjoy the 24-hour direct transit. But the passenger needs to apply for the temporary entry permit upon his arrival.
For more information, see this section on the dedicated wikipedia page.
And who transfers the luggage from one airline to another?
This depends on how you booked the tickets. If all segments are on the same booking, then chances are the airlines are code-sharing and/or in an alliance and will route your luggage to its final destination. Indeed, Air France and China Eastern are part of Skyteam so the luggage will be send straight to your final destination.
However, note that a 1-hour layover between intercontinental flights might not allow enough time to transfer the luggage from one plane to the other. Therefore, pack a change of clothes in your carry-on luggage in case you end up having to wait for a your luggage to come with a later flight.