| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- 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<unknown>}
- */
- logout () {
- return fetch('/blade-auth/oauth/logout')
- },
- getUserInfo () {
- return fetch('/blade-project-manage-v2/other/v1/getUserInfo')
- },
- /**
- * 获取按钮权限
- * @returns {Promise | Promise<unknown>}
- */
- 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'
- })
- }
- }
|