Commit 8b74ce94 authored by yun's avatar yun

修改bug

parent af9b218a
...@@ -149,10 +149,15 @@ export const get = { ...@@ -149,10 +149,15 @@ export const get = {
}) })
}, },
// 首页 tabs列表查询课程 请求 // 首页 tabs列表查询课程 请求
getListAllLesson: (params) => { getListAllLesson: (params, that) => {
return axios({ return axios({
url: api.ListAllLesson, url: api.ListAllLesson,
method: 'get', method: 'get',
cancelToken: new axiosIns.CancelToken(function executor(c) { // 设置 cancel token
if (that) {
that.sourceCnacle = c
}
}),
params: params params: params
}) })
}, },
......
...@@ -234,7 +234,8 @@ export default { ...@@ -234,7 +234,8 @@ export default {
}, { }, {
name: '返积分' name: '返积分'
}], }],
valueIndex: [1, 0, 1] valueIndex: [1, 0, 1],
sourceCnacle: ''
} }
}, },
methods: { methods: {
...@@ -293,6 +294,9 @@ export default { ...@@ -293,6 +294,9 @@ export default {
if (reg.test(this.value)) { if (reg.test(this.value)) {
this.value = '' this.value = ''
} }
if (this.sourceCnacle) {
this.sourceCnacle()
}
const res = await get.getListAllLesson({ 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降序) 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降序) valueGainSort: (this.returnValue === '1' && this.costValue === '1') ? '0' : this.returnValue === '1' ? '0' : '', // 积分奖励(1升序 0降序)
...@@ -310,7 +314,7 @@ export default { ...@@ -310,7 +314,7 @@ export default {
viewParam: this.value, viewParam: this.value,
page: 1, page: 1,
rows: this.pageNum rows: this.pageNum
}) }, this)
// 遍历 学习人数和评论人数 // 遍历 学习人数和评论人数
res.data.data.rows.map((list) => { res.data.data.rows.map((list) => {
if (this.returnValue === '1') { 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