api.js 713 B

12345678910111213141516171819202122232425262728
  1. import axios from "axios"
  2. function _like() {
  3. return axios({
  4. method: 'post',
  5. url: `http://project.4dage.com:8036/api/visit/saveType`,
  6. headers: {
  7. appId: "E9A27605CEB3FFAF48F4D7B86858A03D9868419F60B5A45027FB6E6867F4EDA9",
  8. "Content-Type": "application/json",
  9. },
  10. data: {
  11. moduleType: "web",
  12. type: 'star',
  13. },
  14. })
  15. }
  16. export default {
  17. like: globalUtils.throttle(_like, 2000),
  18. async fetchPanoData() {
  19. const res = await axios({
  20. method: 'get',
  21. url: `https://zzbbh.4dage.com/YHT/Qjkk/local/WK1578926366500417536/someData.json?_=${Math.random()}`,
  22. })
  23. console.log('fetch pano data: ', res.data)
  24. return res.data
  25. },
  26. }