index.ts 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. import microRequest from '../../utils/micro_request';
  2. import specialRequest from '../../utils/special_request';
  3. const sciPath = import.meta.env.VITE_SCIENTIFIC;
  4. export function useAchievementApi() {
  5. return {
  6. // 专利
  7. getPatentList: (query?: object) => {
  8. return microRequest.postRequest(sciPath, 'SciAchieve', 'GetPatentList', query);
  9. },
  10. // 软著
  11. getSoftwareList: (query?: object) => {
  12. return microRequest.postRequest(sciPath, 'SciAchievementSoftware', 'GetSoftwareList', query);
  13. },
  14. // 其他成果
  15. getOtherList: (query?: object) => {
  16. return microRequest.postRequest(sciPath, 'SciAchievementOther', 'GetOtherList', query);
  17. },
  18. // 标准
  19. getStandardList: (query?: object) => {
  20. return microRequest.postRequest(sciPath, 'SciAchievementStandard', 'GetList', query);
  21. },
  22. // 决策咨询
  23. getDecisionList: (query?: object) => {
  24. return microRequest.postRequest(sciPath, 'SciAchievementDecision', 'GetList', query);
  25. },
  26. // 学术著作
  27. getWorkList: (query?: object) => {
  28. return microRequest.postRequest(sciPath, 'SciAchieve', 'GetWorkList', query);
  29. },
  30. // 奖项荣誉
  31. getAwardsList: (query?: object) => {
  32. return microRequest.postRequest(sciPath, 'SciAchieve', 'GetAwardsList', query);
  33. },
  34. // 学术论文
  35. getPaperList: (query?: object) => {
  36. return microRequest.postRequest(sciPath, 'SciAchieve', 'GetPaperList', query);
  37. },
  38. // 学术会议
  39. getConferenceList: (query?: object) => {
  40. return microRequest.postRequest(sciPath, 'SciConference', 'GetList', query);
  41. },
  42. // 科技专项活动
  43. getSpecialActivityList: (params?: any) => {
  44. return specialRequest.get('/cxy/technology/special/activity/list', { params });
  45. },
  46. // 科技专项活动详情
  47. getSpecialActivityDetail: (id: string | number) => {
  48. return specialRequest.get(`/cxy/technology/special/activity/${id}`);
  49. },
  50. // 获取外部科研字典
  51. getDictData: (dictType: string) => {
  52. return specialRequest.get('/cxy/dict/data/list', { params: { dictType } });
  53. },
  54. // 免登录获取SCITOKEN
  55. getSciToken: (userId: string | number):Promise<any> => {
  56. return specialRequest.post('/lams/avoid/login', { userId, code: 'dshc-cq-ky' });
  57. },
  58. };
  59. }