request.js 357 B

12345678910111213141516
  1. const basicApi = '/ycsletrx'
  2. const header = {
  3. 'Content-Type': 'application/x-www-form-urlencoded',
  4. }
  5. async function fetchUserInfo() {
  6. try {
  7. const response = await axios.post(basicApi + '/getUser', {}, {
  8. headers: header
  9. })
  10. return response.data
  11. } catch (e) {
  12. console.log(e)
  13. return false
  14. }
  15. }