square.js 890 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import {axios} from '../utils/request'
  2. import {FILE_MODULE, SQUARE_MODULE} from "./_prefix";
  3. export const sharedFileList = userId => {
  4. return axios.get(`${SQUARE_MODULE}/sharedFileList`, {
  5. params: {
  6. userId: userId
  7. }
  8. }).then(res => {
  9. return res;
  10. }
  11. )
  12. }
  13. export const sharedModelList = userId => {
  14. return axios.get(`${SQUARE_MODULE}/sharedModelList`, {
  15. params: {
  16. userId: userId
  17. }
  18. }).then(res => {
  19. return res;
  20. }
  21. )
  22. }
  23. export const shareFile = (userId,fileId) => {
  24. return axios.post(`${SQUARE_MODULE}/shareFile`, {
  25. userId, fileId
  26. }).then( res => {
  27. return res;
  28. });
  29. }
  30. export const shareModel = (userId,modelId) => {
  31. return axios.post(`${SQUARE_MODULE}/shareModel`, {
  32. userId, modelId
  33. }).then( res => {
  34. return res;
  35. });
  36. }