本文档由小幺鸡编辑

1.请求/wechat/login?returnUrl=前端的处理路由url,使用windows.locaction.href方式请求

2.根据1返回的结果如下:前端的处理路由url?state=状态&openid=用户对应公众号的唯一id&sign=签名

    参数说明:state=0是未绑定,会返回相应的openid和sign参数,前端控制跳转到注册路由,注册需要带上openid和sign参数

                     state=1是已绑定,服务器会向客户端写入cookie,cookie名称为tfw_wx_user,cookie结构为              

{"userinfo":{"Id":0.0,"UserNo":"18825070407-1","Name":"","Lxdh":"18825070407","UserFace":"","Email":null,"ValidateState":0.0},"serverdate":"2018-07-30 16:54:21","token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJJZCI6MTQ3NzgsIlVzZXJOYW1lIjoiMTg4MjUwNzA0MDctMSIsIk5hbWUiOiIiLCJMWERIIjoiMTg4MjUwNzA0MDciLCJTeXN0ZW1JZCI6NSwiQ29tcGFueUlkIjoiMyIsIkNvbXBhbnlOYW1lIjoi5YWs5LyXIiwiQ29tcGFueVR5cGUiOjEwMCwiSXNBdXRoZW50aWNhdGVkIjp0cnVlLCJ1c2VyVHlwZSI6MiwiU3RvcmVOYW1lIjoiIiwiVmFsaWRTdGF0ZSI6IiIsIkxvZ2luRGF0ZSI6IlwvRGF0ZSgxNTMyOTQwODYxMDAwKVwvIn0.qIr6pHlbgSlZ1EjNOaCtt2A3UlpdOJofZD1YmWFne80","token_expires":600}


cookie 中的json结构说明参照【h5绑定微信注册】接口返回信息