deploy v-1
This commit is contained in:
+27
-6
@@ -10,6 +10,32 @@ export const useDiscountStore = defineStore('discounts', {
|
||||
total: 0
|
||||
}),
|
||||
actions: {
|
||||
async add(form) {
|
||||
this.fetching = true
|
||||
const { status, data } = await axios.post('/admins/discount', form)
|
||||
this.fetching = false
|
||||
return data
|
||||
},
|
||||
async history() {
|
||||
this.fetching = true
|
||||
const { status, data } = await axios.get('/admins/discountHistory')
|
||||
this.fetching = false
|
||||
return data
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
async index() {
|
||||
this.items = [];
|
||||
this.fetching = true
|
||||
@@ -18,12 +44,7 @@ export const useDiscountStore = defineStore('discounts', {
|
||||
return this.items = data
|
||||
|
||||
},
|
||||
async add(form) {
|
||||
this.fetching = true
|
||||
const { status, data } = await axios.post('/admins/discount', form)
|
||||
this.fetching = false
|
||||
return data
|
||||
},
|
||||
|
||||
async getDiscount(id) {
|
||||
this.items = [];
|
||||
this.fetching = true
|
||||
|
||||
Reference in New Issue
Block a user