123456789101112131415161718192021222324252627282930313233343536373839404142 |
- import { unref } from "vue";
- import { defineStore } from "pinia";
- import axios from "axios";
- import { useAxios } from "@vueuse/integrations/useAxios";
- const baseURL = import.meta.env.VITE_DOMAIN_URL;
- const instance = axios.create({
- baseURL: baseURL,
- });
- export const useInfoStore = defineStore({
- id: "info",
- state: () => {
- return {
- poster: [],
- exhibition: [],
- activity: [],
- news: [],
- notices: [],
- };
- },
- getters: {},
- actions: {
- async getPoster() {
- const { data } = useAxios(
- "/show/poster/getList",
- { method: "get" },
- instance
- );
- console.log("data", data);
- this.poster = data;
- },
- getData() {
- const { data, isFinished } = useAxios(
- "/show/poster/getList",
- { method: "get" },
- instance
- );
- },
- },
- });
|