user.js 536 B

12345678910111213141516171819202122232425262728
  1. import { request } from '../service/request'
  2. const baseUri = ''
  3. const auth = '/wx/auth'
  4. const user = '/wx/user'
  5. export function login(data) {
  6. return request({
  7. url: baseUri + auth + '/login_by_account',
  8. method: 'post',
  9. data: data
  10. })
  11. }
  12. export function authorize() {
  13. return request({
  14. url: baseUri + auth + '/authorize',
  15. method: 'get'
  16. })
  17. }
  18. export function getInfo(userId) {
  19. return request({
  20. url: baseUri + user + '/userInfo/' + userId,
  21. method: 'post'
  22. })
  23. }