import request from '../utils/request'; /** * 微信小程序登录 * @param {Object} data - { code: wx.login的code, phoneCode: 手机号授权code } */ export function wechatLogin(data) { return request({ url: '/miniapp/auth/login', method: 'POST', data }); } /** * 获取服务协议/隐私政策内容 * @param {string} type - 'service' 或 'privacy' */ export function getAgreement(type) { return request({ url: `/miniapp/auth/agreement?type=${type}`, method: 'GET' }); } /** * 退出登录 */ export function logout() { return request({ url: '/miniapp/auth/logout', method: 'POST' }); }