# web-jpetstore-back **Repository Path**: chen-hang007/web-jpetstore-back ## Basic Information - **Project Name**: web-jpetstore-back - **Description**: 宠物商店后端 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-05-19 - **Last Updated**: 2025-06-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README 1.登录 Request - Method:POST - URL:/tokens - Parameters: { username,password}//不能为空 Response - success ```json { "status": 0, "message": "success", "data": { "userid": "f2gg", "password": null, "email": "10", "firstname": "10", "lastname": "12", "status": "12", "addr1": "2", "addr2": "3", "city": "1", "state": "10086", "zip": "100", "country": "12", "phone": "12", "favcategory": "0", "la": "english", "fa": "CATS", "mylistopt": 1, "banneropt": 1 } } - failure ```json { "status": 1, "message": "用户名或者密码错误" } - failure2 ```json { "status": 1, "message": "缺少参数" } 2.退出登录 Request - Method: Delete - URL:/tokens - Parameters: Response -success ```json { "status": 0, "message": "退出登录成功!!" } 3.注册 Request - Method:POST - URL:/Account - Parameters: { "userid": "f2", "password": 12345, "email": "10", "firstname": "10", "lastname": "12", "status": "12", "addr1": "2", "addr2": "3", "city": "1", "state": "10086", "zip": "100", "country": "12", "phone": "12", "favcategory": "0", "la": "english", "fa": "CATS", "mylistopt": 1, "banneropt": 1 } //前14个选项不能为空 Response - success ```json { "status": 0, "message": "注册成功" } - failure ```json { "status": 1, "message": "注册失败!!" } 4.判断用户名是否已经存在 Request - Method:GET - URL:/Account/{id} - Parameters: Response - success ```json { "status": 0, "message": "success", "data": { "userid": "f2gg", "email": "10", "firstname": "10", "lastname": "12", "status": "12", "addr1": "2", "addr2": "3", "city": "1", "state": "10086", "zip": "100", "country": "12", "phone": "12", "favcategory": "0" } } - failure ```json { "status": 1, "message": "该用户不存在" } - failure2 ```json { "status": 1, "message": "缺少参数" } - failure3 ```json { "status": 1, "message": "服务器异常" } 5.获取所有用户信息 Request - Method:GET - URL:/Account/{id} - Parameters: Response - success ```json { "status": 0, "message": "success", "data": [ { "userid": "codd", "email": "10", "firstname": "10", "lastname": "12", "status": "12", "addr1": "2", "addr2": "3", "city": "1", "state": "10086", "zip": "100", "country": "12", "phone": "12", "favcategory": "0" }, { "userid": "f2gg", "email": "10", "firstname": "10", "lastname": "12", "status": "12", "addr1": "2", "addr2": "3", "city": "1", "state": "10086", "zip": "100", "country": "12", "phone": "12", "favcategory": "0" }, { "userid": "j2ee", "email": "10", "firstname": "10", "lastname": "12", "status": "12", "addr1": "2", "addr2": "3", "city": "1", "state": "10086", "zip": "100", "country": "12", "phone": "12", "favcategory": "0" } ] } - failure1 ```json { "status": 1, "message": "服务器异常" }