when it bite. make a high pitch noise and turn your back away from it. till it calms down. also turn you back away from it when it starts to 發脾氣. reward with food when it's calm.
it is most likely trying to get more attention from you.
this is only general advice. should ask professional dog trainers for advice.
hope it helps