提交 e668f6ac authored 作者: lihuihui's avatar lihuihui

修改课程讨论模块

上级 6f7d8beb
......@@ -74,7 +74,7 @@
<div :class='["item-order", (sort[1].isShow ? "on" : "")]' @click='sortFn' :data-index='1' :data-str='sort[1].str'>按投票排序</div>
</div>
<div class='discuss-scroll' bindscrolltolower='loadmore' bindscrolltoupper='updatenew'>
<!-- <template v-for='(item, index) in discussList'>
<template v-for='(item, index) in discussList'>
<div v-bind:key="index" class='item-list' @click='goDiscussDetail' :data-id='item.id' :data-sid='item.sid' :data-index='index'>
<div class='user'>
<template v-if="item.user.url">
......@@ -95,8 +95,8 @@
</template>
<template v-if='!discussList.length'>
<div class='no-data'>暂无相关讨论</div>
</template> -->
<discuss :params="params"></discuss>
</template>
<!-- <discuss :params="params"></discuss> -->
</div>
</template>
<template v-else>
......@@ -232,13 +232,13 @@ export default {
},
data () {
return {
params: {
path: `/v2/qa/questions/course/${this.sid}/${this.cid}`,
page: {
limit: 10,
offset: 0
}
},
// params: {
// path: `/v2/qa/questions/course/${this.sid}/${this.cid}`,
// page: {
// limit: 10,
// offset: 0
// }
// },
ckeditor: null,
activeName: '1',
activeName1: '1',
......@@ -394,9 +394,9 @@ export default {
this.tabs[3].assess = json1
loading.close()
}).catch(e => { this.$message.error(e.message) }).finally(() => { })
// cAction.Discuss.getCourseDiscussList(this.cid, this.sid, this.param).then(json2 => {
// this.discussList = json2
// }).catch(e => { this.$message.error(e.message) }).finally(() => { })
cAction.Discuss.getCourseDiscussList(this.cid, this.sid, this.param).then(json2 => {
this.discussList = json2
}).catch(e => { this.$message.error(e.message) }).finally(() => { })
}).catch(e => { this.$message.error(e.message); loading.close() }).finally(() => { })
window.addEventListener('resize', this.resizeRoot.bind(this), false)
/* 实时刷新数据 */
......@@ -737,17 +737,17 @@ export default {
message: '问题发布成功'
})
this.isPublicShow = false
this.params = {
path: `/v2/qa/questions/course/${this.sid}/${this.cid}`,
page: {
limit: 10,
offset: 0
},
v: (new Date()).valueOf()
}
// cAction.Discuss.getCourseDiscussList(this.cid, this.sid, this.param).then(json2 => {
// this.discussList = json2
// }).catch(e => { this.$message.error(e.message) }).finally(() => { })
// this.params = {
// path: `/v2/qa/questions/course/${this.sid}/${this.cid}`,
// page: {
// limit: 10,
// offset: 0
// },
// v: (new Date()).valueOf()
// }
cAction.Discuss.getCourseDiscussList(this.cid, this.sid, this.param).then(json2 => {
this.discussList = json2
}).catch(e => { this.$message.error(e.message) }).finally(() => { })
}).catch(e => { this.$message.error(e.message) }).finally(() => { loading.close() })
}
} else {
......@@ -774,18 +774,18 @@ export default {
this.param.sort = this.sort[index].isShow ? str : ''
this.param.offset = 0
// const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' })
this.params = {
path: `/v2/qa/questions/course/${this.sid}/${this.cid}`,
dataJson: {
limit: 10,
offset: 0,
sort: this.sort[index].isShow ? str : ''
}
}
// cAction.Discuss.getCourseDiscussList(this.cid, this.sid, this.param).then(json => {
// this.discussList = json
// }).catch(e => { this.$message.error(e.message) }).finally(() => { loading.close() })
const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' })
// this.params = {
// path: `/v2/qa/questions/course/${this.sid}/${this.cid}`,
// dataJson: {
// limit: 10,
// offset: 0,
// sort: this.sort[index].isShow ? str : ''
// }
// }
cAction.Discuss.getCourseDiscussList(this.cid, this.sid, this.param).then(json => {
this.discussList = json
}).catch(e => { this.$message.error(e.message) }).finally(() => { loading.close() })
}
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论