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

二期需求等

上级 f77020d9
<template>
<section class="I-card-item-wrapper">
<article class="item">
<img class="left-icon" src="../../images/cme/phrase2/I-img.png" alt />
<article class="center">
<span class="top">国家级继续教育I类学分项目</span>
<span class="bottom">上百个项目持续更新上线</span>
</article>
<img class="right-icon" src="../../images/cme/phrase2/arr-right.png" alt />
</article>
</section>
</template>
<script>
export default {
data() {
return {};
},
methods: {}
};
</script>
<style lang="scss" scoped>
@import "../../style/mixin";
.I-card-item-wrapper {
// width: 100%;
margin: 0 px2rem(15px);
.item {
// width: 100%;
display: flex;
height: px2rem(72px);
flex-direction: row;
align-content: space-between;
align-items: center;
// box-sizing: border-box;
padding: 0 px2rem(15px);
background: #F8F9FA;
border-radius: px2rem(6px);
.left-icon {
width: px2rem(40px);
height: px2rem(40px);
margin-right: px2rem(15px);
}
.center {
position: relative;
top: -4px;
left: 0;
display: flex;
flex-direction: column;
flex: 1;
height: px2rem(40px);
align-content: flex-start;
text-align: left;
.top {
height: px2rem(26px);
line-height: px2rem(26px);
font-size: px2rem(16px);
font-weight: 700;
color: rgba(55, 56, 57, 1);
}
.bottom {
font-size: px2rem(14px);
font-weight: 400;
color: rgba(151, 152, 153, 1);
}
}
.right-icon {
width: px2rem(15px);
height: px2rem(15px);
}
}
}
</style>
\ No newline at end of file
<template>
<section class="card-banner-wrapper">
<article class="left">
<img src="../../images/cme/phrase2/what.png" alt />
<span>学习项目必须使用学习卡哦~</span>
</article>
<span class="right">购买学习卡</span>
</section>
</template>
<script>
export default {
data() {
return {};
},
methods: {}
};
</script>
<style lang="scss" scoped>
@import "../../style/mixin";
.card-banner-wrapper {
width: 100%;
height: px2rem(40px);
display: flex;
flex-direction: row;
padding: 0 px2rem(15px);
justify-content: space-between;
align-items: center;
background: #FEFAF5;
.left {
display: flex;
height: px2rem(40px);
flex-direction: row;
align-items: center;
img {
width: px2rem(13px);
height: px2rem(13px);
margin-right: px2rem(4px);
}
span {
font-size: px2rem(13px);
color: #e6a23c;
}
}
.right {
height: px2rem(25px);
line-height: px2rem(25px);
font-size: px2rem(12px);
padding: 0 px2rem(10px);
background: rgba(230, 162, 60, 1);
border-radius: px2rem(25px);
border: px2rem(1px) solid rgba(230, 162, 60, 1);
color: #FFFFFF;
}
}
</style>
\ No newline at end of file
<template>
<section class="card-popup-wrapper">
<van-popup
v-model="showGoUpdate"
position="center"
>
<article class="content">
<p class="title">学分项目必须使用学习卡</p>
<p class="title">请先购买学习卡</p>
<section class="card-info">
<img class="icon" src="../../images/cme/phrase2/I-card-icon.png" alt />
<div class="info">
<span>Ⅰ类学分继续医学教育10分学习卡</span>
<p>
<span>¥60</span><span>原价¥80</span>
</p>
</div>
</section>
<div class="line"></div>
<div class="btn">
<span class="left" @click="cancle">已购买去学习</span>
<span class="vert-line"></span>
<span class="right" @click="conform">去购买</span>
</div>
<!-- <p class="update-btn v-hairline-top confirm-btn" @click="cancle">确定</p>
<p class="update-btn v-hairline-top" @click="conform">取消</p> -->
</article>
</van-popup>
</section>
</template>
<script>
import { Popup } from "vant";
export default {
data() {
return {
}
},
props: {
showGoUpdate: {
type: Boolean,
default: false,
}
},
methods: {
cancle() {
},
conform() {
}
},
}
</script>
<style lang="scss" scoped>
@import "../../style/mixin";
.card-popup-wrapper {
.content {
font-size: px2rem(14px);
width: px2rem(300px);
// height: px2rem(245px);
padding-top: px2rem(30px);
.title {
text-align: center;
font-size: px2rem(18px);
font-weight: 700;
}
.card-info {
display: flex;
flex-direction: row;
align-items: center;
height: px2rem(76px);
margin: px2rem(15px);
padding: 0 px2rem(8px);
background: #F8F9FA;
border-radius: px2rem(6px);
font-size: px2rem(14px);
.icon {
width: px2rem(60px);
height: px2rem(60px);
margin-right: px2rem(8px);
}
}
.line {
margin-top: px2rem(30px);
height: px2rem(1px);
background: #F0F1F2;
}
.btn {
width: 100%;
display: flex;
flex-direction: row;
// justify-content: space-between;
align-items: center;
height: px2rem(50px);
// margin-top: px2rem(15px);
font-size: px2rem(17px);
.left {
flex: 1;
text-align: center;
color: #979899;
// border-right: 1px solid #F0F1F2;
}
.vert-line {
width: px2rem(1px);
height: 100%;
background: #F0F1F2;
}
.right {
flex: 1;
text-align: center;
color: #449284;
}
}
}
.van-popup.van-popup--center {
border-radius: px2rem(4px);
}
}
</style>
<template>
<!-- 专项合作首页: 我参与的,其它项目 -->
<div class="page-container">
<CommonNavbar
:bgColor="bgColor"
v-show="isShowNavbar"
:title="navTitle"
:isFixNavbar="isFixNavbar"
:burialPoint="pointStyle"
borderStyle="1px solid #fff"
></CommonNavbar>
<section class="page-content">
<!-- <button @click="jumpToExamAction" style="margin: 20px;font-size:20px;text-align:center;padding:10px;border-radius:10px;">测试按钮1</button>
<button @click="jumpToExamAction2" style="margin: 20px;font-size:20px;text-align:center;padding:10px;border-radius:10px;">测试按钮2</button> -->
<!-- {{token}} -->
<table class="page-content-table">
<tr>
<td @click="changeTab(1)" :class="{'active': tabIndex === 1}">
<div class="tap-title">
<span :style="{'color': tabIndex === 1 ? '#333' : '#999'}">我的项目</span>
<span></span>
</div>
</td>
<td @click="changeTab(2)" :class="{'active': tabIndex === 2}">
<div class="tap-title">
<!-- <span>其它项目</span> -->
<span :style="{'color': tabIndex === 2 ? '#333' : '#999'}">全部项目</span>
<span></span>
</div>
</td>
</tr>
</table>
<article class="page-content-list">
<section v-if="tabIndex === 1">
<CoopListItem
:paramData="joinProjectList"
:coopType="1"
:tabTo="1"
:isShow="isShow"
:userMobile="userMobile"></CoopListItem>
</section>
<section v-if="tabIndex === 2">
<CoopListItem
:paramData="otherProjectList"
:coopType="1"
:tabTo="2"
:isShow="isShow"
:userMobile="userMobile"></CoopListItem>
</section>
</article>
</section>
<Toast ref="toastTitle"></Toast>
<Loading v-if="showLoading"/>
<!-- <div>
<iframe src="https://www.baidu.com" id="mobsf" frameborder="0" style="width:100%;height:500px;"></iframe>
</div>-->
<!-- <discuss-topic-stencil /> -->
</div>
</template>
<script>
import CommonNavbar from "@/components/common/common-navbar";
import CoopListItem from "@/components/business/coop-list-item";
import Loading from "@/components/common/common-loading";
import Toast from "@/components/common/common-toast";
import { mapGetters, mapActions } from "vuex";
export default {
data() {
return {
showLoading: false,
bgColor: "#fff",
isShow: false,
navTitle: "CME项目",
compTitle: "组件名称",
isShowNavbar: true,
isFixNavbar: false,
pointStyle: "activity",
descTitle: "规定从何处开始选取。如果是负数",
tabIndex: 1,
joinProjectList: [], // 我的项目
otherProjectList: [], // 全部项目
token: "",
toastTitle: "",
userMobile: ""
};
},
computed: {
...mapGetters(["projectTabIndex"])
},
components: {
// DiscussTopicStencil,
CommonNavbar,
CoopListItem,
Loading,
Toast,
},
created() {
var _this = this;
window.__getUserInfo = function(param) {
_this.setUserInfo(param);
_this.token = param.userToken;
_this.userMobile = param.userMobile;
_this.getCoopData();
};
_this.getUserInfo();
if (__isWeb) {
_this.getCoopData();
}
window.__refresh = function() {
//_this.tabIndex = _this.projectTabIndex;
_this.getUserInfo();
// document.documentElement.scrollTop = 0;
// document.body.scrollTop = 0;
};
// 打开页面埋点
this.$sendBuriedData({
component_tag: '210#0#0#0'
});
},
mounted() {
var _this = this;
this.tabIndex = this.projectTabIndex;
// let param = {
// id: 12 };
// this.API_GET("app/certificate/downLoad", param).then(res => {
// });
document.documentElement.scrollTop = 0;
document.body.scrollTop = 0;
},
methods: {
// 跳转到第三方考试页面
//
jumpToExamAction() {
let paramList = [
{
key: "pageUrl",
value: 'http://cmeonline.cma-cmc.com.cn/cms/weixinCourseDetail.htm?courseId=a245b2060ac0495cae440de859321b91&openCourseId=2d9b152a85dc4833892aeaa713362b9f',
type: 4,
seqNo: 1
},
// 此字段不配置,则用原来的逻辑
{
key: "needCache",
value: '1', // 0不缓存,其它值都做缓存
type: 4,
seqNo: 1
}
];
rocNative.dispatchEventByModuleCode({
modeCode: "M300",
jsonString: paramList
});
},
jumpToExamAction2() {
let paramList = [
{
key: "pageUrl",
value: 'http://cmeonline.cma-cmc.com.cn/cms/weixinCourseDetail.htm?courseId=0aeee9f7712b4543ab8eadb0571a78a7&openCourseId=e9e124392d3f4e2494d46e8f990b085e',
type: 4,
seqNo: 1
},
// 此字段不配置,则用原来的逻辑
{
key: "needCache",
value: '1', // 0不缓存,其它值都做缓存
type: 4,
seqNo: 1
}
];
rocNative.dispatchEventByModuleCode({
modeCode: "M300",
jsonString: paramList
});
},
...mapActions(["setUserInfo"]),
//获取版本号
getUserInfo() {
rocNative.getUserInfo({
__funcName: "__getUserInfo"
});
},
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
});
},
// 获取所有项目:我的项目、其它项目
getCoopData() {
// debugger
let _this = this;
let param = {
token: _this.token,
setEntry: true
};
let cachedJoinProjectList = []
let cachedOtherProjectList = []
_this.otherProjectList = []
_this.showLoading = true;
this.GET("cme/project/list", param).then(
res => {
_this.showLoading = false;
if (res.code == "000000") {
// let oldProjects1 = [];
// let oldProjects2 = [];
// for(let i = 0; i < res.data.oldProjects.length; i++) {
// if(res.data.oldProjects[i].roleFlag == 1) {
// oldProjects1.push(res.data.oldProjects[i]);
// } else if (res.data.oldProjects[i].roleFlag == 0) {
// oldProjects2.push(res.data.oldProjects[i]);
// }
// }
// console.log('项目1',oldProjects1,'项目2',oldProjects2);
cachedJoinProjectList = res.data.myCMEProjectListDtoList;
cachedOtherProjectList = res.data.allCMEProjectListDtoList;
_this.joinProjectList = res.data.myCMEProjectListDtoList;
_this.otherProjectList = res.data.allCMEProjectListDtoList;
// cachedJoinProjectList = _this.handleOldProject(
// oldProjects1,
// res.data.myProjectList
// );
// cachedOtherProjectList = _this.handleOldProject(
// oldProjects2,
// res.data.otherProjectList
// );
// 如果用户已经登陆,则将"至今"的几个项目移到我的列表中
if(_this.userMobile) {
// cachedOtherProjectList.map(item => {
// if(item.projectName && item.projectName.indexOf('国家基本公共卫生服务项目基层高血压管理办公室') >= 0) {
// cachedJoinProjectList.unshift(item);
// } else {
// _this.otherProjectList.push(item);
// }
// })
_this.tabIndex = 1;
} else {
_this.tabIndex = 2;
// _this.otherProjectList = cachedOtherProjectList
}
// _this.joinProjectList = cachedJoinProjectList;
if (_this.joinProjectList && _this.joinProjectList.length === 0) {
_this.tabIndex = 2;
}
_this.isShow = true
// console.log('otherProjectList',_this.otherProjectList);
}
}
);
},
handleOldProject(oldProjects, otherProjectList) {
let oldList = oldProjects.map(item => {
item.pType = 1;
return item;
}),
otherList = otherProjectList.map(item => {
item.pType = 2;
return item;
});
return oldList.concat(otherList);
},
}
};
</script>
<style lang="scss" scoped>
@import "../style/mixin";
.page-content {
&-table {
position: fixed;
z-index: 1;
width: 100%;
text-align: center;
border-bottom: 1px solid #e7e7e7;
background: #fff;
tr {
font-size: px2rem(15px);
font-weight: 700;
height: px2rem(44px);
td {
width: 50%;
padding-top: px2rem(6px);
.tap-title {
display: flex;
flex-direction: column;
align-items: center;
color: #999;
span:nth-child(2) {
position: relative;
left: 0;
bottom: px2rem(-9px);
z-index: 2;
width: px2rem(10px);
height: px2rem(3px);
background: rgba(255, 255, 255, 1);
border-radius: px2rem(3px);
}
}
&.active {
span:nth-child(2) {
background: rgba(68, 146, 132, 1);
}
}
}
}
}
&-list {
padding-top: px2rem(50px);
}
}
</style>
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
></CommonNavbar> ></CommonNavbar>
<section class="page-content"> <section class="page-content">
<!-- <button @click="jumpToExamAction" style="margin: 20px;font-size:20px;text-align:center;padding:10px;border-radius:10px;">测试按钮1</button> <!-- <button @click="jumpToExamAction" style="margin: 20px;font-size:20px;text-align:center;padding:10px;border-radius:10px;">测试按钮1</button>
<button @click="jumpToExamAction2" style="margin: 20px;font-size:20px;text-align:center;padding:10px;border-radius:10px;">测试按钮2</button> --> <button @click="jumpToExamAction2" style="margin: 20px;font-size:20px;text-align:center;padding:10px;border-radius:10px;">测试按钮2</button>-->
<!-- {{token}} --> <!-- {{token}} -->
<table class="page-content-table"> <table class="page-content-table">
<tr> <tr>
...@@ -23,38 +23,51 @@ ...@@ -23,38 +23,51 @@
</td> </td>
<td @click="changeTab(2)" :class="{'active': tabIndex === 2}"> <td @click="changeTab(2)" :class="{'active': tabIndex === 2}">
<div class="tap-title"> <div class="tap-title">
<!-- <span>其它项目</span> -->
<span :style="{'color': tabIndex === 2 ? '#333' : '#999'}">全部项目</span> <span :style="{'color': tabIndex === 2 ? '#333' : '#999'}">全部项目</span>
<span></span> <span></span>
</div> </div>
</td> </td>
</tr> </tr>
</table> </table>
<article class="cb-wrapper">
<CardBanner></CardBanner>
</article>
<article class="page-content-list"> <article class="page-content-list">
<CommonTitle title="I类学分项目" :isShowCert="false"></CommonTitle>
<ICardItem></ICardItem>
<CommonTitle title="II类学分项目" :isShowCert="false"></CommonTitle>
<section v-if="tabIndex === 1"> <section v-if="tabIndex === 1">
<CoopListItem <CoopListItem
:paramData="joinProjectList" :paramData="joinProjectList"
:coopType="1" :coopType="1"
:tabTo="1" :tabTo="1"
:isShow="isShow" :isShow="isShow"
:userMobile="userMobile"></CoopListItem> :userMobile="userMobile"
></CoopListItem>
</section> </section>
<section v-if="tabIndex === 2"> <section v-if="tabIndex === 2">
<CoopListItem <CoopListItem
:paramData="otherProjectList" :paramData="otherProjectList"
:coopType="1" :coopType="1"
:tabTo="2" :tabTo="2"
:isShow="isShow" :isShow="isShow"
:userMobile="userMobile"></CoopListItem> :userMobile="userMobile"
></CoopListItem>
</section> </section>
</article> </article>
</section> </section>
<Toast ref="toastTitle"></Toast> <Toast ref="toastTitle"></Toast>
<Loading v-if="showLoading"/> <Loading v-if="showLoading" />
<!-- <div> <!-- <div>
<iframe src="https://www.baidu.com" id="mobsf" frameborder="0" style="width:100%;height:500px;"></iframe> <iframe src="https://www.baidu.com" id="mobsf" frameborder="0" style="width:100%;height:500px;"></iframe>
</div>--> </div>-->
<!-- <discuss-topic-stencil /> --> <!-- <discuss-topic-stencil /> -->
<transition name="fade">
<article v-show="needShowBackup" @click="scrollTop" class="back-up-icon">
<img src="../images/cme/phrase2/back-top.png" alt />
</article>
</transition>
<CardPopup showGoUpdate></CardPopup>
</div> </div>
</template> </template>
<script> <script>
...@@ -62,6 +75,10 @@ import CommonNavbar from "@/components/common/common-navbar"; ...@@ -62,6 +75,10 @@ import CommonNavbar from "@/components/common/common-navbar";
import CoopListItem from "@/components/business/coop-list-item"; import CoopListItem from "@/components/business/coop-list-item";
import Loading from "@/components/common/common-loading"; import Loading from "@/components/common/common-loading";
import Toast from "@/components/common/common-toast"; import Toast from "@/components/common/common-toast";
import CardBanner from "@/components/cme/card-banner";
import ICardItem from "@/components/cme/I-card-item";
import CardPopup from "@/components/cme/card-popup";
import CommonTitle from "@/components/common/common-title";
import { mapGetters, mapActions } from "vuex"; import { mapGetters, mapActions } from "vuex";
export default { export default {
...@@ -81,7 +98,8 @@ export default { ...@@ -81,7 +98,8 @@ export default {
otherProjectList: [], // 全部项目 otherProjectList: [], // 全部项目
token: "", token: "",
toastTitle: "", toastTitle: "",
userMobile: "" userMobile: "",
needShowBackup: false
}; };
}, },
computed: { computed: {
...@@ -94,6 +112,10 @@ export default { ...@@ -94,6 +112,10 @@ export default {
CoopListItem, CoopListItem,
Loading, Loading,
Toast, Toast,
CardBanner,
CommonTitle,
ICardItem,
CardPopup
}, },
created() { created() {
var _this = this; var _this = this;
...@@ -110,15 +132,14 @@ export default { ...@@ -110,15 +132,14 @@ export default {
window.__refresh = function() { window.__refresh = function() {
//_this.tabIndex = _this.projectTabIndex; //_this.tabIndex = _this.projectTabIndex;
_this.getUserInfo(); _this.getUserInfo();
// document.documentElement.scrollTop = 0;
// document.body.scrollTop = 0;
}; };
// 打开页面埋点 // 打开页面埋点
this.$sendBuriedData({ this.$sendBuriedData({
component_tag: '210#0#0#0' component_tag: "210#0#0#0"
}); });
window.addEventListener("scroll", this.scrollFun);
}, },
mounted() { mounted() {
var _this = this; var _this = this;
...@@ -128,25 +149,24 @@ export default { ...@@ -128,25 +149,24 @@ export default {
// id: 12 }; // id: 12 };
// this.API_GET("app/certificate/downLoad", param).then(res => { // this.API_GET("app/certificate/downLoad", param).then(res => {
// }); // });
document.documentElement.scrollTop = 0;
document.body.scrollTop = 0;
}, },
methods: { methods: {
// 跳转到第三方考试页面 // 跳转到第三方考试页面
// //
jumpToExamAction() { jumpToExamAction() {
let paramList = [ let paramList = [
{ {
key: "pageUrl", key: "pageUrl",
value: 'http://cmeonline.cma-cmc.com.cn/cms/weixinCourseDetail.htm?courseId=a245b2060ac0495cae440de859321b91&openCourseId=2d9b152a85dc4833892aeaa713362b9f', value:
"http://cmeonline.cma-cmc.com.cn/cms/weixinCourseDetail.htm?courseId=a245b2060ac0495cae440de859321b91&openCourseId=2d9b152a85dc4833892aeaa713362b9f",
type: 4, type: 4,
seqNo: 1 seqNo: 1
}, },
// 此字段不配置,则用原来的逻辑 // 此字段不配置,则用原来的逻辑
{ {
key: "needCache", key: "needCache",
value: '1', // 0不缓存,其它值都做缓存 value: "1", // 0不缓存,其它值都做缓存
type: 4, type: 4,
seqNo: 1 seqNo: 1
} }
...@@ -161,14 +181,15 @@ export default { ...@@ -161,14 +181,15 @@ export default {
let paramList = [ let paramList = [
{ {
key: "pageUrl", key: "pageUrl",
value: 'http://cmeonline.cma-cmc.com.cn/cms/weixinCourseDetail.htm?courseId=0aeee9f7712b4543ab8eadb0571a78a7&openCourseId=e9e124392d3f4e2494d46e8f990b085e', value:
"http://cmeonline.cma-cmc.com.cn/cms/weixinCourseDetail.htm?courseId=0aeee9f7712b4543ab8eadb0571a78a7&openCourseId=e9e124392d3f4e2494d46e8f990b085e",
type: 4, type: 4,
seqNo: 1 seqNo: 1
}, },
// 此字段不配置,则用原来的逻辑 // 此字段不配置,则用原来的逻辑
{ {
key: "needCache", key: "needCache",
value: '1', // 0不缓存,其它值都做缓存 value: "1", // 0不缓存,其它值都做缓存
type: 4, type: 4,
seqNo: 1 seqNo: 1
} }
...@@ -188,9 +209,9 @@ export default { ...@@ -188,9 +209,9 @@ export default {
}); });
}, },
changeTab(index) { changeTab(index) {
let tag = index == 1 ? '210#210001#0' : '210#210001#1'; let tag = index == 1 ? "210#210001#0" : "210#210001#1";
this.tabIndex = index; this.tabIndex = index;
if(index == 1 && !this.userMobile) { if (index == 1 && !this.userMobile) {
rocNative.gotoLogin(); rocNative.gotoLogin();
this.tabIndex = 2; this.tabIndex = 2;
} }
...@@ -206,61 +227,59 @@ export default { ...@@ -206,61 +227,59 @@ export default {
token: _this.token, token: _this.token,
setEntry: true setEntry: true
}; };
let cachedJoinProjectList = [] let cachedJoinProjectList = [];
let cachedOtherProjectList = [] let cachedOtherProjectList = [];
_this.otherProjectList = [] _this.otherProjectList = [];
_this.showLoading = true; _this.showLoading = true;
this.GET("cme/project/list", param).then( this.GET("cme/project/list", param).then(res => {
res => { _this.showLoading = false;
_this.showLoading = false; if (res.code == "000000") {
if (res.code == "000000") { // let oldProjects1 = [];
// let oldProjects1 = []; // let oldProjects2 = [];
// let oldProjects2 = []; // for(let i = 0; i < res.data.oldProjects.length; i++) {
// for(let i = 0; i < res.data.oldProjects.length; i++) { // if(res.data.oldProjects[i].roleFlag == 1) {
// if(res.data.oldProjects[i].roleFlag == 1) { // oldProjects1.push(res.data.oldProjects[i]);
// oldProjects1.push(res.data.oldProjects[i]); // } else if (res.data.oldProjects[i].roleFlag == 0) {
// } else if (res.data.oldProjects[i].roleFlag == 0) { // oldProjects2.push(res.data.oldProjects[i]);
// oldProjects2.push(res.data.oldProjects[i]); // }
// } // }
// } // console.log('项目1',oldProjects1,'项目2',oldProjects2);
// console.log('项目1',oldProjects1,'项目2',oldProjects2);
cachedJoinProjectList = res.data.myCMEProjectListDtoList;
cachedOtherProjectList = res.data.allCMEProjectListDtoList;
_this.joinProjectList = res.data.myCMEProjectListDtoList;
_this.otherProjectList = res.data.allCMEProjectListDtoList;
// cachedJoinProjectList = _this.handleOldProject(
// oldProjects1,
// res.data.myProjectList
// );
// cachedOtherProjectList = _this.handleOldProject(
// oldProjects2,
// res.data.otherProjectList
// );
// 如果用户已经登陆,则将"至今"的几个项目移到我的列表中
if(_this.userMobile) {
// cachedOtherProjectList.map(item => {
// if(item.projectName && item.projectName.indexOf('国家基本公共卫生服务项目基层高血压管理办公室') >= 0) {
// cachedJoinProjectList.unshift(item);
// } else {
// _this.otherProjectList.push(item);
// }
// })
_this.tabIndex = 1;
} else {
_this.tabIndex = 2;
// _this.otherProjectList = cachedOtherProjectList
}
// _this.joinProjectList = cachedJoinProjectList;
if (_this.joinProjectList && _this.joinProjectList.length === 0) {
_this.tabIndex = 2;
}
_this.isShow = true
// console.log('otherProjectList',_this.otherProjectList); cachedJoinProjectList = res.data.myCMEProjectListDtoList;
cachedOtherProjectList = res.data.allCMEProjectListDtoList;
_this.joinProjectList = res.data.myCMEProjectListDtoList;
_this.otherProjectList = res.data.allCMEProjectListDtoList;
// cachedJoinProjectList = _this.handleOldProject(
// oldProjects1,
// res.data.myProjectList
// );
// cachedOtherProjectList = _this.handleOldProject(
// oldProjects2,
// res.data.otherProjectList
// );
// 如果用户已经登陆,则将"至今"的几个项目移到我的列表中
if (_this.userMobile) {
// cachedOtherProjectList.map(item => {
// if(item.projectName && item.projectName.indexOf('国家基本公共卫生服务项目基层高血压管理办公室') >= 0) {
// cachedJoinProjectList.unshift(item);
// } else {
// _this.otherProjectList.push(item);
// }
// })
_this.tabIndex = 1;
} else {
_this.tabIndex = 2;
// _this.otherProjectList = cachedOtherProjectList
} }
// _this.joinProjectList = cachedJoinProjectList;
if (_this.joinProjectList && _this.joinProjectList.length === 0) {
_this.tabIndex = 2;
}
_this.isShow = true;
// console.log('otherProjectList',_this.otherProjectList);
} }
); });
}, },
handleOldProject(oldProjects, otherProjectList) { handleOldProject(oldProjects, otherProjectList) {
let oldList = oldProjects.map(item => { let oldList = oldProjects.map(item => {
...@@ -273,7 +292,17 @@ export default { ...@@ -273,7 +292,17 @@ export default {
}); });
return oldList.concat(otherList); return oldList.concat(otherList);
}, },
scrollFun() {
let scrollTop = window.scrollY;
if (scrollTop >= 500) {
this.needShowBackup = true;
} else {
this.needShowBackup = false;
}
},
scrollTop() {
window.scrollTo(0, 0);
}
} }
}; };
</script> </script>
...@@ -319,9 +348,33 @@ export default { ...@@ -319,9 +348,33 @@ export default {
} }
} }
} }
.cb-wrapper {
width: 100%;
position: fixed;
top: px2rem(44px);
left: 0;
z-index: 1;
}
&-list { &-list {
padding-top: px2rem(50px); padding-top: px2rem(80px);
}
}
.back-up-icon {
position: fixed;
bottom: px2rem(50px);
right: px2rem(15px);
img {
width: px2rem(35px);
height: px2rem(35px);
} }
} }
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.5s;
}
.fade-enter,
.fade-leave-active {
opacity: 0;
}
</style> </style>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册