You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
806 B
JavaScript

import {
defineStore
} from 'pinia';
export const useStore = defineStore('counter', {
state: () => ({
count: 1,
loading: 0,
activity_package: 0,
// buy_info:{"hospital":1,"combo":0,"items":[],"group":"","person":[{"id":12,"user":1,"name":"陆予三三","id_number":"130322199409060012","birthday":"1994-09-06","sex":1,"phone":"15232310906","relationship":"本人","marriage":1,"default":1,"del":2,"created_at":"2023-04-13T02:22:35.000000Z","updated_at":"2023-05-26T06:48:06.000000Z"}],"time":{"id":0,"date":null}},
buy_info: {
hospital: 0,
combo: 0,
items: [],
group: '',
person: [],
time: {
id: 0,
date: null
}
}
}),
actions: {
loadingStart() {
this.loading++
},
loadingDone() {
this.loading--
if (this.loading < 0) this.loading = 0
}
},
});