| | |
| | | |
| | | // export default apolloClient; |
| | | // 定义不同请求地址 |
| | | const EFORMURI = "http://192.168.3.88:18080/dream_test/graphql"; |
| | | const IOTURI = "https://www.9village.cn/dream_test" + "/graphql"; |
| | | const EFORMURI = "/dream_test/graphql"; |
| | | const IOTURI = "/dream_test/graphql"; |
| | | // import ApolloClient from 'apollo-boost' //引入apollo-boost插件 |
| | | import { ApolloClient } from "apollo-client"; |
| | | import { createHttpLink } from "apollo-link-http"; |
| | |
| | | headers: { |
| | | Authorization: JSON.parse(localStorage.getItem("user")).jwtToken, |
| | | // Authorization:'eyJhbGciOiJIUzI1NiJ9.eyJleHBUaW1lIjoiMjAyNC8wNy8zMSAxODoxMSIsInVzZXJJZCI6NDQsImp0aSI6ImVlMDM3NmFjLWQ5OTAtNDRkZS05YTVmLTUxYjhjMjc0YWNiOSIsImlhdCI6MTcyMjQxMzUwMSwic3ViIjoieWNsIiwiZXhwIjoxNzIyNDIwNzAxfQ.bSd0qag44dwXeJQpvryYJXEtrQ03-8MmHQWhgILGXO4', |
| | | staffId: JSON.parse(localStorage.getItem("user")).staffs[0].id, |
| | | staffId: JSON.parse(localStorage.getItem("selectStaff")).id, |
| | | playerId: |
| | | JSON.parse(localStorage.getItem("user")).players.length > 0 |
| | | ? JSON.parse(localStorage.getItem("user")).players[0].id |