api.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // import { deepProcess } from "@/utils.js"
  2. import axios from "axios"
  3. import someDataJson from './someData.json'
  4. // axios({
  5. // method: 'post',
  6. // url: `${config.backendDir}visit/saveType`,
  7. // headers: {
  8. // appId: "CA02F83A5FA162B930AA2F962D202F43B0F6DE0B51AD79FEDB03FA8202BB4909330105B3B347510D87C97060C4288280D4A744E00565A4EC",
  9. // "Content-Type": "application/json",
  10. // },
  11. // data: {
  12. // moduleType,
  13. // type: 'visit',
  14. // },
  15. // })
  16. export default {
  17. async fetchPanoData(panoCode) {
  18. // const res = await axios({
  19. // method: 'get',
  20. // url: '/someData.json'
  21. // // url: `https://4dkk.4dage.com/720yun_fd_manage/${panoCode}/someData.json?_=${Math.random()}`,
  22. // })
  23. // console.log('fetch pano data: ', res.data)
  24. // // function changeSubStr(str) {
  25. // // return str.replace('https://4dkk.4dage.com/720yun_fd_manage/image/', `${process.env.VUE_APP_QJKK_XML_FILE_PATH}images/`)
  26. // // }
  27. // // function checkIsString(p) {
  28. // // return typeof p === 'string'
  29. // // }
  30. // // if (process.env.VUE_APP_CLI_MODE === 'local') {
  31. // // deepProcess(res, checkIsString, changeSubStr)
  32. // // }
  33. // return res.data
  34. return someDataJson
  35. },
  36. }