This commit is contained in:
2020-04-09 16:38:26 +00:00
parent f2e8e34cdb
commit 8e06072204
2 changed files with 25 additions and 1 deletions

View File

@@ -168,10 +168,33 @@ export default {
});
},
getExcerpt(item) {
let vm = this;
//Search/Info/2/1?phrase=we
if (item.info) {
return;
}
// item.info = "***NEW INFO HERE****";
window.$gz.api
.get(
API_BASE_URL +
item.type +
"/" +
item.id +
"?phrase=" +
vm.searchPhrase
)
.then(res => {
if (res.error != undefined) {
vm.formState.serverError = res.error;
window.$gz.form.setErrorBoxErrors(vm);
} else {
item.info = res.data;
}
})
.catch(function handleGetDataFromAPIError(error) {
window.$gz.errorHandler.handleFormError(error, vm);
});
},
getDataFromApi() {
let vm = this;