server.js 593 B

1234567891011121314151617181920212223242526272829303132
  1. import { creatRequest } from '../../utils/request.js';
  2. const requestList = {
  3. //退出登录
  4. logout: {
  5. method: 'POST',
  6. url: 'login/out'
  7. },
  8. //获取用户信息
  9. getuser:{
  10. method: 'GET',
  11. url: 'user'
  12. },
  13. // 是否日志推送
  14. getVersionLog:{
  15. method: 'GET',
  16. url: 'versionInfo/getVersionLog'
  17. },
  18. // 确定已读
  19. hadRead:{
  20. method: 'POST',
  21. url: 'versionInfo/hadRead'
  22. },
  23. getThisVersionInfo:{
  24. method: 'GET',
  25. url: 'versionInfo/getThisVersionInfo'
  26. }
  27. };
  28. export const commServer = ({ key, data }) => {
  29. let obj = requestList[key];
  30. return creatRequest(obj, data);
  31. }