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

修改课程讨论模块

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