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

二期功能等

上级 61acf590
......@@ -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",
......
......@@ -225,7 +225,7 @@ export default {
// let pageUrl = "";
// let paramList = [];
// if(item.parent === false) {
// pageUrl = getWebPageUrl('coopv2/#/coop');
// pageUrl = getWebPageUrl('cme/#/coop');
// paramList = [
// {
// key: "pageUrl",
......@@ -235,7 +235,7 @@ export default {
// }
// ]
// } else {
// pageUrl = getWebPageUrl('coopv2/#/parent');
// pageUrl = getWebPageUrl('cme/#/parent');
// paramList = [
// {
// key: "pageUrl",
......
......@@ -11,11 +11,41 @@
</section>
</template>
<script>
import { getWebPageUrl } from "@/utils/index"
import { mapGetters } from 'vuex'
export default {
data() {
return {};
},
methods: {}
computed: {
...mapGetters(["userInfo"])
},
methods: {
// 跳转I类学习详情页面
jumpToCardList() {
if (!this.userInfo.userMobile) {
rocNative.gotoLogin();
}
if (window.__isWeb) {
console.log('in jumpToCardList');
return;
} else {
let pageUrl = getWebPageUrl('cme/#/icreditdetail');
let paramList = [
{
key: "pageUrl",
value: pageUrl,
type: 4,
seqNo: 1
}
]
rocNative.dispatchEventByModuleCode({
modeCode: "M300",
jsonString: paramList
});
}
}
}
};
</script>
<style lang="scss" scoped>
......
......@@ -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,8 @@
<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>{{organName}}</span>
</div>
</div>
......@@ -69,6 +70,10 @@ export default {
projectCredit: {
type: String,
default: ""
},
cmeType: {
type: String | Number,
default: 1
}
}
};
......
<template>
<section class="card-banner-wrapper">
<section @click="jumpToCardList" class="card-banner-wrapper">
<article class="left">
<img src="../../images/cme/phrase2/what.png" alt />
<span>学习项目必须使用学习卡哦~</span>
......@@ -8,11 +8,34 @@
</section>
</template>
<script>
import { getHactiveUrl } from "@/utils/index";
export default {
data() {
return {};
},
methods: {}
methods: {
// 跳转到学习卡列表页面
jumpToCardList() {
if (window.__isWeb) {
console.log("in jumpToCardList");
return;
} else {
let pageUrl = getHactiveUrl("/message_push/#/study-card");
let paramList = [
{
key: "pageUrl",
value: pageUrl,
type: 4,
seqNo: 1
}
];
rocNative.dispatchEventByModuleCode({
modeCode: "M300",
jsonString: paramList
});
}
}
}
};
</script>
<style lang="scss" scoped>
......@@ -25,7 +48,7 @@ export default {
padding: 0 px2rem(15px);
justify-content: space-between;
align-items: center;
background: #FEFAF5;
background: #fefaf5;
.left {
display: flex;
height: px2rem(40px);
......@@ -49,7 +72,7 @@ export default {
background: rgba(230, 162, 60, 1);
border-radius: px2rem(25px);
border: px2rem(1px) solid rgba(230, 162, 60, 1);
color: #FFFFFF;
color: #ffffff;
}
}
</style>
\ No newline at end of file
const getters = {
userInfo: state => state.coop.userInfo,
statusBarHeight: state => state.coop.statusBarHeight,
projectTabIndex: state => state.coop.projectTabIndex
projectTabIndex: state => state.coop.projectTabIndex,
jumpURLForII: state => state.coop.jumpURLForII,
positionInfo: state => state.coop.positionInfo,
organizationInfo: state => state.coop.organizationInfo,
}
export default getters
......@@ -2,7 +2,28 @@ const coop = {
state: {
userInfo: {},
statusBarHeight: {},
projectTabIndex: 1
projectTabIndex: 1,
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 +35,15 @@ const coop = {
SET_PROJECT_TAB_INDEX: (state, projectTabIndex) => {
state.projectTabIndex = projectTabIndex
},
SET_JUMP_URL_FOR_I_AND_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 +55,15 @@ const coop = {
setProjectTabIndex({ commit }, projectTabIndex) {
commit('SET_PROJECT_TAB_INDEX', projectTabIndex)
},
setJumpURLForII({ commit }, jumpURLForII) {
commit('SET_JUMP_URL_FOR_I_AND_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',
}
}
......@@ -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]
......
......@@ -8,17 +8,28 @@
<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">
<img @click="jumper" class="img" src="https://file.yunqueyi.com/h5/images/tinified/i-detail-8.png">
<CardPopup :showGoUpdate="showGoUpdate"></CardPopup>
</section>
</template>
<script>
import CardPopup from "@/components/cme/card-popup";
export default {
data() {
return {
showGoUpdate: false,
}
},
components: {
CardPopup
},
methods: {
/*
1、判断用户是否购买过I类学习卡,没有购买过,则弹出Popup框(之前要调用接口)
2、判断用户是否购买过I类学习卡,没有购买过,则弹出Popup框(之前要调用接口)
*/
jumper() {
this.showGoUpdate = true;
console.log('in jumper');
}
},
......
此差异已折叠。
......@@ -10,9 +10,6 @@
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}">
......@@ -67,7 +64,7 @@
<img src="../images/cme/phrase2/back-top.png" alt />
</article>
</transition>
<CardPopup :showGoUpdate="showGoUpdate"></CardPopup>
<!-- <CardPopup :showGoUpdate="showGoUpdate"></CardPopup> -->
</div>
</template>
<script>
......@@ -77,7 +74,7 @@ import Loading from "@/components/common/common-loading";
import Toast from "@/components/common/common-toast";
import CardBanner from "@/components/cme/card-banner";
import ICardItem from "@/components/cme/I-card-item";
import CardPopup from "@/components/cme/card-popup";
// import CardPopup from "@/components/cme/card-popup";
import CommonTitle from "@/components/common/common-title";
import { mapGetters, mapActions } from "vuex";
......@@ -105,7 +102,7 @@ export default {
};
},
computed: {
...mapGetters(["projectTabIndex"])
...mapGetters(["projectTabIndex", "organizationInfo"])
},
components: {
......@@ -117,7 +114,7 @@ export default {
CardBanner,
CommonTitle,
ICardItem,
CardPopup
// CardPopup
},
created() {
var _this = this;
......@@ -141,73 +138,31 @@ export default {
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;
// let param = {
// id: 12 };
// this.API_GET("app/certificate/downLoad", param).then(res => {
// });
},
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
});
},
...mapActions(["setUserInfo", "setOrganizationInfo"]),
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
//获取位置信息 测试代码 TEST
getPositionData() {
console.log('getPositionData');
rocNative.getPositionData({
__funcName: "__getPositionData"
});
},
...mapActions(["setUserInfo"]),
//获取版本号
getUserInfo() {
rocNative.getUserInfo({
......@@ -215,14 +170,7 @@ export default {
});
},
//获取位置信息
getPositionData() {
console.log('getPositionData');
rocNative.getPositionData({
__funcName: "__getPositionData"
});
},
// 切换列表
changeTab(index) {
let tag = index == 1 ? "210#210001#0" : "210#210001#1";
this.tabIndex = index;
......@@ -234,79 +182,43 @@ export default {
component_tag: tag
});
},
// 获取所有项目:我的项目、其它项目
getCoopData() {
// debugger
let _this = this;
let param = {
token: _this.token,
setEntry: true
};
let cachedJoinProjectList = [];
let cachedOtherProjectList = [];
_this.joinProjectList = [];
_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
// );
// 如果用户已经登陆,则将"至今"的几个项目移到我的列表中
_this.organizationInfo.provinceId = res.data.provinceId;
_this.organizationInfo.organizationId = res.data.organizationId;
_this.oneLevelUrl = res.data.oneLevelUrl; // 学习卡列表地址
// _this.setJumpURLForIAndII(res.data.oneLevelUrl);
_this.setOrganizationInfo(organizationInfo);
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);
},
// 监听滚动事件
scrollFun() {
let scrollTop = window.scrollY;
if (scrollTop >= 500) {
......@@ -315,6 +227,8 @@ export default {
this.needShowBackup = false;
}
},
// 滚动到顶部
scrollTop() {
window.scrollTo(0, 0);
}
......
此差异已折叠。
......@@ -67,6 +67,7 @@
:organName="project.organName"
:remind="project.remind"
:projectCredit="project.projectCredit"
:cmeType="project.cmeType"
/>
<LearnKnow :mustKnow="project.mustKnow"></LearnKnow>
<CommonSpliteLine></CommonSpliteLine>
......@@ -112,10 +113,10 @@
/>
<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>
</div>
</template>
<script>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册