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

跳转到学习卡列表页面

上级 32c22b0a
...@@ -11,12 +11,26 @@ ...@@ -11,12 +11,26 @@
</section> </section>
</template> </template>
<script> <script>
import { getWebPageUrl } from "@/utils/index" import { getWebPageUrl } from "@/utils/index";
import { mapGetters } from 'vuex' import { mapGetters } from "vuex";
export default { export default {
data() { data() {
return {}; return {};
}, },
props: {
oneLevelUrl: {
type: String,
default: ""
},
provinceId: {
type: String | Number,
default: ""
},
organizationId: {
type: String | Number,
default: ""
}
},
computed: { computed: {
...mapGetters(["userInfo"]) ...mapGetters(["userInfo"])
}, },
...@@ -28,18 +42,18 @@ export default { ...@@ -28,18 +42,18 @@ export default {
return; return;
} }
if (window.__isWeb) { if (window.__isWeb) {
console.log('in jumpToCardList'); console.log("in jumpToCardList");
return; return;
} else { } else {
let pageUrl = getWebPageUrl('cme/#/icredit-detail'); let pageUrl = getWebPageUrl("cme/#/icredit-detail");
let paramList = [ let paramList = [
{ {
key: "pageUrl", key: "pageUrl",
value: pageUrl, value: `${pageUrl}?provinceId=${provinceId}&organizationId=${organizationId}&oneLevelUrl=` + encodeURIComponent(this.oneLevelUrl),
type: 4, type: 4,
seqNo: 1 seqNo: 1
} }
] ];
rocNative.dispatchEventByModuleCode({ rocNative.dispatchEventByModuleCode({
modeCode: "M300", modeCode: "M300",
jsonString: paramList jsonString: paramList
...@@ -63,7 +77,7 @@ export default { ...@@ -63,7 +77,7 @@ export default {
align-items: center; align-items: center;
// box-sizing: border-box; // box-sizing: border-box;
padding: 0 px2rem(15px); padding: 0 px2rem(15px);
background: #F8F9FA; background: #f8f9fa;
border-radius: px2rem(6px); border-radius: px2rem(6px);
.left-icon { .left-icon {
width: px2rem(40px); width: px2rem(40px);
...@@ -85,7 +99,7 @@ export default { ...@@ -85,7 +99,7 @@ export default {
line-height: px2rem(26px); line-height: px2rem(26px);
font-size: px2rem(16px); font-size: px2rem(16px);
font-weight: 700; font-weight: 700;
color: rgba(55, 56, 57, 1); color: rgba(55, 56, 57, 1);
} }
.bottom { .bottom {
font-size: px2rem(14px); font-size: px2rem(14px);
......
...@@ -11,7 +11,9 @@ ...@@ -11,7 +11,9 @@
import { getHactiveUrl } from "@/utils/index"; import { getHactiveUrl } from "@/utils/index";
export default { export default {
data() { data() {
return {}; return {
}
}, },
methods: { methods: {
// 跳转到学习卡列表页面 // 跳转到学习卡列表页面
......
...@@ -13,7 +13,7 @@ module.exports = { ...@@ -13,7 +13,7 @@ module.exports = {
query = this.$route.query query = this.$route.query
} }
// alert('this.token' + this.token) // alert('this.token' + this.token)
this.token = this.getUrlKey('token') || (query && query.token) || 'EF1CB4B4133F403ABF088F2B7947738F' this.token = this.getUrlKey('token') || (query && query.token) || 'EEF69589911F4D3CAC8700AC11EE8096'
}, },
mounted() { mounted() {
......
...@@ -14,9 +14,7 @@ ...@@ -14,9 +14,7 @@
<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-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-6.png">
<img class="img" src="https://file.yunqueyi.com/h5/images/tinified/I-detail-7.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"> <img @click="isBuy(1)" class="img" src="https://file.yunqueyi.com/h5/images/tinified/i-detail-8.png">
<img @click="confirm(1)" class="img" src="https://file.yunqueyi.com/h5/images/tinified/i-detail-8.png">
<img @click="jumpToCardList" class="img" src="https://file.yunqueyi.com/h5/images/tinified/i-detail-8.png">
<CardPopup :cardInfo="cardInfo" :isShow="showGoUpdate" @cancle="jumpToCardList" @confirm="confirm"></CardPopup> <CardPopup :cardInfo="cardInfo" :isShow="showGoUpdate" @cancle="jumpToCardList" @confirm="confirm"></CardPopup>
</section> </section>
</template> </template>
...@@ -32,6 +30,9 @@ export default { ...@@ -32,6 +30,9 @@ export default {
showNavBar: true, showNavBar: true,
showGoUpdate: false, showGoUpdate: false,
isFixNavbar: true, isFixNavbar: true,
oneLevelUrl: '',
provinceId: 0,
organizationId: 0,
cardInfo: { cardInfo: {
} }
...@@ -45,47 +46,41 @@ export default { ...@@ -45,47 +46,41 @@ export default {
...mapGetters(['jumpURLForI', 'organizationInfo']) ...mapGetters(['jumpURLForI', 'organizationInfo'])
}, },
created() { created() {
// TEST // TEST
let _this = this; let _this = this;
window.__getPositionData = function(param) { window.__getPositionData = function(param) {
console.log(param); console.log(param);
_this.getProvinceIdByPosition(param); _this.getProvinceIdByPosition(param);
} }
this.oneLevelUrl = decodeURIComponent(this.$route.query && this.$route.query.oneLevelUrl || '');
alert(this.jumpURLForI); this.provinceId = this.$route.query && this.$route.query.provinceId || 0;
// TODO TEST this.organizationId = this.$route.query && this.$route.query.organizationId || 0;
// this.getCardInfoByProvinceId(110); console.log(this.oneLevelUrl, this.provinceId, this.organizationId);
// this.isBuy(1);
}, },
methods: { methods: {
/*
TODO
1、判断用户是否购买过I类学习卡,没有购买过,则弹出Popup框(之前要调用接口)
2、判断用户是否购买过I类学习卡,没有购买过,则弹出Popup框(之前要调用接口)
*/
// 判断用户是否购买过I类学习卡 // 判断用户是否购买过I类学习卡
isBuy(cardType) { isBuy(cardType) {
let param = { let param = {
"cardType": cardType, cardType: cardType,
setEntry: true,
} }
this.GET("trade/storage/card/isBuy", param).then(res => { this.GET("trade/storage/card/isBuy", param).then(res => {
if (res.code == "000000") { if (res.code == "000000") {
console.log('isBuy', res);
// 如果购买过,则直接跳转到中华医学会页面 // 如果购买过,则直接跳转到中华医学会页面
if(true) { if(res.data) {
this.jumpToCardList(); this.jumpToCardList();
} else { } else {
this.jumper(); this.preJumper();
} }
} }
}); });
}, },
jumper() { preJumper() {
// 如果有机构,则直接获取学习卡信息 // 如果有机构,则直接获取学习卡信息
console.log('in jumper this.organizationInfo', this.organizationInfo, ''); console.log('in jumper this.organizationInfo', this.organizationInfo, '');
if(this.organizationInfo.organizationId && this.organizationInfo.provinceId) { if(this.organizationId != 0 && this.provinceId != 0) {
this.getCardInfoByProvinceId(this.organizationInfo.provinceId); this.getCardInfoByProvinceId(this.provinceId);
// 否则获取地理位置信息 // 否则获取地理位置信息
} else { } else {
this.getPositionData(); this.getPositionData();
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
</article> </article>
<article class="page-content-list"> <article class="page-content-list">
<CommonTitle v-show="tabIndex === 2" title="I类学分项目" :isShowCert="false"></CommonTitle> <CommonTitle v-show="tabIndex === 2" title="I类学分项目" :isShowCert="false"></CommonTitle>
<ICardItem v-show="tabIndex === 2"></ICardItem> <ICardItem v-show="tabIndex === 2" :oneLevelUrl="oneLevelUrl" :provinceId="provinceId" :organizationId="organizationId"></ICardItem>
<CommonTitle title="II类学分项目" :isShowCert="false"></CommonTitle> <CommonTitle title="II类学分项目" :isShowCert="false"></CommonTitle>
<section v-if="tabIndex === 1"> <section v-if="tabIndex === 1">
<CoopListItem <CoopListItem
...@@ -200,11 +200,13 @@ export default { ...@@ -200,11 +200,13 @@ export default {
// let organizationInfo = {} // let organizationInfo = {}
_this.joinProjectList = res.data.myCMEProjectListDtoList; _this.joinProjectList = res.data.myCMEProjectListDtoList;
_this.otherProjectList = res.data.allCMEProjectListDtoList; _this.otherProjectList = res.data.allCMEProjectListDtoList;
_this.organizationInfo.provinceId = res.data.provinceId; _this.provinceId = res.data.provinceId;
_this.organizationInfo.organizationId = res.data.organizationId; _this.organizationId = res.data.organizationId;
// _this.oneLevelUrl = res.data.oneLevelUrl; // I类学习卡列表地址 // _this.organizationInfo.provinceId = res.data.provinceId;
_this.setJumpURLForI(res.data.oneLevelUrl); // _this.organizationInfo.organizationId = res.data.organizationId;
_this.setOrganizationInfo(_this.organizationInfo); _this.oneLevelUrl = res.data.oneLevelUrl; // I类学习卡列表地址
// _this.setJumpURLForI(res.data.oneLevelUrl);
// _this.setOrganizationInfo(_this.organizationInfo);
if (_this.userMobile) { if (_this.userMobile) {
_this.tabIndex = 1; _this.tabIndex = 1;
} else { } else {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册