Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-professional-exam
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Culm
pica-professional-exam
提交
14440e7b
提交
14440e7b
编写于
10月 11, 2020
作者:
guangjun.yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
激活并去练习
上级
5b913971
变更
2
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
515 行增加
和
106 行删除
+515
-106
question-detail copy.vue
src/views/question-detail copy.vue
+508
-0
question-detail.vue
src/views/question-detail.vue
+7
-106
未找到文件。
src/views/question-detail copy.vue
0 → 100644
浏览文件 @
14440e7b
此差异已折叠。
点击以展开。
src/views/question-detail.vue
浏览文件 @
14440e7b
...
@@ -27,15 +27,6 @@
...
@@ -27,15 +27,6 @@
@
confirm=
"beforeChangeCardAction"
@
confirm=
"beforeChangeCardAction"
></ChangeCard>
></ChangeCard>
<!-- 主动提示:激活并去学习 -->
<CourseDialog
:subContent=
"subContent"
confirmBtnText=
"激活并去练习"
needSubContent
:isShowDialog=
"showBindCardTips"
@
handlerAction=
"handlerAction"
></CourseDialog>
<Loading
v-show=
"showLoading"
/>
<Loading
v-show=
"showLoading"
/>
<div
class=
"pt-70"
:class=
"
{'pt-110': showFreeTips}">
</div>
<div
class=
"pt-70"
:class=
"
{'pt-110': showFreeTips}">
</div>
</section>
</section>
...
@@ -79,7 +70,6 @@ export default {
...
@@ -79,7 +70,6 @@ export default {
experienceDialog
:
false
,
// 体验结束弹框
experienceDialog
:
false
,
// 体验结束弹框
showChangeCard
:
false
,
//是否展示激活弹框,
showChangeCard
:
false
,
//是否展示激活弹框,
changeCardErrorMsg
:
""
,
changeCardErrorMsg
:
""
,
showBindCardTips
:
false
,
cmeCardModels
:
{
cmeCardModels
:
{
cardNo
:
""
,
cardNo
:
""
,
cardKey
:
""
,
cardKey
:
""
,
...
@@ -118,7 +108,7 @@ export default {
...
@@ -118,7 +108,7 @@ export default {
]),
]),
needFixed
()
{
needFixed
()
{
return
(
return
(
this
.
experienceDialog
||
this
.
showChangeCard
||
this
.
showBindCardTips
this
.
experienceDialog
||
this
.
showChangeCard
);
);
},
},
showFreeTips
()
{
showFreeTips
()
{
...
@@ -159,12 +149,6 @@ export default {
...
@@ -159,12 +149,6 @@ export default {
_this
.
getUserInfo
();
_this
.
getUserInfo
();
};
};
window
.
__getPositionData
=
function
(
param
)
{
console
.
log
(
param
);
// _this.showLoading = false;
param
.
setEntry
=
true
;
_this
.
getProvinceIdByPosition
(
param
);
};
},
},
methods
:
{
methods
:
{
...
mapActions
([
"setUserInfo"
,
"handlerQuestionList"
]),
...
mapActions
([
"setUserInfo"
,
"handlerQuestionList"
]),
...
@@ -181,7 +165,6 @@ export default {
...
@@ -181,7 +165,6 @@ export default {
commitKind
:
this
.
commitKind
// 答题来源 1:错题集 2:收藏 3:题库
commitKind
:
this
.
commitKind
// 答题来源 1:错题集 2:收藏 3:题库
});
});
this
.
getPractiseTitles
(
true
);
this
.
getPractiseTitles
(
true
);
// this.preJumper();
},
},
// 开始翻页
// 开始翻页
...
@@ -314,27 +297,12 @@ export default {
...
@@ -314,27 +297,12 @@ export default {
},
},
// 激活前
// 激活前
beforeChangeCardAction
(
cardKey
,
isInTips
)
{
beforeChangeCardAction
(
cardKey
)
{
this
.
checkTokenForNative
(()
=>
{
this
.
checkTokenForNative
(()
=>
{
this
.
changeCardAction
(
cardKey
,
isInTips
);
this
.
changeCardAction
(
cardKey
);
});
});
},
},
// 处理提示信息框
handlerAction
(
type
)
{
if
(
type
==
1
)
{
// this.$sendBuriedData({
// component_tag: `882#88219`
// });
this
.
showBindCardTips
=
false
;
}
else
{
// this.$sendBuriedData({
// component_tag: `882#88218`
// });
this
.
beforeChangeCardAction
(
this
.
cmeCardModels
.
cardKey
,
true
);
}
},
// 分页获取题目(前、后翻页)
// 分页获取题目(前、后翻页)
getPractiseTitles
(
isFirst
)
{
getPractiseTitles
(
isFirst
)
{
if
(
isFirst
)
{
if
(
isFirst
)
{
...
@@ -388,7 +356,7 @@ export default {
...
@@ -388,7 +356,7 @@ export default {
},
},
// 激活Action 返回值:0绑定失败,1绑定成功
// 激活Action 返回值:0绑定失败,1绑定成功
changeCardAction
(
cardKey
,
isInTips
)
{
changeCardAction
(
cardKey
)
{
let
_this
=
this
;
let
_this
=
this
;
let
param
=
{
let
param
=
{
idType
:
2
,
idType
:
2
,
...
@@ -402,91 +370,24 @@ export default {
...
@@ -402,91 +370,24 @@ export default {
_this
.
changeCardErrorMsg
=
""
;
_this
.
changeCardErrorMsg
=
""
;
this
.
POST
(
"cme/projectCard/bind"
,
param
)
this
.
POST
(
"cme/projectCard/bind"
,
param
)
.
then
(
res
=>
{
.
then
(
res
=>
{
isInTips
&&
(
_this
.
showBindCardTips
=
false
);
console
.
log
(
"in res"
,
res
,
isInTips
);
if
(
res
.
code
==
"000000"
)
{
if
(
res
.
code
==
"000000"
)
{
if
(
!
res
.
data
)
{
if
(
!
res
.
data
)
{
if
(
isInTips
)
{
_this
.
changeCardErrorMsg
=
"请输入正确的激活码"
;
Toast
(
res
.
message
);
}
else
{
_this
.
changeCardErrorMsg
=
"请输入正确的激活码"
;
}
}
else
{
}
else
{
_this
.
showChangeCard
=
false
;
_this
.
showChangeCard
=
false
;
Toast
(
"激活成功,开始练习"
);
Toast
(
"激活成功,开始练习"
);
// 重新获取题库内容(从头开始)
// 重新获取题库内容(从头开始)
// _this.getProjectInfoById
();
_this
.
init
();
}
}
}
else
{
}
else
{
Toast
(
res
.
message
);
Toast
(
res
.
message
);
}
}
})
})
.
catch
(
e
=>
{
.
catch
(
e
=>
{
console
.
log
(
"in catch"
,
isInTips
);
_this
.
changeCardErrorMsg
=
"请输入正确的激活码"
;
if
(
isInTips
)
{
Toast
(
"无效的激活码"
);
_this
.
showBindCardTips
=
false
;
}
else
{
_this
.
changeCardErrorMsg
=
"请输入正确的激活码"
;
}
});
});
},
},
// 根据位置信息获取省ID
getProvinceIdByPosition
(
param
)
{
param
.
setEntry
=
true
;
this
.
POST
(
"aggregate/cme/convertLocationToProvinceId"
,
param
).
then
(
res
=>
{
if
(
res
.
code
==
"000000"
)
{
this
.
getCardInfoByProvinceId
(
res
.
data
);
}
}
);
},
// 跳转前判断是否有机构,否则使用定位信息
preJumper
()
{
// TODO 测试代码
if
(
window
.
__isWeb
)
{
this
.
getCardInfoByProvinceId
(
310
);
}
else
{
if
(
this
.
organizationId
!=
0
&&
this
.
provinceId
!=
0
)
{
this
.
getCardInfoByProvinceId
(
this
.
provinceId
);
}
else
{
this
.
getPositionData
();
}
}
},
// 根据省ID,获取学习卡信息
getCardInfoByProvinceId
(
provinceId
)
{
let
param
=
{
area
:
provinceId
+
""
,
cardType
:
this
.
cardType
||
3
,
cardTypeList
:
[
this
.
cardType
||
3
],
goodsType
:
this
.
goodsType
};
param
.
setEntry
=
true
;
this
.
POST
(
"trade/goods/cardList_v2"
,
param
).
then
(
res
=>
{
if
(
res
.
code
==
"000000"
)
{
this
.
showLoading
=
false
;
this
.
cardInfo
=
(
res
.
data
&&
res
.
data
[
0
])
||
{
id
:
0
,
name
:
"题库卡"
};
this
.
subContent
=
`您已购买
${
this
.
cardInfo
.
goodsName
}
”,是否用此卡绑定并激活当前题库。题库卡激活码一旦使用,不可更改不可退回`
;
}
});
},
// 获取地理位置信息
getPositionData
()
{
console
.
log
(
"getPositionData"
);
rocNative
.
getPositionData
({
__funcName
:
"__getPositionData"
});
},
// 滚动到最上面
// 滚动到最上面
scrollTop
()
{
scrollTop
()
{
console
.
log
(
"in scrollTop"
);
console
.
log
(
"in scrollTop"
);
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录