|
|
@ -7,13 +7,13 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
const loaded = ref(false);
|
|
|
|
const loaded = ref(false);
|
|
|
|
|
|
|
|
|
|
|
|
const { padStore, currentPage } = padliographyStore();
|
|
|
|
const { padStore, currentPage, baseUrl } = padliographyStore();
|
|
|
|
const newPage = ref("");
|
|
|
|
const newPage = ref("");
|
|
|
|
const initPage = ref("");
|
|
|
|
const initPage = ref("");
|
|
|
|
const pageDescription = ref("");
|
|
|
|
const pageDescription = ref("");
|
|
|
|
|
|
|
|
|
|
|
|
const initialize = function () {
|
|
|
|
const initialize = function () {
|
|
|
|
fetch(`/api/${initPage.value}/init`, {
|
|
|
|
fetch(`${baseUrl.value}/api/${initPage.value}/init`, {
|
|
|
|
method: "POST",
|
|
|
|
method: "POST",
|
|
|
|
headers: { "Content-Type": "application/json" },
|
|
|
|
headers: { "Content-Type": "application/json" },
|
|
|
|
body: JSON.stringify({
|
|
|
|
body: JSON.stringify({
|
|
|
@ -37,7 +37,7 @@ export default {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
watchEffect(() => {
|
|
|
|
watchEffect(() => {
|
|
|
|
fetch(`/api/${currentPage.value}`)
|
|
|
|
fetch(`${baseUrl.value}/api/${currentPage.value}`)
|
|
|
|
.then((res) => res.json())
|
|
|
|
.then((res) => res.json())
|
|
|
|
.then((data) => {
|
|
|
|
.then((data) => {
|
|
|
|
pads.value = data.pads;
|
|
|
|
pads.value = data.pads;
|
|
|
|