import HttpRequest from "../system/request"; /** * 发送短信验证码 * @param {String} phone 手机号 * @returns {Promise} 发送短信验证码 */ export const sendSms = async (phone) => { const res = await HttpRequest.post('v2/account/sendSms', { phone: phone }); return res.status == 1; } /** * 获取协议内容 * @param {String} type 协议类型 * @returns {Promise} 获取协议 */ export const getAgreement = async (type) => { let type_id = 0; if (type == "user") { type_id = 4; } else if (type == "privacy") { type_id = 5; } const res = await HttpRequest.get('/getAgreement', { type: type_id }); if (res.status == 1) { return res.data; } return null; }