Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
addInsured-AIA-POC
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liujianghai
addInsured-AIA-POC
Commits
8314396f
Commit
8314396f
authored
Mar 04, 2020
by
marsandheart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
注释掉一些console,修改节点二到五的问题格式,更改pdfPath
parent
3f614b3b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
8 deletions
+32
-8
DoubleRecord.jsx
src/pages/DoubleRecord.jsx
+32
-8
No files found.
src/pages/DoubleRecord.jsx
View file @
8314396f
...
...
@@ -17,7 +17,7 @@ const showPDF = () => {
return
;
}
window
.
webkit
.
messageHandlers
.
aiaPDFPreView
.
postMessage
({
pdfPath
:
'https://
marsandheart.github.io/pdf/frontendKnowledge
.pdf'
,
pdfPath
:
'https://
gitee.com/JYWan/JYWeiBo/raw/master/aia_doc-1
.pdf'
,
pdfName
:
'免除保险人责任条款'
});
};
...
...
@@ -105,6 +105,10 @@ const defaultSteps = [
questions
:
[
{
questionId
:
''
,
needPlay
:
false
,
needCheck
:
false
,
playStatus
:
'0'
,
checked
:
false
,
text
:
''
,
voice
:
''
}
...
...
@@ -117,6 +121,10 @@ const defaultSteps = [
questions
:
[
{
questionId
:
''
,
needPlay
:
false
,
needCheck
:
false
,
playStatus
:
'0'
,
checked
:
false
,
text
:
''
,
voice
:
''
}
...
...
@@ -129,6 +137,10 @@ const defaultSteps = [
questions
:
[
{
questionId
:
''
,
needPlay
:
false
,
needCheck
:
false
,
playStatus
:
'0'
,
checked
:
false
,
text
:
''
,
voice
:
''
}
...
...
@@ -141,6 +153,10 @@ const defaultSteps = [
questions
:
[
{
questionId
:
''
,
needPlay
:
false
,
needCheck
:
false
,
playStatus
:
'0'
,
checked
:
false
,
text
:
''
,
voice
:
''
}
...
...
@@ -154,6 +170,10 @@ const defaultSteps = [
questions
:
[
{
questionId
:
'1'
,
needPlay
:
false
,
needCheck
:
false
,
playStatus
:
'0'
,
checked
:
false
,
text
:
(
<
span
>
请销售人员点击链接向镜头展示
...
...
@@ -197,7 +217,7 @@ export default function(props) {
const
currentStep
=
steps
.
find
((
s
)
=>
s
.
id
===
stepId
);
useEffect
(()
=>
{
console
.
log
(
'use effect'
);
//
console.log('use effect');
setTimeout
(()
=>
{
playQuestion
(
questionId
);
},
1000
);
...
...
@@ -206,7 +226,7 @@ export default function(props) {
// 朗读当前问题
const
playQuestion
=
(
questionId
)
=>
{
const
targetQuestion
=
currentStep
.
questions
.
find
((
q
)
=>
q
.
questionId
===
questionId
);
if
(
!
targetQuestion
.
needPlay
)
{
if
(
!
targetQuestion
||
!
targetQuestion
.
needPlay
)
{
return
;
}
...
...
@@ -233,7 +253,7 @@ export default function(props) {
newSteps
[
stepIdx
].
questions
[
questionIdx
].
playStatus
=
playStatus
;
updateSteps
(
newSteps
);
console
.
log
(
`设置问题
${
qId
}
为
${
playStatus
}
`
);
//
console.log(`设置问题${qId}为${playStatus}`);
};
// 勾选,用于需要勾选的问题
...
...
@@ -255,7 +275,7 @@ export default function(props) {
newSteps
[
stepIdx
].
questions
[
questionIdx
].
checked
=
checked
;
updateSteps
(
newSteps
);
console
.
log
(
checked
);
//
console.log(checked);
};
const
setCheckThenNextQuestion
=
()
=>
{
...
...
@@ -282,7 +302,7 @@ export default function(props) {
newSteps
[
stepIdx
].
questions
[
questionIdx
].
checked
=
checked
;
updateSteps
(
newSteps
);
console
.
log
(
checked
);
//
console.log(checked);
};
// app结束朗读后调用
...
...
@@ -292,10 +312,10 @@ export default function(props) {
if
(
targetQuestion
.
needCheck
)
{
// stop and wait check
setPlayStatus
(
questionId
,
'3'
);
console
.
log
(
'need you check'
);
//
console.log('need you check');
return
;
}
else
{
console
.
log
(
'auto check'
);
//
console.log('auto check');
// setPlayStatus(questionId,'3');
// checkCurrentQuestion();
setPlayStatusAndChecked
(
questionId
,
'3'
,
true
);
...
...
@@ -354,6 +374,7 @@ export default function(props) {
// 调用app的语音播报,监听语音结束,在刚进入页面时自动调用一次,每一个问题结束后判断是否自动调用
const
voiceStart
=
(
voiceContent
)
=>
{
// alert(`播放: ${voiceContent}`);
console
.
log
(
`播放:
${
voiceContent
}
`
);
// setTimeout(() => {
// console.log('finish one voice');
...
...
@@ -375,6 +396,7 @@ export default function(props) {
// 调用app的语音暂停,点击问题的暂停按钮时候调用
const
voicePause
=
()
=>
{
// alert('暂停播放');
console
.
log
(
'暂停播放'
)
if
(
!
window
.
webkit
)
{
alert
(
'window.webkit 未定义'
);
return
;
...
...
@@ -385,6 +407,7 @@ export default function(props) {
// 调用app的暂停后继续播放方法
const
voiceContinue
=
()
=>
{
// alert('继续播放');
console
.
log
(
'继续播放'
)
if
(
!
window
.
webkit
)
{
alert
(
'window.webkit 未定义'
);
return
;
...
...
@@ -395,6 +418,7 @@ export default function(props) {
// 调用app的语音停止,在跳转、翻页的时候调用,避免翻页后继续播放
const
voiceStop
=
()
=>
{
// alert('停止播放');
console
.
log
(
'停止播放'
)
if
(
!
window
.
webkit
)
{
alert
(
'window.webkit 未定义'
);
return
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment