Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-cooperation-cme
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.education.frontend
pica-cooperation-cme
提交
39807538
提交
39807538
编写于
6月 08, 2020
作者:
guangjun.yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
判断用户是否购买过I类学习卡
上级
e6d612d2
变更
6
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
604 行增加
和
137 行删除
+604
-137
coop-list-item copy 2.vue
src/components/business/coop-list-item copy 2.vue
+436
-0
coop-list-item.vue
src/components/business/coop-list-item.vue
+14
-115
card-popup.vue
src/components/cme/card-popup.vue
+1
-1
I-credit-detail.vue
src/views/I-credit-detail.vue
+13
-15
index.vue
src/views/index.vue
+6
-0
merge-detail.vue
src/views/merge-detail.vue
+134
-6
未找到文件。
src/components/business/coop-list-item copy 2.vue
0 → 100644
浏览文件 @
39807538
此差异已折叠。
点击以展开。
src/components/business/coop-list-item.vue
浏览文件 @
39807538
...
...
@@ -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
>
...
...
@@ -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
,
...
...
@@ -138,7 +126,9 @@ export default {
query
:
{
id
:
item
.
id
,
coopType
:
this
.
coopType
,
courseRequire
:
item
.
courseRequire
courseRequire
:
item
.
courseRequire
,
projectId
:
this
.
provinceId
,
organizationId
:
this
.
organizationId
}
}
);
return
;
...
...
@@ -148,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
}
&projectId=${this.projectId
}
&organizationId=${this.organizationId
}
`
),
type
:
4
,
seqNo
:
1
}
...
...
@@ -164,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('cme/#/coop');
// paramList = [
//
{
// key: "pageUrl",
// value: pageUrl + `?id=$
{
item
.
id
}
&
coopType
=
$
{
coopType
}
&
tabTo
=
$
{
tabTo
}
&
courseRequire
=
$
{
courseRequire
}
`,
// type: 4,
// seqNo: 1
//
}
// ]
//
}
else {
// pageUrl = getWebPageUrl('cme/#/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
...
...
src/components/cme/card-popup.vue
浏览文件 @
39807538
...
...
@@ -12,7 +12,7 @@
<div
class=
"info"
>
<span
class=
"name"
>
{{
cardInfo
.
goodsName
}}
</span>
<p>
<span
class=
"price"
>
¥
{{
cardInfo
.
preferentialPrice
}}
</span><span
class=
"discount"
><del>
原价¥
{{
cardInfo
.
costPrice
}}
</del></span>
<span
class=
"price"
>
¥
{{
cardInfo
.
preferentialPrice
}}
</span><span
v-show=
"cardInfo.costPrice"
class=
"discount"
><del>
原价¥
{{
cardInfo
.
costPrice
}}
</del></span>
</p>
</div>
</section>
...
...
src/views/I-credit-detail.vue
浏览文件 @
39807538
...
...
@@ -21,7 +21,6 @@
<
script
>
import
CommonNavbar
from
"@/components/common/common-navbar"
;
import
CardPopup
from
"@/components/cme/card-popup"
;
import
{
mapGetters
}
from
'vuex'
;
export
default
{
data
()
{
return
{
...
...
@@ -42,20 +41,18 @@ export default {
CommonNavbar
,
CardPopup
},
computed
:
{
...
mapGetters
([
'jumpURLForI'
,
'organizationInfo'
])
},
created
()
{
// TEST
let
_this
=
this
;
window
.
__getPositionData
=
function
(
param
)
{
console
.
log
(
param
);
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
;
console
.
log
(
this
.
oneLevelUrl
,
this
.
provinceId
,
this
.
organizationId
);
// this.getProvinceIdByPosition();
},
methods
:
{
// 判断用户是否购买过I类学习卡
...
...
@@ -76,12 +73,10 @@ export default {
});
},
// 跳转前判断是否有机构,否则使用定位信息
preJumper
()
{
// 如果有机构,则直接获取学习卡信息
console
.
log
(
'in jumper this.organizationInfo'
,
this
.
organizationInfo
,
''
);
if
(
this
.
organizationId
!=
0
&&
this
.
provinceId
!=
0
)
{
this
.
getCardInfoByProvinceId
(
this
.
provinceId
);
// 否则获取地理位置信息
}
else
{
this
.
getPositionData
();
}
...
...
@@ -106,7 +101,6 @@ export default {
this
.
POST
(
"trade/goods/cardList"
,
param
).
then
(
res
=>
{
if
(
res
.
code
==
"000000"
)
{
this
.
showGoUpdate
=
true
;
console
.
log
(
'getCardInfoByProvinceId'
,
res
);
this
.
cardInfo
=
res
.
data
&&
res
.
data
[
0
]
||
{}
;
}
});
...
...
@@ -114,9 +108,9 @@ export default {
// 根据位置信息获取省ID
getProvinceIdByPosition
(
param
)
{
this
.
GET
(
"aggregate/cme/convertLocationToProvinceId"
,
param
).
then
(
res
=>
{
param
.
setEntry
=
true
;
this
.
POST
(
"aggregate/cme/convertLocationToProvinceId"
,
param
).
then
(
res
=>
{
if
(
res
.
code
==
"000000"
)
{
console
.
log
(
'getProvinceIdByPosition'
,
res
);
this
.
getCardInfoByProvinceId
(
res
.
data
);
}
});
...
...
@@ -124,7 +118,6 @@ export default {
// 跳转到原生的购买页面
confirm
(
goodId
)
{
console
.
log
(
goodId
);
let
paramList
=
[
{
key
:
"className"
,
...
...
@@ -147,9 +140,7 @@ export default {
// 跳转I类学习详情页面(中华医学会项目列表页面)
jumpToCardList
()
{
console
.
log
(
this
.
oneLevelUrl
);
if
(
window
.
__isWeb
)
{
console
.
log
(
'in jumpToCardList'
);
return
;
}
else
{
let
pageUrl
=
this
.
oneLevelUrl
;
...
...
@@ -159,6 +150,13 @@ export default {
value
:
pageUrl
,
type
:
4
,
seqNo
:
1
},
// 此字段不配置,则用原来的逻辑
{
key
:
"needCache"
,
value
:
'1'
,
// 0不缓存,其它值都做缓存
type
:
4
,
seqNo
:
1
}
]
rocNative
.
dispatchEventByModuleCode
({
...
...
src/views/index.vue
浏览文件 @
39807538
...
...
@@ -40,6 +40,8 @@
:tabTo=
"1"
:isShow=
"isShow"
:userMobile=
"userMobile"
:provinceId=
"provinceId"
:organizationId=
"organizationId"
></CoopListItem>
</section>
<section
v-if=
"tabIndex === 2"
>
...
...
@@ -49,6 +51,8 @@
:tabTo=
"2"
:isShow=
"isShow"
:userMobile=
"userMobile"
:provinceId=
"provinceId"
:organizationId=
"organizationId"
></CoopListItem>
</section>
</article>
...
...
@@ -100,6 +104,8 @@ export default {
needShowBackup
:
false
,
showGoUpdate
:
false
,
oneLevelUrl
:
''
,
provinceId
:
0
,
organizationId
:
0
,
};
},
computed
:
{
...
...
src/views/merge-detail.vue
浏览文件 @
39807538
...
...
@@ -117,6 +117,7 @@
:btnText=
"project.currentProgress > 1 ? '参加考试' : '学完全部课程,可参加考试'"
:type=
"project.currentProgress > 1 ? 'primary' : 'disabled'"
></ExjumperButton>
<div
v-if=
"project.cmeType == 2"
style=
"padding-top: 30px"
></div>
<CardPopup
:cardInfo=
"cardInfo"
:isShow=
"showGoUpdate"
@
cancle=
"jumpToCardList()"
@
confirm=
"confirm"
></CardPopup>
</div>
</
template
>
<
script
>
...
...
@@ -144,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
;
...
...
@@ -231,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
:
''
,
showGoUpdate
:
false
,
cardInfo
:
{
},
};
},
components
:
{
...
...
@@ -250,7 +258,8 @@ export default {
TeacterIntro
,
CommonDialog
,
ExjumperButton
,
ExjumperDialog
ExjumperDialog
,
CardPopup
},
computed
:
{
...
...
@@ -262,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
...
...
@@ -288,7 +299,11 @@ export default {
// action: "打开页面",
component_tag
:
`211#0#
${
this
.
projectId
}
#0`
});
window
.
__getPositionData
=
function
(
param
)
{
console
.
log
(
param
);
param
.
setEntry
=
true
;
_this
.
getProvinceIdByPosition
(
param
);
}
},
mounted
()
{
window
.
addEventListener
(
"scroll"
,
this
.
scrollFun
);
...
...
@@ -306,17 +321,130 @@ export default {
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
)
{
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
()
{
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"
:
1
,
"pageNum"
:
1
,
"pageSize"
:
1
}
this
.
POST
(
"trade/goods/cardList"
,
param
).
then
(
res
=>
{
if
(
res
.
code
==
"000000"
)
{
this
.
showGoUpdate
=
true
;
this
.
cardInfo
=
res
.
data
&&
res
.
data
[
0
]
||
{}
;
}
});
},
// 获取地理位置信息
getPositionData
()
{
console
.
log
(
'getPositionData'
);
rocNative
.
getPositionData
({
__funcName
:
"__getPositionData"
});
},
// 跳转到原生的购买页面
confirm
(
goodId
)
{
let
paramList
=
[
{
key
:
"className"
,
value
:
"com.picahealth.yunque.activitys.studycard.StudyCardDetailActivity###PicaDo.LearningCardVC"
,
type
:
4
,
seqNo
:
1
},
{
key
:
"goodId"
,
value
:
goodId
,
type
:
4
,
seqNo
:
1
},
];
rocNative
.
dispatchEventByModuleCode
({
modeCode
:
"M200"
,
jsonString
:
paramList
});
},
// 跳转到第三方考试页面
jumpToExamAction
()
{
// 判断版本号,如果小于3.4.0,则只做提示
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录