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.
18 lines
371 B
JavaScript
18 lines
371 B
JavaScript
|
1 year ago
|
import {defineStore} from 'pinia'
|
||
|
|
import {ref} from 'vue'
|
||
|
|
import {getOrder} from '../../api/api.js'
|
||
|
|
export const order = defineStore('order',()=>{
|
||
|
|
const orders = ref([])
|
||
|
|
|
||
|
|
const getOrders = (data)=>{
|
||
|
|
getOrder({phoneNumber:uni.getStorageSync('phoneNumber')}).then((res)=>{
|
||
|
|
orders.value = res.data
|
||
|
|
console.log(res);
|
||
|
|
})
|
||
|
|
}
|
||
|
|
return{
|
||
|
|
orders,
|
||
|
|
getOrders
|
||
|
|
|
||
|
|
}
|
||
|
|
})
|