import request from "@/sheep/request"; const myHomeAPI = { // 社交授权的跳转 socialAuthRedirect: (redirect_url, scopes) => { return request({ url: "/client/account/wx-login", method: "POST", data: { redirect_url, scopes, }, custom: { showSuccess: true, loadingMsg: "登陆中", }, }); }, //获取openId getObtain: (data) => { return request({ url: "/client/wechat/callback", method: "post", data, custom: { showSuccess: true, loadingMsg: "登陆中", }, }); }, //获取token和令牌 登录 getTokenInfojhy: (data) => { return request({ url: "/client/wechat/login", method: "get", data, }); }, //修改用户信息 editUserInfo: (data) => { return request({ url: "client/account/bind-mobile", method: "post", data, }); }, //通过手机号登录 phoneLogin: (data) => { return request({ url: "/client/account/login", method: "post", data, }); }, // 更新接口地址 getWechatAuthUrl: (redirect_url, scopes) => { return request({ url: "/client/wechat/auth-url", method: "get", params: { redirect_uri: redirect_url, scope: scopes, }, custom: { showSuccess: true, loadingMsg: "获取授权链接...", }, }); }, }; export default myHomeAPI;