Refactor front
gitea/hedera-web/pipeline/pr-beta This commit looks good
Details
gitea/hedera-web/pipeline/pr-beta This commit looks good
Details
This commit is contained in:
parent
6edce7496c
commit
ce792f7bf6
|
@ -1,5 +1,5 @@
|
|||
import { defineStore } from 'pinia';
|
||||
import { jApi } from '@/boot/axios';
|
||||
import { jApi, api } from '@/boot/axios';
|
||||
import useNotify from '@/composables/useNotify.js';
|
||||
import { i18n } from '@/boot/i18n';
|
||||
import { useQuasar } from 'quasar';
|
||||
|
@ -56,9 +56,18 @@ export const useAppStore = defineStore('hedera', {
|
|||
|
||||
this.menuEssentialLinks = sectionTree;
|
||||
},
|
||||
|
||||
async loadConfig() {
|
||||
const imageUrl = await jApi.getValue('SELECT url FROM imageConfig');
|
||||
this.$patch({ imageUrl });
|
||||
try {
|
||||
const { data } = await api.get('/ImageConfigs/getImageConfig');
|
||||
|
||||
if (!data) return;
|
||||
|
||||
const [config] = data;
|
||||
this.imageUrl = config?.url;
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
},
|
||||
|
||||
async init() {
|
||||
|
|
Loading…
Reference in New Issue