Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-professional-exam
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Culm
pica-professional-exam
提交
5139e23e
提交
5139e23e
编写于
9月 27, 2020
作者:
yi.li
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
题库详情页接口联调及处理
上级
0e4967b2
变更
2
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
194 行增加
和
51 行删除
+194
-51
common-navbar.vue
src/components/common/common-navbar.vue
+11
-5
question-bank.vue
src/views/question-bank.vue
+183
-46
未找到文件。
src/components/common/common-navbar.vue
浏览文件 @
5139e23e
...
...
@@ -118,7 +118,7 @@ export default {
goShare
()
{
this
.
$sendBuriedData
({
component_tag
:
`882#88209`
});
});
let
_this
=
this
;
let
videoUrl
=
this
.
$route
.
query
.
videoUrl
||
''
;
let
info
=
""
;
...
...
@@ -131,15 +131,15 @@ export default {
}
else
{
info
=
JSON
.
stringify
({
projectId
:
this
.
projectId
,
})
}
})
}
let
param
=
{
channel
:
1
,
// 分享渠道 1:APP
info
:
info
,
type
:
3
,
// 业务类型 1:教培项目 2:继教项目 3:职称考项目
token
:
_this
.
userInfo
.
userToken
,
setEntry
:
true
};
};
_this
.
NEW_POST
(
"portal/shareParam/save"
,
param
).
then
(
res
=>
{
if
(
res
.
code
==
"000000"
)
{
let
url
=
getWebPageUrl
(
`profexam/#/sharecoop?uuid=
${
res
.
data
}
`
);
...
...
@@ -148,7 +148,7 @@ export default {
}
}).
catch
(
e
=>
{
console
.
error
(
e
);;
});
});
},
//分享
...
...
@@ -232,6 +232,12 @@ export default {
font-weight: 700;
color: rgba(51, 51, 51, 1);
line-height: 26px;
display: inline-block;
max-width: 230px;
height: 36px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.nav-part {
...
...
src/views/question-bank.vue
浏览文件 @
5139e23e
<
template
>
<div
class=
"question-bank-wrap"
>
<CommonNavbar
ref=
"navBarCom"
:bgColor=
"bgColor"
v-
show
=
"isShowNavbar"
v-
if
=
"isShowNavbar"
:title=
"navTitle"
:isFixNavbar=
"isFixNavbar"
borderStyle=
"1px solid #fff"
></CommonNavbar>
<div
class=
"question-bank-content"
>
<div
class=
"header-info"
>
<div
class=
"info-first"
>
<img
v-if=
"directoryInfo.avatarImageUrl"
:src=
"directoryInfo.avatarImageUrl"
>
<img
v-if=
"!directoryInfo.avatarImageUrl"
src=
"../images/question/portrait.png"
>
<div
class=
"infor"
>
<p
class=
"name"
>
{{
directoryInfo
.
name
}}
医生
</p>
<p
class=
"question-result"
>
已做题
<span>
{{
directoryInfo
.
finishedNum
}}
</span>
错误题
<span
class=
"err"
>
{{
directoryInfo
.
wrongTitle
}}
</span>
正确率
<span
class=
"suc"
>
{{
directoryInfo
.
correctRatio
}}
%
</span></p>
<div
class=
"fixed-qb-header"
>
<div
class=
"header-info"
>
<div
class=
"info-first"
>
<img
v-if=
"directoryInfo.avatarImageUrl"
:src=
"directoryInfo.avatarImageUrl"
>
<img
v-if=
"!directoryInfo.avatarImageUrl"
src=
"../images/question/portrait.png"
>
<div
class=
"infor"
>
<p
class=
"name"
>
{{
directoryInfo
.
name
}}
医生
</p>
<p
class=
"question-result"
>
已做题
<span>
{{
directoryInfo
.
finishedNum
}}
</span>
错误题
<span
class=
"err"
>
{{
directoryInfo
.
wrongTitle
}}
</span>
正确率
<span
class=
"suc"
>
{{
directoryInfo
.
correctRatio
}}
%
</span></p>
</div>
</div>
<div
class=
"info-second"
>
<div
class=
"item"
@
click=
"wrongBook"
><img
src=
"../images/question/text.png"
>
错题集
<span
v-if=
"directoryInfo.wrongTitleBook"
>
(
{{
directoryInfo
.
wrongTitleBook
}}
)
</span></div>
<div
class=
"item"
@
click=
"collectBook"
><img
src=
"../images/question/heart-h.png"
>
收藏
<span
v-if=
"directoryInfo.collectTitleBook"
>
(
{{
directoryInfo
.
collectTitleBook
}}
)
</span></div>
</div>
</div>
<div
class=
"info-second"
>
<div
class=
"item"
@
click=
"wrongBook"
><img
src=
"../images/question/text.png"
>
错题集
<span
v-if=
"directoryInfo.wrongTitleBook"
>
(
{{
directoryInfo
.
wrongTitleBook
}}
)
</span></div>
<div
class=
"item"
@
click=
"collectBook"
><img
src=
"../images/question/heart-h.png"
>
收藏
<span
v-if=
"directoryInfo.collectTitleBook"
>
(
{{
directoryInfo
.
collectTitleBook
}}
)
</span></div>
</div>
</div>
<div
class=
"question-intro"
v-if=
"directoryInfo.directoryImageUrl || directoryInfo.directoryIntro"
>
...
...
@@ -31,32 +34,33 @@
<div
class=
"course-item"
v-for=
"(item, index) in subDirectoryModelList"
:key=
"index"
>
<div
class=
"left-c"
>
<p
class=
"title-c"
>
{{
item
.
directoryName
}}
</p>
<p
class=
"join-c"
v-if=
"!
car
dStatus"
>
{{
item
.
joinUserNum
}}
人已参与
</p>
<p
class=
"join-c"
v-if=
"!
bin
dStatus"
>
{{
item
.
joinUserNum
}}
人已参与
</p>
<div
class=
"progress-course"
v-else
>
<div
class=
"progress-w"
><van-progress
:percentage=
"item.finishedRatio"
:stroke-width=
"6"
color=
"#449284"
:show-pivot=
"false"
/></div>
<span
class=
"mg-set"
>
{{
item
.
finishedRatio
}}
%
</span><span>
共
{{
item
.
sumTitle
}}
道
</span>
</div>
</div>
<div
class=
"right-btn"
>
<span
v-if=
"!cardStatus && (item.freeFlag == 0)"
@
click=
"freeStudy(item)"
>
免费练习
</span>
<img
v-if=
"!cardStatus && (item.freeFlag == 1)"
src=
"../images/question/lock.png"
@
click=
"unlockHand"
>
<span
v-if=
"cardStatus == 1"
@
click=
"goStudy(item)"
>
{{
setTxt
(
item
.
finishedRatio
)
}}
</span>
<span
v-if=
"!bindStatus && (item.freeFlag == 0)"
@
click=
"goStudy(item)"
>
开始练习
</span>
<span
v-if=
"!bindStatus && (item.freeFlag == 1) && (item.freePractice > 0)"
@
click=
"freeStudy(item)"
>
免费练习
</span>
<img
v-if=
"!bindStatus && (item.freeFlag == 1) && (item.freePractice == 0)"
src=
"../images/question/lock.png"
@
click=
"unlockHand"
>
<span
v-if=
"bindStatus == 1"
@
click=
"goStudy(item)"
>
{{
setTxt
(
item
.
finishedRatio
)
}}
</span>
</div>
</div>
</div>
</div>
<BindCardButton
v-if=
"!
cardStatus
"
v-if=
"!
bindStatus && !isWeb
"
:cardInfo=
"cardInfo"
@
changeClick=
"changeClick"
@
gotoBuy=
"confirm"
></BindCardButton>
<
!--
<
ChangeCard
<ChangeCard
:changeErrorMsg=
"changeCardErrorMsg"
:isShow=
"showChangeCard"
@
cancle=
"cancleChangeCard"
@
confirm=
"
c
hangeCardAction"
>
</ChangeCard>
-->
@
confirm=
"
beforeC
hangeCardAction"
>
</ChangeCard>
<CourseDialog
:subContent=
"subContent"
confirmBtnText=
"激活并去学习"
...
...
@@ -71,8 +75,9 @@
import
BindCardButton
from
"@/components/cme/bind-card-button"
;
import
ChangeCard
from
"@/components/cme/change-card"
;
import
CourseDialog
from
"@/components/course/course-dialog"
;
import
{
Progress
}
from
'vant'
;
import
{
Progress
,
Toast
}
from
'vant'
;
import
{
mapGetters
,
mapActions
}
from
"vuex"
;
import
{
getWebPageUrl
}
from
"@/utils/index"
;
export
default
{
components
:
{
CommonNavbar
,
...
...
@@ -89,28 +94,34 @@ export default {
bgColor
:
"#fff"
,
isShowNavbar
:
true
,
navTitle
:
'中级-内科'
,
isFixNavbar
:
true
,
firstSubjectId
:
66
,
directoryInfo
:
{},
isFixNavbar
:
false
,
secondSubjectId
:
null
,
directoryInfo
:
{
finishedNum
:
0
,
wrongTitle
:
0
,
correctRatio
:
0
,
},
subDirectoryModelList
:
[],
userId
:
null
,
car
dStatus
:
0
,
bin
dStatus
:
0
,
cardInfo
:
{
id
:
0
},
subContent
:
''
,
cmeCardModels
:
{},
showBindCardTips
:
false
,
showChangeCard
:
false
,
changeCardErrorMsg
:
""
,
}
},
created
()
{
let
_this
=
this
;
_this
.
secondSubjectId
=
_this
.
$route
.
query
.
secondSubjectId
||
106
;
window
.
__getUserInfoQB
=
function
(
param
)
{
console
.
log
(
"__getUserInfoQB"
,
param
);
_this
.
token
=
param
.
userToken
;
_this
.
userMobile
=
param
.
userMobile
;
_this
.
setUserInfo
(
param
);
// _this.checkToken();
_this
.
initData
();
};
...
...
@@ -131,6 +142,10 @@ export default {
};
},
mounted
()
{
this
.
$nextTick
(()
=>
{
let
navBH
=
this
.
$refs
.
navBarCom
.
navHeight
;
console
.
log
(
'顶部导航栏高度'
,
navBH
)
})
},
computed
:
{
...
...
@@ -162,17 +177,19 @@ export default {
token
:
this
.
token
,
setEntry
:
true
};
this
.
GET
(
`portal/titleTest/user/getBrushTitleInfo/
${
this
.
first
SubjectId
}
`
,
param
).
then
(
res
=>
{
console
.
log
(
'详情结果'
,
res
.
data
.
data
)
this
.
GET
(
`portal/titleTest/user/getBrushTitleInfo/
${
this
.
second
SubjectId
}
`
,
param
).
then
(
res
=>
{
console
.
log
(
'详情结果'
,
res
.
data
)
if
(
res
.
code
==
"000000"
)
{
this
.
directoryInfo
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
.
data
));
const
{
subDirectoryModelList
,
userId
,
cardType
,
goodsType
,
organizationId
,
provinceId
}
=
this
.
directoryInfo
;
this
.
directoryInfo
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
));
const
{
subDirectoryModelList
,
userId
,
cardType
,
goodsType
,
organizationId
,
provinceId
,
bindStatus
,
firstSubjectCodeName
,
secondSubjectName
,
secondSubjectCode
}
=
this
.
directoryInfo
;
this
.
subDirectoryModelList
=
subDirectoryModelList
;
this
.
userId
=
userId
;
this
.
bindStatus
=
bindStatus
;
this
.
navTitle
=
`
${
firstSubjectCodeName
}
-
${
secondSubjectName
}${
secondSubjectCode
}
`
//获取底部卡信息
// 如果
hasBindCard
为false,则获取卡信息 0:未绑卡 1:已绑卡
if
(
!
this
.
car
dStatus
)
{
// 如果
bindStatus
为false,则获取卡信息 0:未绑卡 1:已绑卡
if
(
!
this
.
bin
dStatus
)
{
this
.
preJumper
();
// 查询有无已买未激活的卡
this
.
hasNoUsedCard
();
...
...
@@ -191,13 +208,13 @@ export default {
this
.
GET
(
"campaign/admin/task/checkToken"
,
param
).
then
(
res
=>
{
if
(
res
.
code
!==
"000000"
)
{
//未登录 跳转登录页
console
.
log
(
"跳登录"
,
_
this
.
isInfresh
);
if
(
_
this
.
isInfresh
)
{
console
.
log
(
"跳登录"
,
this
.
isInfresh
);
if
(
this
.
isInfresh
)
{
rocNative
.
goBack
();
}
else
{
rocNative
.
gotoLogin
();
}
_
this
.
isInfresh
=
false
;
this
.
isInfresh
=
false
;
}
else
{
}
...
...
@@ -252,7 +269,7 @@ export default {
}
);
},
// 查询是否买过类似的卡,但还没有激活
// 查询是否买过类似的卡,但还没有
绑定
激活
hasNoUsedCard
()
{
let
param
=
{
setEntry
:
true
...
...
@@ -277,18 +294,17 @@ export default {
this
.
$sendBuriedData
({
component_tag
:
`882#88218`
});
this
.
c
hangeCardAction
(
this
.
cmeCardModels
.
cardKey
,
true
)
this
.
beforeC
hangeCardAction
(
this
.
cmeCardModels
.
cardKey
,
true
)
}
},
//错题集
wrongBook
()
{
this
.
checkTokenForNative
(()
=>
{
// this.changeCardAction(cardKey, isInTips);
this
.
$router
.
push
({
path
:
'/question-detail'
,
query
:
{
directoryId
:
0
,
secondSubjectId
:
this
.
firstSubjectId
,
//需跟后端确认
secondSubjectId
:
this
.
secondSubjectId
,
cardType
:
this
.
directoryInfo
.
cardType
,
goodsType
:
this
.
directoryInfo
.
goodsType
,
commitKind
:
1
,
...
...
@@ -301,12 +317,11 @@ export default {
//收藏
collectBook
()
{
this
.
checkTokenForNative
(()
=>
{
// this.changeCardAction(cardKey, isInTips);
this
.
$router
.
push
({
path
:
'/question-detail'
,
query
:
{
directoryId
:
0
,
secondSubjectId
:
this
.
firstSubjectId
,
//需跟后端确认
secondSubjectId
:
this
.
secondSubjectId
,
cardType
:
this
.
directoryInfo
.
cardType
,
goodsType
:
this
.
directoryInfo
.
goodsType
,
commitKind
:
2
,
...
...
@@ -316,17 +331,120 @@ export default {
})
});
},
changeClick
()
{},
confirm
()
{},
changeClick
()
{
this
.
checkTokenForNative
(()
=>
{
this
.
showChangeCard
=
true
;
});
this
.
$sendBuriedData
({
component_tag
:
`882#88202`
});
},
//去购买操作-先校验登录
confirm
()
{
this
.
checkTokenForNative
(()
=>
{
this
.
confirmGoBuy
();
})
},
confirmGoBuy
()
{
this
.
$sendBuriedData
({
component_tag
:
`882#88203`
});
let
appVersion
=
this
.
userInfo
.
appVersion
||
""
;
let
appVersionNum
=
appVersion
.
split
(
"."
).
join
(
""
);
if
(
appVersionNum
<
344
)
{
this
.
$toast
(
"请您下载新版本App"
);
return
;
}
// 直接传入职称考项目ID(projectId)
let
pageUrl
=
getWebPageUrl
(
`/profexam/#/question-bank?id=
${
this
.
secondSubjectId
}
&secondSubjectId=
${
this
.
secondSubjectId
}
`
);
let
paramList
=
[
{
key
:
"className"
,
value
:
"com.picahealth.yunque.activitys.studycard.StudyCardDetailActivity###PicaDo.LearningCardVC"
,
type
:
4
,
seqNo
:
1
},
{
key
:
"goodId"
,
value
:
this
.
cardInfo
.
id
,
type
:
4
,
seqNo
:
1
},
{
key
:
"courseUrl"
,
value
:
encodeURIComponent
(
pageUrl
),
// value: projectId,
type
:
4
,
seqNo
:
1
}
];
rocNative
.
dispatchEventByModuleCode
({
modeCode
:
"M200"
,
jsonString
:
paramList
});
},
//确认激活操作-先校验登录
beforeChangeCardAction
(
cardKey
,
isInTips
)
{
this
.
checkTokenForNative
(()
=>
{
this
.
changeCardAction
(
cardKey
,
isInTips
);
});
},
changeCardAction
(
cardKey
,
isInTips
)
{
let
param
=
{
idType
:
2
,
cardKey
:
cardKey
,
cardType
:
this
.
directoryInfo
.
cardType
,
goodsType
:
this
.
directoryInfo
.
goodsType
,
channel
:
1
,
portalProjectId
:
this
.
secondSubjectId
,
setEntry
:
true
};
this
.
changeCardErrorMsg
=
""
;
this
.
POST
(
"cme/projectCard/bind"
,
param
).
then
(
res
=>
{
isInTips
&&
(
this
.
showBindCardTips
=
false
);
if
(
res
.
code
==
"000000"
)
{
if
(
res
.
data
==
0
)
{
if
(
isInTips
)
{
Toast
(
res
.
message
);
}
else
{
this
.
changeCardErrorMsg
=
"请输入正确的激活码"
;
}
}
else
{
this
.
showChangeCard
=
false
;
Toast
(
"激活成功,开始学习"
);
this
.
initData
();
}
}
else
{
Toast
(
res
.
message
);
}
}).
catch
(
e
=>
{
console
.
log
(
'in catch'
,
isInTips
);
if
(
isInTips
)
{
Toast
(
"无效的激活码"
);
this
.
showBindCardTips
=
false
;
}
else
{
this
.
changeCardErrorMsg
=
"请输入正确的激活码"
;
}
});
},
//关闭激活弹层
cancleChangeCard
()
{
this
.
showChangeCard
=
false
;
},
//免费练习
freeStudy
(
obj
)
{
this
.
checkTokenForNative
(()
=>
{
// this.changeCardAction(cardKey, isInTips);
this
.
$router
.
push
({
path
:
'/question-detail'
,
query
:
{
directoryId
:
obj
.
directoryId
,
secondSubjectId
:
this
.
firstSubjectId
,
//需跟后端确认
secondSubjectId
:
this
.
secondSubjectId
,
cardType
:
this
.
directoryInfo
.
cardType
,
goodsType
:
this
.
directoryInfo
.
goodsType
,
commitKind
:
3
,
...
...
@@ -341,7 +459,20 @@ export default {
this
.
$toast
(
'购买后可练习'
)
},
//开始练习
goStudy
(
obj
)
{},
goStudy
(
obj
)
{
this
.
$router
.
push
({
path
:
'/question-detail'
,
query
:
{
directoryId
:
obj
.
directoryId
,
secondSubjectId
:
this
.
secondSubjectId
,
cardType
:
this
.
directoryInfo
.
cardType
,
goodsType
:
this
.
directoryInfo
.
goodsType
,
commitKind
:
3
,
freeFlag
:
obj
.
freeFlag
,
currentTitle
:
obj
.
directoryName
}
})
},
},
}
</
script
>
...
...
@@ -354,7 +485,13 @@ export default {
.question-bank-content{
padding: 0 16px;
box-sizing: border-box;
position: relative;
.fixed-qb-header{
position: relative;
}
.header-info{
/*position: fixed;*/
/*top: 100px;*/
.info-first{
display: flex;
padding: 20px 0;
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录