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

Merge branch 'dev-cme-phase2.2-0601' into 'release'

CME二期功能 code reviewer:张平

CME二期功能 code reviewer:张平

See merge request !10
......@@ -75,7 +75,7 @@ export default {
});
return;
}
let pageUrl = getWebPageUrl('coopv2/#/comp2');
let pageUrl = getWebPageUrl('cme/#/comp2');
let moduleName = encodeURIComponent(item.moduleName)
let paramList = [
{
......
此差异已折叠。
......@@ -212,7 +212,7 @@ export default {
// let pageUrl = "";
// let paramList = [];
// if(item.parent === false) {
// pageUrl = getWebPageUrl('coopv2/#/coop');
// pageUrl = getWebPageUrl('cme/#/coop');
// paramList = [
// {
// key: "pageUrl",
......@@ -222,7 +222,7 @@ export default {
// }
// ]
// } else {
// pageUrl = getWebPageUrl('coopv2/#/parent');
// pageUrl = getWebPageUrl('cme/#/parent');
// paramList = [
// {
// key: "pageUrl",
......
......@@ -19,29 +19,11 @@
<div class="coop-item-right">
<span class="coop-item-right-title">{{item.name}}</span>
<span class="coop-item-right-other">{{item.level}} | {{item.credit}} | {{item.scope}}</span>
<!-- <span v-if="item.pType == 1"
class="coop-item-right-other"
>起止日期 {{item.oldTime}}</span>-->
<!-- <span v-else
class="coop-item-right-other"
>起止日期 {{item.projectBegintimeLong | formatTime}}-{{item.projectEndtimeLong | formatTime}}</span>-->
<span class="coop-item-right-other">{{item.startDate | formatTime('{y}.{m}.{d}')}}{{item.endDate | formatTime('{y}.{m}.{d}')}}</span>
</div>
</div>
<NoMoreContent v-show="paramData.length > 9"></NoMoreContent>
<NoContent v-show="!paramData.length && isShow" :tabNum="tabTo"></NoContent>
<!--<UpdateDialog :showGoUpdate="showGoUpdate" @goUpdateHandler="goUpdateHandler"></UpdateDialog>-->
<!-- <van-popup
v-model="showGoUpdate"
position="bottom"
:style="{ height: '4.427rem' }"
>
<div class="update-dialog-content">
<p class="title">该项目仅对河北石家庄市的用户开放</p>
<p class="update-btn v-hairline-top confirm-btn" @click="goUpdateHandler">确定</p>
<p class="update-btn v-hairline-top" @click="showGoUpdate = false">取消</p>
</div>
</van-popup>-->
</section>
</template>
......@@ -52,7 +34,7 @@ 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 } from "vant";
import { Popup, Toast } from "vant";
export default {
name: "coop-list-item",
......@@ -83,12 +65,18 @@ export default {
userMobile: {
type: String,
default: ""
}
},
provinceId: {
type: String | Number,
default: 0
},
organizationId: {
type: String | Number,
default: 0
},
},
computed: {
...mapGetters(["userInfo"])
// cBgColor() {
// }
},
components: {
NoMoreContent,
......@@ -123,6 +111,14 @@ export default {
}
},
coopDetails(item) {
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({
......@@ -130,7 +126,9 @@ export default {
query: {
id: item.id,
coopType: this.coopType,
courseRequire: item.courseRequire
courseRequire: item.courseRequire,
provinceId: this.provinceId,
organizationId: this.organizationId
}
});
return;
......@@ -140,7 +138,7 @@ export default {
let paramList = [
{
key: "pageUrl",
value: getWebPageUrl(`cme/#/coop?id=${item.id}&courseRequire=${item.courseRequire}`),
value: getWebPageUrl(`cme/#/coop?id=${item.id}&courseRequire=${item.courseRequire}&provinceId=${this.provinceId}&organizationId=${this.organizationId}`),
type: 4,
seqNo: 1
}
......@@ -156,100 +154,9 @@ export default {
this.$sendBuriedData({
component_tag: `210#210002#${item.id}#${item.name}` //'210#210002#0#'+item.projectName
});
// if (item.courseRequire == 1) { //对课程完成度有控制,需判断版本号
// let appVersion = getAppVersion(this.userInfo.appVersion);
// // alert('版本'+appVersion)
// let flag = appVersion < 315;
// if (flag === true) {
// // 小于315版本,添加去更新弹层
// this.showGoUpdate = true;
// }else {
// // 跳转到老项目
// if(this.tabTo != 3) {
// this.setProjectTabIndex(this.tabTo)
// }
// if (item.pType == 1) {
// this.goToPage(item);
// // 跳转到新项目
// } else {
// this.showModule(item, this.coopType, this.tabTo, item.courseRequire)
// }
// }
// } else {
// // 跳转到老项目
// if(this.tabTo != 3) {
// this.setProjectTabIndex(this.tabTo)
// }
// if (item.pType == 1) {
// this.goToPage(item);
// // 跳转到新项目
// } else {
// this.showModule(item, this.coopType, this.tabTo, item.courseRequire)
// // this.$router.push({
// // path: "/coop",
// // query: {
// // id: item.id,
// // coopType: this.coopType
// // }
// // });
// }
// }
},
// 跳转到新项目
// showModule(item, coopType, tabTo, courseRequire) {
// if (window.__isWeb) {
// if(item.parent === false) {
// this.$router.push({
// path: "/coop",
// query: {
// id: item.id,
// coopType: coopType,
// tabTo: tabTo,
// courseRequire: courseRequire,
// }
// });
// } else {
// this.$router.push({
// path: "/parent",
// query: {
// entryId: item.entryId,
// }
// });
// }
// return;
// }
// let pageUrl = "";
// let paramList = [];
// if(item.parent === false) {
// pageUrl = getWebPageUrl('coopv2/#/coop');
// paramList = [
// {
// key: "pageUrl",
// value: pageUrl + `?id=${item.id}&coopType=${coopType}&tabTo=${tabTo}&courseRequire=${courseRequire}`,
// type: 4,
// seqNo: 1
// }
// ]
// } else {
// pageUrl = getWebPageUrl('coopv2/#/parent');
// paramList = [
// {
// key: "pageUrl",
// value: pageUrl + `?entryId=${item.entryId}`,
// type: 4,
// seqNo: 1
// }
// ]
// }
// rocNative.dispatchEventByModuleCode({
// modeCode: "M300",
// jsonString: paramList
// });
// },
goToPage(item) {
let _this = this;
// 如果是湖北考试项目,则做相应权限判断 湖北的projectId=3
......
......@@ -32,7 +32,7 @@ export default {
flex-direction: column;
justify-content: center;
align-content: center;
margin-top: px2rem(150px);
margin-top: px2rem(100px);
margin-bottom: px2rem(20px);
text-align: center;
// margin: 0 auto;
......
<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">国家级继续教育I类学分项目</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() {
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
......@@ -18,7 +18,7 @@
<span>申请范围</span>
<span>{{scope}}</span>
</div>
<div class="remind" v-if="remind">
<div class="remind" v-if="remind && cmeType != 2">
<span>{{remind}}</span>
</div>
<div class="content">
......@@ -26,7 +26,9 @@
<span>{{startDate | formatTime('{y}.{m}.{d}')}}{{endDate | formatTime('{y}.{m}.{d}')}}</span>
</div>
<div class="content">
<span>发起机构</span>
<!-- <span>{{cmeType == 2 ? '主办单位' : '发起机构'}}</span> -->
<span>主办单位</span>
<!-- <span>发起机构</span> -->
<span>{{organName}}</span>
</div>
</div>
......@@ -69,6 +71,10 @@ export default {
projectCredit: {
type: String,
default: ""
},
cmeType: {
type: String | Number,
default: 2
}
}
};
......
<template>
<section @click="jumpToCardList" class="card-banner-wrapper">
<article class="left">
<img :class="{'is-android': isAndroid}" src="../../images/cme/phrase2/what.png" alt />
<span>学习项目必须使用学习卡哦~</span>
</article>
<span class="right">购买学习卡</span>
</section>
</template>
<script>
import { getHactiveUrl } from "@/utils/index";
import { mapGetters } from "vuex";
import { Toast } from 'vant';
export default {
data() {
return {
isAndroid: window.__isAndroid,
}
},
props: {
userMobile: {
type: String | Number,
default: ''
}
},
computed: {
...mapGetters(["userInfo"])
},
methods: {
// 跳转到学习卡列表页面
jumpToCardList() {
// 如果没有登录,则要去登录页面
let appVersion = this.userInfo.appVersion;
let appVersionNum = appVersion.split('.').join('');
console.log('appVersionNum', appVersionNum);
if(appVersionNum < 341) {
Toast('请您下载新版本App');
return;
}
if (!this.userMobile) {
rocNative.gotoLogin();
return;
}
if (window.__isWeb) {
console.log("in jumpToCardList");
return;
} else {
let pageUrl = getHactiveUrl("/message_push/#/study-card?origin=1");
let paramList = [
{
key: "pageUrl",
value: pageUrl,
type: 4,
seqNo: 1
}
];
rocNative.dispatchEventByModuleCode({
modeCode: "M300",
jsonString: paramList
});
}
}
}
};
</script>
<style lang="scss" scoped>
@import "../../style/mixin";
.card-banner-wrapper {
width: 100%;
height: px2rem(40px);
display: flex;
flex-direction: row;
padding: 0 px2rem(15px);
justify-content: space-between;
align-items: center;
background: #fefaf5;
.left {
display: flex;
height: px2rem(40px);
flex-direction: row;
align-items: center;
img {
width: px2rem(13px);
height: px2rem(13px);
margin-right: px2rem(4px);
&.is-android {
width: px2rem(12px);
height: px2rem(13px);
margin-bottom: px2rem(2px);
}
}
span {
font-size: px2rem(13px);
color: #e6a23c;
}
}
.right {
height: px2rem(25px);
line-height: px2rem(25px);
font-size: px2rem(12px);
padding: 0 px2rem(10px);
background: rgba(230, 162, 60, 1);
border-radius: px2rem(25px);
border: px2rem(1px) solid rgba(230, 162, 60, 1);
color: #ffffff;
}
}
</style>
\ No newline at end of file
<template>
<section class="card-popup-wrapper">
<van-popup
v-model="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>
<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>
......@@ -23,7 +23,7 @@ export default {
props: {
title: {
type: String,
default: '即将打开<br/>“中华医学教育在线”平台'
default: '即将打开<br/> “中华医学教育在线”平台'
},
content: {
type: String,
......
......@@ -26,14 +26,14 @@
left: 0;
bottom: 0;
right: 0;
z-index: 1000;
z-index: 10000;
background: rgba(0, 0, 0, 0.5);
}
svg {
position: fixed;
top: px2rem(280px);
left: px2rem(166px);
z-index: 201;
z-index: 9999;
}
}
......
......@@ -9,6 +9,7 @@ const test = r => require.ensure([], () => r(require('../views/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 [{
path: '/',
......@@ -57,7 +58,12 @@ export default [{
{
path: '/excg-tips',
component: excgtips
},
{
path: '/icredit-detail',
component: icreditdetail
},
]
}]
const getters = {
userInfo: state => state.coop.userInfo,
statusBarHeight: state => state.coop.statusBarHeight,
projectTabIndex: state => state.coop.projectTabIndex
projectTabIndex: state => state.coop.projectTabIndex,
jumpURLForI: state => state.coop.jumpURLForI,
jumpURLForII: state => state.coop.jumpURLForII,
positionInfo: state => state.coop.positionInfo,
organizationInfo: state => state.coop.organizationInfo,
}
export default getters
......@@ -2,7 +2,29 @@ const coop = {
state: {
userInfo: {},
statusBarHeight: {},
projectTabIndex: 1
projectTabIndex: 1,
jumpURLForI: "", //中华医学会一类跳转地址
jumpURLForII: "", //中华医学会二类跳转地址
positionInfo: {
accuracy: "",
address: "",
city: "",
city_code: "",
country: "",
district: "",
district_code: "",
latitude: "",
longitude: "",
poi_name: "",
province: "",
},
organizationInfo: {
provinceId: 0,
cityId: 0,
countyId: 0,
townId: 0,
organizationId: 0
}
},
mutations: {
SET_USER_INFO: (state, userInfo) => {
......@@ -14,6 +36,18 @@ const coop = {
SET_PROJECT_TAB_INDEX: (state, projectTabIndex) => {
state.projectTabIndex = projectTabIndex
},
SET_JUMP_URL_FOR_I: (state, jumpURLForI) => {
state.jumpURLForI = jumpURLForI
},
SET_JUMP_URL_FOR_II: (state, jumpURLForII) => {
state.jumpURLForII = jumpURLForII
},
SET_POSITION_INFO: (state, positionInfo) => {
state.positionInfo = positionInfo
},
SET_ORGANIZATION_INFO: (state, organizationInfo) => {
state.organizationInfo = organizationInfo
},
},
actions: {
setUserInfo({ commit }, userInfo) {
......@@ -25,6 +59,18 @@ const coop = {
setProjectTabIndex({ commit }, projectTabIndex) {
commit('SET_PROJECT_TAB_INDEX', projectTabIndex)
},
setJumpURLForI({ commit }, jumpURLForI) {
commit('SET_JUMP_URL_FOR_I', jumpURLForI)
},
setJumpURLForII({ commit }, jumpURLForII) {
commit('SET_JUMP_URL_FOR_II', jumpURLForII)
},
setPositionInfo({ commit }, positionInfo) {
commit('SET_POSITION_INFO', positionInfo)
},
setOrganizationInfo({ commit }, organizationInfo) {
commit('SET_ORGANIZATION_INFO', organizationInfo)
},
}
}
......
......@@ -10,38 +10,47 @@ export const envConfig = {
apiUrl: 'https://dev-api.yunqueyi.com/',
webPageUrl: 'https://dev-phome.yunqueyi.com/',
baseUrl: 'https://dev-sc.yunqueyi.com/',
hactiveUrl: 'https://dev-hactive.yunqueyi.com',
// http://dev-hactive.yunqueyi.com/message_push/#/study-card
// baseUrl: 'https://test1-sc.yunqueyi.com/',
// apiUrl: 'https://test1-api.yunqueyi.com/',
// webPageUrl: 'https://test1-phome.yunqueyi.com/'
// hactiveUrl: 'https://dev-hactive.yunqueyi.com',
// baseUrl: 'https://uat-sc.yunqueyi.com/',
// apiUrl: 'https://uat-api.yunqueyi.com/',
// webPageUrl: 'https://uat-phome.yunqueyi.com/'
// hactiveUrl: 'https://uat-hactive.yunqueyi.com',
// baseUrl: 'https://sc.yunqueyi.com/',
// apiUrl: 'https://api.yunqueyi.com/',
// webPageUrl: 'https://phome.yunqueyi.com/'
// hactiveUrl: 'https://hactive.yunqueyi.com',
},
dev: {
baseUrl: 'https://dev-sc.yunqueyi.com/',
apiUrl: 'https://dev-api.yunqueyi.com/',
webPageUrl: 'https://dev-phome.yunqueyi.com/'
webPageUrl: 'https://dev-phome.yunqueyi.com/',
hactiveUrl: 'https://dev-hactive.yunqueyi.com',
},
test: {
baseUrl: 'https://test1-sc.yunqueyi.com/',
apiUrl: 'https://test1-api.yunqueyi.com/',
webPageUrl: 'https://test1-phome.yunqueyi.com/'
webPageUrl: 'https://test1-phome.yunqueyi.com/',
hactiveUrl: 'https://test1-hactive.yunqueyi.com',
},
uat: {
baseUrl: 'https://uat-sc.yunqueyi.com/',
apiUrl: 'https://uat-api.yunqueyi.com/',
webPageUrl: 'https://uat-phome.yunqueyi.com/'
webPageUrl: 'https://uat-phome.yunqueyi.com/',
hactiveUrl: 'https://uat-hactive.yunqueyi.com',
},
pro: {
baseUrl: 'https://sc.yunqueyi.com/',
apiUrl: 'https://api.yunqueyi.com/',
webPageUrl: 'https://phome.yunqueyi.com/'
webPageUrl: 'https://phome.yunqueyi.com/',
hactiveUrl: 'https://hactive.yunqueyi.com',
}
}
......@@ -15,9 +15,9 @@ service.interceptors.request.use(config => {
if (config.data && config.data.setEntry) {
config.headers['sysCode'] = config.data.sysCode || 10
if(config.data.token){
config.headers['token'] = config.data.token || '0F32D60C3D7042158BCF1FB574E482BE'
config.headers['token'] = config.data.token || '891F256CC48A4D57905F79C8F7628A74'
if( process.env.BUILD_ENV == "development" ){ // 本地开发环境
config.headers['token'] = config.data.token || '68659175C0D94E9998CE2C9E3F5C6533';
config.headers['token'] = config.data.token || '891F256CC48A4D57905F79C8F7628A74';
}
// delete config.data.token;
}
......
......@@ -84,6 +84,10 @@ const vueFilter = {
return sizeStr.substring(0, index) + sizeStr.substr(index + 3, 2)
}
return size;
},
formatMoney(money = 0) {
if(!money) return 0;
return (money / 100).toFixed(2);
}
}
......
......@@ -18,6 +18,11 @@ export function getWebPageUrl(url) {
return getConfigByEnvType('webPageUrl') + (url || '')
}
// 获取推送域名地址(message_push)
export function getHactiveUrl(url) {
return getConfigByEnvType('hactiveUrl') + (url || '')
}
// 根据不同环境,生成URL
function getConfigByEnvType(urlType) {
return envConfig[process.env.BUILD_ENV][urlType]
......
......@@ -13,7 +13,7 @@ module.exports = {
query = this.$route.query
}
// alert('this.token' + this.token)
this.token = this.getUrlKey('token') || (query && query.token) || '68659175C0D94E9998CE2C9E3F5C6533'
this.token = this.getUrlKey('token') || (query && query.token) || 'EEF69589911F4D3CAC8700AC11EE8096'
},
mounted() {
......
......@@ -53,7 +53,7 @@
})
}
})
}("gotoLogin", "dispatchEventByModuleCode", "gotoAuthentication", "shareWechat", "backPreviousPage", "bindingWechat", "getDeviceInfo", "goBack", "appBuryingPointEntrust", "getAuthPermission", "getAppVersionCode", "getToken", "gotoNewActivity", "gotoNewActivityWithParams", "gotoNewWebActivity", "gotoYidianActivity", "readMessage", "openFiveMintusAudio", "getStatusBarSize", "showNativeDialog", "showNativeToast", "gotoViewTop", "appInit", "checkPermissions", "getStatusBarHeight", "setTabMiniIcon", "getUserInfo", "pauseAudioView", "sendBuriedPoint", "openErrorDebug", "upGradeVersion", "getLocalData");
}("gotoLogin", "dispatchEventByModuleCode", "gotoAuthentication", "shareWechat", "backPreviousPage", "bindingWechat", "getDeviceInfo", "goBack", "appBuryingPointEntrust", "getAuthPermission", "getAppVersionCode", "getToken", "gotoNewActivity", "gotoNewActivityWithParams", "gotoNewWebActivity", "gotoYidianActivity", "readMessage", "openFiveMintusAudio", "getStatusBarSize", "showNativeDialog", "showNativeToast", "gotoViewTop", "appInit", "checkPermissions", "getStatusBarHeight", "setTabMiniIcon", "getUserInfo", "pauseAudioView", "sendBuriedPoint", "openErrorDebug", "upGradeVersion", "getLocalData", "getPositionData");
if (e.__rocAndroid) {
e.__isAndroid = true
e.__isIOS = false
......
<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.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_v2", 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"
borderStyle="1px solid #fff"
></CommonNavbar>
<section class="page-content">
<!-- <button @click="jumpToExamAction" style="margin: 20px;font-size:20px;text-align:center;padding:10px;border-radius:10px;">测试按钮1</button>
<button @click="jumpToExamAction2" style="margin: 20px;font-size:20px;text-align:center;padding:10px;border-radius:10px;">测试按钮2</button> -->
<!-- {{token}} -->
<table class="page-content-table">
<tr>
<td @click="changeTab(1)" :class="{'active': tabIndex === 1}">
<div class="tap-title">
<span :style="{'color': tabIndex === 1 ? '#333' : '#999'}">我的项目</span>
<span></span>
</div>
</td>
<td @click="changeTab(2)" :class="{'active': tabIndex === 2}">
<div class="tap-title">
<!-- <span>其它项目</span> -->
<span :style="{'color': tabIndex === 2 ? '#333' : '#999'}">全部项目</span>
<span></span>
</div>
</td>
</tr>
</table>
<article class="page-content-list">
<section v-if="tabIndex === 1">
<CoopListItem
:paramData="joinProjectList"
:coopType="1"
:tabTo="1"
:isShow="isShow"
:userMobile="userMobile"></CoopListItem>
</section>
<section v-if="tabIndex === 2">
<CoopListItem
:paramData="otherProjectList"
:coopType="1"
:tabTo="2"
:isShow="isShow"
:userMobile="userMobile"></CoopListItem>
</section>
</article>
</section>
<Toast ref="toastTitle"></Toast>
<Loading v-if="showLoading"/>
<!-- <div>
<iframe src="https://www.baidu.com" id="mobsf" frameborder="0" style="width:100%;height:500px;"></iframe>
</div>-->
<!-- <discuss-topic-stencil /> -->
</div>
</template>
<script>
import CommonNavbar from "@/components/common/common-navbar";
import CoopListItem from "@/components/business/coop-list-item";
import Loading from "@/components/common/common-loading";
import Toast from "@/components/common/common-toast";
import { mapGetters, mapActions } from "vuex";
export default {
data() {
return {
showLoading: false,
bgColor: "#fff",
isShow: false,
navTitle: "CME项目",
compTitle: "组件名称",
isShowNavbar: true,
isFixNavbar: false,
pointStyle: "activity",
descTitle: "规定从何处开始选取。如果是负数",
tabIndex: 1,
joinProjectList: [], // 我的项目
otherProjectList: [], // 全部项目
token: "",
toastTitle: "",
userMobile: ""
};
},
computed: {
...mapGetters(["projectTabIndex"])
},
components: {
// DiscussTopicStencil,
CommonNavbar,
CoopListItem,
Loading,
Toast,
},
created() {
var _this = this;
window.__getUserInfo = function(param) {
_this.setUserInfo(param);
_this.token = param.userToken;
_this.userMobile = param.userMobile;
_this.getCoopData();
};
_this.getUserInfo();
if (__isWeb) {
_this.getCoopData();
}
window.__refresh = function() {
//_this.tabIndex = _this.projectTabIndex;
_this.getUserInfo();
// document.documentElement.scrollTop = 0;
// document.body.scrollTop = 0;
};
// 打开页面埋点
this.$sendBuriedData({
component_tag: '210#0#0#0'
});
},
mounted() {
var _this = this;
this.tabIndex = this.projectTabIndex;
// let param = {
// id: 12 };
// this.API_GET("app/certificate/downLoad", param).then(res => {
// });
document.documentElement.scrollTop = 0;
document.body.scrollTop = 0;
},
methods: {
// 跳转到第三方考试页面
//
jumpToExamAction() {
let paramList = [
{
key: "pageUrl",
value: 'http://cmeonline.cma-cmc.com.cn/cms/weixinCourseDetail.htm?courseId=a245b2060ac0495cae440de859321b91&openCourseId=2d9b152a85dc4833892aeaa713362b9f',
type: 4,
seqNo: 1
},
// 此字段不配置,则用原来的逻辑
{
key: "needCache",
value: '1', // 0不缓存,其它值都做缓存
type: 4,
seqNo: 1
}
];
rocNative.dispatchEventByModuleCode({
modeCode: "M300",
jsonString: paramList
});
},
jumpToExamAction2() {
let paramList = [
{
key: "pageUrl",
value: 'http://cmeonline.cma-cmc.com.cn/cms/weixinCourseDetail.htm?courseId=0aeee9f7712b4543ab8eadb0571a78a7&openCourseId=e9e124392d3f4e2494d46e8f990b085e',
type: 4,
seqNo: 1
},
// 此字段不配置,则用原来的逻辑
{
key: "needCache",
value: '1', // 0不缓存,其它值都做缓存
type: 4,
seqNo: 1
}
];
rocNative.dispatchEventByModuleCode({
modeCode: "M300",
jsonString: paramList
});
},
...mapActions(["setUserInfo"]),
//获取版本号
getUserInfo() {
rocNative.getUserInfo({
__funcName: "__getUserInfo"
});
},
changeTab(index) {
let tag = index == 1 ? '210#210001#0' : '210#210001#1';
this.tabIndex = index;
if(index == 1 && !this.userMobile) {
rocNative.gotoLogin();
this.tabIndex = 2;
}
this.$sendBuriedData({
component_tag: tag
});
},
// 获取所有项目:我的项目、其它项目
getCoopData() {
// debugger
let _this = this;
let param = {
token: _this.token,
setEntry: true
};
let cachedJoinProjectList = []
let cachedOtherProjectList = []
_this.otherProjectList = []
_this.showLoading = true;
this.GET("cme/project/list", param).then(
res => {
_this.showLoading = false;
if (res.code == "000000") {
// let oldProjects1 = [];
// let oldProjects2 = [];
// for(let i = 0; i < res.data.oldProjects.length; i++) {
// if(res.data.oldProjects[i].roleFlag == 1) {
// oldProjects1.push(res.data.oldProjects[i]);
// } else if (res.data.oldProjects[i].roleFlag == 0) {
// oldProjects2.push(res.data.oldProjects[i]);
// }
// }
// console.log('项目1',oldProjects1,'项目2',oldProjects2);
cachedJoinProjectList = res.data.myCMEProjectListDtoList;
cachedOtherProjectList = res.data.allCMEProjectListDtoList;
_this.joinProjectList = res.data.myCMEProjectListDtoList;
_this.otherProjectList = res.data.allCMEProjectListDtoList;
// cachedJoinProjectList = _this.handleOldProject(
// oldProjects1,
// res.data.myProjectList
// );
// cachedOtherProjectList = _this.handleOldProject(
// oldProjects2,
// res.data.otherProjectList
// );
// 如果用户已经登陆,则将"至今"的几个项目移到我的列表中
if(_this.userMobile) {
// cachedOtherProjectList.map(item => {
// if(item.projectName && item.projectName.indexOf('国家基本公共卫生服务项目基层高血压管理办公室') >= 0) {
// cachedJoinProjectList.unshift(item);
// } else {
// _this.otherProjectList.push(item);
// }
// })
_this.tabIndex = 1;
} else {
_this.tabIndex = 2;
// _this.otherProjectList = cachedOtherProjectList
}
// _this.joinProjectList = cachedJoinProjectList;
if (_this.joinProjectList && _this.joinProjectList.length === 0) {
_this.tabIndex = 2;
}
_this.isShow = true
// console.log('otherProjectList',_this.otherProjectList);
}
}
);
},
handleOldProject(oldProjects, otherProjectList) {
let oldList = oldProjects.map(item => {
item.pType = 1;
return item;
}),
otherList = otherProjectList.map(item => {
item.pType = 2;
return item;
});
return oldList.concat(otherList);
},
}
};
</script>
<style lang="scss" scoped>
@import "../style/mixin";
.page-content {
&-table {
position: fixed;
z-index: 1;
width: 100%;
text-align: center;
border-bottom: 1px solid #e7e7e7;
background: #fff;
tr {
font-size: px2rem(15px);
font-weight: 700;
height: px2rem(44px);
td {
width: 50%;
padding-top: px2rem(6px);
.tap-title {
display: flex;
flex-direction: column;
align-items: center;
color: #999;
span:nth-child(2) {
position: relative;
left: 0;
bottom: px2rem(-9px);
z-index: 2;
width: px2rem(10px);
height: px2rem(3px);
background: rgba(255, 255, 255, 1);
border-radius: px2rem(3px);
}
}
&.active {
span:nth-child(2) {
background: rgba(68, 146, 132, 1);
}
}
}
}
}
&-list {
padding-top: px2rem(50px);
}
}
</style>
此差异已折叠。
此差异已折叠。
......@@ -67,6 +67,7 @@
:organName="project.organName"
:remind="project.remind"
:projectCredit="project.projectCredit"
:cmeType="project.cmeType"
/>
<LearnKnow :mustKnow="project.mustKnow"></LearnKnow>
<CommonSpliteLine></CommonSpliteLine>
......@@ -90,7 +91,6 @@
</div>
</div>
</div>
<Loading v-show="showLoading" />
<!-- 弹框 -->
<CommonDialog
:isShowDialog="isShowDialog"
......@@ -105,17 +105,19 @@
:isShowDialog="isShowEJDialog"
isSingle
needSubContent
content="确保您已经从云鹊平台购买优惠学习卡。跳转后请申请考试、激活学习卡,考试通过后申请证书。"
subContent="学分由中华医学电子音像出版社授予,如有问题可致电400-920-8899云鹊医客服咨询。"
content="请确保您已经在云鹊平台购买学员优惠学习卡"
subContent="1. 跳转后点击“购买学习”,注册登录“中华医学教育在线”平台(首次登录需用手机号注册)<br/>2. 支付方式选择 “学习卡支付”,输入在云鹊平台已购学习卡的激活码,即可参加考试申请学分"
cancleBtnText="我知道了"
@handlerAction="handlerEJAction"
/>
<ExjumperButton
@btnClick="beforeJumpToExam"
v-if="project.cmeType == 2 && project.inScope !== 0"
v-if="project.cmeType == 2"
:btnText="project.currentProgress > 1 ? '参加考试' : '学完全部课程,可参加考试'"
:type="project.currentProgress > 1 ? 'primary' : 'disabled'"></ExjumperButton>
<div v-if="project.cmeType == 2 && project.inScope !== 0" 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>
<Loading v-show="showLoading" />
</div>
</template>
<script>
......@@ -143,6 +145,7 @@ import { getWebPageUrl, gotoPage } from "@/utils/index";
import { mapGetters, mapActions } from "vuex";
import vueFilters from "@/utils/filter";
import { Toast } from 'vant';
import CardPopup from "@/components/cme/card-popup";
let cataOffsetTop = 0;
let intorOffsetTop = 0;
......@@ -230,8 +233,14 @@ export default {
courseRequire: 0,
clientType: 0,
// currentProgress>1时考试按钮显示并可用
btnType: 'primary', // primary: 可跳转时(currentProgress = 1); disabled: 不可跳转时
btnText: '学完全部课程,可参加考试' // 参加考试(currentProgress = 1); 或者学完全部课程,可参加考试
btnType: 'primary', // primary: 可跳转时(currentProgress = 1); disabled: 不可跳转时
btnText: '学完全部课程,可参加考试', // 参加考试(currentProgress = 1); 或者学完全部课程,可参加考试
provinceId: '',
organizationId: '',
isShowPopup: false,
cardInfo: {
id: 0
},
};
},
components: {
......@@ -249,7 +258,8 @@ export default {
TeacterIntro,
CommonDialog,
ExjumperButton,
ExjumperDialog
ExjumperDialog,
CardPopup
},
computed: {
......@@ -261,6 +271,8 @@ export default {
this.from = this.$route.query.from || this.from || "native";
this.projectId = this.$route.query.id || 1;
this.courseRequire = this.$route.query.courseRequire;
this.provinceId = this.$route.query && this.$route.query.provinceId || 0;
this.organizationId = this.$route.query && this.$route.query.organizationId || 0;
window.__getUserInfo64Comp = function(param) {
// appVersion 安卓 3.2.2 iOS
......@@ -287,7 +299,12 @@ export default {
// action: "打开页面",
component_tag: `211#0#${this.projectId}#0`
});
window.__getPositionData = function(param) {
console.log(param);
// _this.showLoading = false;
param.setEntry = true;
_this.getProvinceIdByPosition(param);
}
},
mounted() {
window.addEventListener("scroll", this.scrollFun);
......@@ -299,29 +316,169 @@ export default {
methods: {
...mapActions(["setUserInfo"]),
// 点击弹层
clickOverlay() {
console.log('clickOverlay');
this.isShowPopup = false;
},
// 点击“参与考试”
beforeJumpToExam() {
// 如果是首次,则弹出弹框
if(this.project.firstIntoExam) {
this.isShowEJDialog = true;
} else {
this.jumpToExamAction();
this.isBuy(2);
// this.jumpToExamAction();
}
},
// 第一次跳转弹框,点击时调用相应接口
handlerEJAction() {
this.isShowEJDialog = false;
this.jumpToExamAction();
this.isBuy(2);
// this.jumpToExamAction();
this.firstIntoExamAction();
},
// 判断用户是否购买过I类学习卡
isBuy(cardType) {
this.showLoading = true;
// alert(this.showLoading)
let param = {
cardType: cardType,
setEntry: true,
}
this.GET("trade/storage/card/isBuy", param).then(res => {
if (res.code == "000000") {
// 如果购买过,则直接跳转到中华医学会页面
if(res.data) {
this.jumpToCardList();
} else {
this.preJumper();
}
}
});
},
// 跳转II类学习详情页面(中华医学会项目详情页面)
jumpToCardList() {
this.showLoading = false;
this.isShowPopup = false;
// 判断版本号,如果小于3.4.0,则只做提示
let appVersion = this.userInfo.appVersion;
let appVersionNum = appVersion.split('.').join('');
if(appVersionNum < 341) {
Toast('请您下载新版本App');
return;
}
if (window.__isWeb) {
return;
} else {
let pageUrl = this.project.examBtnUrl;
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
});
}
},
// 跳转前判断是否有机构,否则使用定位信息
preJumper() {
if(this.organizationId != 0 && this.provinceId != 0) {
this.getCardInfoByProvinceId(this.provinceId);
} else {
this.getPositionData();
}
},
// 根据位置信息获取省ID
getProvinceIdByPosition(param) {
param.setEntry = true;
this.POST("aggregate/cme/convertLocationToProvinceId", param).then(res => {
if (res.code == "000000") {
this.getCardInfoByProvinceId(res.data);
}
});
},
// 根据省ID,获取学习卡信息
getCardInfoByProvinceId(provinceId) {
let param = {
"area": provinceId + '',
"cardType": 2,
"pageNum": 1,
"pageSize": 1
}
this.POST("trade/goods/cardList_v2", param).then(res => {
if (res.code == "000000") {
this.showLoading = false;
this.isShowPopup = true;
this.cardInfo = res.data && res.data[0] || {id: 0} ;
}
});
},
// 获取地理位置信息
getPositionData() {
// this.showLoading = true;
console.log('getPositionData');
rocNative.getPositionData({
__funcName: "__getPositionData"
});
},
// 跳转到原生的购买页面
confirm() {
this.isShowPopup = false;
let pageUrl = this.project.examBtnUrl;
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(pageUrl),
type: 4,
seqNo: 1
}
];
rocNative.dispatchEventByModuleCode({
modeCode: "M200",
jsonString: paramList
});
},
// 跳转到第三方考试页面
jumpToExamAction() {
// 判断版本号,如果小于3.4.0,则只做提示
let appVersion = this.userInfo.appVersion;
let appVersionNum = appVersion.split('.').join('');
if(appVersionNum < 340) {
if(appVersionNum < 341) {
Toast('请您下载新版本App');
return;
}
......@@ -398,7 +555,7 @@ export default {
setEntry: true
};
_this.NEW_POST("cme/credit/rangeCheck", param).then(res => {
if (res.code == "219004" || res.code == "219012") {
if ( (_this.project.cmeType != 2) && (res.code == "219004" || res.code == "219012")) {
// 未加入机构 219004 不在申请范围 219012
this.dialogContent = `该项目仅对${_this.project.scope}的用户开放`;
this.cancleBtnText = "我知道了";
......@@ -747,7 +904,7 @@ export default {
span.focus:after {
content: "";
position: absolute;
left: px2rem(7px);
left: px2rem(9px);
bottom: px2rem(-14px);
background: #449284;
// border-bottom: px2rem(1px) solid #449284;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册