提交 ef8a9652 编写于 作者: huangwensu's avatar huangwensu

详情页接口联调

上级 efe1b623
...@@ -3,29 +3,57 @@ ...@@ -3,29 +3,57 @@
<div class="basic-title">基本信息</div> <div class="basic-title">基本信息</div>
<div class="content"> <div class="content">
<span>项目名称</span> <span>项目名称</span>
<span>GWKX-20180326-42843</span> <span>{{projectNo}}</span>
</div> </div>
<div class="content"> <div class="content">
<span>学习收获</span> <span>学习收获</span>
<span>国家级Ⅰ类 3学分</span> <span>{{level}} {{credit}}学分</span>
</div> </div>
<div class="content"> <div class="content">
<span>申请范围</span> <span>申请范围</span>
<span>河北省 石家庄</span> <span>{{scope}}</span>
</div>
<div class="content remind" v-if="remind">
<span>{{remind}}</span>
</div> </div>
<div class="content"> <div class="content">
<span>起止时间</span> <span>起止时间</span>
<span>2020.03.01至2020.12.3</span> <span>{{startDate}}{{endDate}}</span>
</div> </div>
<div class="content"> <div class="content">
<span>发起机构</span> <span>发起机构</span>
<span>云鹊医</span> <span>{{organName}}</span>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
props: {
projectNo: {
default: "GWKX-20180326-42843"
},
credit: {
default: "3"
},
level: {
default: "国家级Ⅰ类"
},
scope: {
default: "河北省 石家庄"
},
startDate: {
default: "2020.03.01"
},
endDate: {
default: "2020.12.3"
},
organName: {
default: "云鹊医"
},
remind: {
default: ""
}
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -55,5 +83,27 @@ export default { ...@@ -55,5 +83,27 @@ export default {
color: #676869; color: #676869;
} }
} }
.content.remind {
span {
display: inline-block;
padding: px2rem(5px) px2rem(10px);
margin-left: px2rem(78px);
font-size: px2rem(14px);
color: #FB5B52;
background: #FCEEED;
border-radius: px2rem(4px);
}
span:after {
content: "";
position: absolute;
left: px2rem(105px);
bottom: px2rem(70px);
width: 0;
height: 0;
border-width: 0 px2rem(8px) px2rem(8px);
border-style: solid;
border-color: transparent transparent #FCEEED;
}
}
} }
</style> </style>
\ No newline at end of file
...@@ -27,14 +27,43 @@ ...@@ -27,14 +27,43 @@
</template> </template>
<script> <script>
export default { export default {
props: {
currentProgress: {
type: Number,
default: 0
}
},
data() { data() {
return { return {
step1: false, step1: false,
step2: true, step2: false,
step3: false, step3: false,
step4: false step4: false
} }
}, },
created() {
if(this.currentProgress == 1) { // 项目学习
this.step1 = true;
this.step2 = false;
this.step3 = false;
this.step4 = false;
}else if(this.currentProgress == 2) { // 申请学分
this.step1 = false;
this.step2 = true;
this.step3 = false;
this.step4 = false;
}else if(this.currentProgress == 3) { // 学分审核
this.step1 = false;
this.step2 = false;
this.step3 = true;
this.step4 = false;
}else if(this.currentProgress == 4) { // 申请成功
this.step1 = false;
this.step2 = false;
this.step3 = false;
this.step4 = true;
}
},
methods: { methods: {
// 立即申请 // 立即申请
applyFor() { applyFor() {
......
...@@ -13,16 +13,18 @@ ...@@ -13,16 +13,18 @@
</template> </template>
<script> <script>
export default { export default {
props: {
textContent: {
type: String,
default: ''
}
},
data() { data() {
return { return {
textContent: '《健康中国2030规划纲要》提出“以全科医生为重点,加强基层人才队伍建设”。基层全科医生囿于传统固有的书本型以及经验型思维模式,习惯接受临床上习惯接受临床上习惯接受临床上。',
newText: '', newText: '',
btnText: '详情', btnText: '详情',
allTextFlag: false allTextFlag: false
} }
},
created() {
}, },
mounted() { mounted() {
if(this.textContent.length > 69) { if(this.textContent.length > 69) {
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
<div class="item-leader-container"> <div class="item-leader-container">
<div class="basic-title">项目负责人</div> <div class="basic-title">项目负责人</div>
<div class="leader-info"> <div class="leader-info">
<img src="../../images/video-cover.png"/> <img :src="projectLeader.appImageUrl"/>
<div class="leader-text"> <div class="leader-text">
<span>王荣英</span> <span>{{projectLeader.name}}</span>
<span>主任医师 教授 硕士生导师</span> <span>{{projectLeader.title}}</span>
<div class="address">河北医科大学第二医院</div> <div class="address">{{projectLeader.hospital}}</div>
</div> </div>
</div> </div>
<div class="content"> <div class="content">
...@@ -21,9 +21,14 @@ ...@@ -21,9 +21,14 @@
</template> </template>
<script> <script>
export default { export default {
props: {
projectLeader: {
type: Object,
default: () => {}
}
},
data() { data() {
return { return {
textContent: '全科医疗科主任,主任医师,教授,博士学位,硕士生导师,河北省医学会全科医学分会委员。主要专业特长:常见病、多发病的诊治、预防、康复常见病、多发病的诊治、预防',
newText: '', newText: '',
btnText: '详情', btnText: '详情',
allTextFlag: false allTextFlag: false
...@@ -33,20 +38,20 @@ export default { ...@@ -33,20 +38,20 @@ export default {
}, },
mounted() { mounted() {
if(this.textContent.length > 66) { if(this.projectLeader.info.length > 66) {
this.newText = this.textContent.slice(0,66) + "..."; this.newText = this.projectLeader.info.slice(0,66) + "...";
}else { }else {
this.newText = this.textContent; this.newText = this.projectLeader.info;
} }
}, },
methods: { methods: {
allText() { allText() {
if(!this.allTextFlag) { if(!this.allTextFlag) {
this.newText = this.textContent; this.newText = this.projectLeader.info;
this.btnText = '收起'; this.btnText = '收起';
this.allTextFlag = true; this.allTextFlag = true;
}else { }else {
this.newText = this.textContent.slice(0,66) + "...";; this.newText = this.projectLeader.info.slice(0,66) + "...";;
this.btnText = '详情'; this.btnText = '详情';
this.allTextFlag = false; this.allTextFlag = false;
} }
......
...@@ -2,14 +2,18 @@ ...@@ -2,14 +2,18 @@
<div class="learn-know-container"> <div class="learn-know-container">
<div class="basic-title">学习须知</div> <div class="basic-title">学习须知</div>
<div class="content"> <div class="content">
<span>1、必须在该项目页内学完所有课程,平台其它栏目课程进度不计入本项目; </span> <span>{{mustKnow}}</span>
<span>2、该项目每一章节课程必须按顺序学完并参与考试,且首次学习不允许跳过、快进等;学习时长均需达到80%及以上,考试成绩均在80分及以上判定为通过。</span>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
props: {
mustKnow: {
type: String,
default: ''
}
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
<template> <template>
<div class="teacter-intro-container"> <div class="teacter-intro-container">
<div class="basic-title">讲师介绍</div> <div class="basic-title">讲师介绍</div>
<div class="leader-info"> <div class="leader-info" v-for="(item,index) in doctorList" :key="index">
<img src="../../images/video-cover.png"/> <img :src="item.appImageUrl"/>
<div class="leader-text"> <div class="leader-text">
<span>王荣英</span> <span>{{item.name}}</span>
<span>主任医师 教授 硕士生导师</span> <span>{{item.title}}</span>
<div class="address">河北医科大学第二医院</div> <div class="address">{{item.hospital}}</div>
</div>
</div>
<div class="leader-info">
<img src="../../images/video-cover.png"/>
<div class="leader-text">
<span>王荣英</span>
<span>主任医师 教授 硕士生导师</span>
<div class="address">河北医科大学第二医院</div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
props: {
doctorList: {
type: Array,
default: () => []
}
},
data() { data() {
return { return {
......
<template> <template>
<div> <div class="desc-container">
<div class="desc-title" v-show="isShowTitle"> <div class="desc-title">
<span>{{descTitle}}</span> <span>{{projectName}}</span>
</div> </div>
<div class="desc-detail"> <div class="desc-detail">
<span class="desc_text" v-html="message"></span> <span class="desc_text" v-if="studyNum && subject">{{studyNum}}人已学/{{subject}}</span>
<!-- <CommonSpliteLine></CommonSpliteLine> -->
<!-- <div class="split-line"></div> -->
<!-- <div class="desc_text_tp" @click="showDesc()">
<span v-show="!isShowFlag">显示全部</span>
<span v-show="isShowFlag">收起</span>
</div> -->
</div> </div>
</div> </div>
</template> </template>
...@@ -20,81 +14,62 @@ export default { ...@@ -20,81 +14,62 @@ export default {
name: "common-description", name: "common-description",
data() { data() {
return { return {
isShowFlag: false
}; };
}, },
computed: {
CommonSpliteLine
},
props: { props: {
isShowTitle: { projectName: {
type: Boolean,
default: true
},
descTitle: {
type: String, type: String,
default: "" default: "全科医学诊疗思维与实务项目"
}, },
value: { studyNum: {
type: Number,
default: 28000
},
subject: {
type: String, type: String,
default: "" default: "全科医学"
} }
}, },
created() {}, created() {},
mounted() {}, mounted() {
computed: { if(this.studyNum > 1000 && this.studyNum < 10000) {
message: function() { this.studyNum = this.studyNum / 1000 + 'k';
// return this.isShowFlag }else if(this.studyNum > 10000) {
// ? '<span style="color: red;">简介</span>' + this.value this.studyNum = this.studyNum / 10000 + 'w';
// : '<span style="color: red;">简介</span>' +
// this.value.slice(0, 34) +
// "...";
let shortMsg = this.value || "";
if (shortMsg.length > 63) {
shortMsg = this.value.slice(0, 63) + "...";
}
return this.isShowFlag ? this.value : shortMsg;
} }
}, },
methods: { methods: {
showDesc() {
this.isShowFlag = !this.isShowFlag;
}
} }
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "../../style/mixin"; @import "../../style/mixin";
.desc-title { .desc-container {
padding: px2rem(20px) px2rem(15px);
.desc-title {
display: flex; display: flex;
padding: px2rem(15px);
padding-bottom: 0px; padding-bottom: 0px;
line-height: px2rem(22px); line-height: px2rem(22px);
font-weight: 700; font-weight: 700;
color: rgba(51, 51, 51, 1);
span { span {
font-family: "PingFangSC-Medium", "PingFangSC", "Microsoft Yahei"; font-family: "PingFangSC-Medium", "PingFangSC", "Microsoft Yahei";
font-size: px2rem(18px); font-size: px2rem(18px);
font-weight: 700; font-weight: 700;
color: #333333;
} }
} }
.desc-detail { .desc-detail {
display: flex; display: flex;
position: relative; position: relative;
word-break: normal; word-break: normal;
margin-bottom: px2rem(40px); // margin-bottom: px2rem(40px);
// height: px2rem(60px); // height: px2rem(60px);
} .desc_text {
.display-none {
position: fixed;
top: 0;
visibility: hidden;
}
.desc_text {
padding: px2rem(15px);
padding-top: px2rem(6px); padding-top: px2rem(6px);
font-size: px2rem(14px); font-size: px2rem(13px);
color: #999999; color: #676869;
line-height: px2rem(25px); line-height: px2rem(25px);
letter-spacing: 1px; letter-spacing: 1px;
word-wrap: break-word; word-wrap: break-word;
...@@ -103,26 +78,9 @@ export default { ...@@ -103,26 +78,9 @@ export default {
text-align: justify; text-align: justify;
flex-direction: row; flex-direction: row;
flex-wrap: wrap; flex-wrap: wrap;
}
}
} }
.desc_text_tp {
position: absolute;
left: 0;
bottom: px2rem(-30px);
// left: 50%;
// transform: translateX(px2rem(-32px));
width: 100%;
text-align: center;
font-size: px2rem(16px);
font-weight: 700;
color: #cccccc;
// border-top: 1px solid #f1f1f1;
}
.split-line {
display: flex;
width: 92%;
position: absolute;
left: 4%;
bottom: px2rem(0px);
border-bottom: 0.5px solid #f1f1f1;
}
</style> </style>
...@@ -16,15 +16,19 @@ ...@@ -16,15 +16,19 @@
<!-- banner图片 --> <!-- banner图片 -->
<div v-if="bannerType == 1" class="page-content-img-container"> <div v-if="bannerType == 1" class="page-content-img-container">
<img class="banner-img" :src="attachmentUrl"> <img class="banner-img" :src="attachmentUrl">
<img v-show="pStatus == 1" class="banner-img-1" src="../images/status-join.png"> <img v-show="project.status == 1" class="banner-img-1" src="../images/status-join.png">
<img v-show="pStatus == 5" class="banner-img-5" src="../images/status-keep-on.png"> <img v-show="project.status == 5" class="banner-img-5" src="../images/status-keep-on.png">
<img v-show="pStatus == 10" class="banner-img-10" src="../images/status-end.png"> <img v-show="project.status == 10" class="banner-img-10" src="../images/status-end.png">
</div> </div>
<!-- banner视频 -->
<CommonTcPlayer v-if="bannerType == 2" style="flex" :options="videoOptions"></CommonTcPlayer> <CommonTcPlayer v-if="bannerType == 2" style="flex" :options="videoOptions"></CommonTcPlayer>
<!-- 项目标题 --> <!-- 项目标题 -->
<CommonDescription :descTitle="projectName" :value="projectIntro"></CommonDescription> <CommonDescription
:projectName="project.projectName"
:studyNum="project.studyNum"
:subject="project.subject"/>
<!-- 步骤条 --> <!-- 步骤条 -->
<CmeStep></CmeStep> <CmeStep :currentProgress="project.currentProgress"></CmeStep>
<!-- 简介和目录 --> <!-- 简介和目录 -->
<div class="intro-catalogue-container"> <div class="intro-catalogue-container">
<div id="content-title" class="title" :class="{'fixed-title': fixedFlag}"> <div id="content-title" class="title" :class="{'fixed-title': fixedFlag}">
...@@ -32,18 +36,25 @@ ...@@ -32,18 +36,25 @@
<span :class="{'focus': !tabFlag}" @click="jumpCatalogue">目录</span> <span :class="{'focus': !tabFlag}" @click="jumpCatalogue">目录</span>
</div> </div>
<div id="intro-content" class="intro-content"> <div id="intro-content" class="intro-content">
<BasicInfo></BasicInfo> <BasicInfo
<LearnKnow></LearnKnow> :projectNo="project.projectNo"
:credit="project.credit"
:level="project.level"
:scope="project.scope"
:startDate="project.startDate"
:endDate="project.endDate"
:organName="project.organName"
:remind="project.remind"/>
<LearnKnow :mustKnow="project.mustKnow"></LearnKnow>
<CommonSpliteLine></CommonSpliteLine> <CommonSpliteLine></CommonSpliteLine>
<ItemIntro></ItemIntro> <ItemIntro :textContent="project.projectIntro"></ItemIntro>
<ItemLeader></ItemLeader> <ItemLeader :projectLeader="projectLeader"></ItemLeader>
<TeacterIntro></TeacterIntro> <TeacterIntro :doctorList="doctorList"></TeacterIntro>
</div> </div>
<CommonSpliteLine></CommonSpliteLine> <CommonSpliteLine></CommonSpliteLine>
<div id="catalogue-content" class="catalogue-content"> <div id="catalogue-content" class="catalogue-content">
<div class="catalogue-title">目录</div> <div class="catalogue-title">目录</div>
<CellListDetail <CellListDetail
v-if="visibleFlag == 1"
:projectComponent="projectComponentDTOS" :projectComponent="projectComponentDTOS"
:paramData="contentList" :paramData="contentList"
:moduleName="moduleName" :moduleName="moduleName"
...@@ -52,9 +63,6 @@ ...@@ -52,9 +63,6 @@
:courseRequire="courseRequire"/> :courseRequire="courseRequire"/>
</div> </div>
</div> </div>
<!-- <CertShow v-if="projectStatus === 2"></CertShow> -->
<!-- <NoPermContent v-if="visibleFlag == 2"></NoPermContent> -->
</div> </div>
<Loading v-show="showLoading"/> <Loading v-show="showLoading"/>
...@@ -86,17 +94,37 @@ import vueFilters from '@/utils/filter'; ...@@ -86,17 +94,37 @@ import vueFilters from '@/utils/filter';
export default { export default {
data() { data() {
return { return {
tabFlag: true, tabFlag: true, // 显示目录还是简介
fixedFlag: false, fixedFlag: false, // 目录和简介是否固定
project: {
credit: "", // 学分
level: "", // 项目等级
scope: "", // 申请范围
remind: "", // 在不在范围提醒
startDate: "", // 开始时间
endDate: "", // 结束时间
organName: "", // 发起机构
projectName: "", // 项目名称
projectNo: "", // 项目编号
currentProgress: 0, // 项目进度
projectIntro: "", // 项目介绍
mustKnow: '', // 学习须知
studyNum: 0, // 学习人数
studyProgress: 0, // 学习进度
subject: "", // 学科
status: 0, // 项目状态 1是参加中 5是进行中 10是已结束
},
projectLeader: {},
doctorList: [],
from: "inner", from: "inner",
isBlack: false, isBlack: false,
showLoading: false, showLoading: false,
projectId: 1, projectId: 1,
componentId: 1, //componentId: 1,
moduleId: 1, //moduleId: 1,
contentList: [], contentList: [],
moduleName: "", moduleName: "",
bannerType: 1, bannerType: 1, // 1 图片 2视频
videoOptions: { videoOptions: {
mp4: "", mp4: "",
// mp4: "https://pica-pro.oss-cn-shanghai.aliyuncs.com/2019/03/05/movie.mp4", // mp4: "https://pica-pro.oss-cn-shanghai.aliyuncs.com/2019/03/05/movie.mp4",
...@@ -108,10 +136,7 @@ export default { ...@@ -108,10 +136,7 @@ export default {
width: "415", //视频的显示宽度,请尽量使用视频分辨率宽度 width: "415", //视频的显示宽度,请尽量使用视频分辨率宽度
height: "210" //视频的显示高度,请尽量使用视频分辨率高度 height: "210" //视频的显示高度,请尽量使用视频分辨率高度
}, },
projectStatus: 1, //1没有获得证书 2是获得全部证书 //projectStatus: 1, //1没有获得证书 2是获得全部证书
pStatus: 0, // 项目状态 1是参加中 5是进行中 10是已结束
projectIntro: "",
projectName: "",
attachmentUrl: require("../images/banner-default.png"), attachmentUrl: require("../images/banner-default.png"),
bgColor: "none", bgColor: "none",
navTitle: "项目详情", navTitle: "项目详情",
...@@ -119,11 +144,9 @@ export default { ...@@ -119,11 +144,9 @@ export default {
isShowNavbar: true, isShowNavbar: true,
isFixNavbar: true, isFixNavbar: true,
pointStyle: "activity", pointStyle: "activity",
descTitle: "规定从何处开始选取。如果是负数",
projectComponentDTOS: [], projectComponentDTOS: [],
actionList: [], actionList: [],
detailNum: 0, detailNum: 0,
visibleFlag: 0,
courseRequire: 0, courseRequire: 0,
clientType: 0 clientType: 0
}; };
...@@ -154,7 +177,7 @@ export default { ...@@ -154,7 +177,7 @@ export default {
let _this = this; let _this = this;
this.from = this.$route.query.from || this.from || "native"; this.from = this.$route.query.from || this.from || "native";
this.projectId = this.$route.query.id; this.projectId = this.$route.query.id;
this.componentId = this.$route.query.componentId; //this.componentId = this.$route.query.componentId;
this.moduleId = this.$route.query.moduleId; this.moduleId = this.$route.query.moduleId;
this.moduleName = this.$route.query.moduleName; this.moduleName = this.$route.query.moduleName;
this.courseRequire = this.$route.query.courseRequire; this.courseRequire = this.$route.query.courseRequire;
...@@ -195,6 +218,28 @@ export default { ...@@ -195,6 +218,28 @@ export default {
__funcName: "__getUserInfo64Comp" __funcName: "__getUserInfo64Comp"
}); });
}, },
scrollFun() {
let scrollTop = document.body.scrollTop || document.documentElement.scrollTop;
const catalogue = document.getElementById('catalogue-content');
const h = catalogue.offsetTop - 600;
if (scrollTop > 20) {
this.isBlack = true;
this.bgColor = "#fff";
} else {
this.isBlack = false;
this.bgColor = "none";
}
if(scrollTop > 300) {
this.fixedFlag = true;
}else {
this.fixedFlag = false;
}
if(scrollTop > h) {
this.tabFlag = false;
}else {
this.tabFlag = true;
}
},
// 锚点到简介 // 锚点到简介
jumpIntro() { jumpIntro() {
this.tabFlag = true; this.tabFlag = true;
...@@ -216,32 +261,30 @@ export default { ...@@ -216,32 +261,30 @@ export default {
this.isBlack = true; this.isBlack = true;
this.bgColor = "#fff"; this.bgColor = "#fff";
}, },
// 获取单个模块信息 // token是否失效校验
getComponentInfoById(componentId) { checkToken() {
let _this = this; let _this = this;
let param = { let param = {
componentId: componentId,
token: _this.userInfo.userToken, token: _this.userInfo.userToken,
setEntry: true setEntry: true,
}; };
this.GET("portal/portalApp/component", param).then(res => { this.GET("campaign/admin/task/checkToken", param).then(res => {
if (res.code == "000000") { if(res.code !== '000000') {
_this.attachmentUrl = res.data.imageUrl; //未登录 跳转登录页
_this.projectIntro = res.data.introduce; console.log('跳登录');
_this.projectName = res.data.name; rocNative.gotoLogin();
} }
}); });
}, },
// 获取项目详情
// 获取单个项目信息 getProjectParticularsV2() {
getCoopInfo(projectId) {
let _this = this; let _this = this;
let param = { let param = {
portalProjectId: projectId, token: _this.userInfo.userToken || 'AAA613F74B7A4746AEE8354458FF4896',
token: _this.userInfo.userToken,
setEntry: true setEntry: true
}; };
this.GET("portal/portalApp/queryProjectParticulars", param).then(res => { // _this.showLoading = true;
this.NEW_GET(`cme/project/${_this.projectId}/info`, param).then(res => {
if (res.code == "000000") { if (res.code == "000000") {
// 先设置视频URL再显示视频组件 ------------ BEGIN // 先设置视频URL再显示视频组件 ------------ BEGIN
if (res.data.attachmentType == 2) { if (res.data.attachmentType == 2) {
...@@ -255,60 +298,16 @@ export default { ...@@ -255,60 +298,16 @@ export default {
} }
// 先设置视频URL再显示视频组件 ------------ END // 先设置视频URL再显示视频组件 ------------ END
_this.projectIntro = res.data.projectIntro; _this.project = res.data;
_this.projectName = res.data.projectName; _this.projectLeader = res.data.projectLeader;
_this.pStatus = res.data.status; _this.doctorList = res.data.doctorList;
}
}); //_this.projectStatus = res.data.projectStatus;
}, _this.projectComponentDTOS = _this.setListData(res.data.projectComponentDTOS);
setContent(data) {
let list = data;
for(let i=0;i<list.length;i++) {
let len = vueFilters.strLength(list[i].name);
let certificate = list[i].certificateFlag;
if(len > 30 && certificate == 2) {
list[i].height = "2";
} else if (len > 30 && certificate != 2) {
list[i].height = 2;
} else if (len <= 30 && certificate == 2) {
list[i].height = "1";
} else if(len <= 30 && certificate != 2) {
list[i].height = 1;
}
}
console.log('contentList!',list);
return list;
},
// 获取内容列表
getContentList(moduleId) {
let _this = this;
let param = {
moduleId: _this.moduleId,
token: _this.userInfo.userToken,
setEntry: true,
projectId: _this.projectId,
};
_this.showLoading = true;
this.GET("portal/portalApp/contentList", param).then(res => {
// _this.showLoading = false;
if (res.code == "000000") {
_this.contentList = _this.setContent(res.data.contentList);
} }
//_this.showLoading = false;
}); });
}, },
getHight(data) {
let len = vueFilters.strLength(data.name);
let certificate = data.certificateFlag;
if(len > 30 && certificate == 2) {
return "2";
} else if (len > 30 && certificate != 2) {
return 2;
} else if (len <= 30 && certificate == 2) {
return "1";
} else if(len <= 30 && certificate != 2) {
return 1;
}
},
setListData(data) { setListData(data) {
let _this = this; let _this = this;
let list = data; let list = data;
...@@ -339,75 +338,100 @@ export default { ...@@ -339,75 +338,100 @@ export default {
// list[0].portalModuleDTOS[3].contentList[1].certificateFlag = 2; // list[0].portalModuleDTOS[3].contentList[1].certificateFlag = 2;
return list; return list;
}, },
checkToken() { getHight(data) {
let _this = this; let len = vueFilters.strLength(data.name);
let param = { let certificate = data.certificateFlag;
token: _this.userInfo.userToken, if(len > 30 && certificate == 2) {
setEntry: true, return "2";
}; } else if (len > 30 && certificate != 2) {
this.GET("campaign/admin/task/checkToken", param).then(res => { return 2;
if(res.code !== '000000') { } else if (len <= 30 && certificate == 2) {
//未登录 跳转登录页 return "1";
console.log('跳登录'); } else if(len <= 30 && certificate != 2) {
rocNative.gotoLogin(); return 1;
} }
});
}, },
getProjectParticularsV2() { // 获取单个模块信息
let _this = this; // getComponentInfoById(componentId) {
let param = { // let _this = this;
token: _this.userInfo.userToken || 'AAA613F74B7A4746AEE8354458FF4896', // let param = {
setEntry: true, // componentId: componentId,
portalProjectId: _this.projectId || 164, // token: _this.userInfo.userToken,
}; // setEntry: true
_this.showLoading = true; // };
this.NEW_GET("portal/portalApp/queryProjectParticularsV2", param).then(res => { // this.GET("portal/portalApp/component", param).then(res => {
// _this.showLoading = false; // if (res.code == "000000") {
if (res.code == "000000") { // _this.attachmentUrl = res.data.imageUrl;
_this.visibleFlag = res.data.learnableFlag; // _this.projectIntro = res.data.introduce;
// 先设置视频URL再显示视频组件 ------------ BEGIN // _this.projectName = res.data.name;
if (res.data.attachmentType == 2) { // }
_this.videoOptions.mp4 = res.data.attachmentUrl; // });
} else { // },
_this.attachmentUrl = res.data.attachmentUrl;
} // 获取单个项目信息
_this.bannerType = res.data.attachmentType; // getCoopInfo(projectId) {
if(_this.bannerType == 2) { // let _this = this;
_this.clientType = __isWeb ? 1 : __isAndroid ? 2 : 3; // let param = {
} // portalProjectId: projectId,
// 先设置视频URL再显示视频组件 ------------ END // token: _this.userInfo.userToken,
// setEntry: true
// };
// this.GET("portal/portalApp/queryProjectParticulars", param).then(res => {
// if (res.code == "000000") {
// // 先设置视频URL再显示视频组件 ------------ BEGIN
// if (res.data.attachmentType == 2) {
// _this.videoOptions.mp4 = res.data.attachmentUrl;
// } else {
// _this.attachmentUrl = res.data.attachmentUrl;
// }
// _this.bannerType = res.data.attachmentType;
// if(_this.bannerType == 2) {
// _this.clientType = __isWeb ? 1 : __isAndroid ? 2 : 3;
// }
// // 先设置视频URL再显示视频组件 ------------ END
// _this.projectIntro = res.data.projectIntro;
// _this.projectName = res.data.projectName;
// _this.pStatus = res.data.status;
// }
// });
// },
// setContent(data) {
// let list = data;
// for(let i=0;i<list.length;i++) {
// let len = vueFilters.strLength(list[i].name);
// let certificate = list[i].certificateFlag;
// if(len > 30 && certificate == 2) {
// list[i].height = "2";
// } else if (len > 30 && certificate != 2) {
// list[i].height = 2;
// } else if (len <= 30 && certificate == 2) {
// list[i].height = "1";
// } else if(len <= 30 && certificate != 2) {
// list[i].height = 1;
// }
// }
// console.log('contentList!',list);
// return list;
// },
// 获取内容列表
// getContentList(moduleId) {
// let _this = this;
// let param = {
// moduleId: _this.moduleId,
// token: _this.userInfo.userToken,
// setEntry: true,
// projectId: _this.projectId,
// };
// _this.showLoading = true;
// this.GET("portal/portalApp/contentList", param).then(res => {
// // _this.showLoading = false;
// if (res.code == "000000") {
// _this.contentList = _this.setContent(res.data.contentList);
// }
// });
// },
_this.projectIntro = res.data.projectIntro;
_this.projectName = res.data.projectName;
_this.pStatus = res.data.status;
_this.projectStatus = res.data.projectStatus;
_this.projectComponentDTOS = _this.setListData(res.data.projectComponentDTOS);
}
_this.showLoading = false;
});
},
scrollFun() {
let scrollTop = document.body.scrollTop || document.documentElement.scrollTop;
const catalogue = document.getElementById('catalogue-content');
const h = catalogue.offsetTop - 600;
if (scrollTop > 20) {
this.isBlack = true;
this.bgColor = "#fff";
} else {
this.isBlack = false;
this.bgColor = "none";
}
if(scrollTop > 300) {
this.fixedFlag = true;
}else {
this.fixedFlag = false;
}
if(scrollTop > h) {
this.tabFlag = false;
}else {
this.tabFlag = true;
}
},
} }
}; };
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册