提交 a0bf552f 编写于 作者: guangjun.yang's avatar guangjun.yang

每周更新课程

上级 be2abd83
......@@ -29,7 +29,7 @@
<p class="name-title" :class="{'name-title-no': item.useFlag == 2}">{{item.name | shortName(30)}}</p>
</div>
<span
@click="gotoExamOrCourse(item)"
@click="gotoExamOrCourse(item, portalModule.contentList, index)"
class="text-action"
:class="{'text-action-no': item.useFlag == 2}"
>
......@@ -132,7 +132,7 @@ export default {
methods: {
// 跳转到考试或课程 type 1: 考试; 2: 课程
// 如果是考试,将根据appVersion判断是新考试还是老考试,如果是301或之前的,都是老考试
gotoExamOrCourse(item) {
gotoExamOrCourse(item, contentList, index) {
// 埋点:去学习、继续学习、复习、去考试、重考
// let actionCode = sendBuriedDataMap[item.status];
// if(actionCode) {
......@@ -150,13 +150,62 @@ export default {
this.gotoExam(item.id);
}
} else if (item.type == 2) {
this.gotoCourse(item.id);
this.gotoCourse(item, contentList, index);
}
},
// 如果此模块中没有考试,则直接退出;否则
beforeGotoCourse(item, contentList, index) {
let extendsParam = [];
let hasExam = false;
let currentExam = {};
// 查找当前课程后面的有没有考试
for(let i = index; i < contentList.length; i ++) {
if(contentList[i].type == 1) {
hasExam = true;
currentExam = contentList[i];
break;
}
}
// 如果后面没有考试,则直接退出
if(!hasExam) return extendsParam;
let hasNoLearningCourse = false;
// 查找本模块中是否还有没有学习完的课程,排除当前这个
for(let i = 0; i < contentList.length; i ++) {
if(i == index) continue;
if(contentList[i].type == 2 && contentList[i].status != 14) {
hasNoLearningCourse = true;
break;
}
}
// 如果还有课程没有学完,则直接退出
if(hasNoLearningCourse) return extendsParam;
let urlType = currentExam.urlType;
let jumpUrl = currentExam.url;
let jumpContent = '';
let examType = 0;
// (已经与后台约定只判断链接)如果有链接,则要加入相应参数
if(jumpUrl) {
examType = urlType;
jumpContent = jumpUrl;
} else {
examType = -1;
jumpContent = currentExam.id;
}
extendsParam.push({key: "examType", value: examType, type: 4, seqNo: 1});
extendsParam.push({key: "jumpContent", value: jumpContent, type: 4, seqNo: 1});
return extendsParam;
},
// 跳转到课程
// TODO 查看课程是否是最后一节课, 如果是,则要查找到相应的考试,并传递给原生端
gotoCourse: function(courseId) {
gotoCourse: function(item, contentList, index) {
let extendsParam = this.beforeGotoCourse(item, contentList, index);
let appVersion = getAppVersion(this.userInfo.appVersion);
// 弹框提示下载新版本可以试看
if(appVersion < 343 && !this.hasBindCard) {
......@@ -211,9 +260,10 @@ export default {
console.log(paramList);
rocNative.dispatchEventByModuleCode({
modeCode: "M200",
jsonString: paramList
jsonString: paramList.concat(extendsParam)
});
},
// 跳转到考试
gotoExam: function(examId) {
let paramList = [
......
<template>
<!-- 专项合作首页: 我参与的,其它项目 -->
<!-- 专业选择列表 -->
<div class="page-container">
<CommonNavbar
:bgColor="bgColor"
......@@ -33,6 +33,7 @@
:class="{'no-active' : subject.openFlag == 0, 'has-bind' : subject.bindCardStatus == 1}"
v-for="(subject, sIndex) in item.secondSubjectModelList"
:key="sIndex"
@click="coopDetails(subject)"
>
<span>{{subject.name}}</span>
<span>({{subject.code}})</span>
......@@ -86,8 +87,6 @@ export default {
token: "",
userMobile: "",
needShowBackup: false,
provinceId: 0,
organizationId: 0,
listData: [
{
name: "中医",
......@@ -121,7 +120,7 @@ export default {
};
},
computed: {
...mapGetters(["organizationInfo"])
...mapGetters(["userInfo"])
},
components: {
......@@ -161,19 +160,59 @@ export default {
},
methods: {
...mapActions(["setUserInfo", "setOrganizationInfo", "setJumpURLForI"]),
...mapActions(["setUserInfo"]),
// 选择职称
selectModel(model, index) {
this.crrentModelIndex = index;
this.listData = this.titleTestModelList[index].firstSubjectModelList;
this.listData =
this.titleTestModelList[index].firstSubjectModelList || [];
},
// 跳转到项目页面
coopDetails(item) {
// this.$sendBuriedData({
// component_tag: `880#8803#${item.id}#${item.name}` //'210#210002#0#'+item.projectName
// });
// 临时添加
if (window.__isWeb) {
this.$router.push({
path: "/coop",
query: {
id: item.id
}
});
return;
}
let appVersion = this.userInfo.appVersion;
let appVersionNum = appVersion.split(".").join("");
console.log("appVersionNum", appVersionNum);
if (appVersionNum < 341) {
Toast("请您下载新版本App");
return;
}
if (this.userMobile) {
let paramList = [
{
key: "pageUrl",
value: getWebPageUrl(
`profexam/#/coop?id=${item.id}`
),
type: 4,
seqNo: 1
}
];
rocNative.dispatchEventByModuleCode({
modeCode: "M300",
jsonString: paramList
});
} else {
rocNative.gotoLogin();
}
},
// //获取位置信息 测试代码 TEST
// getPositionData() {
// console.log('getPositionData');
// rocNative.getPositionData({
// __funcName: "__getPositionData"
// });
// },
//获取版本号
getUserInfo() {
......@@ -182,20 +221,6 @@ export default {
});
},
// 切换列表
changeTab(index) {
let tag = index == 1 ? "210#210001#0" : "210#210001#1";
this.tabIndex = index;
if (index == 1 && !this.userMobile) {
rocNative.gotoLogin();
this.tabIndex = 2;
}
// this.$sendBuriedData({
// component_tag: tag
// });
},
// 查询列表
getListData() {
let _this = this;
......@@ -203,7 +228,9 @@ export default {
token: _this.token,
setEntry: true
};
this.GET(`portal/titleTestApp/list`,param).then(res => {
this.showLoading = true;
this.GET(`portal/titleTestApp/list`, param).then(res => {
this.showLoading = false;
if (res.code == "000000") {
this.titleTestModelList = res.data.titleTestModelList;
this.listData = res.data.titleTestModelList[0].firstSubjectModelList;
......@@ -213,39 +240,6 @@ export default {
});
},
getCoopData() {
let _this = this;
let param = {
token: _this.token,
setEntry: true
};
_this.joinProjectList = [];
_this.otherProjectList = [];
_this.showLoading = true;
this.GET("cme/project/list", param).then(res => {
_this.showLoading = false;
if (res.code == "000000") {
// let organizationInfo = {}
_this.joinProjectList = res.data.myCMEProjectListDtoList;
_this.otherProjectList = res.data.allCMEProjectListDtoList;
_this.provinceId = res.data.provinceId;
_this.organizationId = res.data.organizationId;
// _this.oneLevelUrl = res.data.oneLevelUrl; // I类学习卡列表地址
// 不做相应判断
if (_this.userMobile) {
_this.tabIndex = 1;
} else {
_this.tabIndex = 2;
}
if (_this.joinProjectList && _this.joinProjectList.length === 0) {
_this.tabIndex = 2;
}
_this.isShow = true;
}
});
},
// 监听滚动事件
scrollFun() {
let scrollTop = window.scrollY;
......@@ -268,6 +262,7 @@ export default {
.page-content {
padding-top: px2rem(74px);
min-height: 100vh;
.body {
min-height: 90vh;
display: flex;
......@@ -386,7 +381,7 @@ export default {
}
span {
font-size: px2rem(12px);
color: #C7C8C9;
color: #c7c8c9;
}
}
}
......
......@@ -69,7 +69,10 @@
</div>
<CommonSpliteLine></CommonSpliteLine>
<div id="catalogue-content" class="catalogue-content">
<div class="catalogue-title">目录</div>
<div class="catalogue-title">
<span class="c-title">目录</span>
<span class="c-sub">每周更新课程</span>
</div>
<CellListDetail
:projectComponent="projectComponentDTOS"
:actionList="actionList"
......@@ -260,12 +263,7 @@ export default {
let _this = this;
this.from = this.$route.query.from || this.from || "native";
this.projectId = this.$route.query.id || 1;
// 此两个参数将由接口返回
// this.courseRequire = this.$route.query.courseRequire;
// this.provinceId = this.$route.query && this.$route.query.provinceId || 0;
// this.organizationId = this.$route.query && this.$route.query.organizationId || 0;
window.__getUserInfo64Comp = function(param) {
// appVersion 安卓 3.2.2 iOS
console.log("__getUserInfo64Comp", param);
......@@ -484,7 +482,7 @@ export default {
// 直接传入项目ID(projectId)
let projectId = this.project.projectId;
let pageUrl = getWebPageUrl(
`/profexam/#/index?id=${projectId}&profexamProjectId=${projectId}`
`/profexam/#/index?id=${projectId}&profexamProjectId=${projectId}&projectName=${this.project.projectName}`
);
let paramList = [
{
......@@ -932,12 +930,24 @@ export default {
z-index: 999;
}
.catalogue-content {
padding: px2rem(30px) px2rem(15px) 0;
padding: 0 px2rem(15px);
.catalogue-title {
font-size: px2rem(18px);
color: #373839;
font-weight: 700;
margin-bottom: px2rem(16px);
// display: flex;
// flex-direction: row;
// align-items: center;
// align-content: center;
margin-top: px2rem(5px);
// margin-bottom: px2rem(16px);
.c-title {
font-size: px2rem(18px);
color: #373839;
font-weight: 700;
}
.c-sub {
margin-left: px2rem(-6px);
font-size: px2rem(12px);
color: #979899;
}
}
}
.fixed-flag-height {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册