Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online-pc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online-pc
Commits
1c36672d
提交
1c36672d
authored
5月 06, 2020
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
差异文件
merge...
上级
1455041c
80023d9b
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
136 行增加
和
46 行删除
+136
-46
tableList.vue
client/src/components/comTable/tableList.vue
+3
-2
index.js
client/src/modules/discuss/api/index.js
+34
-32
childAnswer.vue
client/src/modules/discuss/components/childAnswer.vue
+58
-0
index.js
client/src/modules/discuss/index.js
+5
-2
discuss.vue
client/src/modules/discuss/src/discuss.vue
+13
-0
discussDetail.vue
client/src/modules/discuss/src/discussDetail.vue
+0
-0
discussDetail.vue
client/src/pages/learn/discussDetail.vue
+9
-2
list.vue
client/src/pages/mobileLive/list.vue
+14
-8
没有找到文件。
client/src/components/comTable/tableList.vue
浏览文件 @
1c36672d
...
@@ -61,6 +61,7 @@
...
@@ -61,6 +61,7 @@
:page-size=
"page.size"
:page-size=
"page.size"
layout=
"total, prev, pager, next, jumper"
layout=
"total, prev, pager, next, jumper"
:total=
"page.total"
:total=
"page.total"
:hide-on-single-page=
"true"
@
current-change=
"handleCurrentChange"
@
current-change=
"handleCurrentChange"
></el-pagination>
></el-pagination>
</div>
</div>
...
@@ -154,8 +155,8 @@ export default {
...
@@ -154,8 +155,8 @@ export default {
// 分页
// 分页
if
(
this
.
hasPage
)
{
if
(
this
.
hasPage
)
{
this
.
dataList
=
response
.
list
this
.
dataList
=
response
.
list
||
[]
this
.
page
.
total
=
parseInt
(
response
.
count
)
this
.
page
.
total
=
parseInt
(
response
.
count
)
||
0
}
}
})
})
},
},
...
...
client/src/modules/discuss/api/index.js
浏览文件 @
1c36672d
...
@@ -2,55 +2,57 @@ import BaseAPI from '@/api/base_api'
...
@@ -2,55 +2,57 @@ import BaseAPI from '@/api/base_api'
const
httpRequest
=
new
BaseAPI
(
webConf
)
const
httpRequest
=
new
BaseAPI
(
webConf
)
/**
/**
* 获取课程详情
* 获取课程讨论列表
* @param {string} courseId 课程ID
* @param {string} semesterId 学期ID
*/
*/
export
function
getCourse
(
courseId
,
semesterId
)
{
export
const
getDiscussList
=
(
param
)
=>
{
return
httpRequest
.
get
(
`/v2/education/courses/
${
courseId
}
/
${
semesterId
}
`
)
const
paramPath
=
param
.
path
||
''
return
httpRequest
.
get
(
`/v2/qa/questions
${
paramPath
}
`
,
param
.
dataJson
)
}
}
/**
/**
* 获取章节资源详情
* 获取我的课程讨论列表
* @param {string} vid 资源ID
*/
*/
export
function
getChapterVideo
(
vid
)
{
export
const
getCourseDiscussList
=
(
param
)
=>
{
return
httpRequest
.
post
(
const
paramPath
=
param
.
path
||
''
'/v2/education/video-streaming'
,
return
httpRequest
.
get
(
{
vid
}
,
`/v2/qa/questions/course
${
paramPath
}
`
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
}
param
.
dataJson
)
)
}
}
/**
/**
* 获取章节资源详情
* 删除提问
* @param {string} vid 章节的资源ID
*/
*/
export
function
getChapterVideoAliyun
(
vid
)
{
export
const
deleteDiscuss
=
(
qid
)
=>
{
return
httpRequest
.
post
(
return
httpRequest
.
delete
(
'/v2/education/aliyun-video-streaming'
,
`/v2/qa/questions/
${
qid
}
`
{
vid
},
{
headers
:
{
'Content-Type'
:
'application/json'
}
}
)
)
}
}
/**
/**
* 获取
课程讨论列表
* 获取
问题详情
*/
*/
export
const
getDiscussList
=
(
param
)
=>
{
export
const
getDiscussDetail
=
(
qid
)
=>
{
const
paramPath
=
param
.
path
||
''
return
httpRequest
.
get
(
return
httpRequest
.
get
(
`/v2/qa/questions
${
paramPath
}
`
,
`/v2/qa/questions/
${
qid
}
`
param
.
dataJson
)
)
}
}
/**
/**
*
获取我的课程讨论列表
*
删除评论
*/
*/
export
const
getCourseDiscussList
=
(
param
)
=>
{
export
const
deleteComment
=
(
cid
)
=>
{
const
paramPath
=
param
.
path
||
''
return
httpRequest
.
delete
(
return
httpRequest
.
get
(
`/v2/qa/comments/
${
cid
}
`
`/v2/qa/questions/course
${
paramPath
}
`
,
)
param
.
dataJson
}
/**
* 回复评论
*/
export
const
callbackComment
=
(
param
)
=>
{
return
httpRequest
.
post
(
'/v2/qa/comments'
,
param
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
}
)
)
}
}
client/src/modules/discuss/components/childAnswer.vue
0 → 100644
浏览文件 @
1c36672d
<
template
>
<div>
<div
class=
'ask'
>
<template
v-for=
'(item, index) in abswerData.comments'
>
<div
v-bind:key=
"index"
class=
'item-list'
:data-id=
'item.id'
>
<div
class=
'user'
>
<div
class=
'name'
>
{{
item
.
user
.
name
}}
</div>
<div
class=
'time'
>
{{
item
.
user
.
time
}}
</div>
<template
v-if=
'item.mine'
><div
class=
'right-txt'
@
click=
'deleteComment'
:data-cid=
'item.cid'
>
{{
$t
(
'pages.learn.discussDetail.delete'
)
}}
</div></
template
>
<div
class=
'right-txt'
@
click=
'callbackComment'
:data-sid=
'abswerData.sid'
:data-qid=
'abswerData.qid'
:data-quesid=
'abswerData.qid'
:data-to=
'item.user.name'
>
{{ $t('pages.learn.discussDetail.reply') }}
</div>
</div>
<div
class=
'text'
>
{{item.text}}
</div>
</div>
</template>
</div>
</div>
</template>
<
script
>
import
*
as
api
from
'../api/index'
export
default
{
data
()
{
return
{
abswerData
:
{}
}
},
props
:
{
dataJson
:
{
type
:
Object
,
require
:
false
}
},
mounted
()
{
},
methods
:
{
deleteComment
(
e
)
{
const
cid
=
e
.
currentTarget
.
dataset
.
cid
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
''
,
spinner
:
''
,
background
:
'rgba(255, 255, 255, 0.9)'
})
api
.
deleteComment
(
cid
).
then
(
json
=>
{
this
.
$emit
(
'updateList'
)
this
.
$message
({
type
:
'success'
,
message
:
this
.
$t
(
'pages.learn.discussDetail.deleteSuccess'
)
})
}).
catch
(
e
=>
{
this
.
$message
.
error
(
e
.
message
)
}).
finally
(()
=>
{
loading
.
close
()
})
},
callbackComment
()
{
}
},
watch
:
{
dataJson
:
function
(
newVal
,
oldVal
)
{
this
.
abswerData
=
newVal
console
.
log
(
this
.
abswerData
,
'=============='
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
client/src/modules/discuss/index.js
浏览文件 @
1c36672d
import
'./index.scss'
import
'./index.scss'
import
Discuss
from
'./src/discuss.vue'
import
Discuss
from
'./src/discuss.vue'
import
DiscussDetail
from
'./src/discussDetail.vue'
const
components
=
[
const
components
=
[
Discuss
Discuss
,
DiscussDetail
]
]
const
install
=
function
(
Vue
,
opts
=
{})
{
const
install
=
function
(
Vue
,
opts
=
{})
{
...
@@ -26,5 +28,6 @@ if (typeof window !== 'undefined' && window.Vue) {
...
@@ -26,5 +28,6 @@ if (typeof window !== 'undefined' && window.Vue) {
export
default
{
export
default
{
install
,
install
,
Discuss
Discuss
,
DiscussDetail
}
}
client/src/modules/discuss/src/discuss.vue
浏览文件 @
1c36672d
...
@@ -28,6 +28,19 @@
...
@@ -28,6 +28,19 @@
</template>
</template>
<
script
>
<
script
>
/**
* 调用:通过组件传值监听watch来请求渲染
*
params: {
path: '/my', 地址参数
request: 'getDiscussList', 请求方法
dataJson: { 参数
limit: 10,
offset: 0
}
}
*/
import
*
as
api
from
'../api/index'
import
*
as
api
from
'../api/index'
export
default
{
export
default
{
...
...
client/src/modules/discuss/src/discussDetail.vue
浏览文件 @
1c36672d
差异被折叠。
点击展开。
client/src/pages/learn/discussDetail.vue
浏览文件 @
1c36672d
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
<div>
<div>
<div
class=
"con-title"
>
{{
$t
(
'pages.learn.discussDetail.title'
)
}}
</div>
<div
class=
"con-title"
>
{{
$t
(
'pages.learn.discussDetail.title'
)
}}
</div>
<div
class=
"con-box"
>
<div
class=
"con-box"
>
<!--
<discuss-detail
:paramId=
'paramId'
></discuss-detail>
-->
<div
class=
'discuss-detail-scroll'
>
<div
class=
'discuss-detail-scroll'
>
<div
class=
'ques'
>
<div
class=
'ques'
>
<div
class=
'title'
>
{{
discussQues
.
title
}}
</div>
<div
class=
'title'
>
{{
discussQues
.
title
}}
</div>
...
@@ -13,7 +14,6 @@
...
@@ -13,7 +14,6 @@
<div
class=
'right-txt'
@
click=
'callbackComment'
:data-sid=
'discussQues.sid'
:data-qid=
'discussQues.qid'
:data-quesid=
'discussQues.qid'
>
{{ $t('pages.learn.discussDetail.reply') }}
</div>
<div
class=
'right-txt'
@
click=
'callbackComment'
:data-sid=
'discussQues.sid'
:data-qid=
'discussQues.qid'
:data-quesid=
'discussQues.qid'
>
{{ $t('pages.learn.discussDetail.reply') }}
</div>
<div
class=
'right-txt'
@
click=
'openOrcloseDis'
data-key=
'disQus'
>
{{ $t('pages.learn.discussDetail.discuss') }}({{discussQues.comCnt}})
</div>
<div
class=
'right-txt'
@
click=
'openOrcloseDis'
data-key=
'disQus'
>
{{ $t('pages.learn.discussDetail.discuss') }}({{discussQues.comCnt}})
</div>
<div
class=
'right-txt'
@
click=
'btnlike'
:data-quesid=
'discussQues.qid'
:data-sid=
'discussQues.sid'
:data-tagid=
'discussQues.tag_id'
>
<div
class=
'right-txt'
@
click=
'btnlike'
:data-quesid=
'discussQues.qid'
:data-sid=
'discussQues.sid'
:data-tagid=
'discussQues.tag_id'
>
<!-- <image class='img' src='{{discussQues.has_tag ? "./icons/like-on.png" : "./icons/like.png"}}'></image> -->
{{ $t('pages.learn.discussDetail.like') }}({{discussQues.likeCnt}})
</div>
{{ $t('pages.learn.discussDetail.like') }}({{discussQues.likeCnt}})
</div>
</div>
</div>
<
template
v-if=
'disQus.isShowComment'
>
<
template
v-if=
'disQus.isShowComment'
>
...
@@ -53,7 +53,6 @@
...
@@ -53,7 +53,6 @@
<div
class=
'right-txt'
@
click=
'callbackComment'
:data-sid=
'discussQues.sid'
:data-qid=
'discussQues.qid'
:data-ansid=
'item.aid'
>
{{ $t('pages.learn.discussDetail.reply') }}
</div>
<div
class=
'right-txt'
@
click=
'callbackComment'
:data-sid=
'discussQues.sid'
:data-qid=
'discussQues.qid'
:data-ansid=
'item.aid'
>
{{ $t('pages.learn.discussDetail.reply') }}
</div>
<div
class=
'right-txt'
@
click=
'openOrcloseDis'
:data-key=
'answers'
:data-index=
'index'
>
{{ $t('pages.learn.discussDetail.discuss') }}({{item.comCnt}})
</div>
<div
class=
'right-txt'
@
click=
'openOrcloseDis'
:data-key=
'answers'
:data-index=
'index'
>
{{ $t('pages.learn.discussDetail.discuss') }}({{item.comCnt}})
</div>
<div
class=
'right-txt'
@
click=
'btnlike'
:data-sid=
'discussQues.sid'
:data-quesid=
'discussQues.qid'
:data-ansid=
'item.aid'
:data-tagid=
'item.tag_id'
>
<div
class=
'right-txt'
@
click=
'btnlike'
:data-sid=
'discussQues.sid'
:data-quesid=
'discussQues.qid'
:data-ansid=
'item.aid'
:data-tagid=
'item.tag_id'
>
<!-- <image class='img' src='{{item.has_tag ? "./icons/like-on.png" : "./icons/like.png"}}'></image> -->
点赞({{item.likeCnt}})
</div>
点赞({{item.likeCnt}})
</div>
</div>
</div>
<
template
v-if=
'answers[index].isShowComment'
>
<
template
v-if=
'answers[index].isShowComment'
>
...
@@ -103,6 +102,7 @@ export default {
...
@@ -103,6 +102,7 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
paramId
:
{},
ckeditor
:
null
,
ckeditor
:
null
,
courseTitle
:
'课程问题'
,
courseTitle
:
'课程问题'
,
discussQues
:
{
discussQues
:
{
...
@@ -142,6 +142,13 @@ export default {
...
@@ -142,6 +142,13 @@ export default {
call: {}
call: {}
}
}
},
},
created() {
this.paramId = {
sid: this.$route.params.sid,
cid: this.$route.params.cid,
id: this.$route.params.id
}
},
mounted () {
mounted () {
this.call = { questionId: this.id, semester_id: '', contents: '', question_id: this.id, answer: true }
this.call = { questionId: this.id, semester_id: '', contents: '', question_id: this.id, answer: true }
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
)
' })
...
...
client/src/pages/mobileLive/list.vue
浏览文件 @
1c36672d
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
<
div
class
=
"live-item-content__time"
>
{{
subitem
.
start_time
}}
<
/div
>
<
div
class
=
"live-item-content__time"
>
{{
subitem
.
start_time
}}
<
/div
>
<
div
<
div
class
=
"live-item-content__status"
class
=
"live-item-content__status"
v
-
if
=
"
subitem.enable_record
"
v
-
if
=
"
!(subitem.live_status === 103 && !subitem.enable_record)
"
>
{{
calcTimeText
(
subitem
.
start_time
,
subitem
.
live_status
)
}}
<
/div
>
>
{{
calcTimeText
(
subitem
.
start_time
,
subitem
.
live_status
)
}}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -65,7 +65,7 @@ export default {
...
@@ -65,7 +65,7 @@ export default {
methods
:
{
methods
:
{
/* 退出登录 - 跳转方法 */
/* 退出登录 - 跳转方法 */
logout
()
{
logout
()
{
cAction
.
Other
s
.
outLogin
()
cAction
.
Other
.
outLogin
()
.
then
(
str
=>
{
.
then
(
str
=>
{
window
.
G
.
UserInfo
=
{
}
window
.
G
.
UserInfo
=
{
}
this
.
$router
.
push
({
path
:
'/login/index'
}
)
this
.
$router
.
push
({
path
:
'/login/index'
}
)
...
@@ -96,9 +96,10 @@ export default {
...
@@ -96,9 +96,10 @@ export default {
this
.
dataList
=
response
.
data
this
.
dataList
=
response
.
data
}
}
}
)
}
)
.
catch
(
e
=>
{
// 取消报错提醒
this
.
$message
.
error
(
e
.
message
)
// .catch(e =>
{
}
)
// this.$message.error(e.message)
//
}
)
.
finally
(()
=>
{
.
finally
(()
=>
{
if
(
this
.
loading
)
{
if
(
this
.
loading
)
{
this
.
loading
.
close
()
this
.
loading
.
close
()
...
@@ -182,6 +183,7 @@ export default {
...
@@ -182,6 +183,7 @@ export default {
openCloudLive
(
data
,
message
)
{
openCloudLive
(
data
,
message
)
{
// https://doc.bokecc.com/live/Appendix_1.html
// https://doc.bokecc.com/live/Appendix_1.html
const
liveStatus
=
data
.
live_status
const
liveStatus
=
data
.
live_status
data
.
viewer_name
=
data
.
viewer_name
||
this
.
nickName
if
(
liveStatus
===
1
)
{
if
(
liveStatus
===
1
)
{
// 进行中
// 进行中
const
url
=
`https://view.csslcloud.net/api/view/index?roomid=${data.room_id
}
&userid=${data.user_id
}
&autoLogin=true&viewername=${data.viewer_name
}
&viewertoken=${data.viewer_token
}
`
const
url
=
`https://view.csslcloud.net/api/view/index?roomid=${data.room_id
}
&userid=${data.user_id
}
&autoLogin=true&viewername=${data.viewer_name
}
&viewertoken=${data.viewer_token
}
`
...
@@ -258,7 +260,7 @@ export default {
...
@@ -258,7 +260,7 @@ export default {
this
.
timer
=
setInterval
(()
=>
{
this
.
timer
=
setInterval
(()
=>
{
this
.
getNewLiveMsg
()
this
.
getNewLiveMsg
()
this
.
getLiveList
()
this
.
getLiveList
()
}
,
3
000
)
}
,
10
000
)
}
,
}
,
beforeDestroy
()
{
beforeDestroy
()
{
this
.
timer
&&
clearInterval
(
this
.
timer
)
this
.
timer
&&
clearInterval
(
this
.
timer
)
...
@@ -292,7 +294,11 @@ body {
...
@@ -292,7 +294,11 @@ body {
padding
:
0.2
rem
0.2
rem
0.16
rem
;
padding
:
0.2
rem
0.2
rem
0.16
rem
;
}
}
.
head
.
logo
{
.
head
.
logo
{
height
:
0.3
rem
;
width
:
0.9
rem
;
/* height: 0.3rem; */
}
.
head
.
logo
:
nth
-
child
(
2
)
{
margin
-
left
:
0.1
rem
;
}
}
.
head
.
user
{
.
head
.
user
{
display
:
flex
;
display
:
flex
;
...
@@ -379,7 +385,7 @@ body {
...
@@ -379,7 +385,7 @@ body {
font
-
size
:
0.12
rem
;
font
-
size
:
0.12
rem
;
color
:
#
333
;
color
:
#
333
;
}
}
.
live
-
item
-
content__
time
{
.
live
-
item
-
content__
status
{
color
:
#
b01c3d
;
color
:
#
b01c3d
;
}
}
<
/style
>
<
/style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论