api.js 654 B

1234567891011121314151617181920212223242526
  1. // export const baseURL = 'http://project.4dage.com:8036' //线上地址
  2. //export const baseURL ='http://192.168.20.55:8036' //本地地址
  3. // 本地化加上
  4. export const baseURL ='' //甲方有服务器的打包地址
  5. export const addNumAPI = (type) => {
  6. fetch(`${baseURL}/api/visit/saveType`, {
  7. method: "post",
  8. body: JSON.stringify({
  9. moduleType: "web",
  10. type,
  11. }),
  12. headers: {
  13. appId:
  14. "E9A27605CEB3FFAF48F4D7B86858A03D9868419F60B5A45027FB6E6867F4EDA9",
  15. "Content-Type": "application/json",
  16. },
  17. })
  18. .then((res) => res.text()) //请求得到的数据转换为text
  19. .then((res) => {
  20. });
  21. }