Blame view

yudao-ui-admin-uniapp/api/login.js 568 Bytes
bf5df656   YunaiV   初始化管理后台的 uniapp 版本
1
2
3
  import request from '@/utils/request'
  
  // 登录方法
baf5d87d   xingyu4j   feat: uniapp 适配aj...
4
5
6
7
8
9
10
11
12
13
14
15
16
17
  export function login(username, password, captchaVerification) {
  	const data = {
  		username,
  		password,
  		captchaVerification
  	}
  	return request({
  		url: '/system/auth/login',
  		headers: {
  			isToken: false
  		},
  		'method': 'POST',
  		'data': data
  	})
bf5df656   YunaiV   初始化管理后台的 uniapp 版本
18
19
20
21
  }
  
  // 获取用户详细信息
  export function getInfo() {
baf5d87d   xingyu4j   feat: uniapp 适配aj...
22
23
24
25
  	return request({
  		url: '/system/auth/get-permission-info',
  		'method': 'GET'
  	})
bf5df656   YunaiV   初始化管理后台的 uniapp 版本
26
27
28
29
  }
  
  // 退出方法
  export function logout() {
baf5d87d   xingyu4j   feat: uniapp 适配aj...
30
31
32
33
  	return request({
  		url: '/system/auth/logout',
  		'method': 'POST'
  	})
bf5df656   YunaiV   初始化管理后台的 uniapp 版本
34
  }