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

兑换或购买后可学习课程

上级 fad3ccfd
<template>
<section class="bind-cart-wrapper">
<article class="left">
<div class="top">
<span class="discount">{{(cardInfo.preferentialPrice || cardInfo.costPrice) | formatMoney}}</span>
<span v-show="cardInfo.preferentialPrice" class="price">
<del>原价¥{{cardInfo.costPrice | formatMoney}}</del>
</span>
</div>
<div class="bottom">
<img src="../../images/cme/phrase2/info.png" />
<span>兑换或购买后可学习课程</span>
</div>
</article>
<article class="right">
<span class="left">去兑换</span>
<span class="right">去购买</span>
</article>
</section>
</template>
<script>
export default {
props: {
cardInfo: {
type: Object,
default: () => {}
}
},
data() {
return {};
},
methods: {
btnClick() {
this.$emit("btnClick");
}
}
};
</script>
<style lang="scss" scoped>
@import "../../style/mixin";
.bind-cart-wrapper {
width: 100%;
display: flex;
flex-direction: row;
height: px2rem(60px);
line-height: 1;
justify-content: space-between;
padding: px2rem(10px) px2rem(15px);
font-size: px2rem(14px);
background: rgba(255, 255, 255, 1);
box-shadow: 0px -2px 10px 0px rgba(0, 0, 0, 0.1);
.left {
display: flex;
flex-direction: column;
height: px2rem(40px);
line-height: 1;
font-size: 12px;
// align-items: ;
.top {
height: px2rem(27px);
.discount {
color: #FB5B52;
font-size: px2rem(18px);
font-weight: 700;
margin-right: px2rem(4px);
}
.price {
color: #979899;
}
}
.bottom {
display: flex;
flex-direction: row;
img {
width: px2rem(12px);
height: px2rem(12px);
margin-left: 1px;
margin-right: px2rem(4px);
}
color: #979899;
}
}
.right {
display: flex;
flex-direction: row;
span {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
width: px2rem(80px);
font-size: px2rem(14px);
font-weight: 700;
text-align: center;
&.left {
border-radius: px2rem(20px) 0px 0px px2rem(20px);
border: 1px solid rgba(255, 122, 75, 1);
color: #ff7a4b;
}
&.right {
background: linear-gradient(
137deg,
rgba(255, 166, 95, 1) 0%,
rgba(255, 122, 75, 1) 100%
);
border-radius: 0px px2rem(20px) px2rem(20px) 0px;
color: #fff;
}
}
}
}
</style>
\ No newline at end of file
...@@ -26,13 +26,13 @@ ...@@ -26,13 +26,13 @@
</td> </td>
</tr> </tr>
</table> </table>
<article v-show="isShow" class="cb-wrapper" :class="{'padding-top-111': !isWeb}"> <!-- <article v-show="isShow" class="cb-wrapper" :class="{'padding-top-111': !isWeb}">
<CardBanner :userMobile="userMobile"></CardBanner> <CardBanner :userMobile="userMobile"></CardBanner>
</article> </article> -->
<article class="page-content-list"> <article class="page-content-list">
<CommonTitle v-show="tabIndex === 2" title="I类学分继续医学教育项目" :isShowCert="false"></CommonTitle> <CommonTitle title="I类学分继续医学教育项目" :isShowCert="false"></CommonTitle>
<ICardItem v-show="tabIndex === 2" :oneLevelUrl="oneLevelUrl" :provinceId="provinceId" :organizationId="organizationId" :cmeToken="token"></ICardItem> <ICardItem :oneLevelUrl="oneLevelUrl" :provinceId="provinceId" :organizationId="organizationId" :cmeToken="token"></ICardItem>
<CommonTitle class="mt-10" v-show="isShow" title="II类学分继续医学教育项目" :isShowCert="false"></CommonTitle> <CommonTitle class="mt-10" v-show="isShow && tabIndex === 2" title="II类学分继续医学教育项目" :isShowCert="false"></CommonTitle>
<section v-if="tabIndex === 1"> <section v-if="tabIndex === 1">
<CoopListItem <CoopListItem
:paramData="joinProjectList" :paramData="joinProjectList"
...@@ -206,11 +206,9 @@ export default { ...@@ -206,11 +206,9 @@ export default {
_this.otherProjectList = res.data.allCMEProjectListDtoList; _this.otherProjectList = res.data.allCMEProjectListDtoList;
_this.provinceId = res.data.provinceId; _this.provinceId = res.data.provinceId;
_this.organizationId = res.data.organizationId; _this.organizationId = res.data.organizationId;
// _this.organizationInfo.provinceId = res.data.provinceId;
// _this.organizationInfo.organizationId = res.data.organizationId;
_this.oneLevelUrl = res.data.oneLevelUrl; // I类学习卡列表地址 _this.oneLevelUrl = res.data.oneLevelUrl; // I类学习卡列表地址
// _this.setJumpURLForI(res.data.oneLevelUrl);
// _this.setOrganizationInfo(_this.organizationInfo); // 不做相应判断
if (_this.userMobile) { if (_this.userMobile) {
_this.tabIndex = 1; _this.tabIndex = 1;
} else { } else {
...@@ -219,6 +217,7 @@ export default { ...@@ -219,6 +217,7 @@ export default {
if (_this.joinProjectList && _this.joinProjectList.length === 0) { if (_this.joinProjectList && _this.joinProjectList.length === 0) {
_this.tabIndex = 2; _this.tabIndex = 2;
} }
_this.isShow = true; _this.isShow = true;
} }
}); });
...@@ -295,7 +294,7 @@ export default { ...@@ -295,7 +294,7 @@ export default {
} }
} }
&-list { &-list {
padding-top: px2rem(85px); padding-top: px2rem(50px);
.mt-10 { .mt-10 {
margin-bottom: px2rem(-10px); margin-bottom: px2rem(-10px);
} }
......
此差异已折叠。
...@@ -125,11 +125,14 @@ ...@@ -125,11 +125,14 @@
/> />
<ExjumperButton <ExjumperButton
@btnClick="beforeJumpToExam" @btnClick="beforeJumpToExam"
v-if="project.cmeType == 2" v-if="project.cmeType == 2 && project.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>
<CardPopup :cardInfo="cardInfo" :isShow="isShowPopup" @clickOverlay="clickOverlay" @cancle="jumpToCardList()" @confirm="confirm"></CardPopup>
<BindCardButton v-if="project.cmeType == 2 && !project.hasBindCard" :cardInfo="cardInfo"></BindCardButton>
<!-- <CardPopup :cardInfo="cardInfo" :isShow="isShowPopup" @clickOverlay="clickOverlay" @cancle="jumpToCardList()" @confirm="confirm"></CardPopup> -->
<Loading v-show="showLoading" /> <Loading v-show="showLoading" />
</div> </div>
</template> </template>
...@@ -160,7 +163,8 @@ import { getWebPageUrl, gotoPage } from "@/utils/index"; ...@@ -160,7 +163,8 @@ import { getWebPageUrl, gotoPage } from "@/utils/index";
import { mapGetters, mapActions } from "vuex"; import { mapGetters, mapActions } from "vuex";
import vueFilters from "@/utils/filter"; import vueFilters from "@/utils/filter";
import { Toast } from 'vant'; import { Toast } from 'vant';
import CardPopup from "@/components/cme/card-popup"; // import CardPopup from "@/components/cme/card-popup";
import BindCardButton from "@/components/cme/bind-card-button";
let cataOffsetTop = 0; let cataOffsetTop = 0;
let intorOffsetTop = 0; let intorOffsetTop = 0;
...@@ -210,6 +214,7 @@ export default { ...@@ -210,6 +214,7 @@ export default {
examBtnUrl: '', // 考试按钮跳转连接 examBtnUrl: '', // 考试按钮跳转连接
firstIntoExam: false, // true弹框,是否首次进入考试,用于首次跳转弹框提示,只跟项目和人员有关 firstIntoExam: false, // true弹框,是否首次进入考试,用于首次跳转弹框提示,只跟项目和人员有关
jumpToContents: false, // 是否跳转到目录 jumpToContents: false, // 是否跳转到目录
hasBindCard: false, // 是否绑定过学习卡或兑换过 没有绑定,则显示绑定按钮
// cmeType=2时不显示进度, // cmeType=2时不显示进度,
// projectNo为空时不显示项目编号, // projectNo为空时不显示项目编号,
// projectLeader为空时不显示项目负责人, // projectLeader为空时不显示项目负责人,
...@@ -275,9 +280,10 @@ export default { ...@@ -275,9 +280,10 @@ export default {
CommonDialog, CommonDialog,
ExjumperButton, ExjumperButton,
ExjumperDialog, ExjumperDialog,
CardPopup, // CardPopup,
CommonAdertImg, CommonAdertImg,
NoMoreContent NoMoreContent,
BindCardButton
}, },
computed: { computed: {
...@@ -355,7 +361,7 @@ export default { ...@@ -355,7 +361,7 @@ export default {
// 点击弹层 // 点击弹层
clickOverlay() { clickOverlay() {
console.log('clickOverlay'); console.log('clickOverlay');
this.isShowPopup = false; // this.isShowPopup = false;
}, },
// 点击“参与考试” // 点击“参与考试”
...@@ -367,8 +373,8 @@ export default { ...@@ -367,8 +373,8 @@ export default {
if(this.project.firstIntoExam) { if(this.project.firstIntoExam) {
this.isShowEJDialog = true; this.isShowEJDialog = true;
} else { } else {
this.isBuy(2); // this.isBuy(2);
// this.jumpToExamAction(); this.jumpToCardList();
} }
}, },
...@@ -378,30 +384,30 @@ export default { ...@@ -378,30 +384,30 @@ export default {
component_tag: `883#8831` component_tag: `883#8831`
}); });
this.isShowEJDialog = false; this.isShowEJDialog = false;
this.isBuy(2); this.jumpToCardList();
// this.jumpToExamAction(); // this.isBuy(2);
this.firstIntoExamAction(); this.firstIntoExamAction();
}, },
// 判断用户是否购买过I类学习卡 // 判断用户是否购买过I类学习卡
isBuy(cardType) { // isBuy(cardType) {
this.showLoading = true; // this.showLoading = true;
// alert(this.showLoading) // // alert(this.showLoading)
let param = { // let param = {
cardType: cardType, // cardType: cardType,
setEntry: true, // setEntry: true,
} // }
this.GET("trade/storage/card/isBuy", param).then(res => { // this.GET("trade/storage/card/isBuy", param).then(res => {
if (res.code == "000000") { // if (res.code == "000000") {
// 如果购买过,则直接跳转到中华医学会页面 // // 如果购买过,则直接跳转到中华医学会页面
if(res.data) { // if(res.data) {
this.jumpToCardList(); // this.jumpToCardList();
} else { // } else {
this.preJumper(); // this.preJumper();
} // }
} // }
}); // });
}, // },
// 跳转II类学习详情页面(中华医学会项目详情页面) // 跳转II类学习详情页面(中华医学会项目详情页面)
jumpToCardList() { jumpToCardList() {
...@@ -410,7 +416,7 @@ export default { ...@@ -410,7 +416,7 @@ export default {
}); });
this.showLoading = false; this.showLoading = false;
this.isShowPopup = false; // this.isShowPopup = false;
// 判断版本号,如果小于3.4.0,则只做提示 // 判断版本号,如果小于3.4.0,则只做提示
let appVersion = this.userInfo.appVersion; let appVersion = this.userInfo.appVersion;
let appVersionNum = appVersion.split('.').join(''); let appVersionNum = appVersion.split('.').join('');
...@@ -446,10 +452,15 @@ export default { ...@@ -446,10 +452,15 @@ export default {
// 跳转前判断是否有机构,否则使用定位信息 // 跳转前判断是否有机构,否则使用定位信息
preJumper() { preJumper() {
if(this.organizationId != 0 && this.provinceId != 0) { // TODO 测试代码
this.getCardInfoByProvinceId(this.provinceId); if(window.__isWeb) {
this.getCardInfoByProvinceId(310);
} else { } else {
this.getPositionData(); if(this.organizationId != 0 && this.provinceId != 0) {
this.getCardInfoByProvinceId(this.provinceId);
} else {
this.getPositionData();
}
} }
}, },
...@@ -474,7 +485,7 @@ export default { ...@@ -474,7 +485,7 @@ export default {
this.POST("trade/goods/cardList", param).then(res => { this.POST("trade/goods/cardList", param).then(res => {
if (res.code == "000000") { if (res.code == "000000") {
this.showLoading = false; this.showLoading = false;
this.isShowPopup = true; // this.isShowPopup = true;
this.cardInfo = res.data && res.data[0] || {id: 0} ; this.cardInfo = res.data && res.data[0] || {id: 0} ;
} }
}); });
...@@ -495,7 +506,7 @@ export default { ...@@ -495,7 +506,7 @@ export default {
component_tag: `885#8852` component_tag: `885#8852`
}); });
this.isShowPopup = false; // this.isShowPopup = false;
let pageUrl = this.project.examBtnUrl; let pageUrl = this.project.examBtnUrl;
let paramList = [ let paramList = [
{ {
...@@ -522,36 +533,6 @@ export default { ...@@ -522,36 +533,6 @@ export default {
jsonString: paramList jsonString: paramList
}); });
}, },
// 跳转到第三方考试页面
jumpToExamAction() {
// 判断版本号,如果小于3.4.0,则只做提示
let appVersion = this.userInfo.appVersion;
let appVersionNum = appVersion.split('.').join('');
if(appVersionNum < 341) {
Toast('请您下载新版本App');
return;
}
let paramList = [
{
key: "pageUrl",
value: this.project.examBtnUrl,
type: 4,
seqNo: 1
},
// 此字段不配置,则用原来的逻辑
{
key: "needCache",
value: '1', // 0不缓存,其它值都做缓存
type: 4,
seqNo: 1
}
];
rocNative.dispatchEventByModuleCode({
modeCode: "M300",
jsonString: paramList
});
},
// 首次进入考试时记录(点击‘我知道了’时调用) // 首次进入考试时记录(点击‘我知道了’时调用)
firstIntoExamAction() { firstIntoExamAction() {
...@@ -816,9 +797,13 @@ export default { ...@@ -816,9 +797,13 @@ export default {
setTimeout(() => { setTimeout(() => {
_this.showLoading = false; _this.showLoading = false;
}, 800); }, 800);
// TODO 如果 hasBindCard 为false,则获取卡信息
_this.preJumper()
} }
}); });
}, },
// 项目负责人--详情(收起) // 项目负责人--详情(收起)
changeLeaderText(data) { changeLeaderText(data) {
let _this = this; let _this = this;
...@@ -833,6 +818,7 @@ export default { ...@@ -833,6 +818,7 @@ export default {
} }
} }
}, },
// 项目介绍 // 项目介绍
itemIntroText(data) { itemIntroText(data) {
let _this = this; let _this = this;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册