comments for development
This commit is contained in:
parent
a280c5f80a
commit
fc5d3263ef
@ -5,6 +5,9 @@
|
|||||||
<div v-if="responseData">
|
<div v-if="responseData">
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th v-for="item in headers">{{ item }}</th>
|
<th v-for="item in headers">{{ item }}</th>
|
||||||
</tr>
|
</tr>
|
||||||
@ -40,17 +43,25 @@ const responseData = ref("")
|
|||||||
const searchWhat = ref(searchStore.searchParams.query)
|
const searchWhat = ref(searchStore.searchParams.query)
|
||||||
|
|
||||||
const query={...searchStore.searchParams}
|
const query={...searchStore.searchParams}
|
||||||
|
|
||||||
|
const keys_of_a_data=ref()
|
||||||
// const workingVar = {
|
// const workingVar = {
|
||||||
// query: "Thailand",
|
// query: "Thailand",
|
||||||
// search_type: "precise",
|
// search_type: "precise",
|
||||||
// page_num: "2",
|
// page_num: "2",
|
||||||
// page_size: "2"
|
// page_size: "2"
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
//responseData = {data:(100)[...], pagination:{...}}
|
||||||
|
//data =[{metadata: {...} , search: {...} },{},{}]
|
||||||
onMounted(()=>{
|
onMounted(()=>{
|
||||||
fetchData("/search","POST",query).then(response =>{
|
fetchData("/search","POST",query).then(response =>{
|
||||||
console.log("response apple: ",response)
|
console.log("response apple: ",response)
|
||||||
responseData.value = response
|
responseData.value = response
|
||||||
console.log(response)
|
console.log("response starfish: ",Object.keys(response.data[0]))
|
||||||
|
keys_of_a_data.value = Object.keys(response.data[0])
|
||||||
|
console.log("keys_of_a_data: ",keys_of_a_data)
|
||||||
|
|
||||||
}).catch(error=>{
|
}).catch(error=>{
|
||||||
responseData.value = "error"
|
responseData.value = "error"
|
||||||
console.log(error)
|
console.log(error)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user