Fixed a bug with accounts not filtering by buyer and seller
This commit is contained in:
parent
fbcf66a247
commit
71cfd9a108
|
@ -4,12 +4,7 @@ import store from '../store/modules/settings.js'
|
|||
const apiUrl = 'https://users.service.development.therig.onlinefuelslabs.io'
|
||||
|
||||
export function fetchList(query) {
|
||||
const dto = {
|
||||
'page': query.page,
|
||||
'limit': query.limit,
|
||||
'platform': query.platform || store.state.platform
|
||||
}
|
||||
return axios.get(`${apiUrl}/account/search`, { params: dto })
|
||||
return axios.get(`${apiUrl}/account/search`, { params: query })
|
||||
}
|
||||
|
||||
export function fetchAccount(id) {
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { fetchList } from '@/api/account'
|
||||
const fetchAccountList = require('@/api/account').fetchList
|
||||
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
|
||||
|
||||
export default {
|
||||
|
@ -86,11 +86,15 @@ export default {
|
|||
methods: {
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
fetchList(this.listQuery).then(response => {
|
||||
fetchAccountList(this.listQuery).then(response => {
|
||||
this.list = response.data.docs
|
||||
this.total = response.data.total
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
handleFilter(query) {
|
||||
this.listQuery.page = 1
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue