Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online-pc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online-pc
Commits
7facf264
提交
7facf264
authored
5月 14, 2020
作者:
lihuihui
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'enterprise-wmp-copy' of…
Merge branch 'enterprise-wmp-copy' of
https://gitlab.ezijing.com/zhangyanxin/learn-mbaOnline
into enterprise-wmp-copy
上级
ca4c5b8c
812c5042
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
38 行增加
和
27 行删除
+38
-27
index.js
client/src/modules/discuss/api/index.js
+10
-10
discuss.vue
client/src/modules/discuss/src/discuss.vue
+3
-2
courseDetail.vue
client/src/pages/learn/courseDetail.vue
+25
-15
没有找到文件。
client/src/modules/discuss/api/index.js
浏览文件 @
7facf264
...
@@ -7,7 +7,7 @@ const httpRequest = new BaseAPI(webConf)
...
@@ -7,7 +7,7 @@ const httpRequest = new BaseAPI(webConf)
export
const
getDiscussList
=
(
param
)
=>
{
export
const
getDiscussList
=
(
param
)
=>
{
const
paramPath
=
param
.
path
||
''
const
paramPath
=
param
.
path
||
''
return
httpRequest
.
get
(
return
httpRequest
.
get
(
`/v2/qa/questions
${
paramPath
}
`
,
`/
api/lms/
v2/qa/questions
${
paramPath
}
`
,
param
.
dataJson
param
.
dataJson
)
)
}
}
...
@@ -17,7 +17,7 @@ export const getDiscussList = (param) => {
...
@@ -17,7 +17,7 @@ export const getDiscussList = (param) => {
export
const
getCourseDiscussList
=
(
param
)
=>
{
export
const
getCourseDiscussList
=
(
param
)
=>
{
const
paramPath
=
param
.
path
||
''
const
paramPath
=
param
.
path
||
''
return
httpRequest
.
get
(
return
httpRequest
.
get
(
`/v2/qa/questions/course
${
paramPath
}
`
,
`/
api/lms/
v2/qa/questions/course
${
paramPath
}
`
,
param
.
dataJson
param
.
dataJson
)
)
}
}
...
@@ -26,7 +26,7 @@ export const getCourseDiscussList = (param) => {
...
@@ -26,7 +26,7 @@ export const getCourseDiscussList = (param) => {
*/
*/
export
const
deleteDiscuss
=
(
qid
)
=>
{
export
const
deleteDiscuss
=
(
qid
)
=>
{
return
httpRequest
.
delete
(
return
httpRequest
.
delete
(
`/v2/qa/questions/
${
qid
}
`
`/
api/lms/
v2/qa/questions/
${
qid
}
`
)
)
}
}
...
@@ -35,7 +35,7 @@ export const deleteDiscuss = (qid) => {
...
@@ -35,7 +35,7 @@ export const deleteDiscuss = (qid) => {
*/
*/
export
const
getDiscussDetail
=
(
qid
)
=>
{
export
const
getDiscussDetail
=
(
qid
)
=>
{
return
httpRequest
.
get
(
return
httpRequest
.
get
(
`/v2/qa/questions/
${
qid
}
`
`/
api/lms/
v2/qa/questions/
${
qid
}
`
)
)
}
}
/**
/**
...
@@ -43,7 +43,7 @@ export const getDiscussDetail = (qid) => {
...
@@ -43,7 +43,7 @@ export const getDiscussDetail = (qid) => {
*/
*/
export
const
deleteComment
=
(
cid
)
=>
{
export
const
deleteComment
=
(
cid
)
=>
{
return
httpRequest
.
delete
(
return
httpRequest
.
delete
(
`/v2/qa/comments/
${
cid
}
`
`/
api/lms/
v2/qa/comments/
${
cid
}
`
)
)
}
}
/**
/**
...
@@ -51,7 +51,7 @@ export const deleteComment = (cid) => {
...
@@ -51,7 +51,7 @@ export const deleteComment = (cid) => {
*/
*/
export
const
callbackComment
=
(
param
)
=>
{
export
const
callbackComment
=
(
param
)
=>
{
return
httpRequest
.
post
(
return
httpRequest
.
post
(
'/v2/qa/comments'
,
'/
api/lms/
v2/qa/comments'
,
param
,
param
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
}
{
headers
:
{
'Content-Type'
:
'application/json'
}
}
)
)
...
@@ -62,7 +62,7 @@ export const callbackComment = (param) => {
...
@@ -62,7 +62,7 @@ export const callbackComment = (param) => {
*/
*/
export
const
answerQues
=
(
param
)
=>
{
export
const
answerQues
=
(
param
)
=>
{
return
httpRequest
.
post
(
return
httpRequest
.
post
(
'/v2/qa/answers'
,
'/
api/lms/
v2/qa/answers'
,
param
,
param
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
}
{
headers
:
{
'Content-Type'
:
'application/json'
}
}
)
)
...
@@ -72,7 +72,7 @@ export const answerQues = (param) => {
...
@@ -72,7 +72,7 @@ export const answerQues = (param) => {
*/
*/
export
const
deleteAnswer
=
(
aid
)
=>
{
export
const
deleteAnswer
=
(
aid
)
=>
{
return
httpRequest
.
delete
(
return
httpRequest
.
delete
(
`/v2/qa/answers/
${
aid
}
`
`/
api/lms/
v2/qa/answers/
${
aid
}
`
)
)
}
}
/**
/**
...
@@ -80,7 +80,7 @@ export const deleteAnswer = (aid) => {
...
@@ -80,7 +80,7 @@ export const deleteAnswer = (aid) => {
*/
*/
export
const
unlike
=
(
tagid
)
=>
{
export
const
unlike
=
(
tagid
)
=>
{
return
httpRequest
.
delete
(
return
httpRequest
.
delete
(
`/v2/qa/tags/
${
tagid
}
`
`/
api/lms/
v2/qa/tags/
${
tagid
}
`
)
)
}
}
/**
/**
...
@@ -88,7 +88,7 @@ export const unlike = (tagid) => {
...
@@ -88,7 +88,7 @@ export const unlike = (tagid) => {
*/
*/
export
const
like
=
(
param
)
=>
{
export
const
like
=
(
param
)
=>
{
return
httpRequest
.
post
(
return
httpRequest
.
post
(
'/v2/qa/tags'
,
'/
api/lms/
v2/qa/tags'
,
param
,
param
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
}
{
headers
:
{
'Content-Type'
:
'application/json'
}
}
)
)
...
...
client/src/modules/discuss/src/discuss.vue
浏览文件 @
7facf264
...
@@ -78,9 +78,10 @@ export default {
...
@@ -78,9 +78,10 @@ export default {
*/
*/
goDiscussDetail
(
e
)
{
goDiscussDetail
(
e
)
{
const
qid
=
e
.
currentTarget
.
dataset
.
id
const
qid
=
e
.
currentTarget
.
dataset
.
id
const
sid
=
e
.
currentTarget
.
dataset
.
sid
//
const sid = e.currentTarget.dataset.sid
const
cid
=
e
.
currentTarget
.
dataset
.
cid
const
cid
=
e
.
currentTarget
.
dataset
.
cid
this
.
$router
.
push
({
path
:
`/app/learn/discuss-detail/
${
sid
}
/
${
cid
}
/
${
qid
}
`
})
// this.$router.push({ path: `/app/learn/discuss-detail/${sid}/${cid}/${qid}` })
this
.
$router
.
push
({
path
:
`/app/learn/discuss-detail/
${
cid
}
/
${
qid
}
`
})
}
}
},
},
watch
:
{
watch
:
{
...
...
client/src/pages/learn/courseDetail.vue
浏览文件 @
7facf264
...
@@ -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-if=
"item.questioner.uid == $GLOBAL.UserInfo.id"
v-bind:key=
"index"
class=
'item-list lhhId'
@
click=
'goDiscussDetail'
:data-id=
'item.id'
:data-sid=
'item.sid'
:data-index=
'index'
>
<div
v-if=
"item.questioner.uid == $GLOBAL.UserInfo.id"
v-bind:key=
"index"
class=
'item-list lhhId'
@
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 && !domLength'
>
<
template
v-if=
'!discussList.length && !domLength'
>
<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
>
...
@@ -228,6 +228,15 @@ export default {
...
@@ -228,6 +228,15 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
params
:
{
path
:
`/
${
this
.
cid
}
`
,
request
:
'getCourseDiscussList'
,
dataJson
:
{
limit
:
10
,
offset
:
0
,
sort
:
''
}
},
isCourseDis
:
this
.
getQueryString
(
'v'
),
isCourseDis
:
this
.
getQueryString
(
'v'
),
domLength
:
0
,
domLength
:
0
,
ckeditor
:
null
,
ckeditor
:
null
,
...
@@ -860,18 +869,19 @@ export default {
...
@@ -860,18 +869,19 @@ 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
:
`/
${
this
.
cid
}
`
,
// dataJson: {
request
:
'getCourseDiscussList'
,
// limit: 10,
dataJson
:
{
// offset: 0,
limit
:
10
,
// sort: this.sort[index].isShow ? str : ''
offset
:
0
,
// }
sort
:
this
.
sort
[
index
].
isShow
?
str
:
''
// }
}
cAction
.
Discuss
.
getCourseDiscussList
(
this
.
cid
,
this
.
sid
,
this
.
param
).
then
(
json
=>
{
}
this
.
discussList
=
json
// cAction.Discuss.getCourseDiscussList(this.cid, this.sid, this.param).then(json => {
}).
catch
(
e
=>
{
this
.
$message
.
error
(
e
.
message
)
}).
finally
(()
=>
{
loading
.
close
()
})
// this.discussList = json
// }).catch(e => { this.$message.error(e.message) }).finally(() => { loading.close() })
},
},
getQueryString
(
name
)
{
getQueryString
(
name
)
{
const
reg
=
new
RegExp
(
'(^|&)'
+
name
+
'=([^&]*)(&|$)'
,
'i'
)
const
reg
=
new
RegExp
(
'(^|&)'
+
name
+
'=([^&]*)(&|$)'
,
'i'
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论