Merge branch 'beta' into feature/address-list-query
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:
commit
dbd46d602d
|
@ -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';
|
||||
|
@ -32,7 +32,10 @@ export const useAppStore = defineStore('hedera', {
|
|||
}),
|
||||
actions: {
|
||||
async getMenuLinks() {
|
||||
const sections = await jApi.query('SELECT * FROM myMenu');
|
||||
const { data: sections } = await api.get('MyMenus');
|
||||
|
||||
if (!sections) return;
|
||||
|
||||
const sectionMap = new Map();
|
||||
for (const section of sections) {
|
||||
sectionMap.set(section.id, section);
|
||||
|
@ -56,9 +59,17 @@ 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');
|
||||
|
||||
if (!data) return;
|
||||
|
||||
this.imageUrl = data[0]?.url;
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
},
|
||||
|
||||
async init() {
|
||||
|
|
|
@ -248,11 +248,10 @@ export const useUserStore = defineStore('user', () => {
|
|||
|
||||
const fetchUser = async (userType = 'user') => {
|
||||
try {
|
||||
const userData = await jApi.getObject(
|
||||
'SELECT id, nickname, name, lang FROM account.myUser'
|
||||
);
|
||||
if (userType === 'user') mainUser.value = userData;
|
||||
else supplantedUser.value = userData;
|
||||
const userData = await api.get('VnUsers/getCurrentUserData');
|
||||
|
||||
if (userType === 'user') mainUser.value = userData.data;
|
||||
else supplantedUser.value = userData.data;
|
||||
} catch (error) {
|
||||
console.error('Error fetching user: ', error);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue