Commit adb0ed08 authored by 高晓帆's avatar 高晓帆

fix

parent 6f8fc853
import axios from 'axios';
let loginForm=JSON.parse(window.localStorage.getItem(`${location.host}loginForm`))
const writeLog=(type,data)=>{
if(!loginForm) return;
let log=type+' '+new Date().format('yyyy-MM-dd hh:mm:ss')+' '+loginForm.number+' '+location.host+' '+data
axios.post("//"+document.location.logServe+"/ht/api/web/log/upload",{log:log}).then(res=>{
if(res.code!=0){
console.log('writeLog',res.msg)
}
}).catch(err=>{
console.log('writeLog',err)
})
}
export default writeLog
...@@ -2,6 +2,7 @@ import axios from 'axios'; ...@@ -2,6 +2,7 @@ import axios from 'axios';
let loginForm=JSON.parse(window.localStorage.getItem(`${location.host}loginForm`)) let loginForm=JSON.parse(window.localStorage.getItem(`${location.host}loginForm`))
const writeLog=(type,data)=>{ const writeLog=(type,data)=>{
if(!loginForm) return; if(!loginForm) return;
let log=type+' '+new Date().format('yyyy-MM-dd hh:mm:ss')+' '+loginForm.number+' '+location.host+' '+data let log=type+' '+new Date().format('yyyy-MM-dd hh:mm:ss')+' '+loginForm.number+' '+location.host+' '+data
axios.post("//"+document.location.logServe+"/ht/api/web/log/upload",{log:log}).then(res=>{ axios.post("//"+document.location.logServe+"/ht/api/web/log/upload",{log:log}).then(res=>{
if(res.code!=0){ if(res.code!=0){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment