admin 管理员组文章数量: 887021
2024年2月23日发(作者:嵌入式好不好学)
需求清单
username: user[0].username, nickname: user[0].nickname, type: user[0].type, avatar_url: user[0].avatar_url, create_time: user[0].create_time, expire_time: user[0].expire_time, expires_in: user[0].expires_in, login_time: user[0].login_time, login_times: user[0].login_times, }; ({ code: CODE_SUCCESS, msg: "weibo账号登录成功", data: { token, userinfo, }, }); } else { ({ code: CODE_ERROR, msg: "weibo账号登录失败", data: null, }); } } else { let addAuthUser = await setAuthUser(, 2, accessToken, 1, null); ("addAuthUser===", addAuthUser); if (edRows == 1) { let queryUser = await getAuthUser(Id); let userImage = await addUserImage(queryUser[0].openid); if (userImage) { let userinfo = { id: queryUser[0].id, openid: queryUser[0].openid, user_id: queryUser[0].user_id, username: queryUser[0].username, nickname: queryUser[0].nickname, type: queryUser[0].type, avatar_url: queryUser[0].avatar_url, create_time: queryUser[0].create_time, expire_time: queryUser[0].expire_time, expires_in: queryUser[0].expires_in, login_time: queryUser[0].login_time, login_times: queryUser[0].login_times, };
({ code: CODE_SUCCESS, msg: "weibo账号登录成功", data: { token, userinfo, }, }); } } else { ({ code: CODE_ERROR, msg: "weibo账号登录失败", data: null, }); }
if (accessToken) { let result = await axios({ method: "get", url: `${_url}`, headers: { accept: "application/json", Authorization: `token ${accessToken}`, "User-Agent": "jackchen0120", }, }); let token = getToken(accessToken); if ( == 200) { let user = await validateAuthUser(); if (user) { user[0].login_times += 1; let updateAuthUser = await setAuthUser(, 3, accessToken, 0, user[0].login_times); if (edRows == 1) { let userinfo = { id: user[0].id, openid: user[0].openid, user_id: user[0].user_id, username: user[0].username, nickname: user[0].nickname, type: user[0].type, avatar_url: user[0].avatar_url, create_time: user[0].create_time, expire_time: user[0].expire_time, expires_in: user[0].expires_in, login_time: user[0].login_time, login_times: user[0].login_times, }; ({ code: CODE_SUCCESS, msg: "github账号登录成功", data: { token, userinfo, }, }); } else { ({ code: CODE_ERROR, msg: "github账号登录失败", data: null, }); } } else { let addAuthUser = await setAuthUser(, 3, accessToken, 1, null); if (edRows == 1) { let queryUser = await getAuthUser(Id); let userImage = await addUserImage(queryUser[0].openid);
if (userImage) { let userinfo = { id: queryUser[0].id, openid: queryUser[0].openid, user_id: queryUser[0].user_id, username: queryUser[0].username, nickname: queryUser[0].nickname, type: queryUser[0].type, avatar_url: queryUser[0].avatar_url, create_time: queryUser[0].create_time, expire_time: queryUser[0].expire_time, expires_in: queryUser[0].expires_in, login_time: queryUser[0].login_time,
安装npm install -S qiniu代码实现
版权声明:本文标题:手把手带你进阶全栈打工人,手撸H5完整商城项目从0到1实战分享(附源码 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.freenas.com.cn/jishu/1708647867h528557.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论