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