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

其它逻辑

上级 b27c5a80
<template> <template>
<section class="card-popup-wrapper"> <section class="card-popup-wrapper">
<van-popup <van-popup
v-model="showGoUpdate" v-model="isShow"
position="center" position="center"
> >
<article class="content"> <article class="content">
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
<section class="card-info"> <section class="card-info">
<img class="icon" src="../../images/cme/phrase2/I-card-icon.png" alt /> <img class="icon" src="../../images/cme/phrase2/I-card-icon.png" alt />
<div class="info"> <div class="info">
<span>Ⅰ类学分继续医学教育10分学习卡</span> <span class="name">{{cardInfo.goodsName}}</span>
<p> <p>
<span class="price">60</span><span class="discount"> 原价¥80</span> <span class="price">{{cardInfo.preferentialPrice}}</span><span class="discount"><del> 原价¥{{cardInfo.costPrice}}</del></span>
</p> </p>
</div> </div>
</section> </section>
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
<span class="vert-line"></span> <span class="vert-line"></span>
<span class="right" @click="confirm">去购买</span> <span class="right" @click="confirm">去购买</span>
</div> </div>
<!-- <p class="update-btn v-hairline-top confirm-btn" @click="cancle">确定</p>
<p class="update-btn v-hairline-top" @click="confirm">取消</p> -->
</article> </article>
</van-popup> </van-popup>
</section> </section>
...@@ -37,9 +35,20 @@ export default { ...@@ -37,9 +35,20 @@ export default {
} }
}, },
props: { props: {
showGoUpdate: { isShow: {
type: Boolean, type: Boolean,
default: false, default: false,
},
cardInfo: {
id: 10031,
goodsVersion: 1,
cardType: 1,
costPrice: 0,
preferentialPrice: 0,
goodsDesc: "",
goodsName: "学习卡",
goodsType: 2,
isSale: 1,
} }
}, },
methods: { methods: {
...@@ -81,7 +90,19 @@ export default { ...@@ -81,7 +90,19 @@ export default {
margin-right: px2rem(8px); margin-right: px2rem(8px);
} }
.info { .info {
width: 100%;
position: relative;
top: 0;
left: 0;
.name {
position: absolute;
top: px2rem(-32px);
left: px2rem(4px);
}
p { p {
position: absolute;
bottom: px2rem(-34px);
left: 0px;
display: flex; display: flex;
align-items: center; align-items: center;
.price { .price {
......
...@@ -36,10 +36,10 @@ const coop = { ...@@ -36,10 +36,10 @@ const coop = {
SET_PROJECT_TAB_INDEX: (state, projectTabIndex) => { SET_PROJECT_TAB_INDEX: (state, projectTabIndex) => {
state.projectTabIndex = projectTabIndex state.projectTabIndex = projectTabIndex
}, },
SET_JUMP_URL_FOR_I_AND_II: (state, jumpURLForI) => { SET_JUMP_URL_FOR_I: (state, jumpURLForI) => {
state.jumpURLForI = jumpURLForI state.jumpURLForI = jumpURLForI
}, },
SET_JUMP_URL_FOR_I_AND_II: (state, jumpURLForII) => { SET_JUMP_URL_FOR_II: (state, jumpURLForII) => {
state.jumpURLForII = jumpURLForII state.jumpURLForII = jumpURLForII
}, },
SET_POSITION_INFO: (state, positionInfo) => { SET_POSITION_INFO: (state, positionInfo) => {
......
...@@ -15,9 +15,9 @@ service.interceptors.request.use(config => { ...@@ -15,9 +15,9 @@ service.interceptors.request.use(config => {
if (config.data && config.data.setEntry) { if (config.data && config.data.setEntry) {
config.headers['sysCode'] = config.data.sysCode || 10 config.headers['sysCode'] = config.data.sysCode || 10
if(config.data.token){ if(config.data.token){
config.headers['token'] = config.data.token || '0F32D60C3D7042158BCF1FB574E482BE' config.headers['token'] = config.data.token || '891F256CC48A4D57905F79C8F7628A74'
if( process.env.BUILD_ENV == "development" ){ // 本地开发环境 if( process.env.BUILD_ENV == "development" ){ // 本地开发环境
config.headers['token'] = config.data.token || '68659175C0D94E9998CE2C9E3F5C6533'; config.headers['token'] = config.data.token || '891F256CC48A4D57905F79C8F7628A74';
} }
// delete config.data.token; // delete config.data.token;
} }
......
...@@ -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) || '68659175C0D94E9998CE2C9E3F5C6533' this.token = this.getUrlKey('token') || (query && query.token) || 'EF1CB4B4133F403ABF088F2B7947738F'
}, },
mounted() { mounted() {
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<img @click="jumper" class="img" src="https://file.yunqueyi.com/h5/images/tinified/i-detail-8.png"> <img @click="jumper" 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="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"> <img @click="jumpToCardList" class="img" src="https://file.yunqueyi.com/h5/images/tinified/i-detail-8.png">
<CardPopup :cardInfo="cardInfo" :showGoUpdate="showGoUpdate" @cancle="jumpToCardList" @confirm="confirm"></CardPopup> <CardPopup :cardInfo="cardInfo" :isShow="showGoUpdate" @cancle="jumpToCardList" @confirm="confirm"></CardPopup>
</section> </section>
</template> </template>
<script> <script>
...@@ -50,8 +50,12 @@ export default { ...@@ -50,8 +50,12 @@ export default {
window.__getPositionData = function(param) { window.__getPositionData = function(param) {
console.log(param); console.log(param);
_this.getProvinceIdByPosition(param); _this.getProvinceIdByPosition(param);
// this.getCardInfoByProvinceId(param.city_code);
} }
alert(this.jumpURLForI);
// TODO TEST
// this.getCardInfoByProvinceId(110);
// this.isBuy(1);
}, },
methods: { methods: {
/* /*
...@@ -59,8 +63,25 @@ export default { ...@@ -59,8 +63,25 @@ export default {
1、判断用户是否购买过I类学习卡,没有购买过,则弹出Popup框(之前要调用接口) 1、判断用户是否购买过I类学习卡,没有购买过,则弹出Popup框(之前要调用接口)
2、判断用户是否购买过I类学习卡,没有购买过,则弹出Popup框(之前要调用接口) 2、判断用户是否购买过I类学习卡,没有购买过,则弹出Popup框(之前要调用接口)
*/ */
// 判断用户是否购买过I类学习卡
isBuy(cardType) {
let param = {
"cardType": cardType,
}
this.GET("trade/storage/card/isBuy", param).then(res => {
if (res.code == "000000") {
console.log('isBuy', res);
// 如果购买过,则直接跳转到中华医学会页面
if(true) {
this.jumpToCardList();
} else {
this.jumper();
}
}
});
},
jumper() { jumper() {
// this.showGoUpdate = true;
// 如果有机构,则直接获取学习卡信息 // 如果有机构,则直接获取学习卡信息
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.organizationInfo.organizationId && this.organizationInfo.provinceId) {
...@@ -87,7 +108,7 @@ export default { ...@@ -87,7 +108,7 @@ export default {
"pageNum": 1, "pageNum": 1,
"pageSize": 1 "pageSize": 1
} }
this.GET("trade/goods/cardList", param).then(res => { this.POST("trade/goods/cardList", param).then(res => {
if (res.code == "000000") { if (res.code == "000000") {
this.showGoUpdate = true; this.showGoUpdate = true;
console.log('getCardInfoByProvinceId', res); console.log('getCardInfoByProvinceId', res);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册