51 lines
877 B
Vue
51 lines
877 B
Vue
<template>
|
|
<view>
|
|
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
|
|
}
|
|
},
|
|
methods: {
|
|
async requests(gest,path){
|
|
let test
|
|
if(gest=="get"){
|
|
let text = await fetch(`http://124.93.196.45:10091/Neusoft/times-model${path}`,{
|
|
method:"GET",
|
|
headers:{
|
|
"Content-Type":"application/json",
|
|
"Authorization":(await this.requests("POST","/app/login"))
|
|
}
|
|
})
|
|
}else if(gest="POST"){
|
|
let text = await fetch(`http://124.93.196.45:10091/Neusoft/times-model${path}`,{
|
|
method:"GET",
|
|
headers:{
|
|
"Content-Type":"application/json",
|
|
},
|
|
body:JSON.stringify({
|
|
"password": "0CYdq6Hn",
|
|
"username": "6dOMIgIU"
|
|
})
|
|
})
|
|
}
|
|
const data = await text
|
|
console.log(data);
|
|
}
|
|
},
|
|
async mounted(){
|
|
let get=[]
|
|
}
|
|
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
|
|
</style>
|