乐心健康在线刷步数提交源码
判断用过一次,请求登录界面获取不到信息,直接使用存储的token刷步,减少登录次数(防止频繁登录)判断token,如果token无效,会重新请求登录,刷新步骤,重新保存登录信息。 (防止客户端登录后web token失效)
判断手机号和密码是否与cookie相同。如果不同,重新请求登录,刷新步骤,重新保存登录信息。 (防止密码修改或存储的登录信息与输入不一致)
cookie存储时间默认为30天(token的有效时间暂时未知,如果失败会重新存储token)。您可以修改源代码。 js文件只是简单的压缩,没有加密,不过小白能看懂。
需要自己配置nginx解决跨域问题,依然只使用两个接口:
(If it is judged that it has been used once, and the request login interface cannot obtain information, directly use the stored token to brush the steps to reduce the login times (prevent frequent login)Judge the token. If the token is invalid, it will request login again, refresh the steps and save the login information again. (prevent web token invalidation after client login)Determine whether the mobile phone number and password are the same as the cookie. If it is different, request login again, refresh the steps and save the login information again. (prevent password modification or stored login information from being inconsistent with input)The cookie storage time is 30 days by default (the valid time of the token is temporarily unknown. If it fails, the token will be stored again). You can modify the source code. JS file is simply compressed without encryption, but Xiaobai can understand it.You need to configure nginx yourself to solve cross domain problems. You still only use two interfaces:)
页:
[1]