This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
import { defineStore } from 'pinia';
|
||||
import { getOssConfig } from '@/api/common';
|
||||
|
||||
interface OssConfigState {
|
||||
ossConfig: any; // 根据实际数据类型定义接口
|
||||
}
|
||||
|
||||
export const useOssConfigStore = defineStore('ossConfig', {
|
||||
state: (): OssConfigState => ({
|
||||
ossConfig: null,
|
||||
}),
|
||||
getters: {
|
||||
getConfig() {
|
||||
return this.ossConfig;
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
setOssConfigState(info) {
|
||||
this.ossConfig = info;
|
||||
},
|
||||
setOssConfig() {
|
||||
// return new Promise((resolve, reject) => {
|
||||
// getOssConfig()
|
||||
// .then((res) => {
|
||||
// this.setOssConfigState(res);
|
||||
// resolve(res);
|
||||
// })
|
||||
// .catch((error) => {
|
||||
// reject(error);
|
||||
// });
|
||||
// });
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user