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'
|
const apiUrl = 'https://users.service.development.therig.onlinefuelslabs.io'
|
||||||
|
|
||||||
export function fetchList(query) {
|
export function fetchList(query) {
|
||||||
const dto = {
|
return axios.get(`${apiUrl}/account/search`, { params: query })
|
||||||
'page': query.page,
|
|
||||||
'limit': query.limit,
|
|
||||||
'platform': query.platform || store.state.platform
|
|
||||||
}
|
|
||||||
return axios.get(`${apiUrl}/account/search`, { params: dto })
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function fetchAccount(id) {
|
export function fetchAccount(id) {
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { fetchList } from '@/api/account'
|
const fetchAccountList = require('@/api/account').fetchList
|
||||||
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
|
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -86,11 +86,15 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
getList() {
|
getList() {
|
||||||
this.listLoading = true
|
this.listLoading = true
|
||||||
fetchList(this.listQuery).then(response => {
|
fetchAccountList(this.listQuery).then(response => {
|
||||||
this.list = response.data.docs
|
this.list = response.data.docs
|
||||||
this.total = response.data.total
|
this.total = response.data.total
|
||||||
this.listLoading = false
|
this.listLoading = false
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
handleFilter(query) {
|
||||||
|
this.listQuery.page = 1
|
||||||
|
this.getList()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue