import axios from 'axios';
import qs from 'qs';
let loginForm=JSON.parse(window.localStorage.getItem(`${location.host}loginForm`))
const writeLog=(type,data)=>{
  let log=new Date().format('yyyy-MM-dd hh:mm:ss')+' '+loginForm.number+' '+location.host+' '+type+' '+data
    axios.post("//"+document.location.logServe+"/ht/api/web/log/upload",JSON.stringify({log})).then(res=>{
    }).catch(err=>{
      console.log(err)
    })
}
export default writeLog
