import apiClient from "../client" import type { WechatAuthUrlResponse, WechatCallbackResponse } from "./types" /** * 获取微信授权链接 */ export const getWechatAuthUrl = async (): Promise => { const response = await apiClient.get("/auth/wechat/url") return response.data } /** * 微信回调登录 */ export const wechatCallback = async ( code: string, state: string, ): Promise => { const response = await apiClient.post("/auth/wechat/callback", { code, state }) return response.data }