You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
shop-pc/plugins/api/account.js

38 lines
861 B

3 years ago
/*
* @Author: ch
* @Date: 2022-05-04 18:24:03
* @LastEditors: ch
* @LastEditTime: 2022-05-04 22:43:19
* @Description: file content
*/
import {axiosTk} from "../axiosTk";
import {axios} from "../axios";
import { ToAsyncAwait } from "../utils";
const BASE_URL = '/uc';
/**
* 获取当前登录用户信息
*/
export const ApiGetCurrentUser = () =>
ToAsyncAwait(axiosTk.get(`${BASE_URL}/user/current`));
/**
* 修改用户信息
* @param {*} data
*/
export const ApiPutUser = (data) =>
ToAsyncAwait(axiosTk.put(`${BASE_URL}/user/`, data));
/**
* 登录
* @param {*} data
*/
export const ApiPostLogin = (data) => ToAsyncAwait(axios.post(`${BASE_URL}/user/login`, data));
/**
* 获取手机验证码
* @param {*} params
*/
export const ApiGetCode = (params) => ToAsyncAwait(axios.get(`${BASE_URL}/user/login/verificationCode`, params));