1404/11/01-add dynamic config
This commit is contained in:
+15
-12
@@ -1,21 +1,24 @@
|
||||
import { computed, ref } from 'vue'
|
||||
import {computed, ref} from 'vue'
|
||||
// import { get } from 'lodash'
|
||||
import { defineStore } from 'pinia'
|
||||
import { getMe } from '@/api/me'
|
||||
import type { User } from '@/models/login'
|
||||
import { useWalletStore } from '@/store/walletStore'
|
||||
import {defineStore} from 'pinia'
|
||||
import {getMe} from '@/api/me'
|
||||
import type {User} from '@/models/login'
|
||||
import {useWalletStore} from '@/store/walletStore'
|
||||
import {authenticateWithFingerprint, setFingerPrint} from '@/utils'
|
||||
import type { PWallet } from '@/models/wallet'
|
||||
import type {PWallet} from '@/models/wallet'
|
||||
import {getConfig} from "@/api/config";
|
||||
|
||||
|
||||
export const useConfigStore = defineStore('config', () => {
|
||||
const config=ref()
|
||||
async function getConfigData(){
|
||||
let temp=await getConfig()
|
||||
config.value=temp.user
|
||||
console.log(config.value)
|
||||
}
|
||||
const config = ref()
|
||||
|
||||
async function getConfigData() {
|
||||
|
||||
let temp = window.__APP_CONFIG__
|
||||
config.value = temp.user
|
||||
console.log(config.value)
|
||||
}
|
||||
|
||||
return {
|
||||
config,
|
||||
getConfigData
|
||||
|
||||
Reference in New Issue
Block a user