This commit is contained in:
@@ -142,6 +142,7 @@
|
||||
<script>
|
||||
import orderApi from '@/api/order'
|
||||
import productApi from '@/api/product'
|
||||
import customerApi from '@/api/customer'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -167,9 +168,18 @@ export default {
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.loadCustomers()
|
||||
this.loadProducts()
|
||||
},
|
||||
methods: {
|
||||
async loadCustomers() {
|
||||
try {
|
||||
const res = await customerApi.getCustomers({ page: 1, pageSize: 100 })
|
||||
this.customers = res.records || []
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
},
|
||||
async loadProducts() {
|
||||
try {
|
||||
const res = await productApi.getProducts({ page: 1, pageSize: 100 })
|
||||
|
||||
Reference in New Issue
Block a user