shop-wx/src/api/users/index.ts

11 lines
359 B
TypeScript
Raw Normal View History

import { http } from "@/http/http";
import type { CurrentUserResponseData } from './types';
/** 获取当前登录用户详情 */
export async function getCurrentUserApi() {
return await http.get<CurrentUserResponseData>("users/me");
}
export async function mpCodeToOpenId(code: string) {
return await http.get<string>("wx/mpCodeToOpenId", { code });
}