api.js 1.1 KB

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