fix: 加载客户列表数据
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Agent
2026-03-25 14:56:09 +00:00
parent af232815d3
commit b7b11207ab

View File

@@ -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 })