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

职称考项目

上级 a1e4d916
...@@ -146,12 +146,12 @@ export default { ...@@ -146,12 +146,12 @@ export default {
// 如果是考试,将根据appVersion判断是新考试还是老考试,如果是301或之前的,都是老考试 // 如果是考试,将根据appVersion判断是新考试还是老考试,如果是301或之前的,都是老考试
gotoExamOrCourse(item) { gotoExamOrCourse(item) {
// 埋点:去学习、继续学习、复习、去考试、重考 // 埋点:去学习、继续学习、复习、去考试、重考
let actionCode = sendBuriedDataMap[item.status]; // let actionCode = sendBuriedDataMap[item.status];
if(actionCode) { // if(actionCode) {
this.$sendBuriedData({ // this.$sendBuriedData({
component_tag: `882#${actionCode}#${this.projectId}` // component_tag: `882#${actionCode}#${this.projectId}`
}); // });
} // }
let appVersion = getAppVersion(this.userInfo.appVersion); let appVersion = getAppVersion(this.userInfo.appVersion);
if (item.useFlag == 2) return; if (item.useFlag == 2) return;
if (window.__isWeb) { if (window.__isWeb) {
......
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
class="cell-detail" class="cell-detail"
v-for="(component , index) in projectComponent" v-for="(component , index) in projectComponent"
:key="index"> :key="index">
<!-- <CommonTitle :fontWeight="500" :title="component.name" :isShowCert="true" :isShowExplain="true" @showDialog="showDialog(component.introduce)"></CommonTitle> -->
<!-- <MergeTitle :fontWeight="500" :title="component.name" :isShowCert="component.status" :isShowExplain="true" @showDialog="showDialog(component.introduce)"></MergeTitle> -->
<van-collapse v-model="activeNames" @change="changeCollapse"> <van-collapse v-model="activeNames" @change="changeCollapse">
<van-collapse-item <van-collapse-item
v-for="(portalModule, index) in component.portalModuleDTOS" v-for="(portalModule, index) in component.portalModuleDTOS"
...@@ -17,7 +15,6 @@ ...@@ -17,7 +15,6 @@
:disabled="portalModule.disabled" :disabled="portalModule.disabled"
@click.native="chooseItem(portalModule)" @click.native="chooseItem(portalModule)"
> >
<!-- @click.native="chooseItem(item)" -->
<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>
...@@ -38,31 +35,24 @@ ...@@ -38,31 +35,24 @@
> >
{{getActionText(item.status, item.type)}} {{getActionText(item.status, item.type)}}
</span> </span>
<!-- <img @click="toastToBuy" class="key" v-show="!hasBindCard" src="../../images/cme/phrase2/key.png" alt=""> -->
<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>
</div> </div>
<span v-if="item.certificateFlag == 2"> <!-- <span v-if="item.certificateFlag == 2">
<img class="cert-img" :class="{'space2': item.height == 2 }" src="../../images/has-cert-new.png"> <img class="cert-img" :class="{'space2': item.height == 2 }" src="../../images/has-cert-new.png">
</span> </span> -->
</span> </span>
</article> </article>
</van-collapse-item> </van-collapse-item>
</van-collapse> </van-collapse>
</div> </div>
<van-dialog
v-model="dialogState"
title="标题"
>
</van-dialog>
</section> </section>
</template> </template>
<script> <script>
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 { 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";
...@@ -92,7 +82,6 @@ export default { ...@@ -92,7 +82,6 @@ export default {
appVersion: "200", appVersion: "200",
hocImg: require("../../images/has-owner-cert.png"), hocImg: require("../../images/has-owner-cert.png"),
activeNames: [1], activeNames: [1],
dialogState: false,
projectId: 1 projectId: 1
}; };
}, },
...@@ -127,7 +116,6 @@ export default { ...@@ -127,7 +116,6 @@ export default {
}, },
components: { components: {
MergeTitle, MergeTitle,
CertShow,
NoMoreContent, NoMoreContent,
Dialog, Dialog,
}, },
...@@ -149,22 +137,16 @@ export default { ...@@ -149,22 +137,16 @@ export default {
// 如果是考试,将根据appVersion判断是新考试还是老考试,如果是301或之前的,都是老考试 // 如果是考试,将根据appVersion判断是新考试还是老考试,如果是301或之前的,都是老考试
gotoExamOrCourse(item) { gotoExamOrCourse(item) {
// 埋点:去学习、继续学习、复习、去考试、重考 // 埋点:去学习、继续学习、复习、去考试、重考
let actionCode = sendBuriedDataMap[item.status]; // let actionCode = sendBuriedDataMap[item.status];
if(actionCode) { // if(actionCode) {
this.$sendBuriedData({ // this.$sendBuriedData({
component_tag: `882#${actionCode}#${this.projectId}` // component_tag: `882#${actionCode}#${this.projectId}`
}); // });
} // }
let appVersion = getAppVersion(this.userInfo.appVersion); let appVersion = getAppVersion(this.userInfo.appVersion);
if (item.useFlag == 2) return; if (item.useFlag == 2) return;
// if (window.__isWeb) {
// // this.$refs.toastTitle.toast("请您下载App");
// Toast('请您下载App');
// return;
// }
if (item.type == 1) { if (item.type == 1) {
if (appVersion <= 300) { if (appVersion <= 300) {
// this.$refs.toastTitle.toast("请您下载新版本App");
Toast('请您下载新版本App'); Toast('请您下载新版本App');
return; return;
} else { } else {
...@@ -175,7 +157,8 @@ export default { ...@@ -175,7 +157,8 @@ export default {
} }
}, },
// 跳转到课程 // 跳转到课程
// TODO 查看课程是否是最后一节课, 如果是,则要查找到相应的考试,并传递给原生端
gotoCourse: function(courseId) { gotoCourse: function(courseId) {
let appVersion = getAppVersion(this.userInfo.appVersion); let appVersion = getAppVersion(this.userInfo.appVersion);
// 弹框提示下载新版本可以试看 // 弹框提示下载新版本可以试看
......
<template>
<!-- 项目组件列表项 -->
<section>
<article v-for="(item, index) in paramData" :key="item.id">
<CommonTitle :title="item.name" :isShowCert="item.status == 2"></CommonTitle>
<article class="comp-container">
<div class="comp-container-item"
:class="{'ht-for-m16': model.moduleName.length > 16}"
v-for="model in paramData[index].portalModulesModels" :key="model.id">
<span class="name">{{model.moduleName}}</span>
<!-- <span class="name">{{model.moduleName | shortName(10)}}</span> -->
<span v-if="model.status == 2" class="action" @click="showModule(model, item.id)">查看</span>
<span v-else class="action-no" >即将开始</span>
</div>
</article>
</article>
</section>
</template>
<script>
import CommonTitle from "@/components/common/common-title";
import NoMoreContent from "@/components/business/no-more-content";
import { getWebPageUrl } from "@/utils/index"
export default {
name: "comp-list-item",
data() {
return {};
},
props: {
paramData: {
type: Array,
default: () => []
},
projectId: {
type: String | Number,
default: 1
},
courseRequire: {
type: Number,
default: 0
}
},
components: {
CommonTitle,
NoMoreContent
},
mounted() {},
methods: {
// // 跳转到模块内容页面
// showModule(item, id) {
// this.$router.push({
// path: "/comp",
// query: {
// componentId: id,
// // projectId: this.projectId,
// moduleId: item.moduleId,
// moduleName: item.moduleName
// }
// });
// },
// 跳转到模块内容页面
showModule(item, id) {
if (window.__isWeb) {
this.$router.push({
path: "/comp2",
query: {
componentId: id,
projectId: this.projectId,
moduleId: item.moduleId,
moduleName: item.moduleName,
courseRequire: this.courseRequire,
}
});
return;
}
let pageUrl = getWebPageUrl('cme/#/comp2');
let moduleName = encodeURIComponent(item.moduleName)
let paramList = [
{
key: "pageUrl",
value: pageUrl + `?componentId=${id}&moduleId=${item.moduleId}&moduleName=${moduleName}&projectId=${this.projectId}&courseRequire=${this.courseRequire}`,
type: 4,
seqNo: 1
}
]
rocNative.dispatchEventByModuleCode({
modeCode: "M300",
jsonString: paramList
});
}
}
};
</script>
<style lang="scss" scoped>
@import "../../style/mixin";
.comp-container {
display: flex;
flex-direction: column;
margin: 0 px2rem(15px);
&-item {
display: flex;
flex-direction: row;
margin: px2rem(6px) px2rem(0px);
height: px2rem(51px);
// line-height: px2rem(51px);
font-size: px2rem(15px);
padding: px2rem(0px) px2rem(15px);
background: rgba(248, 249, 250, 1);
border-radius: px2rem(6px);
justify-content: space-between;
align-items: center;
.name {
max-width: px2rem(240px);
font-size: px2rem(15px);
line-height: px2rem(25px) !important;
color: #676869;
}
.action {
width: px2rem(60px);
height: px2rem(25px);
line-height: px2rem(25px);
text-align: center;
font-size: px2rem(12px);
font-weight: 700;
border-radius: px2rem(15px);
// font-family: "PingFangSC-Medium", "PingFangSC", "Microsoft Yahei";
// opacity: 0.45;
border: 1px solid rgba(68, 146, 132, 0.6);
color: rgba(68, 146, 132, 1);
}
.action-no {
width: px2rem(60px);
height: px2rem(25px);
line-height: px2rem(25px);
text-align: center;
font-size: px2rem(12px);
font-weight: 700;
border-radius: px2rem(15px);
// font-family: "PingFangSC-Medium", "PingFangSC", "Microsoft Yahei";
// opacity: 0.45;
border: 1px solid #E7E8E9;
color: #C7C8C9;
}
// span {
// width: 100%;
// }
}
}
.ht-for-m16 {
height: px2rem(66px);
}
</style>
<template>
<!-- 专项合作列表 -->
<section class="coop-container">
<div
v-show="paramData.length && isShow"
v-for="(item , index) in paramData"
:key="index"
class="coop-item"
@click="coopDetails(item)"
>
<div class="coop-item-left">
<img :src="item.imgUrl" />
<span
v-if="item.projectStatusValue"
class="coop-container-status"
:style="{'background': cBgColor(item)}"
>{{item.projectStatusValue | statusText}}</span>
</div>
<div class="coop-item-right">
<span class="coop-item-right-title">{{item.name}}</span>
<span v-if="item.cmeType == 2" class="coop-item-right-other">{{item.level}} | {{item.scope}}</span>
<span v-if="item.cmeType != 2" class="coop-item-right-other">{{item.level}} | {{item.credit}} | {{item.scope}}</span>
<span class="coop-item-right-other">{{item.startDate | formatTime('{y}.{m}.{d}')}}{{item.endDate | formatTime('{y}.{m}.{d}')}} <span v-if="item.cardStatus == 1" class="active"><span>已激活</span></span></span>
</div>
</div>
<NoMoreContent v-show="paramData.length > 9"></NoMoreContent>
<NoContent v-show="!paramData.length && isShow" :tabNum="tabTo"></NoContent>
</section>
</template>
<script>
import NoMoreContent from "@/components/business/no-more-content";
import NoContent from "@/components/business/no-content";
import UpdateDialog from "@/components/business/update-dialog";
import { setEventByModuleCode, deepCopy, getWebPageUrl } from "@/utils/index";
import { getAppVersion } from "@/utils";
import { mapActions, mapGetters } from "vuex";
import { Popup, Toast } from "vant";
export default {
name: "coop-list-item",
data() {
return {
bgColor: "green",
statusText: "进行中",
showGoUpdate: false
};
},
props: {
paramData: {
type: Array,
default: () => []
},
coopType: {
type: Number,
default: 1
},
isShow: {
type: Boolean,
default: false
},
tabTo: {
type: Number,
default: 1
},
userMobile: {
type: String,
default: ""
},
provinceId: {
type: String | Number,
default: 0
},
organizationId: {
type: String | Number,
default: 0
},
},
computed: {
...mapGetters(["userInfo"])
},
components: {
NoMoreContent,
NoContent,
UpdateDialog
},
mounted() {},
filters: {
statusText(status) {
if (status === 1) {
return "参加中";
} else if (status === 5) {
return "进行中";
} else if (status === 10) {
return "已结束";
} else {
return "已结束";
}
}
},
methods: {
...mapActions(["setProjectTabIndex"]),
cBgColor(item) {
if (item.projectStatusValue === 1) {
return "#5890DD";
} else if (item.projectStatusValue === 5) {
return "#449284";
} else if (item.projectStatusValue === 10) {
return "#373839";
} else {
return "#5890DD";
}
},
coopDetails(item) {
this.$sendBuriedData({
component_tag: `880#8803#${item.id}#${item.name}` //'210#210002#0#'+item.projectName
});
let appVersion = this.userInfo.appVersion;
let appVersionNum = appVersion.split('.').join('');
console.log('appVersionNum', appVersionNum);
if(appVersionNum < 341) {
Toast('请您下载新版本App');
return;
}
// 临时添加
if(window.__isWeb) {
this.$router.push({
path: "/coop",
query: {
id: item.id,
coopType: this.coopType,
courseRequire: item.courseRequire,
provinceId: this.provinceId,
organizationId: this.organizationId
}
});
return;
}
if (this.userMobile) {
let paramList = [
{
key: "pageUrl",
value: getWebPageUrl(`cme/#/coop?id=${item.id}&courseRequire=${item.courseRequire}&provinceId=${this.provinceId}&organizationId=${this.organizationId}`),
type: 4,
seqNo: 1
}
];
rocNative.dispatchEventByModuleCode({
modeCode: "M300",
jsonString: paramList
});
} else {
rocNative.gotoLogin();
}
},
goToPage(item) {
let _this = this;
// 如果是湖北考试项目,则做相应权限判断 湖北的projectId=3
if (item.id == "3") {
if (!_this.userInfo.userToken) {
rocNative.gotoLogin();
return;
}
let param = {
type: 1,
token: _this.userInfo.userToken || _this.token,
setEntry: true
};
this.GET("portal/portalApp/role/3", param).then(res => {
if (res.code == "000000") {
// {
// "data": 0, // 0就是无权限,1有权限
// "code": "000000",
// "message": "成功"
// }
if (res.data == 0) {
rocNative.showNativeToast({
message: "您不属于该项目,无法查看"
});
return;
}
} else {
rocNative.gotoLogin();
return;
}
_this.goToPage1(item.contentListModel);
});
} else {
_this.goToPage1(item.contentListModel);
}
},
// 跳转
goToPage1(itemData) {
let paramList = deepCopy(setEventByModuleCode(itemData));
let isStrokeUrl =
paramList[0] &&
paramList[0]["value"] &&
paramList[0]["value"].indexOf("stroke.js") !== -1;
let strokeUrl = "";
if (isStrokeUrl) {
strokeUrl =
paramList[0]["value"] + "&token=" + this.userInfo.userToken ||
_this.token;
paramList[0]["value"] = strokeUrl;
}
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: paramList
});
// this.appBuryingPointEntrust({
// ...activity_action,
// labelId: itemData.id,
// functionCode: this.id == 1 ? "c_project" : "f_activity",
// actionCode: this.id == 1 ? "c_project_tab" : "c_activity_tab",
// labelValue: itemData.title,
// createdTime: new Date().getTime()
// });
},
goUpdateHandler() {
//去更新
rocNative.upGradeVersion();
this.showGoUpdate = false;
}
}
};
</script>
<style lang="scss" scoped>
@import "../../style/mixin";
.coop-container {
position: relative;
margin: px2rem(0px) px2rem(15px);
&-status {
position: absolute;
top: px2rem(6px);
left: 0;
// display: block;
width: px2rem(44px);
height: px2rem(18px);
line-height: px2rem(18px);
padding: px2rem(0px) 0 0 px2rem(4px);
background: rgba(88, 144, 221, 1);
color: #fff;
font-size: px2rem(11px);
border-top-right-radius: px2rem(3px);
border-bottom-right-radius: px2rem(3px);
}
}
.coop-item {
display: flex;
width: 100%;
height: px2rem(128px);
border-bottom: 1px solid #f0f0f0;
background: #fff;
flex-direction: row;
justify-content: center;
align-items: center;
img {
width: px2rem(115px);
height: px2rem(86px);
margin-right: px2rem(15px);
border-radius: px2rem(3px);
}
&-left {
display: flex;
position: relative;
top: 0;
}
&-right {
display: flex;
width: px2rem(215px);
flex-direction: column;
padding-top: px2rem(4px);
&-title {
height: px2rem(50px);
line-height: px2rem(20px);
font-size: px2rem(16px);
font-weight: 700;
color: rgba(55, 56, 57, 1);
}
&-other {
height: px2rem(21px);
line-height: px2rem(20px);
font-size: px2rem(13px);
font-weight: 400;
color: rgba(151, 152, 153, 1);
width: px2rem(210px);
overflow : hidden;
text-overflow: ellipsis;
white-space:nowrap;
.active {
position: absolute;
z-index: 1;
right: 0;
height: px2rem(18px);
line-height: px2rem(18px);
color: #CAA861;
border-radius: px2rem(3px);
border: 1px solid rgba(202,168,97,1);
span {
position: relative;
top: px2rem(-1.1px);
z-index: 2;
font-size: px2rem(11px);
padding: 0 px2rem(4px);
}
}
}
}
}
.update-dialog-content {
padding: 0 px2rem(15px);
box-sizing: border-box;
.title {
text-align: center;
color: #373839;
font-size: px2rem(18px);
padding: px2rem(15px) 0;
line-height: px2rem(25px);
}
.update-btn {
text-align: center;
height: px2rem(55px);
line-height: px2rem(55px);
font-size: px2rem(16px);
color: #979899;
&.confirm-btn {
color: #449284;
}
&.v-hairline-top::after {
border-top-width: 1px;
}
}
}
</style>
<style>
.van-overlay {
background-color: rgba(0, 0, 0, 0.5);
}
</style>
<template>
<div v-show="isShow && needShow" class="pop-sign-box">
<div class="pop-mask"></div>
<div class="pop-box">
<img src="../../images/tankuang.png">
<div class="pop-text">
<p class="pop-text-joy">恭喜你获得</p>
<p class="pop-text-tips">{{popText}}</p>
</div>
<span class="pop-box-btn" @click="gotoCertDetail">查看证书</span>
<div class="sin-close" @click="close">
<img src="../../images/close.png">
</div>
</div>
<Toast ref="toastTitle"></Toast>
</div>
</template>
<script>
import Toast from "@/components/common/common-toast";
import { mapGetters } from "vuex";
import { getAppVersion } from "@/utils";
export default {
data() {
return {
isShow: true,
// appVersion: "200",
// certUrl: '',
// certId: '',
textTips:
"国家公共卫生办公室高血压慢病管理资格国家公共卫生办公室高血压慢病管理资格"
};
},
props: {
certUrl: {
type: String,
default: ""
},
certId: {
type: String || Number,
default: ""
},
popText: {
type: String,
default: ""
},
needShow: {
type: Boolean,
default: false
}
},
computed: {
...mapGetters(["userInfo"])
},
components: {
Toast
},
mounted() {
},
methods: {
// 显示组件
show() {
this.isShow = true;
},
// 关闭组件
close() {
this.isShow = false;
},
// 设置组件文本内容,并根据条件进行显示
// setCertInfo(tips, certUrl, certId, isShow = true) {
// this.textTips = tips;
// this.certUrl = certUrl;
// this.certId = ticertIdps;
// if (this.isShow) {
// this.isShow = isShow;
// }
// },
// 跳转到证书详情页面
gotoCertDetail: function() {
let _this = this;
let param = {
id: _this.certId,
token: _this.userInfo.userToken
};
if (window.__isWeb) {
_this.$refs.toastTitle.toast("请您下载App");
return;
}
let appVersion = getAppVersion(_this.userInfo.appVersion);
if (appVersion <= 300) {
_this.$refs.toastTitle.toast("请您下载新版本App");
return;
}
_this.API_GET("app/certificate/downLoad", param).then(res => {
if (res.respCode == 200) {
// id=418644
let paramList = [
{
key: "className",
value:
"com.picahealth.yunque.activitys.honor.CheckCertificatesActivity###YQWebView",
type: 4,
seqNo: 1
},
{
key: "url",
value: res.certificateUrl,
type: 4,
seqNo: 2
},
{
key: "id",
value: _this.certId,
type: 4,
seqNo: 3
},
{
key: "navTitle",
value: _this.popText,
type: 4,
seqNo: 4
},
{
key: "isNotTab",
value: true,
type: 4,
seqNo: 5
},
{
key: "isShowDownload",
value: true,
type: 4,
seqNo: 6
}
];
rocNative.dispatchEventByModuleCode({
modeCode: "M200",
jsonString: paramList
});
}
});
}
}
};
</script>
<style lang="scss" scoped>
@import "../../style/mixin";
.pop-sign-box {
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 110;
.pop-box {
background: #fff;
// background: #00FF00 url(../../images/tankuang.png) no-repeat center center ;
width: px2rem(280px);
height: px2rem(312px);
border-radius: px2rem(7px);
position: absolute;
z-index: 112;
text-align: center;
left: 50%;
top: 50%;
margin: px2rem(-180px) 0 0 px2rem(-140px);
img {
width: px2rem(280px);
height: px2rem(312px);
vertical-align: middle;
}
&-btn {
position: relative;
top: px2rem(-62px);
display: inline-block;
width: px2rem(215px);
height: px2rem(44px);
line-height: px2rem(44px);
// font-family: "PingFangSC-Medium", "PingFangSC", "Microsoft Yahei";
font-size: px2rem(16px);
background: linear-gradient(
360deg,
rgba(255, 227, 97, 1) 0%,
rgba(255, 217, 121, 1) 100%
);
box-shadow: 0px px2rem(4px) px2rem(4px) 0px rgba(0, 0, 0, 0.09);
border-radius: px2rem(22px);
color: #a78400;
font-weight: 700;
}
}
.pop-text {
position: absolute;
top: px2rem(160px);
width: 100%;
text-align: center;
&-joy {
color: #ff9a4b;
font-size: px2rem(24px);
// font-family: "PingFangSC-Medium", "PingFangSC", "Microsoft Yahei";
font-weight: 700;
}
&-tips {
// font-family: "PingFangSC-Medium", "PingFangSC", "Microsoft Yahei";
color: #ff9a4b;
font-size: px2rem(14px);
font-weight: 400;
padding: px2rem(8px) px2rem(10px) px2rem(24px) px2rem(10px);
}
}
// .si-joy {
// color: #ff7c26;
// font-size: px2rem(18px);
// }
// .si-tips {
// color: #666;
// font-size: px2rem(14px);
// padding: px2rem(8px) px2rem(10px) px2rem(24px) px2rem(10px);
// }
.pop-mask {
position: absolute;
background: rgba(0, 0, 0, 0.5);
width: 100%;
height: 100%;
z-index: 111;
}
.sin-close {
position: absolute;
width: px2rem(30px);
height: px2rem(30px);
bottom: px2rem(-50px);
margin-left: px2rem(-15px);
left: 50%;
img {
width: px2rem(30px);
height: px2rem(30px);
display: block;
}
}
// font-size:px2rem(12px) ;
}
</style>
<template>
<section @click="jumpToCardList" 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">国家级继续医学教育项目(远程)</span>
<span class="bottom">上百个项目持续更新上线</span>
</article>
<img class="right-icon" src="../../images/cme/phrase2/arr-right.png" alt />
</article>
</section>
</template>
<script>
import { Toast } from 'vant';
import { getWebPageUrl } from "@/utils/index";
import { mapGetters } from "vuex";
export default {
data() {
return {};
},
props: {
oneLevelUrl: {
type: String,
default: ""
},
provinceId: {
type: String | Number,
default: ""
},
organizationId: {
type: String | Number,
default: ""
},
cmeToken: {
type: String,
default: ""
}
},
computed: {
...mapGetters(["userInfo"])
},
methods: {
// 跳转I类学习详情(介绍)页面
jumpToCardList() {
this.$sendBuriedData({
component_tag: "880#8802"
});
let appVersion = this.userInfo.appVersion;
let appVersionNum = appVersion.split('.').join('');
console.log('appVersionNum', appVersionNum);
if(appVersionNum < 341) {
Toast('请您下载新版本App');
return;
}
if (!this.userInfo.userMobile) {
rocNative.gotoLogin();
return;
}
if (window.__isWeb) {
console.log("in jumpToCardList");
return;
} else {
let pageUrl = getWebPageUrl("cme/#/icredit-detail");
let paramList = [
{
key: "pageUrl",
value: `${pageUrl}?provinceId=${this.provinceId}&organizationId=${this.organizationId}&cmeToken=${this.cmeToken}&oneLevelUrl=` + encodeURIComponent(this.oneLevelUrl),
type: 4,
seqNo: 1
}
];
rocNative.dispatchEventByModuleCode({
modeCode: "M300",
jsonString: paramList
});
}
}
}
};
</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
...@@ -8,32 +8,17 @@ ...@@ -8,32 +8,17 @@
<div class="pro-name"> <div class="pro-name">
<span class="title">项目名称</span> <span class="title">项目名称</span>
<span class="name">{{projectName}}</span> <span class="name">{{projectName}}</span>
</div> </div>
<!-- <div class="content"> -->
<!-- <span>学习收获</span>
<span>
{{level}}
<b v-show="cmeType !=2" class="split"></b>
{{ cmeType !=2 ? projectCredit : ''}}
</span> -->
<!-- <span>{{level}} | {{projectCredit}}</span> -->
<!-- </div> -->
<div class="content"> <div class="content">
<!-- <span>申请范围</span> -->
<span>学习范围</span> <span>学习范围</span>
<span>{{scope}}</span> <span>{{scope}}</span>
</div> </div>
<div class="remind" v-if="remind && cmeType != 2">
<span>{{remind}}</span>
</div>
<div class="content"> <div class="content">
<span>起止时间</span> <span>起止时间</span>
<span>{{startDate | formatTime('{y}.{m}.{d}')}}{{endDate | formatTime('{y}.{m}.{d}')}}</span> <span>{{startDate | formatTime('{y}.{m}.{d}')}}{{endDate | formatTime('{y}.{m}.{d}')}}</span>
</div> </div>
<div class="content"> <div class="content">
<!-- <span>{{cmeType == 2 ? '主办单位' : '发起机构'}}</span> --> <span>主办单位</span>
<!-- <span>主办单位</span> -->
<span>申办单位</span>
<span>{{organName}}</span> <span>{{organName}}</span>
</div> </div>
</div> </div>
...@@ -77,10 +62,6 @@ export default { ...@@ -77,10 +62,6 @@ export default {
type: String, type: String,
default: "" default: ""
}, },
cmeType: {
type: String | Number,
default: 2
},
projectName: { projectName: {
type: String, type: String,
default: "" default: ""
......
...@@ -31,9 +31,9 @@ export default { ...@@ -31,9 +31,9 @@ export default {
jumpToCardList() { jumpToCardList() {
// 如果没有登录,则要去登录页面 // 如果没有登录,则要去登录页面
// 打开页面埋点 // 打开页面埋点
this.$sendBuriedData({ // this.$sendBuriedData({
component_tag: "880#8801" // component_tag: "880#8801"
}); // });
let appVersion = this.userInfo.appVersion; let appVersion = this.userInfo.appVersion;
let appVersionNum = appVersion.split('.').join(''); let appVersionNum = appVersion.split('.').join('');
console.log('appVersionNum', appVersionNum); console.log('appVersionNum', appVersionNum);
......
<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="info2">
<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="info2">
<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;
}
}
}
.info2 {
display: flex;
flex-direction: column;
.name {
// position: absolute;
// top: px2rem(-30px);
// left: px2rem(4px);
}
p {
display: flex;
align-items: center;
height: px2rem(24px);
line-height: px2rem(24px);
.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>
<van-popup
v-model="isShow"
@click-overlay="cancle"
position="bottom"
>
<section class="bind-cart-wrapper">
<article class="title">
<span>激活详情</span>
<img @click="cancle" src="../../images/cme/close.png" />
</article>
<article class="tip">
<div class="left">
<img src="../../images/cme/phrase2/info.png" />
<span>激活码用于学习课程,您可以从订单详情或您的实体卡查看激活码。激活码一旦使用,不可退回。</span>
</div>
</article>
<section class="input-wrapper">
<article class="code-new">
<!-- <van-field
maxlength="26"
v-model="activationCode"
label="激活码"
placeholder="请输入激活码"
/> -->
<!-- <span>激活码</span>
<input type="text" maxlength="26" v-model="activationCode" placeholder="请输入激活码"> -->
</article>
<span class="error">{{errorMsg}}</span>
<img v-show="!!activationCode" @click="clear" src="../../images/cme/phrase2/close.png" />
</section>
<article class="bottom">
<van-button @click="confirm" size="large" round color="#449284">确认激活</van-button>
</article>
</section>
</van-popup>
</template>
<script>
export default {
props: {
isShow: {
type: Boolean,
default: true
},
changeErrorMsg: {
type: String,
default: ''
}
},
data() {
return {
activationCode: '',
errorMsg: ''
};
},
//
watch: {
activationCode(val) {
if(!val) {
this.errorMsg = '请输入激活码';
} else {
this.errorMsg = '';
}
this.$nextTick(() => {
this.activationCode = val.replace(/\s/g,'').replace(/.....(?!$)/g,'$& ');
});
},
changeErrorMsg(val) {
if(val) {
this.errorMsg = val;
}
},
isShow(val) {
this.activationCode = '';
this.errorMsg = '';
}
},
methods: {
cancle() {
this.$emit("cancle");
},
confirm() {
if(!this.activationCode) {
this.errorMsg = '请输入激活码';
return;
};
if(this.activationCode.length != 23) {
this.errorMsg = '请输入正确的激活码';
return;
}
let aCode = JSON.parse(JSON.stringify(this.activationCode));
aCode = aCode.replace(/\s/g,'');
this.$emit("confirm", aCode);
},
clear() {
this.activationCode = ''
}
}
};
</script>
<style lang="scss" scoped>
@import "../../style/mixin";
.bind-cart-wrapper {
width: 100%;
display: flex;
line-height: 1;
padding: px2rem(10px) px2rem(15px);
display: flex;
flex-direction: column;
background: rgba(255, 255, 255, 1);
// box-shadow: 0px -2px 10px 0px rgba(0, 0, 0, 0.1);
.title {
display: flex;
flex-direction: row;
font-size: 18px;
font-weight: 700;
align-items: center;
justify-content: center;
width: 100%;
margin-top: px2rem(20px);
img {
position: relative;
top: 0;
right: px2rem(-120px);
width: px2rem(12px);
height: px2rem(12px);
}
}
.tip {
display: flex;
margin-top: px2rem(40px);
.left {
display: flex;
line-height: 1.2;
font-size: px2rem(12px);
img {
position: relative;
top: px2rem(1px);
width: px2rem(12px);
height: px2rem(12px);
// margin: px2rem(2px) px2rem(4px) 0 px2rem(1px);
}
span {
margin-left: px2rem(4px);
}
color: #979899;
}
}
.input-wrapper {
position: relative;
.code {
display: flex;
flex-direction: column;
padding: px2rem(20px) 0;
padding-top: 0;
}
.error {
position: absolute;
top: px2rem(66px);
left: px2rem(56px);
display: inline-block;
color: red;
font-size: px2rem(12px);
}
img {
position: absolute;
top: px2rem(33px);
right: px2rem(12px);
width: px2rem(15px);
height: px2rem(15px);
}
}
.bottom {
display: flex;
margin-bottom: px2rem(40px);
}
}
</style>
\ No newline at end of file
<template>
<div class="step-content">
<p class="step-text step1-text" v-if="step1">学习进度{{studyProgress}}</p>
<div class="step-item">
<span :class="{'actived': step1 || step2 || step3 || step4}">1</span>
<p :class="{'actived': step1 || step2 || step3 || step4}">项目学习</p>
</div>
<div class="step-line step-one-line" :class="{'actived': step2 || step3 || step4}"></div>
<p class="step-text step2-text" v-if="step2" @click="applyFor">
立即申请
<img src="../../images/cme/step-right-arrow.png"/>
</p>
<div class="step-item">
<span :class="{'actived': step2 || step3 || step4}">2</span>
<p :class="{'actived': step2 || step3 || step4}">申请学分</p>
</div>
<div class="step-line step-two-line" :class="{'actived': step3 || step4}"></div>
<p class="step-text step3-text" v-if="step3" @click="verifyResult">
{{progressText}}
<img src="../../images/cme/step-right-arrow.png"/>
</p>
<div class="step-item">
<span :class="{'actived': step3 || step4}">3</span>
<p :class="{'actived': step3 || step4}">学分审核</p>
</div>
<div class="step-line step-three-line" :class="{'actived': step4}"></div>
<p class="step-text step4-text" v-if="step4" @click="getScore">
获得{{credit}}
<img src="../../images/cme/step-right-arrow.png"/>
</p>
<div class="step-item">
<span :class="{'actived': step4}">4</span>
<p :class="{'actived': step4}">申请成功</p>
</div>
<!-- 申请学分提示框 -->
<div class="apply-score-content" v-if="showTip">
<div class="lm">
<img src="../../images/cme/hand.png" />
</div>
<div class="title">恭喜您完成该项目学习及考试,快去申请学分</div>
<div class="line"></div>
<div class="rm" @click="closeTip">
<img src="../../images/cme/delete.png" />
</div>
</div>
</div>
</template>
<script>
import { getWebPageUrl, gotoPage } from "@/utils/index";
export default {
props: {
currentProgress: {
type: Number,
default: 0
},
studyProgress: {
type: String,
default: "0%"
},
credit: {
type: String,
default: ""
},
creditId: {
type: Number,
default: 0
},
certificateUrl: {
type: String,
default: ""
},
certificateId: {
type: String,
default: ""
},
projectId: {
type: String | Number,
default: "1"
},
inScope: {
type: Number,
default: 0
}
},
data() {
return {
step1: false,
step2: false,
step3: false,
step4: false,
progressText: "",
showTip: false,
btnDisabled: true
};
},
watch: {
currentProgress(n,o) {
let _this = this;
if(n == 1) { // 项目学习
_this.step1 = true;
_this.step2 = false;
_this.step3 = false;
_this.step4 = false;
}else if(n == 2) { // 申请学分
_this.step1 = false;
_this.step2 = true;
_this.step3 = false;
_this.step4 = false;
_this.showTip = true;
setInterval(() => {
_this.showTip = false;
},5000)
}else if(n == 3) { // 学分审核
_this.step1 = false;
_this.step2 = false;
_this.step3 = true;
_this.step4 = false;
_this.progressText = "审核中";
}else if(n == 4) { // 审核失败
_this.step1 = false;
_this.step2 = false;
_this.step3 = true;
_this.step4 = false;
_this.progressText = "审核失败";
}else if(n == 5 || n == 6) { // 申请成功
_this.step1 = false;
_this.step2 = false;
_this.step3 = false;
_this.step4 = true;
}
}
},
created() {},
methods: {
// 立即申请
applyFor() {
this.$sendBuriedData({
component_tag: `211#211001#${this.projectId}`
});
this.$emit("applicationCredit");
},
// 关闭提示
closeTip() {
this.showTip = false;
},
// 审核
verifyResult() {
if(this.currentProgress == 3) {
this.$sendBuriedData({
component_tag: `211#211003#${this.projectId}`
});
}else if(this.currentProgress == 4) {
this.$sendBuriedData({
component_tag: `211#211005#${this.projectId}`
});
}
gotoPage(this,`cme/#/credit-detail?creditId=${this.creditId}&projectId=${this.projectId}`);
},
// 获得学分--下载证书
getScore() {
let paramList = [
{
key: "className",
value:
"com.picahealth.yunque.activitys.honor.CheckCertificatesActivity###YQWebView",
type: 4,
seqNo: 1
},
{
key: "url",
value: this.certificateUrl,
type: 4,
seqNo: 2
},
{
key: "id",
value: this.certificateId,
type: 4,
seqNo: 3
},
{
key: "navTitle",
value: "学分详情",
type: 4,
seqNo: 4
},
{
key: "isNotTab",
value: true,
type: 4,
seqNo: 5
},
{
key: "isShowDownload",
value: true,
type: 4,
seqNo: 6
}
];
rocNative.dispatchEventByModuleCode({
modeCode: "M200",
jsonString: paramList
});
this.$sendBuriedData({
component_tag: `211#211004#${this.projectId}`
});
}
}
};
</script>
<style lang="scss" scoped>
@import "../../style/mixin";
.step-content {
position: relative;
height: px2rem(110px);
background: rgba(248, 249, 250, 1);
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
.step-item {
flex-grow: 1;
text-align: center;
padding-top: px2rem(20px);
line-height: px2rem(20px);
span {
display: inline-block;
width: px2rem(20px);
height: px2rem(20px);
line-height: px2rem(17px);
border-radius: 50%;
background: #676869;
border: 2px solid rgba(255, 255, 255, 1);
color: #fff;
font-size: px2rem(12px);
font-weight: 700;
}
span.actived {
background: #449284;
}
p {
font-size: px2rem(13px);
color: #373839;
}
p.actived {
color: #449284;
}
}
.step-line {
position: absolute;
top: px2rem(58px);
width: px2rem(75px);
height: px2rem(3px);
background: #dadde1;
}
.step-one-line {
left: px2rem(56px);
}
.step-two-line {
left: px2rem(150px);
}
.step-three-line {
right: px2rem(56px);
}
.step-one-line.actived,
.step-two-line.actived,
.step-three-line.actived {
background: #449284;
}
.step-text {
position: absolute;
top: px2rem(25px);
padding: px2rem(4px) px2rem(6px);
background: #449284;
border-radius: px2rem(10px);
font-size: px2rem(12px);
line-height: px2rem(12px);
color: #fff;
img {
display: inline-block;
width: px2rem(6px);
height: px2rem(9px);
padding-left: px2rem(4px);
}
}
.step1-text {
left: px2rem(20px);
}
.step1-text:after {
content: "";
width: px2rem(0px);
height: px2rem(0px);
border-top: px2rem(7px) solid #449284;
border-left: px2rem(7px) solid transparent;
border-right: px2rem(7px) solid transparent;
position: absolute;
top: px2rem(18px);
left: px2rem(21px);
}
.step2-text {
left: px2rem(106px);
}
.step2-text:after,
.step3-text:after {
content: "";
width: px2rem(0px);
height: px2rem(0px);
border-top: px2rem(7px) solid #449284;
border-left: px2rem(7px) solid transparent;
border-right: px2rem(7px) solid transparent;
position: absolute;
top: px2rem(18px);
left: px2rem(29px);
}
.step3-text {
left: px2rem(207px);
}
.step3-text:after {
content: "";
width: px2rem(0px);
height: px2rem(0px);
border-top: px2rem(7px) solid #449284;
border-left: px2rem(7px) solid transparent;
border-right: px2rem(7px) solid transparent;
position: absolute;
top: px2rem(18px);
left: px2rem(21px);
}
.step4-text {
right: px2rem(20px);
}
.step4-text:after {
content: "";
width: px2rem(0px);
height: px2rem(0px);
border-top: px2rem(7px) solid #449284;
border-left: px2rem(7px) solid transparent;
border-right: px2rem(7px) solid transparent;
position: absolute;
top: px2rem(18px);
right: px2rem(20px);
}
.apply-score-content {
display: flex;
position: absolute;
left: px2rem(105px);
top: px2rem(-42px);
background: #000;
opacity: 0.6;
width: px2rem(236px);
height: px2rem(51px);
border-radius: px2rem(6px);
.title {
font-size: px2rem(12px);
color: rgba(255, 255, 255, 1);
margin: px2rem(7px) px2rem(11px) 0 px2rem(0px);
width: px2rem(133px);
}
.lm {
width: px2rem(41px);
img {
display: inline-block;
width: px2rem(20px);
padding: 0 0 px2rem(7px) px2rem(15px);
}
}
.line {
width: px2rem(1px);
height: px2rem(51px);
background: #fff;
opacity: 0.18;
}
.rm {
width: px2rem(41px);
img {
display: inline-block;
width: px2rem(15px);
padding: 0 px2rem(15px) px2rem(7px);
}
}
}
}
</style>
\ No newline at end of file
...@@ -9,15 +9,15 @@ import '@/utils/yqy-bridge' // 移动端服务 ...@@ -9,15 +9,15 @@ import '@/utils/yqy-bridge' // 移动端服务
// import FastClick from 'fastclick' // import FastClick from 'fastclick'
import vueFilters from '@/utils/filter' import vueFilters from '@/utils/filter'
import VConsole from 'vconsole/dist/vconsole.min.js' import VConsole from 'vconsole/dist/vconsole.min.js'
import BuriedPoint,{ sendBuriedData} from 'web-buried-point'; import BuriedPoint, { sendBuriedData } from 'web-buried-point';
import Vant from 'vant'; import Vant from 'vant';
import 'vant/lib/index.css'; import 'vant/lib/index.css';
import clipboard from 'clipboard'; import clipboard from 'clipboard';
//注册到vue原型上 //注册到vue原型上
Vue.prototype.clipboard = clipboard; Vue.prototype.clipboard = clipboard;
if(!(process.env.BUILD_ENV === 'uat' || process.env.BUILD_ENV === 'pro')) { if (!(process.env.BUILD_ENV === 'uat' || process.env.BUILD_ENV === 'pro')) {
// if(!(process.env.BUILD_ENV === 'pro')) { // if(!(process.env.BUILD_ENV === 'pro')) {
let vConsole = new VConsole() // 初始化 let vConsole = new VConsole() // 初始化
} }
...@@ -25,9 +25,8 @@ if(!(process.env.BUILD_ENV === 'uat' || process.env.BUILD_ENV === 'pro')) { ...@@ -25,9 +25,8 @@ if(!(process.env.BUILD_ENV === 'uat' || process.env.BUILD_ENV === 'pro')) {
// Vue.config.devtools = true; // Vue.config.devtools = true;
// 注册所有公用过滤器 // 注册所有公用过滤器
for(let key in vueFilters) { for (let key in vueFilters) {
Vue.filter(key, vueFilters[key]) Vue.filter(key, vueFilters[key])
} }
...@@ -42,14 +41,14 @@ const router = new VueRouter({ ...@@ -42,14 +41,14 @@ const router = new VueRouter({
routes, routes,
mode: 'hash', mode: 'hash',
strict: process.env.NODE_ENV !== 'production', strict: process.env.NODE_ENV !== 'production',
scrollBehavior (to, from, savedPosition) { scrollBehavior(to, from, savedPosition) {
if (savedPosition) { if (savedPosition) {
return savedPosition return savedPosition
} else { } else {
if (from.meta.keepAlive) { if (from.meta.keepAlive) {
from.meta.savedPosition = document.body.scrollTop; from.meta.savedPosition = document.body.scrollTop;
} }
return { x: 0, y: to.meta.savedPosition || 0 } return { x: 0, y: to.meta.savedPosition || 0 }
} }
} }
}) })
...@@ -63,20 +62,20 @@ Vue.mixin({ ...@@ -63,20 +62,20 @@ Vue.mixin({
// import { buriedURL } from './apiConfig'; // import { buriedURL } from './apiConfig';
let domain = ''; let domain = '';
if (process.env.BUILD_ENV === 'pro') { if (process.env.BUILD_ENV === 'pro') {
domain = 'https://sc.yunqueyi.com'; domain = 'https://sc.yunqueyi.com';
} else if (process.env.BUILD_ENV === 'test') { } else if (process.env.BUILD_ENV === 'test') {
domain = 'https://test1-sc.yunqueyi.com'; domain = 'https://test1-sc.yunqueyi.com';
} else if (process.env.BUILD_ENV === 'uat') { } else if (process.env.BUILD_ENV === 'uat') {
domain = 'https://uat-sc.yunqueyi.com'; domain = 'https://uat-sc.yunqueyi.com';
} else if (process.env.BUILD_ENV === 'dev') { } else if (process.env.BUILD_ENV === 'dev') {
domain = 'https://dev-sc.yunqueyi.com'; domain = 'https://dev-sc.yunqueyi.com';
} else { } else {
domain = 'https://dev-sc.yunqueyi.com'; domain = 'https://dev-sc.yunqueyi.com';
} }
Vue.use(BuriedPoint, { Vue.use(BuriedPoint, {
class_name: 'web_app_cme', class_name: 'web_app_professional_exam',
url: `${domain}/file/log/trace1` url: `${domain}/file/log/trace1`
}); });
Vue.prototype.$sendBuriedData = sendBuriedData; Vue.prototype.$sendBuriedData = sendBuriedData;
......
import App from '../App'
const index = r => require.ensure([], () => r(require('../views/index')), 'index')
const complist = r => require.ensure([], () => r(require('../views/component-details')), 'complist')
const parent = r => require.ensure([], () => r(require('../views/parent-page')), 'parent')
const merge = r => require.ensure([], () => r(require('../views/merge-detail')), 'merge')
const test = r => require.ensure([], () => r(require('../views/test-components')), 'test-components')
export default [{
path: '/',
component: App,
children: [
{
path: '',
redirect: '/index'
},
{
path: '/index',
component: index
},
{
path: '/home',
component: index
},
{
path: '/comp2',
component: complist
},
{
path: '/parent',
component: parent
},
{
path: '/coop',
component: merge
},
{
path: '/test',
component: test
},
]
}]
import App from '../App' import App from '../App'
const index = r => require.ensure([], () => r(require('../views/index')), 'index') const index = r => require.ensure([], () => r(require('../views/index')), 'index')
const complist = r => require.ensure([], () => r(require('../views/component-details')), 'complist')
const cooplist = r => require.ensure([], () => r(require('../views/cooperation-details')), 'cooplist')
const parent = r => require.ensure([], () => r(require('../views/parent-page')), 'parent')
const merge = r => require.ensure([], () => r(require('../views/merge-detail')), 'merge') const merge = r => require.ensure([], () => r(require('../views/merge-detail')), 'merge')
const test = r => require.ensure([], () => r(require('../views/test-components')), 'test-components') const test = r => require.ensure([], () => r(require('../views/test-components')), 'test-components')
const creditedit = r => require.ensure([], () => r(require('../views/credit-edit')), 'credit-edit')
const creditdetail = r => require.ensure([], () => r(require('../views/credit-detail')), 'credit-detail')
const excgtips = r => require.ensure([], () => r(require('../views/exchange-tips')), 'exchange-tips')
const icreditdetail = r => require.ensure([], () => r(require('../views/I-credit-detail')), 'I-credit-detail')
export default [{ export default [{
path: '/', path: '/',
...@@ -27,18 +20,6 @@ export default [{ ...@@ -27,18 +20,6 @@ export default [{
path: '/home', path: '/home',
component: index component: index
}, },
// {
// path: '/coop',
// component: cooplist
// },
{
path: '/comp2',
component: complist
},
{
path: '/parent',
component: parent
},
{ {
path: '/coop', path: '/coop',
component: merge component: merge
...@@ -47,23 +28,5 @@ export default [{ ...@@ -47,23 +28,5 @@ export default [{
path: '/test', path: '/test',
component: test component: test
}, },
{
path: '/credit-edit',
component: creditedit
},
{
path: '/credit-detail',
component: creditdetail
},
{
path: '/excg-tips',
component: excgtips
},
{
path: '/icredit-detail',
component: icreditdetail
},
] ]
}] }]
<template>
<section class="cd-wrapper">
<CommonNavbar
:bgColor="bgColor"
v-show="showNavBar"
title
:isFixNavbar="isFixNavbar"
borderStyle="0px solid #fff"
></CommonNavbar>
<img class="img" src="https://file.yunqueyi.com/h5/images/tinified/I-detail-1.png" />
<img class="img" src="https://file.yunqueyi.com/h5/images/tinified/I-detail-2.png" />
<img class="img" src="https://file.yunqueyi.com/h5/images/tinified/I-detail-3.png" />
<img class="img" src="https://file.yunqueyi.com/h5/images/tinified/I-detail-4.png" />
<img class="img" src="https://file.yunqueyi.com/h5/images/tinified/I-detail-5.png" />
<img class="img" src="https://file.yunqueyi.com/h5/images/tinified/I-detail-6.png" />
<!-- <img class="img" src="https://file.yunqueyi.com/h5/images/tinified/I-detail-7.png" /> -->
<ExjumperButton @btnClick="isBuy(1)" btnText="立即学习" type="primary"></ExjumperButton>
<!-- <img @click="isBuy(1)" class="img" src="https://file.yunqueyi.com/h5/images/tinified/i-detail-8.png"> -->
<CardPopup
:cardInfo="cardInfo"
:isShow="isShowPopup"
@clickOverlay="clickOverlay"
@cancle="jumpToCardList"
@confirm="confirm"
></CardPopup>
<Loading v-if="showLoading" />
</section>
</template>
<script>
import ExjumperButton from "@/components/cme/exjumper-button";
import CommonNavbar from "@/components/common/common-navbar";
import CardPopup from "@/components/cme/card-popup";
import Loading from "@/components/common/common-loading";
import { Toast } from "vant";
export default {
data() {
return {
bgColor: "#fff",
bgColor: "none",
showNavBar: true,
isShowPopup: false,
isFixNavbar: true,
oneLevelUrl: "",
provinceId: 0,
organizationId: 0,
cardInfo: {
id: 0
},
cmeToken: "",
showLoading: false
};
},
components: {
CommonNavbar,
CardPopup,
ExjumperButton,
Loading
},
created() {
let _this = this;
window.__getPositionData = function(param) {
console.log(param);
// _this.showLoading = false;
param.setEntry = true;
_this.getProvinceIdByPosition(param);
};
this.oneLevelUrl = decodeURIComponent(
(this.$route.query && this.$route.query.oneLevelUrl) || ""
);
this.provinceId = (this.$route.query && this.$route.query.provinceId) || 0;
this.organizationId =
(this.$route.query && this.$route.query.organizationId) || 0;
this.cmeToken = (this.$route.query && this.$route.query.cmeToken) || "";
// this.getProvinceIdByPosition();
},
methods: {
// 点击弹层
clickOverlay() {
console.log("clickOverlay");
this.isShowPopup = false;
},
// 判断用户是否购买过I类学习卡
isBuy(cardType) {
this.$sendBuriedData({
component_tag: `881#8811`
});
this.showLoading = true;
let param = {
cardType: cardType,
token: this.cmeToken,
setEntry: true
};
this.GET("trade/storage/card/isBuy", param).then(res => {
if (res.code == "000000") {
// 如果购买过,则直接跳转到中华医学会页面
if (res.data) {
this.jumpToCardList();
} else {
this.preJumper();
}
}
// else {
// Toast(res.message);
// }
});
},
// 跳转前判断是否有机构,否则使用定位信息
preJumper() {
if (this.organizationId != 0 && this.provinceId != 0) {
this.getCardInfoByProvinceId(this.provinceId);
} else {
this.getPositionData();
}
},
// 获取地理位置信息
getPositionData() {
console.log("getPositionData");
rocNative.getPositionData({
__funcName: "__getPositionData"
});
},
// 根据省ID,获取学习卡信息
getCardInfoByProvinceId(provinceId) {
let param = {
area: provinceId + "",
cardType: 1,
pageNum: 1,
pageSize: 1
};
this.POST("trade/goods/cardList", param).then(res => {
if (res.code == "000000") {
this.showLoading = false;
this.isShowPopup = true;
this.cardInfo = (res.data && res.data[0]) || { id: 0 };
}
});
},
// 根据位置信息获取省ID
getProvinceIdByPosition(param) {
param.setEntry = true;
this.POST("aggregate/cme/convertLocationToProvinceId", param).then(
res => {
if (res.code == "000000") {
this.getCardInfoByProvinceId(res.data || 0);
} else {
this.getCardInfoByProvinceId(0);
}
}
);
},
// 跳转到原生的购买页面
confirm() {
this.isShowPopup = false;
let paramList = [
{
key: "className",
value:
"com.picahealth.yunque.activitys.studycard.StudyCardDetailActivity###PicaDo.LearningCardVC",
type: 4,
seqNo: 1
},
{
key: "goodId",
value: this.cardInfo.id,
type: 4,
seqNo: 1
},
{
key: "courseUrl",
value: encodeURIComponent(this.oneLevelUrl),
type: 4,
seqNo: 1
}
];
rocNative.dispatchEventByModuleCode({
modeCode: "M200",
jsonString: paramList
});
},
// 跳转I类学习详情页面(中华医学会项目列表页面)
jumpToCardList() {
this.showLoading = false;
this.isShowPopup = false;
if (window.__isWeb) {
return;
} else {
let pageUrl = this.oneLevelUrl;
let paramList = [
{
key: "pageUrl",
value: pageUrl,
type: 4,
seqNo: 1
},
// 此字段不配置,则用原来的逻辑
{
key: "needCache",
value: "1", // 0不缓存,其它值都做缓存
type: 4,
seqNo: 1
}
];
rocNative.dispatchEventByModuleCode({
modeCode: "M300",
jsonString: paramList
});
}
}
}
};
</script>
<style lang="scss" scoped>
@import "../style/mixin";
.cd-wrapper {
background: #f8f9fa;
padding-bottom: 80px;
.img {
margin-top: -15px;
width: 100%;
}
}
</style>
<template>
<div class="page-container">
<CommonNavbar
:bgColor="bgColor"
v-show="isShowNavbar"
:title="navTitle"
:isFixNavbar="isFixNavbar"
:burialPoint="pointStyle"
></CommonNavbar>
<div class="page-content">
<img
class="banner-img"
src="https://files.yunqueyi.com/image/jpeg/common/20190214153449966.jpg"
>
<CommonBannerVideo></CommonBannerVideo>
<CommonDescription :descTitle="descTitle" :value="description"></CommonDescription>
<CommonSpliteLine></CommonSpliteLine>
<CommonTitle :title="compTitle"></CommonTitle>
<TempListItem class="flex fs10"></TempListItem>
<CertShow class="flex fs10"></CertShow>
</div>
</div>
</template>
<script>
import CommonNavbar from "@/components/common/common-navbar";
import CommonDescription from "@/components/common/common-description";
import CommonSpliteLine from "@/components/common/common-splite-line";
import CommonTitle from "@/components/common/common-title";
import TempListItem from "@/components/business/temp-list-item";
import CertShow from "@/components/business/cert-show";
import CommonBannerVideo from "@/components/common/common-banner-video";
export default {
data() {
return {
bgColor: "none",
navTitle: "activity",
compTitle: "组件名称",
isShowNavbar: true,
isFixNavbar: true,
pointStyle: "activity",
descTitle: "规定从何处开始选取。如果是负数",
description:
"必需。规定从何处开始选取。如果是负数,那么它规定从数组尾部开始算起的位置那么它规定从数组尾部开始算起的位置那么它规定从数组尾部开始算起的位置那么它规定从数组尾部开始算起的位置。也就是说那么它规定从数组尾部开始算起的位置。也就是说那么它规定从数组尾部开始算起的位置。也就是说那么它规定从数组尾部开始算起的位置。也就是说那么它规定从数组尾部开始算起的位置。" +
" 也就是说那么它规定从数组尾部开始算起的位置。也就是说,必需。规定从何处开始选取。如果是负数,那么它规定从数组尾部开始算起的位置。也就是说,必需。规定从何处开始选取。如果是负数,那么它规定从数组尾部开始算起的位置。也就是说,必需。规定从何处开始选取。如果是负数,那么它规定从数组尾部开始算起的位置。也就是说,必需。规定从何处开始选取。如果是负数,那么它规定从数组尾部开始算起的位置。也就是说,必需。规定从何处开始选取。如果是负数,那么它规定从数组尾部开始算起的位置。也就是说,-1 指最后一个元素,-2 指倒数第二个元素,以此类推第二个元素。"
};
},
components: {
CommonNavbar,
CommonDescription,
CommonSpliteLine,
CommonTitle,
TempListItem,
CertShow,
CommonBannerVideo
},
mounted() {},
beforeDestroyed() {},
methods: {}
};
</script>
<style lang="scss" scoped>
@import "../style/mixin";
.banner-img {
display: inherit;
width: px2rem(375px);
height: px2rem(243px);
}
</style>
此差异已折叠。
此差异已折叠。
此差异已折叠。
<!-- 学分:个人信息编辑页面 -->
<template>
<section class="credit-edit-wrapper">
<CommonNavbar
:bgColor="bgColor"
v-show="isShowNavbar"
:isBlack="isBlack"
:title="navTitle"
:isFixNavbar="isFixNavbar"
:burialPoint="pointStyle"
borderStyle="0px solid #fff"
:backMethod="from"
></CommonNavbar>
<van-cell-group class="group">
<van-field label-width="150" disabled v-model="formData.name" label="姓名" placeholder="" />
<van-field label-width="150" v-model="formData.idCardNumber" label="身份证号" maxlength=18 placeholder="请填写您的真实身份证号" />
<van-field label-width="150" v-model="formData.icCardNumber" label="继续医学教育IC卡号" maxlength=9 placeholder="请填写您的IC卡号" />
</van-cell-group>
<div class="tips">
您的身份证号将用于生成项目学分证书对应的编号,请确保您所填写的身份证号的真实性
</div>
<CommonButton :type="buttonStyleType" @btnClick="applyCredit" btnText="提交"></CommonButton>
<CommonDialog content="提交成功" subContent="您可在“个人中心-证书与学分”中查看审核结果" cancleBtnText="我知道了" isSingle needSubContent :isShowDialog="isShowDialog" @handlerAction="handlerDialogAction"></CommonDialog>
</section>
</template>
<script>
import CommonNavbar from "@/components/common/common-navbar";
import CommonButton from "@/components/cme/common-button";
import CommonDialog from "@/components/cme/common-dialog";
export default {
components: {
CommonNavbar,
CommonButton,
CommonDialog
},
data() {
return {
formData: {
creditId: "",
id: "",
name: "",
idCardNumber: "",
icCardNumber: "",
},
// projectId: "",
token: "9B62E5874DA94979A54DB3E9DFC1443F",
buttonStyleType: 'disabled',
from: "native",
isBlack: true,
bgColor: "#fff",
navTitle: "申请学分",
isShowNavbar: true,
isFixNavbar: false,
pointStyle: "activity",
isShowDialog: false,
creditId: 0
};
},
watch: {
formData: {
handler(newVal) {
let idCardReg = /^[1-9]{1}[0-9]{14}$|^[1-9]{1}[0-9]{16}([0-9]|[xX])$/;
let icCardReg = /^[a-zA-Z0-9]{9}$/;
if(newVal.name && newVal.idCardNumber && newVal.icCardNumber
&& idCardReg.test(newVal.idCardNumber)
&& icCardReg.test(newVal.icCardNumber)) {
this.buttonStyleType = 'primary';
} else {
this.buttonStyleType = 'disabled';
}
},
deep: true
}
},
created() {
let _this = this;
window.__getUserInfoInCEdit = function(param) {
_this.token = param.userToken;
_this.getUserInfoByToken();
_this.getLatestApplyRecord();
};
window.__refresh = function() {
_this.getUserInfo();
};
// 前一页面传creditId
// this.projectId = this.$route && this.$route.query && this.$route.query.projectId || '';
this.from = this.$route && this.$route.query && this.$route.query.from || this.from;
this.creditId = this.$route && this.$route.query && this.$route.query.creditId || this.creditId;
// this.formData.id = this.projectId;
this.formData.creditId = this.creditId;
this.token = this.$route && this.$route.query && this.$route.query.token || this.token || ''
if (__isWeb) {
this.getUserInfoByToken();
this.getLatestApplyRecord();
} else {
this.getUserInfo()
}
},
methods: {
getUserInfo() {
rocNative.getUserInfo({
__funcName: "__getUserInfoInCEdit"
});
},
// 提交申请
applyCredit() {
let param = {
...this.formData,
token: this.token,
setEntry: true
};
this.POST("cme/credit/apply", param).then(res => {
if(res.code == '000000') {
this.isShowDialog = true
} else {
this.$toast({message: res.message});
}
})
},
// 最后一次提交信息:获取用户的idCardNumber
getLatestApplyRecord() {
let param = {
token: this.token,
setEntry: true
};
this.POST("cme/credit/latestApplyRecord/" + this.creditId, param).then(res => {
this.formData.icCardNumber = res.data.icCardNumber;
})
},
// 根据token获取用户信息
getUserInfoByToken() {
let param = {
token: this.token,
setEntry: true
};
this.GET("cme/credit/doctor/info", param).then(res => {
this.formData.name = res.data.name;
this.formData.idCardNumber = res.data.card;
// this.isShowDialog = true
})
},
// 显示提交成功的提示信息
handlerDialogAction(type) {
this.isShowDialog = false;
// 跳转到前一页面
if (window.__isWeb) {
this.$router.back(-1);
} else {
rocNative.goBack();
}
},
},
};
</script>
<style lang="scss">
@import "../style/mixin";
.credit-edit-wrapper {
.group {
margin: 10px 15px;
}
.tips {
margin: px2rem(10px) px2rem(15px) px2rem(50px);
font-weight: 400;
font-size: px2rem(14px);
line-height: px2rem(21px);
color: #979899;
}
.van-cell__title .van-field__label {
line-height: px2rem(30px) !important;
height: px2rem(20px) !important;
}
.van-cell {
padding: px2rem(20px) 0 !important;
font-size: px2rem(15px) !important;
color: #373839 !important;
}
.van-cell__title span {
font-weight: 400 !important;
}
.van-field__body {
line-height: px2rem(30px) !important;
height: px2rem(20px) !important;
}
.van-field__control {
padding-top: px2rem(8px) !important;
line-height: px2rem(20px) !important;
font-size: px2rem(15px);
}
}
</style>
\ No newline at end of file
<template>
<div>
<header class="header">
<span>兑换须知</span>
<!-- <img src="../images/cme/close.png" alt=""> -->
</header>
<div class="exchange-tips-wrapper fixed">
<div class="content">
<p class="title">一、云鹊医课程的版权归属何方?</p>
<p class="text">云鹊医平台所有的在线课程版权归云鹊医所有,任何以录屏或其它方式进行的盗版或盗版售卖行为均属侵权行为,一经发现,云鹊医将采取最严厉的措施进行打击并维权,包括但不限于:起诉侵权人、发函侵权人学校或单位、云鹊医全平台公示侵权人所有信息、在一定时间内或永久限制该侵权人购买、观看课程的权利。</p>
<p class="title">二、我应该如何兑换课程?</p>
<p class="text">点击课程页面上的“点击兑换”,即可通过云鹊豆兑换等值的课程。如果云鹊豆不足,可以通过云鹊豆中心的任务列表赚取。目前仅支持完整课程的兑换,暂不支持单独章节的兑换。在云鹊豆系统上线以前、用户已经加入学习的课程不受影响。</p>
<p class="title">三、兑换课程以后如何看课?</p>
<p class="text">打开云鹊医app,进入“个人中心”- “我的课程”,在“学习中”即可看到兑换成功的课程。课程兑换成功以后,用户可以永久收看该门课程。</p>
<p class="title">四、我兑换课程以后后悔了,可以退课吗?</p>
<p class="text">目前云鹊医平台不支持通过云鹊豆兑换的课程退货,即不支持退回云鹊豆的动作,所以请在兑换成功前自行确认是否要用云鹊豆兑换该课程。对于用户自主消费云鹊豆的行为产生的云鹊豆减少,云鹊医平台不作后续处理。</p>
<p class="title">五、其它提示:</p>
<p class="text">由于学员较多,如有问题请直接留言,客服会在24小时以内回复,请谅解。 如果事件过于紧急,请联系云鹊医客服电话:4009208877。</p>
</div>
</div>
</div>
</template>
<style lang="scss" scoped>
@import "../style/mixin";
.header {
width: 100%;
position: fixed;
top: 0;
left: 0;
text-align: center;
padding: px2rem(26px) 0 px2rem(20px);
font-size: px2rem(18px);
line-height: px2rem(18px);
color: #333333;
background: #fff;
// img {
// position: absolute;
// right: px2rem(20px);
// width: px2rem(13px);
// height: px2rem(13px);
// }
}
.exchange-tips-wrapper {
padding-top: px2rem(40px);
margin: px2rem(20px);
font-size: px2rem(16px);
.content {
.title {
line-height: px2rem(18px);
font-weight: 700;
color: #373839;
margin: px2rem(12px) 0;
}
.text {
color: #676869;
// text-align-last: justify;
text-align: justify;
}
}
}
</style>
\ No newline at end of file
<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">
<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 :class="{'android': isAndroid, 'ios': isIOS}"></span>
</div>
</td>
<td @click="changeTab(2)" :class="{'active': tabIndex === 2}">
<div class="tap-title">
<span :style="{'color': tabIndex === 2 ? '#333' : '#999'}">全部项目</span>
<span :class="{'android': isAndroid, 'ios': isIOS}"></span>
</div>
</td>
</tr>
</table>
<!-- <article v-show="isShow" class="cb-wrapper" :class="{'padding-top-111': !isWeb}">
<CardBanner :userMobile="userMobile"></CardBanner>
</article> -->
<article class="page-content-list">
<CommonTitle title="国家级继续医学教育项目(远程)" :isShowCert="false"></CommonTitle>
<ICardItem :oneLevelUrl="oneLevelUrl" :provinceId="provinceId" :organizationId="organizationId" :cmeToken="token"></ICardItem>
<CommonTitle
class="mt-10"
v-show="isShow && ((tabIndex === 1 && joinProjectList.length) || (tabIndex === 2 && otherProjectList.length))"
:title="tabIndex === 1 ? '我的继续医学教育课程' : '继续医学教育课程'"
:isShowCert="false"
/>
<section v-if="tabIndex === 1">
<CoopListItem
:paramData="joinProjectList"
:coopType="1"
:tabTo="1"
:isShow="isShow"
:userMobile="userMobile"
:provinceId="provinceId"
:organizationId="organizationId"
></CoopListItem>
</section>
<section v-if="tabIndex === 2">
<CoopListItem
:paramData="otherProjectList"
:coopType="1"
:tabTo="2"
:isShow="isShow"
:userMobile="userMobile"
:provinceId="provinceId"
:organizationId="organizationId"
></CoopListItem>
</section>
</article>
</section>
<!-- <div>
<iframe src="https://www.baidu.com" id="mobsf" frameborder="0" style="width:100%;height:500px;"></iframe>
</div>-->
<!-- <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>
<Loading v-if="showLoading" />
</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 CardBanner from "@/components/cme/card-banner";
import ICardItem from "@/components/cme/I-card-item";
import CommonTitle from "@/components/common/common-title";
import { mapGetters, mapActions } from "vuex";
export default {
data() {
return {
showLoading: false,
isWeb: window.__isWeb,
isAndroid: window.__isAndroid,
isIOS: window.__isIOS,
bgColor: "#fff",
isShow: false,
navTitle: "继教课程",
compTitle: "组件名称",
isShowNavbar: true,
isFixNavbar: false,
pointStyle: "activity",
descTitle: "规定从何处开始选取。如果是负数",
tabIndex: 1,
joinProjectList: [], // 我的项目
otherProjectList: [], // 全部项目
token: "",
toastTitle: "",
userMobile: "",
needShowBackup: false,
showGoUpdate: false,
oneLevelUrl: '',
provinceId: 0,
organizationId: 0,
};
},
computed: {
...mapGetters(["projectTabIndex", "organizationInfo"])
},
components: {
// DiscussTopicStencil,
CommonNavbar,
CoopListItem,
Loading,
CardBanner,
CommonTitle,
ICardItem,
},
created() {
var _this = this;
window.__getUserInfo = function(param) {
_this.setUserInfo(param);
_this.token = param.userToken;
_this.userMobile = param.userMobile;
_this.getCoopData();
console.log('__getUserInfo', param);
};
_this.getUserInfo();
if (__isWeb) {
_this.getCoopData();
}
window.__refresh = function() {
//_this.tabIndex = _this.projectTabIndex;
_this.getUserInfo();
};
// 打开页面埋点
// this.$sendBuriedData({
// component_tag: "210#0#0#0"
// });
// TEST
// window.__getPositionData = function(param) {
// console.log(param)
// }
// TEST
// this.getPositionData();
window.addEventListener("scroll", this.scrollFun);
},
mounted() {
var _this = this;
this.tabIndex = this.projectTabIndex;
},
methods: {
...mapActions(["setUserInfo", "setOrganizationInfo", "setJumpURLForI"]),
// //获取位置信息 测试代码 TEST
// getPositionData() {
// console.log('getPositionData');
// rocNative.getPositionData({
// __funcName: "__getPositionData"
// });
// },
//获取版本号
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() {
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;
if (scrollTop >= 500) {
this.needShowBackup = true;
} else {
this.needShowBackup = false;
}
},
// 滚动到顶部
scrollTop() {
window.scrollTo(0, 0);
},
}
};
</script>
<style lang="scss" scoped>
@import "../style/mixin";
.page-content {
&-table {
position: fixed;
z-index: 100;
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(-8px);
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);
}
span.android:nth-child(2) {
bottom: px2rem(-12px);
}
span.ios:nth-child(2) {
bottom: px2rem(-10px);
}
}
}
}
}
.cb-wrapper {
width: 100%;
position: fixed;
top: px2rem(49px);
left: 0;
z-index: 90;
// margin-bottom: 30px;
&.padding-top-111 {
top: px2rem(111px);
}
}
&-list {
padding-top: px2rem(50px);
.mt-10 {
margin-bottom: px2rem(-10px);
}
}
}
.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>
...@@ -10,78 +10,20 @@ ...@@ -10,78 +10,20 @@
borderStyle="1px solid #fff" borderStyle="1px solid #fff"
></CommonNavbar> ></CommonNavbar>
<section class="page-content"> <section class="page-content">
<table class="page-content-table"> wefwef
<tr>
<td @click="changeTab(1)" :class="{'active': tabIndex === 1}">
<div class="tap-title">
<span :style="{'color': tabIndex === 1 ? '#333' : '#999'}">我的项目</span>
<span :class="{'android': isAndroid, 'ios': isIOS}"></span>
</div>
</td>
<td @click="changeTab(2)" :class="{'active': tabIndex === 2}">
<div class="tap-title">
<span :style="{'color': tabIndex === 2 ? '#333' : '#999'}">全部项目</span>
<span :class="{'android': isAndroid, 'ios': isIOS}"></span>
</div>
</td>
</tr>
</table>
<!-- <article v-show="isShow" class="cb-wrapper" :class="{'padding-top-111': !isWeb}">
<CardBanner :userMobile="userMobile"></CardBanner>
</article> -->
<article class="page-content-list">
<CommonTitle title="国家级继续医学教育项目(远程)" :isShowCert="false"></CommonTitle>
<ICardItem :oneLevelUrl="oneLevelUrl" :provinceId="provinceId" :organizationId="organizationId" :cmeToken="token"></ICardItem>
<CommonTitle
class="mt-10"
v-show="isShow && ((tabIndex === 1 && joinProjectList.length) || (tabIndex === 2 && otherProjectList.length))"
:title="tabIndex === 1 ? '我的继续医学教育课程' : '继续医学教育课程'"
:isShowCert="false"
/>
<section v-if="tabIndex === 1">
<CoopListItem
:paramData="joinProjectList"
:coopType="1"
:tabTo="1"
:isShow="isShow"
:userMobile="userMobile"
:provinceId="provinceId"
:organizationId="organizationId"
></CoopListItem>
</section>
<section v-if="tabIndex === 2">
<CoopListItem
:paramData="otherProjectList"
:coopType="1"
:tabTo="2"
:isShow="isShow"
:userMobile="userMobile"
:provinceId="provinceId"
:organizationId="organizationId"
></CoopListItem>
</section>
</article>
</section> </section>
<!-- <div>
<iframe src="https://www.baidu.com" id="mobsf" frameborder="0" style="width:100%;height:500px;"></iframe>
</div>-->
<!-- <discuss-topic-stencil /> -->
<transition name="fade"> <transition name="fade">
<article v-show="needShowBackup" @click="scrollTop" class="back-up-icon"> <article v-show="needShowBackup" @click="scrollTop" class="back-up-icon">
<img src="../images/cme/phrase2/back-top.png" alt /> <img src="../images/cme/phrase2/back-top.png" alt />
</article> </article>
</transition> </transition>
<Loading v-if="showLoading" /> <Loading v-if="showLoading" />
<!-- <CardPopup :showGoUpdate="showGoUpdate"></CardPopup> -->
</div> </div>
</template> </template>
<script> <script>
import CommonNavbar from "@/components/common/common-navbar"; import CommonNavbar from "@/components/common/common-navbar";
import CoopListItem from "@/components/business/coop-list-item";
import Loading from "@/components/common/common-loading"; import Loading from "@/components/common/common-loading";
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 CommonTitle from "@/components/common/common-title";
import { mapGetters, mapActions } from "vuex"; import { mapGetters, mapActions } from "vuex";
...@@ -99,16 +41,12 @@ export default { ...@@ -99,16 +41,12 @@ export default {
isShowNavbar: true, isShowNavbar: true,
isFixNavbar: false, isFixNavbar: false,
pointStyle: "activity", pointStyle: "activity",
descTitle: "规定从何处开始选取。如果是负数",
tabIndex: 1, tabIndex: 1,
joinProjectList: [], // 我的项目 joinProjectList: [], // 我的项目
otherProjectList: [], // 全部项目 otherProjectList: [], // 全部项目
token: "", token: "",
toastTitle: "",
userMobile: "", userMobile: "",
needShowBackup: false, needShowBackup: false,
showGoUpdate: false,
oneLevelUrl: '',
provinceId: 0, provinceId: 0,
organizationId: 0, organizationId: 0,
}; };
...@@ -120,12 +58,8 @@ export default { ...@@ -120,12 +58,8 @@ export default {
components: { components: {
// DiscussTopicStencil, // DiscussTopicStencil,
CommonNavbar, CommonNavbar,
CoopListItem,
Loading, Loading,
CardBanner,
CommonTitle, CommonTitle,
ICardItem,
// CardPopup
}, },
created() { created() {
var _this = this; var _this = this;
...@@ -141,27 +75,20 @@ export default { ...@@ -141,27 +75,20 @@ export default {
_this.getCoopData(); _this.getCoopData();
} }
window.__refresh = function() { window.__refresh = function() {
//_this.tabIndex = _this.projectTabIndex;
_this.getUserInfo(); _this.getUserInfo();
}; };
// 打开页面埋点 // 打开页面埋点
this.$sendBuriedData({ // this.$sendBuriedData({
component_tag: "210#0#0#0" // component_tag: "210#0#0#0"
}); // });
// TEST
// window.__getPositionData = function(param) {
// console.log(param)
// }
// TEST
// this.getPositionData();
window.addEventListener("scroll", this.scrollFun); window.addEventListener("scroll", this.scrollFun);
}, },
mounted() { mounted() {
var _this = this; var _this = this;
this.tabIndex = this.projectTabIndex; // this.tabIndex = this.projectTabIndex;
}, },
methods: { methods: {
...@@ -190,9 +117,9 @@ export default { ...@@ -190,9 +117,9 @@ export default {
rocNative.gotoLogin(); rocNative.gotoLogin();
this.tabIndex = 2; this.tabIndex = 2;
} }
this.$sendBuriedData({ // this.$sendBuriedData({
component_tag: tag // component_tag: tag
}); // });
}, },
// 获取所有项目:我的项目、其它项目 // 获取所有项目:我的项目、其它项目
...@@ -213,7 +140,7 @@ export default { ...@@ -213,7 +140,7 @@ 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.oneLevelUrl = res.data.oneLevelUrl; // I类学习卡列表地址 // _this.oneLevelUrl = res.data.oneLevelUrl; // I类学习卡列表地址
// 不做相应判断 // 不做相应判断
if (_this.userMobile) { if (_this.userMobile) {
...@@ -251,67 +178,7 @@ export default { ...@@ -251,67 +178,7 @@ export default {
@import "../style/mixin"; @import "../style/mixin";
.page-content { .page-content {
&-table {
position: fixed;
z-index: 100;
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(-8px);
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);
}
span.android:nth-child(2) {
bottom: px2rem(-12px);
}
span.ios:nth-child(2) {
bottom: px2rem(-10px);
}
}
}
}
}
.cb-wrapper {
width: 100%;
position: fixed;
top: px2rem(49px);
left: 0;
z-index: 90;
// margin-bottom: 30px;
&.padding-top-111 {
top: px2rem(111px);
}
}
&-list {
padding-top: px2rem(50px);
.mt-10 {
margin-bottom: px2rem(-10px);
}
}
} }
.back-up-icon { .back-up-icon {
position: fixed; position: fixed;
......
此差异已折叠。
<template>
<!-- 组件详情页面:模块列表及其下面的元件列表 -->
<div class="page-container-parent">
<CommonNavbar
:bgColor="bgColor"
v-show="isShowNavbar"
:isBlack="isBlack"
:title="navTitle"
:isFixNavbar="isFixNavbar"
:burialPoint="pointStyle"
borderStyle="0px solid #fff"
:backMethod="from"
></CommonNavbar>
<div class="page-content list-container">
<!-- <img
v-if="bannerType == 1"
class="banner-img"
src="https://files.yunqueyi.com/image/jpeg/common/20190214153449966.jpg"
>-->
<!-- <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 v-show="pStatus == 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="pStatus == 10" class="banner-img-10" src="../images/status-end.png">
</div>
<!-- <CommonBannerVideo v-if="bannerType == 1" :videoOptions="videoOptions"></CommonBannerVideo> -->
<CommonTcPlayer v-if="bannerType == 2" style="flex" :options="videoOptions"></CommonTcPlayer>
<CommonDescription :descTitle="projectName" :value="projectIntro"></CommonDescription>
<CommonSpliteLine></CommonSpliteLine>
<div v-if="visibleFlag == 1" class="project-num">{{ childrenList.length }} 个项目</div>
<CoopListItem v-if="visibleFlag == 1" :paramData="childrenList" :coopType="1" :tabTo="3" :isShow="isShow"></CoopListItem>
<NoPermContent v-if="visibleFlag == 2"></NoPermContent>
</div>
<Loading v-show="showLoading"/>
</div>
</template>
<script>
import CommonNavbar from "@/components/common/common-navbar";
import CommonDescription from "@/components/common/common-description";
import CommonSpliteLine from "@/components/common/common-splite-line";
import CommonTitle from "@/components/common/common-title";
import CommonBannerVideo from "@/components/common/common-banner-video";
import CommonTcPlayer from "@/components/common/common-tcplayer";
import CoopListItem from "@/components/business/coop-list-item";
import NoPermContent from "@/components/business/no-perm-content";
import Loading from "@/components/common/common-loading";
import { mapGetters, mapActions } from "vuex";
import vueFilters from '@/utils/filter'
export default {
data() {
return {
from: "inner",
isBlack: false,
showLoading: false,
contentList: [],
bannerType: 1,
videoOptions: {
mp4: "",
// mp4: "https://pica-pro.oss-cn-shanghai.aliyuncs.com/2019/03/05/movie.mp4",
// "mp4": "http://1258717429.vod2.myqcloud.com/24a74910vodcq1258717429/7c37c18f5285890786204547811/9BFIyaoXYAcA.mp4",
// "m3u8": "http://2157.liveplay.myqcloud.com/2157_358535a.m3u8",
// "flv": "http://2157.liveplay.myqcloud.com/live/2157_358535a.flv", //增加了一个flv的播放地址,用于PC平台的播放 请替换成实际可用的播放地址
autoplay: false, //iOS下safari浏览器,以及大部分移动端浏览器是不开放视频自动播放这个能力的
coverpic: require("../images/video-cover.png"),
width: "415", //视频的显示宽度,请尽量使用视频分辨率宽度
height: "210" //视频的显示高度,请尽量使用视频分辨率高度
},
// projectStatus: 1, //1没有获得证书 2是获得全部证书
pStatus: 0, // 项目状态 1是参加中 5是进行中 10是已结束
projectIntro: "",
projectName: "",
attachmentUrl: require("../images/banner-default.png"),
bgColor: "none",
navTitle: "",
compTitle: "组件名称",
isShowNavbar: true,
isShow: true,
isFixNavbar: true,
pointStyle: "activity",
descTitle: "规定从何处开始选取。如果是负数",
description:
"必需。规定从何处开始选取。如果是负数,那么它规定从数组尾部开始算起的位置那么它规定从数组尾部开始算起的位置那么它规定从数组尾部开始算起的位置那么它规定从数组尾部开始算起的位置。也就是说那么它规定从数组尾部开始算起的位置。也就是说那么它规定从数组尾部开始算起的位置。也就是说那么它规定从数组尾部开始算起的位置。也就是说那么它规定从数组尾部开始算起的位置。" +
" 也就是说那么它规定从数组尾部开始算起的位置。也就是说,必需。规定从何处开始选取。如果是负数,那么它规定从数组尾部开始算起的位置。也就是说,必需。规定从何处开始选取。如果是负数,那么它规定从数组尾部开始算起的位置。也就是说,必需。规定从何处开始选取。如果是负数,那么它规定从数组尾部开始算起的位置。也就是说,必需。规定从何处开始选取。如果是负数,那么它规定从数组尾部开始算起的位置。也就是说,必需。规定从何处开始选取。如果是负数,那么它规定从数组尾部开始算起的位置。也就是说,-1 指最后一个元素,-2 指倒数第二个元素,以此类推第二个元素。",
childrenList: [],
visibleFlag: 0,
entryId: 0,
};
},
components: {
CommonNavbar,
CommonDescription,
CommonSpliteLine,
CommonTitle,
CommonBannerVideo,
Loading,
CommonTcPlayer,
CoopListItem,
NoPermContent,
},
computed: {
...mapGetters(["userInfo"])
},
created() {
let _this = this;
this.from = this.$route.query.from || this.from || "native";
this.entryId = this.$route.query.entryId;
window.__getUserInfo4Comp = function(param) {
_this.token = param.userToken;
_this.setUserInfo(param);
_this.checkToken();
_this.getChildrenProject(_this.entryId);
};
window.__refresh = function() {
_this.getChildrenProject(_this.entryId);
};
_this.getUserInfo();
},
mounted() {
window.addEventListener("scroll", this.scrollFun);
},
beforeDestroyed() {
window.removeEventListener("scroll", this.scrollFun);
},
methods: {
...mapActions(["setUserInfo"]),
//获取用户信息
getUserInfo() {
rocNative.getUserInfo({
__funcName: "__getUserInfo4Comp"
});
if (window.__isWeb && process.env.BUILD_ENV == "development") {
let param = {
userToken: 'ED9F3381362641858B2B1F90C92A8050',
};
__getUserInfo4Comp(param);
}
},
checkToken() {
let _this = this;
let param = {
token: _this.userInfo.userToken,
setEntry: true,
};
this.GET("campaign/admin/task/checkToken", param).then(res => {
if(res.code !== '000000') {
//未登录 跳转登录页
console.log('跳登录');
rocNative.gotoLogin();
}
});
},
getChildrenProject(entryId) {
let _this = this;
let param = {
entryId: entryId,
token: _this.userInfo.userToken,
setEntry: true
};
this.GET("portal/portalApp/getEntryInfo", param).then(res => {
if (res.code == "000000") {
_this.visibleFlag = res.data.learnableFlag;
if (res.data.attachmentType == 2) {
_this.videoOptions.mp4 = res.data.attachmentUrl;
} else {
_this.attachmentUrl = res.data.attachmentUrl;
}
_this.bannerType = res.data.attachmentType;
// 先设置视频URL再显示视频组件 ------------ END
_this.projectIntro = res.data.entryIntro;
_this.projectName = res.data.entryName;
_this.pStatus = res.data.status;
_this.childrenList = res.data.projectList;
}
});
},
scrollFun() {
let scrollTop =
document.body.scrollTop || document.documentElement.scrollTop;
if (scrollTop > 20) {
this.isBlack = true;
this.bgColor = "#fff";
} else {
this.isBlack = false;
this.bgColor = "none";
}
}
}
};
</script>
<style lang="scss" >
@import "../style/mixin";
.page-container-parent {
.nav-top .nav-title {
height: px2rem(0px);
padding: px2rem(18px);
}
.banner-img {
display: inherit;
width: px2rem(375px);
height: px2rem(210px);
&-1 {
position: absolute;
left: 0;
top: px2rem(180px);
width: px2rem(76px);
height: px2rem(30px);
}
&-5 {
position: absolute;
left: 0;
top: px2rem(180px);
width: px2rem(76px);
height: px2rem(30px);
}
&-10 {
position: absolute;
left: 0;
top: px2rem(180px);
width: px2rem(148px);
height: px2rem(30px);
}
}
.list-container {
// margin-bottom: px2rem(40px);
}
.project-num {
position: relative;
height: px2rem(18px);
margin: px2rem(20px) 0 px2rem(15px) px2rem(15px);
font-weight: 500;
font-size: px2rem(18px);
line-height: px2rem(18px);
}
}
</style>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册