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
ca6f353d
Commit
ca6f353d
authored
Mar 05, 2020
by
marsandheart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删掉一些无用的代码
parent
889a8ae0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
56 deletions
+2
-56
DoubleRecord.jsx
src/pages/DoubleRecord.jsx
+2
-56
No files found.
src/pages/DoubleRecord.jsx
View file @
ca6f353d
...
...
@@ -315,36 +315,11 @@ export default function(props) {
// console.log('need you check');
return
;
}
else
{
// console.log('auto check');
// setPlayStatus(questionId,'3');
// checkCurrentQuestion();
setPlayStatusAndChecked
(
questionId
,
'3'
,
true
);
goNextQuestion
();
}
};
// 当前问题设置为已确认
// const checkCurrentQuestion = () => {
// const newSteps = steps.map((stp) => ({
// ...stp,
// questions: stp.questions.map((qst) => ({
// ...qst
// }))
// }));
// const stepIdx = newSteps.findIndex((s) => s.id === stepId);
// const questionIdx = currentStep.questions.findIndex((q) => q.questionId === questionId);
// if (stepIdx === -1 || questionIdx === -1 ) {
// console.log('error question');
// return;
// }
// newSteps[stepIdx].questions[questionIdx].checked = true;
// updateSteps(newSteps);
// console.log('checked');
// }
// 下一个问题
const
goNextQuestion
=
()
=>
{
const
newSteps
=
steps
.
map
((
stp
)
=>
({
...
...
@@ -373,7 +348,6 @@ export default function(props) {
// 调用app的语音播报,监听语音结束,在刚进入页面时自动调用一次,每一个问题结束后判断是否自动调用
const
voiceStart
=
(
voiceContent
)
=>
{
// alert(`播放: ${voiceContent}`);
console
.
log
(
`播放:
${
voiceContent
}
`
);
// setTimeout(() => {
...
...
@@ -395,7 +369,6 @@ export default function(props) {
// 调用app的语音暂停,点击问题的暂停按钮时候调用
const
voicePause
=
()
=>
{
// alert('暂停播放');
console
.
log
(
'暂停播放'
);
if
(
!
window
.
webkit
)
{
alert
(
'window.webkit 未定义'
);
...
...
@@ -406,7 +379,6 @@ export default function(props) {
// 调用app的暂停后继续播放方法
const
voiceContinue
=
()
=>
{
// alert('继续播放');
console
.
log
(
'继续播放'
);
if
(
!
window
.
webkit
)
{
alert
(
'window.webkit 未定义'
);
...
...
@@ -417,7 +389,6 @@ export default function(props) {
// 调用app的语音停止,在跳转、翻页的时候调用,避免翻页后继续播放
const
voiceStop
=
()
=>
{
// alert('停止播放');
console
.
log
(
'停止播放'
);
if
(
!
window
.
webkit
)
{
alert
(
'window.webkit 未定义'
);
...
...
@@ -434,7 +405,6 @@ export default function(props) {
}
window
.
webkit
.
messageHandlers
.
aiaShowSignView
.
postMessage
({});
// window.aiaShowSignView();
window
.
aiaGetSignImage
=
(
base64Data
)
=>
{
const
decodeBase64
=
decodeURIComponent
(
base64Data
);
const
base64Src
=
'data:image/png;base64,'
+
decodeBase64
;
...
...
@@ -453,6 +423,8 @@ export default function(props) {
// 上一个节点,如果是第一节点则回到上一页
const
lastStep
=
()
=>
{
setPlayStatus
(
questionId
,
'3'
);
voiceStop
();
if
(
stepId
===
1
)
{
window
.
history
.
go
(
-
1
);
}
else
{
...
...
@@ -483,19 +455,6 @@ export default function(props) {
<
img
src=
{
IconHome
}
alt=
"logo"
></
img
>
</
div
>
</
div
>
{
/* <div className={styles.main}>
<TouchOpacity className={styles.btn} onClick={showPDF}>
PDF预览
</TouchOpacity>
<TouchOpacity className={styles.btn} onClick={showSign}>
呼出签名视图
</TouchOpacity>
<div style={{ clear: 'both' }}></div>
<div>签名图片展示:</div>
<div onClick={showImgSrc}>
<img alt="签名图片" src={imgSrc}></img>
</div>
</div> */
}
<
div
className=
{
styles
.
main
}
>
<
div
className=
{
styles
.
stepArea
}
>
{
steps
.
map
((
item
)
=>
(
...
...
@@ -528,19 +487,6 @@ export default function(props) {
voiceContinue=
{
voiceContinue
}
/>
))
}
{
/* {currentStep.questions.map(q=>(
<div className={styles.stepQuestionItem}>
<TouchOpacity>
<img src={IconPosition} alt="play" className={styles.leftIcon}></img>
</TouchOpacity>
<div className={styles.itemText}>
{q.text}
</div>
<TouchOpacity>
<img src={IconPosition} alt="check" className={styles.rightIcon}></img>
</TouchOpacity>
</div>
))} */
}
{
stepId
===
7
&&
(
<>
<
TouchOpacity
className=
{
styles
.
btn
}
onClick=
{
showSign
}
>
...
...
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