| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- 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;
|