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

代码整理,锁图标样式等

上级 41e000ff
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<article @click.stop="deleteFlow()" class="cell-container"> <article @click.stop="deleteFlow()" class="cell-container">
<span class="" v-for="(item, index) in portalModule.contentList" :key="index"> <span class="" v-for="(item, index) in portalModule.contentList" :key="index">
<div v-if="index > 0 && portalModule.contentList[index].templetId!= portalModule.contentList[index-1].templetId" class="bottom-line"></div> <div v-if="index > 0 && portalModule.contentList[index].templetId!= portalModule.contentList[index-1].templetId" class="bottom-line"></div>
<div class="cell-container-item" @click="gotoExamOrCourse(item)" > <div class="cell-container-item" >
<div class="name"> <div class="name">
<div class="name-img"> <div class="name-img">
<img v-if="item.type == 1 && item.useFlag == 1" class="img-icon" src="../../images/exam.png"> <img v-if="item.type == 1 && item.useFlag == 1" class="img-icon" src="../../images/exam.png">
...@@ -29,26 +29,17 @@ ...@@ -29,26 +29,17 @@
<img v-if="item.type == 2 && item.useFlag == 1" class="img-icon" src="../../images/learn.png"> <img v-if="item.type == 2 && item.useFlag == 1" class="img-icon" src="../../images/learn.png">
<img v-if="item.type == 2 && item.useFlag == 2" class="img-icon" src="../../images/learn-dark.png"> <img v-if="item.type == 2 && item.useFlag == 2" class="img-icon" src="../../images/learn-dark.png">
</div> </div>
<!-- <div class="name-logo" :class="{'name-learn': item.type == 2, 'name-logo-no': item.useFlag == 2}" >
{{item.type | contentType}}
</div> -->
<p class="name-title" :class="{'name-title-no': item.useFlag == 2}">{{item.name | shortName(30)}}</p> <p class="name-title" :class="{'name-title-no': item.useFlag == 2}">{{item.name | shortName(30)}}</p>
<!-- <span v-if="item.certificateFlag !== 2 && index == 0">
<img class="cert-img" src="../../images/has-owner-cert.png">
</span> -->
</div> </div>
<!-- 'bg-13': item.status == 13 -->
<span <span
@click="gotoExamOrCourse(item)"
v-show="hasBindCard"
class="text-action" class="text-action"
:class="{'text-action-no': item.useFlag == 2}" :class="{'text-action-no': item.useFlag == 2}"
> >
<!-- <img v-show="item.status == 13" class="text-action-dh" src="../../images/icon-dh.png"> -->
{{getActionText(item.status)}} {{getActionText(item.status)}}
</span> </span>
<!-- <div class="connect-line" <img @click="toastToBuy" class="key" v-show="!hasBindCard" src="../../images/cme/phrase2/key.png" alt="">
:class="{'len1': item.height === 1, 'len2': item.height === '1','len3': item.height === 2, 'len4': item.height === '2', 'line-complete': index+1 < portalModule.contentList.length && portalModule.contentList[index+1].useFlag == 1}"
v-if="index+1 < portalModule.contentList.length && portalModule.contentList[index].templetId == portalModule.contentList[index+1].templetId">
</div> -->
<div class="foot-line" <div class="foot-line"
v-if="index+1 < portalModule.contentList.length && portalModule.contentList[index].templetId == portalModule.contentList[index+1].templetId"> v-if="index+1 < portalModule.contentList.length && portalModule.contentList[index].templetId == portalModule.contentList[index+1].templetId">
</div> </div>
...@@ -60,12 +51,7 @@ ...@@ -60,12 +51,7 @@
</article> </article>
</van-collapse-item> </van-collapse-item>
</van-collapse> </van-collapse>
<!-- <Toast ref="toastTitle"></Toast> -->
<!-- <div v-if="index+1 < projectComponent.length" class="line-component"></div> -->
</div> </div>
<!-- <NoMoreContent v-if="detailNum > 9" /> -->
<!-- <NoMoreContent />
<div v-if="detailNum <= 9" class="no-more-bottom"></div> -->
<van-dialog <van-dialog
v-model="dialogState" v-model="dialogState"
title="标题" title="标题"
...@@ -75,11 +61,9 @@ ...@@ -75,11 +61,9 @@
</template> </template>
<script> <script>
// import CommonTitle from "@/components/common/common-title";
import MergeTitle from "@/components/business/merge-title"; import MergeTitle from "@/components/business/merge-title";
import NoMoreContent from "@/components/business/no-more-content"; import NoMoreContent from "@/components/business/no-more-content";
import CertShow from "@/components/business/cert-show"; import CertShow from "@/components/business/cert-show";
// import Toast from "@/components/common/common-toast";
import { Collapse, CollapseItem, Dialog, Toast } from 'vant'; import { Collapse, CollapseItem, Dialog, Toast } from 'vant';
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import { getAppVersion } from "@/utils"; import { getAppVersion } from "@/utils";
...@@ -114,14 +98,10 @@ export default { ...@@ -114,14 +98,10 @@ export default {
}; };
}, },
props: { props: {
// moduleName: { hasBindCard: {
// type: String, type: Boolean,
// default: "" default: false
// }, },
// paramData: {
// type: Array,
// default: () => []
// },
projectComponent: { projectComponent: {
type: Array, type: Array,
default: () => [] default: () => []
...@@ -144,10 +124,8 @@ export default { ...@@ -144,10 +124,8 @@ export default {
}, },
components: { components: {
MergeTitle, MergeTitle,
// CommonTitle,
CertShow, CertShow,
NoMoreContent, NoMoreContent,
// Toast,
Dialog, Dialog,
}, },
watch:{ watch:{
...@@ -200,7 +178,6 @@ export default { ...@@ -200,7 +178,6 @@ export default {
paramList = [ paramList = [
{ {
key: "className", key: "className",
// value: "com.picahealth.yunque.activitys.courseplaynew.CourseIntroduceActivity###WeexCourseIntroViewController",
value: "com.picahealth.yunque.activitys.courseplaynew.MyTcPlayVideoActivity###CourseMultiMediaPlayController", value: "com.picahealth.yunque.activitys.courseplaynew.MyTcPlayVideoActivity###CourseMultiMediaPlayController",
type: 4, type: 4,
seqNo: 1 seqNo: 1
...@@ -281,6 +258,11 @@ export default { ...@@ -281,6 +258,11 @@ export default {
console.log('item',item); console.log('item',item);
Toast('尚未开始,敬请期待'); Toast('尚未开始,敬请期待');
} }
},
// 弹框提示
toastToBuy() {
Toast('购买后可学习课程');
} }
} }
}; };
...@@ -423,17 +405,11 @@ export default { ...@@ -423,17 +405,11 @@ export default {
position: relative; position: relative;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
// margin: px2rem(6px) px2rem(0px);
// height: px2rem(51px);
margin-bottom: px2rem(39px); margin-bottom: px2rem(39px);
line-height: px2rem(51px); line-height: px2rem(51px);
font-size: px2rem(15px); font-size: px2rem(15px);
// padding: px2rem(0px) px2rem(15px);
// background: rgba(248, 249, 250, 1);
// border-bottom: 1px solid #f0f0f0;
// border-radius: px2rem(6px);
justify-content: space-between; justify-content: space-between;
// align-items: center; align-items: center;
.name { .name {
.name-img { .name-img {
position: relative; position: relative;
...@@ -558,6 +534,10 @@ export default { ...@@ -558,6 +534,10 @@ export default {
color: #c7c8c9; color: #c7c8c9;
} }
} }
.key {
width: px2rem(15px);
height: px2rem(15px);
}
} }
span { span {
.cert-img { .cert-img {
......
...@@ -42,6 +42,10 @@ export default { ...@@ -42,6 +42,10 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
@import "../../style/mixin"; @import "../../style/mixin";
.bind-cart-wrapper { .bind-cart-wrapper {
position: fixed;
left: 0;
bottom: 0;
z-index: 100;
width: 100%; width: 100%;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
......
<template>
<section class="card-popup-wrapper">
<van-popup
v-model="isShow"
position="center"
@click-overlay="clickOverlay"
>
<article class="content">
<p class="title">学分项目必须使用学习卡</p>
<p class="title">请先购买学习卡</p>
<section class="card-info">
<img v-if="cardInfo.cardType == 1" class="icon" src="../../images/cme/phrase2/I-card-icon.png" alt />
<img v-else class="icon" src="../../images/cme/phrase2/II-card-icon.png" alt />
<!-- <div class="info">
<span class="name">{{cardInfo.goodsName}}</span>
<p>
<span class="price">{{(cardInfo.preferentialPrice || cardInfo.costPrice) | formatMoney}}</span><span v-show="cardInfo.preferentialPrice" class="discount"><del> 原价¥{{cardInfo.costPrice | formatMoney}}</del></span>
</p>
</div> -->
<div class="info">
<span class="name">已购买去学习已购买去学习买去学习</span>
<p>
<span class="price">¥100</span><span class="discount"><del> 原价¥120</del></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="confirm">去购买</span>
</div>
</article>
</van-popup>
</section>
</template>
<script>
import { Popup } from "vant";
export default {
data() {
return {
}
},
props: {
isShow: {
type: Boolean,
default: false,
},
cardInfo: {
id: 10031,
goodsVersion: 1,
cardType: 1,
costPrice: 0,
preferentialPrice: 0,
goodsDesc: "",
goodsName: "学习卡",
goodsType: 2,
isSale: 1,
}
},
methods: {
clickOverlay() {
this.$emit('clickOverlay');
},
cancle() {
this.$emit('cancle');
},
confirm() {
this.$emit('confirm');
}
},
}
</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);
}
.info {
width: 100%;
position: relative;
top: 0;
left: 0;
.name {
position: absolute;
top: px2rem(-30px);
left: px2rem(4px);
}
p {
position: absolute;
bottom: px2rem(-34px);
left: 0px;
display: flex;
align-items: center;
.price {
color: #FB5B52;
font-size: px2rem(18px);
font-weight: 700;
margin-right: px2rem(8px);
}
.discount {
color: #979899;
}
}
}
}
.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 {
border-right: 1px solid #F0F1F2;
// width: px2rem(1px);
height: 100%;
}
.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: "继教项目",
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>
此差异已折叠。
此差异已折叠。
此差异已折叠。
...@@ -91,6 +91,7 @@ ...@@ -91,6 +91,7 @@
:actionList="actionList" :actionList="actionList"
:detailNum="detailNum" :detailNum="detailNum"
:courseRequire="courseRequire" :courseRequire="courseRequire"
:hasBindCard="hasBindCard"
/> />
</div> </div>
</div> </div>
...@@ -125,13 +126,13 @@ ...@@ -125,13 +126,13 @@
/> />
<ExjumperButton <ExjumperButton
@btnClick="beforeJumpToExam" @btnClick="beforeJumpToExam"
v-if="project.cmeType == 2 && project.hasBindCard" v-if="project.cmeType == 2 && hasBindCard"
:btnText="project.currentProgress > 1 ? '参加考试' : '学完全部课程,可参加考试'" :btnText="project.currentProgress > 1 ? '参加考试' : '学完全部课程,可参加考试'"
:type="project.currentProgress > 1 ? 'primary' : 'disabled'"></ExjumperButton> :type="project.currentProgress > 1 ? 'primary' : 'disabled'"></ExjumperButton>
<div v-if="project.cmeType == 2" style="padding-top: 30px"></div> <div v-if="project.cmeType == 2" style="padding-top: 30px"></div>
<BindCardButton <BindCardButton
v-if="project.cmeType == 2 && !project.hasBindCard" v-if="project.cmeType == 2 && !hasBindCard"
:cardInfo="cardInfo" :cardInfo="cardInfo"
:gotoExchange="gotoExchange" :gotoExchange="gotoExchange"
:gotoBuy="gotoBuy" :gotoBuy="gotoBuy"
...@@ -219,13 +220,14 @@ export default { ...@@ -219,13 +220,14 @@ export default {
examBtnUrl: '', // 考试按钮跳转连接 examBtnUrl: '', // 考试按钮跳转连接
firstIntoExam: false, // true弹框,是否首次进入考试,用于首次跳转弹框提示,只跟项目和人员有关 firstIntoExam: false, // true弹框,是否首次进入考试,用于首次跳转弹框提示,只跟项目和人员有关
jumpToContents: false, // 是否跳转到目录 jumpToContents: false, // 是否跳转到目录
hasBindCard: false, // 是否绑定过学习卡或兑换过 没有绑定,则显示绑定按钮 cardStatus: 0,
// cmeType=2时不显示进度, // cmeType=2时不显示进度,
// projectNo为空时不显示项目编号, // projectNo为空时不显示项目编号,
// projectLeader为空时不显示项目负责人, // projectLeader为空时不显示项目负责人,
// inScope=0时考试按钮不显示, // inScope=0时考试按钮不显示,
// currentProgress>1时考试按钮显示并可用 // currentProgress>1时考试按钮显示并可用
}, },
hasBindCard: false, // 是否绑定过学习卡或兑换过 没有绑定,则显示绑定按钮
projectLeader: {}, projectLeader: {},
doctorList: [], doctorList: [],
from: "inner", from: "inner",
...@@ -857,9 +859,11 @@ export default { ...@@ -857,9 +859,11 @@ export default {
}, 800); }, 800);
// 如果 hasBindCard 为false,则获取卡信息 0:未绑卡 1:已绑卡 // 如果 hasBindCard 为false,则获取卡信息 0:未绑卡 1:已绑卡
this.hasBindCard = res.data.cardStatus != 0 ? false : true; _this.hasBindCard = res.data.cardStatus == 0 ? false : true;
if(!_this.hasBindCard) {
_this.preJumper() _this.preJumper()
} }
}
}); });
}, },
......
此差异已折叠。
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册