提交 751e997f authored 作者: lihuihui's avatar lihuihui

wmp问题修改

上级 56e253ac
...@@ -53,7 +53,8 @@ export default class CourseAction extends BaseACTION { ...@@ -53,7 +53,8 @@ export default class CourseAction extends BaseACTION {
status: _cur.is_enabled ? _vIn.$t('action.courseAction.publish') : _vIn.$t('action.courseAction.noPublish'), status: _cur.is_enabled ? _vIn.$t('action.courseAction.publish') : _vIn.$t('action.courseAction.noPublish'),
time: cur.begin_date.split(' ')[0] + _vIn.$t('action.courseAction.to') + cur.end_date.split(' ')[0], time: cur.begin_date.split(' ')[0] + _vIn.$t('action.courseAction.to') + cur.end_date.split(' ')[0],
myStatus: '', myStatus: '',
progress: cur.video_progress progress: cur.video_progress,
course_type: cur.course_type
}) })
} }
// callback(json) // 可以不使用callback 因为使用then // callback(json) // 可以不使用callback 因为使用then
......
...@@ -25,13 +25,12 @@ export default { ...@@ -25,13 +25,12 @@ export default {
components: {}, components: {},
data () { data () {
return { return {
name: window.G.UserInfo.student_info.personal_name || '你好', name: window.G.UserInfo.student_info.personal_name || window.G.UserInfo.nickname || '你好',
num: 0 num: 0
} }
}, },
mounted () { mounted () {
console.log(window.G.UserInfo) this.name = window.G.UserInfo.student_info.personal_name || window.G.UserInfo.nickname || '你好'
this.name = window.G.UserInfo.student_info.personal_name || '你好'
}, },
methods: { methods: {
goNotify () { goNotify () {
......
...@@ -102,7 +102,9 @@ export default { ...@@ -102,7 +102,9 @@ export default {
] ]
}], }],
homeList: [], // 从后台请求 homeList: [], // 从后台请求
param: {}, param: {
course_type: 1
},
timeInterval: null, timeInterval: null,
newLiveMsg: {} newLiveMsg: {}
} }
...@@ -138,7 +140,7 @@ export default { ...@@ -138,7 +140,7 @@ export default {
}, },
goCourseContent (e) { goCourseContent (e) {
const cid = e.currentTarget.dataset.cid const cid = e.currentTarget.dataset.cid
this.$router.push({ path: `/app/learn/course-detail/${cid}` }) this.$router.push({ path: `/app/learn/course-detail/${cid}?v=${this.homeList[0].course_type}` })
}, },
getAjaxList (bool, str) { getAjaxList (bool, str) {
cAction.Course.getCourseList(bool, this.param).then(json => { cAction.Course.getCourseList(bool, this.param).then(json => {
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
</template> </template>
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="课程讨论" name="2"> <el-tab-pane label="课程讨论" name="2" v-if="isCourseDis === '1'">
<template v-if="!isPublicShow"> <template v-if="!isPublicShow">
<div class='pub-ques'> <div class='pub-ques'>
<div class='ask'> <div class='ask'>
...@@ -106,11 +106,11 @@ ...@@ -106,11 +106,11 @@
<el-button type="text" @click='gobackDiscuss'>返回问题列表</el-button> <el-button type="text" @click='gobackDiscuss'>返回问题列表</el-button>
</div> </div>
<el-form ref="setPublishform" :model="publish" :rules="publishRules"> <el-form ref="setPublishform" :model="publish" :rules="publishRules">
<el-form-item label="学习计划" prop="title"> <el-form-item label="问题章节" prop="title">
<el-input v-model="publish.title" type="text" placeholder="请输入学习计划"></el-input> <el-input v-model="publish.title" type="text" placeholder="请输入问题章节"></el-input>
</el-form-item> </el-form-item>
<!-- v-model="publish.content" --> <!-- v-model="publish.content" -->
<div style="line-height: 1.5; font-size: 0.16rem; margin-bottom: 0.2rem;">教材提问</div> <div style="line-height: 1.5; font-size: 0.16rem; margin-bottom: 0.2rem;">问题内容</div>
<textarea id="editor"></textarea> <textarea id="editor"></textarea>
<div style="height: 0.2rem;"></div> <div style="height: 0.2rem;"></div>
<el-form-item> <el-form-item>
...@@ -228,6 +228,7 @@ export default { ...@@ -228,6 +228,7 @@ export default {
}, },
data () { data () {
return { return {
isCourseDis: this.getQueryString('v'),
domLength: 0, domLength: 0,
ckeditor: null, ckeditor: null,
activeName: '1', activeName: '1',
...@@ -782,6 +783,11 @@ export default { ...@@ -782,6 +783,11 @@ export default {
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() })
},
getQueryString (name) {
const reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i')
const r = window.location.search.substr(1).match(reg)
if (r != null) return unescape(r[2]); return null
} }
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论