用户表字段
```
`user_id` int(11) '用户id',
`account` varchar(50) '账号',
`password` varchar(50) '密码',
`openid` varchar(50) '微信绑定',
`card_top` varchar(75) '身份证正面',
`sys_status` int(11) '0正常1封禁',
`create_time` datetime '创建时间'
```
个人认证表
```
`personal_id` int(11) '个人认证id',
`user_id` int(11) '用户id',
`name` varchar(25) '姓名',
`phone` varchar(20) '认证手机号',
`id_card` varchar(50) '身份证号',
`card_top` varchar(75) '身份证正面',
`card_over` varchar(75) '身份证反面',
`card_hand` varchar(75) '手持身份证',
`business_profile` varchar(100) '经营简介',
`personal_auth` int(2) '个人实名状态:1已实名,0待审核,2审核失败',
`personal_num` int(11) '认证次数',
`update_time` datetime '上次认证时间',
`create_time` datetime '创建时间'
```
企业认证表
```
`company_id` int(11) '企业认证id',
`user_id` int(11) '用户id',
`company_name` varchar(50) '企业名称',
`business_license` varchar(75) '营业执照',
`social_credit_code` varchar(50) '社会信用代码',
`legal_card_top` varchar(75) '法人身份证正面',
`legal_card_over` varchar(75) '法人身份证反面',
`legal_card_hand` varchar(75) '法人身份证手持',
`home_location` varchar(50) '归属地',
`legal_contact` varchar(50) '法人联系方式',
`company_auth` int(2) '企业实名状态:1已实名,0待审核,2审核失败',
`company_num` int(11) '认证次数',
`update_time` datetime '上次认证时间',
`create_time` datetime '创建时间'
```
用户表说明:
personal_auth:个人实名状态:1已实名,0待审核,2审核失败
company_auth:企业实名状态:1已实名,0待审核,2审核失败
2.商家注册
~~~[api]
post:http://test.qingdabao.com/user/sign
account#账号(手机号或者邮箱)
password#密码
code#验证码
<<<
success
success
会返回shop_id
<<<
error
error
~~~
3.商家账号登入
~~~[api]
get:http://test.qingdabao.com/user/login
account#账号
password#密码
<<<
success
{
"status": 0,
"message": "ok",
"data": {
"user": {
"user\_id": 1,
"account": "18790901856",
"password": "7c4a8d09ca3762af61e59520943dc26494f8941b",
"openid": "oTLZCxNxGnbI8-U3BSyXsNvQwdSg",
"card\_top": "http://test.qingdabao.com/user/top",
"sys\_status": 0,
"create\_time": "2020-03-30 15:21:56"
},
"personal\_auth": {
"personal\_id": 1,
"user\_id": 1,
"name": "冷月光",
"phone": "18790901856",
"id\_card": "411123199011070011",
"card\_top": "http://test.qingdabao.com/user/top",
"card\_over": "http://test.qingdabao.com/user/over",
"card\_hand": "",
"business\_profile": "test",
"personal\_auth": 1,
"personal\_num": 1,
"update\_time": "2020-03-30 15:21:56",
"create\_time": "2020-03-30 15:21:56"
},
"company\_auth": {
"company\_id": 1,
"user\_id": 1,
"company\_name": null,
"business\_license": "test",
"social\_credit\_code": null,
"legal\_card\_top": null,
"legal\_card\_over": null,
"legal\_card\_hand": null,
"home\_location": null,
"legal\_contact": null,
"company\_auth": 0,
"company\_num": 1,
"update\_time": "2020-03-30 15:21:56",
"create\_time": "2020-03-30 15:21:56"
},
"shop": {
"shop\_id": 1,
"user\_id": 1,
"shop\_name": "",
"shop\_logo": "http://faka-info.oss-cn-beijing.aliyuncs.com/322369001590370883.object%20Ob",
"is\_on": 1,
"short\_link": "vvv",
"without\_link": "差球球是道",
"qr\_code": "http://faka-info.oss-cn-beijing.aliyuncs.com/qrcode460437411585724263.png",
"shop\_announcement": "按时吃三",
"pay\_prompt": "阿擦擦擦",
"is\_stock\_show": 1,
"shop\_contact": "安定区",
"buy\_contact\_way": "的需求文档",
"update\_time": "2020-05-29 11:37:07",
"create\_time": "2020-04-01 14:57:43"
}
}
}
<<<
error
error
~~~
4.商家密码修改
~~~[api]
put:http://test.qingdabao.com/user/pwd_edit
account#账号
password#密码
password_new#新密码
<<<
success
success
<<<
error
账号或密码错误!
或error
~~~
5.商家忘记密码
~~~[api]
put:http://test.qingdabao.com/user/pwd_forget
account=默认值#账号
password_new#新密码
code#验证码
<<<
success
success
<<<
error
error
验证码错误
账号不存在
~~~
7.商家个人实名认证
~~~[api]
post:http://test.qingdabao.com/user/personal_create
user_id#用户id
name#姓名
id_card#身份证号
card_top#身份证正面图片地址
card_over#身份证反面图片地址
card_hand#身份证手持
code#验证码
phone#手机号
<<<
success
success
<<<
error
error
~~~
7.商家个人实名认证失败后重新提交
注释:personal_auth=0或personal_auth=3此时可提交实名认证
~~~[api]
put:http://test.qingdabao.com/user/personal_auth
personal_id#
array#对象,存放需要修改的字段
phone#手机号
code#验证码
<<<
success
success
<<<
error
error
~~~
8.商家企业认证
注释:company_auth=0或company_auth=3此时可提交实名认证
~~~[api]
put:http://test.qingdabao.com/user/company_create
user_id#用户id
business_license#营业执照图片地址
company_name#企业名称
social_credit_code#社会信用代码
legal_card_top#法人身份证正面
legal_card_over#法人身份证反面
legal_card_hand#法人身份证手持
home_location#归属地
legal_contact#法人联系方式
code#验证码
<<<
success
success
<<<
error
error
~~~
8.商家企业实名认证失败后重新提交
注释:personal_auth=2此时可提交实名认证
~~~[api]
put:http://test.qingdabao.com/user/company_auth
company_id#
array#对象,存放需要修改的字段
legal_contact#法人联系方式
code#验证码
<<<
success
success
<<<
error
error
~~~
9.微信绑定
~~~[api]
put:http://test.qingdabao.com/user/wx_bind
account#账户
password#密码
openid#微信openid
<<<
success
<<<
error
~~~