import fetch from '../fetch.js' export default { /** * 获取验证码 * @returns {*} */ captcha () { return fetch('/blade-auth/oauth/captcha') }, login (param, hader) { return fetch('/blade-auth/oauth/token', param, 'post', 'form', { 'Tenant-Id': '000000', 'Captcha-Key': hader.captchaKey, 'Captcha-Code': hader.captchaCode }) }, sendSMS (params) { return fetch('/blade-pc-applet/wechat/home/getHomeNewList', params) }, /** * 退出登录 * @returns {Promise} */ logout () { return fetch('/blade-auth/oauth/logout') }, getUserInfo () { return fetch('/blade-project-manage-v2/other/v1/getUserInfo') }, /** * 获取按钮权限 * @returns {Promise | Promise} */ getPermission () { return fetch('/blade-system/menu/buttons?clientId=project_web') }, qrCode () { return fetch('/wutong-base/oauth/qrcodeLogin') }, qrCodeLogin (params) { return fetch('/wutong-base/oauth/getUserInfo', params) }, loginByCode (param) { return fetch('/blade-auth/oauth/token', param, 'post', 'form', { 'Tenant-Id': '000000' }) } }