修改自定义题库的请求方式
This commit is contained in:
parent
b54d4ec5f0
commit
c9604e7130
@ -1,10 +1,10 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
export const getShopQuestions = (params: any) =>
|
export const getShopQuestions = (data: any) =>
|
||||||
request({
|
request({
|
||||||
url: `/api/${params.shop}/puzzles`,
|
url: `/api/${data.shop}/puzzles`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
params
|
data
|
||||||
})
|
})
|
||||||
|
|
||||||
export const getShopQuestion = (shop: string, id: string, params: any) =>
|
export const getShopQuestion = (shop: string, id: string, params: any) =>
|
||||||
|
@ -308,6 +308,7 @@ export default class extends Vue {
|
|||||||
|
|
||||||
private async getList() {
|
private async getList() {
|
||||||
this.listLoading = true
|
this.listLoading = true
|
||||||
|
console.log(this.listQuery)
|
||||||
const { data } = await getShopQuestions(this.listQuery)
|
const { data } = await getShopQuestions(this.listQuery)
|
||||||
this.listLoading = false
|
this.listLoading = false
|
||||||
this.list = data.records
|
this.list = data.records
|
||||||
@ -336,10 +337,7 @@ export default class extends Vue {
|
|||||||
private filterData() {
|
private filterData() {
|
||||||
this.listQuery.key = this.filterForm.key
|
this.listQuery.key = this.filterForm.key
|
||||||
if (this.filterForm.typeSelect.length > 0) {
|
if (this.filterForm.typeSelect.length > 0) {
|
||||||
this.listQuery.tag = this.filterForm.typeSelect[0]
|
this.listQuery.groups = this.filterForm.typeSelect
|
||||||
}
|
|
||||||
if (this.filterForm.typeSelect.length > 1) {
|
|
||||||
this.listQuery.sub_tag = this.filterForm.typeSelect[1]
|
|
||||||
}
|
}
|
||||||
this.listQuery.page = 1
|
this.listQuery.page = 1
|
||||||
this.getList()
|
this.getList()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user