You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
471 B
19 lines
471 B
import { defineStore } from 'pinia' |
|
import { getLogo } from '@/api/setting' |
|
const settingStore = defineStore('setting', { |
|
state: () => ({ |
|
logo: '', |
|
}), |
|
actions: { |
|
setLogo() { |
|
getLogo().then((res: any) => { |
|
console.log(res, 'this.logo') |
|
this.logo = res.result.logo |
|
|
|
|
|
document.querySelector("link[rel~='icon']").href = import.meta.env.VITE_APP_BASE_API + '/' + this.logo |
|
}) |
|
}, |
|
}, |
|
}) |
|
export default settingStore
|
|
|