add: answer faqs
This commit is contained in:
@@ -5,6 +5,8 @@ export default function useDirectory() {
|
||||
const companies = ref([]);
|
||||
const loading = ref(false);
|
||||
const users = ref([]);
|
||||
const companiesTotal = ref(0);
|
||||
const currentCompaniesPage = ref(1);
|
||||
|
||||
|
||||
const getCompaniesData = async(filterQuery) => {
|
||||
@@ -19,7 +21,14 @@ export default function useDirectory() {
|
||||
|
||||
loading.value = true;
|
||||
const resp = await getCompanies(filterStr);
|
||||
companies.value = resp;
|
||||
if(resp !== null) {
|
||||
companies.value = resp.data;
|
||||
companiesTotal.value = resp.total;
|
||||
console.log(companiesTotal.value)
|
||||
} else {
|
||||
companies.value = [];
|
||||
companiesTotal.value = 0;
|
||||
}
|
||||
loading.value = false;
|
||||
}
|
||||
|
||||
@@ -36,6 +45,8 @@ export default function useDirectory() {
|
||||
getUsersData,
|
||||
users,
|
||||
loading,
|
||||
companies
|
||||
companies,
|
||||
companiesTotal,
|
||||
currentCompaniesPage
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user