对接修改

This commit is contained in:
daihh
2023-02-28 18:00:24 +08:00
parent 306b18115c
commit 76b9f1d137
5 changed files with 284 additions and 220 deletions

View File

@@ -32,8 +32,9 @@
<span v-if="item.cmtask_status==0">未开始</span>
<span v-if="item.cmtask_status==1">进行中</span>
<span v-if="item.cmtask_status==2">已完成</span>
</div>
<div class="uc-course-time">推送时间{{ formatsec(Number(item.updated_at) * 1000 )}}</div>
</div>
<!-- <div class="uc-course-time">推送时间{{ formatsec(Number(item.updated_at) * 1000 )}}</div> -->
<div class="uc-course-time">推送时间{{ item.created_at}}</div>
</div>
<div class="uc-course-btns">
<el-button @click="jumpRouter(item)" type="primary" size="small">开始学习</el-button>
@@ -68,9 +69,10 @@
<script>
import studyItem from '@/components/Course/studyItem.vue';
import apiBoeCourse from '@/api/boe/course.js';
import apiManage from '@/api/manage/manage.js'
import {formatsec} from '@/utils/datetime.js'
export default {
name: 'ucStudyCourses',
name: 'ucStudyTask',
components: { studyItem },
data() {
return {
@@ -122,6 +124,13 @@ export default {
jumpRouter(item) {
//window.open(`${this.webBaseUrl}/course/boeframe?id=${item.cmtask_id}`,'_self' )
location.href=`${this.webBaseUrl}/course/boeframe?id=${item.cmtask_id}`;
if(item.cmtask_type==1){ //学习路径图
//let params=encodeURIComponent('projectId='+courseId);
//this.$router.push('/forward?to='+studentPath+'/projectdetails&params='+params);
location.href='https://u-pre.boe.com/student-h5/projectdetails?projectId='+item.id
}else if(item.cmtask_type==2){ //学习项目
location.href='https://u-pre.boe.com/student-h5/projectdetails?projectId='+item.id
}
},
loadBoeData() {
@@ -129,25 +138,35 @@ export default {
this.params.cmtask_status = this.status;
}
let params={
// keyword:this.keyword,
page:this.page,
size:this.size,
pageNo:this.page,
pageSize:this.size,
cmtask_status:this.params.cmtask_status,
cmtask_name:this.params.cmtask_name,
}
this.loading=true;
apiBoeCourse.cmtaskList(params).then(res=>{
if(res.status==200){
this.total = res.result.count
this.couresList = res.result.list;
}else{
this.$message.error('查询数据失败:'+res.message);
}
this.loading=false;
apiManage.userTaskList(params).then(res=>{
if(res.code==200){
this.total = 10;
this.couresList = res.data;
}else{
this.$message.error('查询数据失败:'+res.msg);
}
this.loading=false;
}).catch(()=>{
this.loading=false;
})
// apiBoeCourse.cmtaskList(params).then(res=>{
// if(res.status==200){
// this.total = res.result.count
// this.couresList = res.result.list;
// }else{
// this.$message.error('查询数据失败:'+res.message);
// }
// this.loading=false;
}).catch(()=>{
this.loading=false;
})
// }).catch(()=>{
// this.loading=false;
// })
},
search(){
this.loadBoeData()