其他接口

# 微信登录 http://testingapi.pengpengwaimai.top/user/wx-login?code=1231231 公众号登录接口 传code 后端获取到openid以后,通过http://testing.pengpengwaimei.top/home把code传给前端 ### 获取到用户openid , INSERT INTO `testing`.`user` (`juese`, `openid`) VALUES ( '1', 【】); 【】里面是从用户获取的openid http://testingapi.pengpengwaimai.top/user/wx-login?code=111222 ![image.png](https://cos.easydoc.net/81242367/files/k3xsbonm.png) # 企业用户注册接口 http://testingapi.pengpengwaimai.top/user/register ### 前端传入 staffname mobile companyname companyid note createtime 6个字段 INSERT INTO `testing`.`staff` (` `staffname`, `mobile`, `companyname`, `companyid`, `note`, `status`, `createtime`) VALUES ( 【】, 【】, 【】,【】,【】, 0,【】); ![image.png](https://cos.easydoc.net/81242367/files/k3rc8rkw.png) http://testingapi.pengpengwaimai.top/user/register?staffname=13&mobile=13000001000&companyname=测试公司&note=&createtime=2019-12-06%2000:00:00 返回成功或者失败 # 企业用户登录 http://testingapi.pengpengwaimai.top/user/company-login ### 前端传入 mobile select * from staff where mobile = 【】 有数据,返回staff 表里的所有字段 没数据,返回手机号错误的提示信息 http://testingapi.pengpengwaimai.top/user/company-login?mobile=13000000000 {"status":"success","data":{"id":1,"staffname":"赵老大","mobile":13000000000,"companyname":"测试公司","companyid":1,"note":"老板的小弟","status":1,"createtime":"2019-12-06 16:18:17"}} # 获取通讯录 http://testingapi.pengpengwaimai.top/user/user-login ### 前端传入用户 user表 id SELECT * FROM `address_book` where uesrid = 【】; 有数据,返回address_book 表中全部数据 没数据,返回 空 返回结果 {"status":"success","data":{"id":1,"status":"2","createtime":"2019-12-09 22:46:40","name":"asg","mobile":"13000000000","address":"alinsg","province":"浙江","city":"台州","area":"市辖区","uesrid":1}} # 查询公司接口 http://testingapi.pengpengwaimai.top/user/get-company?company=测试 ### 前端传入company的一部分字符串 select company from company where company like '%【】%' 有数据,返回company的相关数据,可能是多个 没数据,返回 空 {"status":"success","data":[{"id":"1","createtime":"2019-12-09 09:58:30","company":"测试公司","staffnumber":"0"}]} # 购买干冰提交接口 http://testingapi.pengpengwaimai.top/order/dry-ice post传参 ### 前端传入 mobile note create userid INSERT INTO `testing`.`ice` (`userid`, `mobile`, `note`, `createtime`, `status`) VALUES (【】, 【】, 【】, 【】, 0); 入参示例 userid=3&mobile=13000000001&note=""&createtime="2019-12-09"&status=1