Commit 8b74ce94 authored by yun's avatar yun

修改bug

parent af9b218a
......@@ -149,10 +149,15 @@ export const get = {
})
},
// 首页 tabs列表查询课程 请求
getListAllLesson: (params) => {
getListAllLesson: (params, that) => {
return axios({
url: api.ListAllLesson,
method: 'get',
cancelToken: new axiosIns.CancelToken(function executor(c) { // 设置 cancel token
if (that) {
that.sourceCnacle = c
}
}),
params: params
})
},
......
......@@ -234,7 +234,8 @@ export default {
}, {
name: '返积分'
}],
valueIndex: [1, 0, 1]
valueIndex: [1, 0, 1],
sourceCnacle: ''
}
},
methods: {
......@@ -293,6 +294,9 @@ export default {
if (reg.test(this.value)) {
this.value = ''
}
if (this.sourceCnacle) {
this.sourceCnacle()
}
const res = await get.getListAllLesson({
valueConsumeSort: this.freeValue !== '1' && this.costValue === '1' ? '0' : this.freeValue === '1' && this.costValue === '1' && this.returnValue === '1' ? '0' : '', // 积分消耗(1升序 0降序)
valueGainSort: (this.returnValue === '1' && this.costValue === '1') ? '0' : this.returnValue === '1' ? '0' : '', // 积分奖励(1升序 0降序)
......@@ -310,7 +314,7 @@ export default {
viewParam: this.value,
page: 1,
rows: this.pageNum
})
}, this)
// 遍历 学习人数和评论人数
res.data.data.rows.map((list) => {
if (this.returnValue === '1') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment