Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-professional-exam
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Culm
pica-professional-exam
提交
50965758
提交
50965758
编写于
7月 10, 2020
作者:
guangjun.yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
兑换弹框修改等
上级
140cc6b6
变更
4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
115 行增加
和
66 行删除
+115
-66
bind-card-button.vue
src/components/cme/bind-card-button.vue
+1
-1
change-card.vue
src/components/cme/change-card.vue
+52
-17
global.scss
src/style/global.scss
+0
-1
I-credit-detail.vue
src/views/I-credit-detail.vue
+62
-47
未找到文件。
src/components/cme/bind-card-button.vue
浏览文件 @
50965758
...
...
@@ -31,7 +31,7 @@ export default {
},
methods
:
{
changeClick
(){
this
.
$emit
(
"changeClick"
,
"去兑换"
)
this
.
$emit
(
"changeClick"
)
},
gotoBuy
()
{
this
.
$emit
(
"gotoBuy"
);
...
...
src/components/cme/change-card.vue
浏览文件 @
50965758
...
...
@@ -15,15 +15,19 @@
<span>
激活码用于兑换课程,您可以从订单详情或已购买到实体卡查看激活码密码。激活码一旦兑换,不可退回。
</span>
</div>
</article>
<article
class=
"code"
>
<van-field
v-model=
"activationCode"
border
clearable
label=
"激活码"
placeholder=
"请输入激活码"
/>
</article>
<section
class=
"input-wrapper"
>
<article
class=
"code"
>
<van-field
maxlength=
"23"
v-model=
"activationCode"
clearable
label=
"激活码"
placeholder=
"请输入激活码"
/>
</article>
<span
class=
"error"
>
{{
errorMsg
}}
</span>
</section>
<article
class=
"bottom"
>
<van-button
@
click=
"confirm"
size=
"large"
round
color=
"#449284"
>
确认兑换
</van-button>
</article>
...
...
@@ -45,19 +49,37 @@ export default {
// },
data
()
{
return
{
activationCode
:
""
activationCode
:
""
,
errorMsg
:
'请输入激活码'
};
},
watch
:
{
activationCode
(
val
)
{
if
(
!
val
)
{
this
.
errorMsg
=
'请输入激活码'
;
}
else
{
this
.
errorMsg
=
''
;
}
this
.
$nextTick
(()
=>
{
this
.
activationCode
=
val
.
replace
(
/
\s
/g
,
''
).
replace
(
/.....
(?!
$
)
/g
,
'$& '
);
});
}
},
methods
:
{
cancle
()
{
console
.
log
(
'cancle'
);
this
.
$emit
(
"cancle"
);
},
confirm
()
{
// 时行校验
console
.
log
(
'confirm'
);
this
.
$emit
(
"confirm"
,
this
.
activationCode
);
}
if
(
!
this
.
activationCode
||
this
.
activationCode
.
length
!=
23
)
return
;
let
aCode
=
JSON
.
stringify
(
this
.
activationCode
);
this
.
$emit
(
"confirm"
,
aCode
.
replace
(
/
\s
/g
,
''
));
},
// bankCardKeyup() {
// this.id_card = val.replace(/\s/g,'').replace(/....(?!$)/g,'$& ');
// this.activationCode = this.activationCode.replace(/\s/g,'').replace(/(\.{4})(?=\.)/g, '$1 ');
// }
}
};
</
script
>
...
...
@@ -104,11 +126,24 @@ export default {
color
:
#979899
;
}
}
.code
{
display
:
flex
;
padding
:
px2rem
(
20px
)
0
;
padding-top
:
0
;
.input-wrapper
{
position
:
relative
;
.code
{
display
:
flex
;
flex-direction
:
column
;
padding
:
px2rem
(
20px
)
0
;
padding-top
:
0
;
}
.error
{
position
:
absolute
;
top
:
px2rem
(
64px
);
left
:
px2rem
(
70px
);
display
:
inline-block
;
color
:
red
;
font-size
:
px2rem
(
12px
);
}
}
.bottom
{
display
:
flex
;
margin-bottom
:
px2rem
(
40px
);
...
...
src/style/global.scss
浏览文件 @
50965758
...
...
@@ -112,7 +112,6 @@
}
.bind-cart-wrapper
.van-field__control
{
border-radius
:
px2rem
(
4px
);
border
:
1px
solid
#C7C8C9
;
padding
:
px2rem
(
7px
);
...
...
src/views/I-credit-detail.vue
浏览文件 @
50965758
...
...
@@ -3,18 +3,27 @@
<CommonNavbar
:bgColor=
"bgColor"
v-show=
"showNavBar"
title
=
""
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
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>
<CardPopup
:cardInfo=
"cardInfo"
:isShow=
"isShowPopup"
@
clickOverlay=
"clickOverlay"
@
cancle=
"jumpToCardList"
@
confirm=
"confirm"
></CardPopup>
<Loading
v-if=
"showLoading"
/>
</section>
</
template
>
...
...
@@ -23,24 +32,24 @@ 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'
;
import
{
Toast
}
from
"vant"
;
export
default
{
data
()
{
return
{
bgColor
:
"#fff"
,
bgColor
:
'none'
,
bgColor
:
"none"
,
showNavBar
:
true
,
isShowPopup
:
false
,
isFixNavbar
:
true
,
oneLevelUrl
:
''
,
oneLevelUrl
:
""
,
provinceId
:
0
,
organizationId
:
0
,
cardInfo
:
{
id
:
0
},
cmeToken
:
''
,
showLoading
:
false
,
}
cmeToken
:
""
,
showLoading
:
false
}
;
},
components
:
{
CommonNavbar
,
...
...
@@ -55,18 +64,21 @@ export default {
// _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
.
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'
);
console
.
log
(
"clickOverlay"
);
this
.
isShowPopup
=
false
;
},
...
...
@@ -79,13 +91,13 @@ export default {
let
param
=
{
cardType
:
cardType
,
token
:
this
.
cmeToken
,
setEntry
:
true
,
}
setEntry
:
true
}
;
this
.
GET
(
"trade/storage/card/isBuy"
,
param
).
then
(
res
=>
{
if
(
res
.
code
==
"000000"
)
{
// 如果购买过,则直接跳转到中华医学会页面
if
(
res
.
data
)
{
this
.
jumpToCardList
();
if
(
res
.
data
)
{
this
.
jumpToCardList
();
}
else
{
this
.
preJumper
();
}
...
...
@@ -93,12 +105,12 @@ export default {
// else {
// Toast(res.message);
// }
});
});
},
// 跳转前判断是否有机构,否则使用定位信息
preJumper
()
{
if
(
this
.
organizationId
!=
0
&&
this
.
provinceId
!=
0
)
{
if
(
this
.
organizationId
!=
0
&&
this
.
provinceId
!=
0
)
{
this
.
getCardInfoByProvinceId
(
this
.
provinceId
);
}
else
{
this
.
getPositionData
();
...
...
@@ -107,7 +119,7 @@ export default {
// 获取地理位置信息
getPositionData
()
{
console
.
log
(
'getPositionData'
);
console
.
log
(
"getPositionData"
);
rocNative
.
getPositionData
({
__funcName
:
"__getPositionData"
});
...
...
@@ -116,30 +128,32 @@ export default {
// 根据省ID,获取学习卡信息
getCardInfoByProvinceId
(
provinceId
)
{
let
param
=
{
"area"
:
provinceId
+
''
,
"cardType"
:
1
,
"pageNum"
:
1
,
"pageSize"
:
1
}
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
}
;
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
);
this
.
POST
(
"aggregate/cme/convertLocationToProvinceId"
,
param
).
then
(
res
=>
{
if
(
res
.
code
==
"000000"
)
{
this
.
getCardInfoByProvinceId
(
res
.
data
||
0
);
}
else
{
this
.
getCardInfoByProvinceId
(
0
);
}
}
}
);
);
},
// 跳转到原生的购买页面
...
...
@@ -148,7 +162,8 @@ export default {
let
paramList
=
[
{
key
:
"className"
,
value
:
"com.picahealth.yunque.activitys.studycard.StudyCardDetailActivity###PicaDo.LearningCardVC"
,
value
:
"com.picahealth.yunque.activitys.studycard.StudyCardDetailActivity###PicaDo.LearningCardVC"
,
type
:
4
,
seqNo
:
1
},
...
...
@@ -189,24 +204,24 @@ export default {
// 此字段不配置,则用原来的逻辑
{
key
:
"needCache"
,
value
:
'1'
,
// 0不缓存,其它值都做缓存
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
;
background
:
#
f8f9fa
;
padding-bottom
:
80px
;
.img
{
margin-top
:
-15px
;
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录