vue_h5_tools
Version:
vue h5 开发小工具
18 lines (16 loc) • 437 B
JavaScript
import Vue from 'vue'
export default {
save(content, type) {
return new Promise((resolve, reject)=>{
Vue.axios.post(Vue.$h5.api_path.save_log,{
content: typeof(content) == 'string' ? content : JSON.stringify(content),
type: type,
}).then((res) => {
resolve('日志记录成功')
}).catch((error)=>{
console.log((error))
reject('日志记录失败')
})
})
},
}