编写Register相关API