35 lines
749 B
JavaScript
35 lines
749 B
JavaScript
import { defineStore } from "pinia";
|
|
import { devUrl, wssDevUrl } from "../../request/base/baseUrl";
|
|
|
|
export const useAppStore = defineStore("app", {
|
|
state() {
|
|
return {
|
|
title: "",
|
|
sceneId: "", // 分身场景id
|
|
previewImageData: [], // 预览图片数据
|
|
serverConfig: { // 服务器配置
|
|
baseUrl: devUrl, // 服务器基础地址
|
|
wssUrl: wssDevUrl, // 服务器ws地址
|
|
},
|
|
};
|
|
},
|
|
getters: {},
|
|
|
|
actions: {
|
|
setData(data) {
|
|
this.title = data;
|
|
},
|
|
setSceneId(data) {
|
|
this.sceneId = data;
|
|
},
|
|
setPreviewImageData(data) {
|
|
this.previewImageData = data;
|
|
},
|
|
setServerConfig(data) {
|
|
this.serverConfig = data;
|
|
},
|
|
},
|
|
|
|
unistorage: true,
|
|
});
|