|
@@ -12,7 +12,7 @@ const problems = [
|
|
|
options: ['再累也要收拾整齐了再去睡', '扔下包倒头就睡下']
|
|
|
},
|
|
|
{
|
|
|
- ques: '你常会站在对方角度去思考而模糊了自己的立场',
|
|
|
+ ques: '我常会站在对方角度去思考而模糊了自己的立场',
|
|
|
options: ['是的', '不是']
|
|
|
},
|
|
|
{
|
|
@@ -36,44 +36,41 @@ export default function Talking() {
|
|
|
|
|
|
let pro = problems[count];
|
|
|
|
|
|
- if (count == problems.length) { // 答完题了
|
|
|
- return (
|
|
|
- <div style={{ padding: '10px 20px' }}>
|
|
|
- <MeasurementStep current={0} />
|
|
|
+ return (
|
|
|
+ <div style={{ padding: '10px 20px' }}>
|
|
|
+ <MeasurementStep current={0} />
|
|
|
+ {
|
|
|
+ count === problems.length ? (<>
|
|
|
|
|
|
- <div className='question-box question-result'>这是测试结果</div>
|
|
|
+ <div className='question-box question-result'>这是测试结果</div>
|
|
|
|
|
|
- <Button block variant="base" style={{ width: '30%', margin: '40px auto' }}
|
|
|
- onClick={() => {
|
|
|
- navigate('/diagnosis_m', {
|
|
|
- replace: true
|
|
|
- })
|
|
|
- }}
|
|
|
- > 下一步 </Button>
|
|
|
- </div>
|
|
|
- )
|
|
|
- } else {
|
|
|
- return (
|
|
|
- <>
|
|
|
- <div style={{ padding: '10px 20px' }}>
|
|
|
- <MeasurementStep current={0} />
|
|
|
-
|
|
|
- <div className='question-box'>
|
|
|
- <h3>{pro.ques}?</h3>
|
|
|
- <div className='question-option'>
|
|
|
- {problems[count].options.map((tag, index) => (
|
|
|
- <span key={index} onClick={() => changeProblems('add')}>{tag}</span>
|
|
|
- ))}
|
|
|
+ <Button block variant="base" style={{ width: '30%', margin: '40px auto' }}
|
|
|
+ onClick={() => {
|
|
|
+ navigate('/diagnosis_m', {
|
|
|
+ replace: true
|
|
|
+ })
|
|
|
+ }}
|
|
|
+ > 下一步 </Button>
|
|
|
+ </>) : (
|
|
|
+ <>
|
|
|
+ <div className='question-box'>
|
|
|
+ <h3>{pro.ques}?</h3>
|
|
|
+ <div className='question-option'>
|
|
|
+ {problems[count].options.map((tag, index) => (
|
|
|
+ <span key={index} onClick={() => changeProblems('add')}>{tag}</span>
|
|
|
+ ))}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div className='question-bar'>
|
|
|
- <span onClick={() => changeProblems('reduce')}>上一题</span>
|
|
|
- <span>{count + 1}/{problems.length}</span>
|
|
|
- <span></span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </>
|
|
|
- )
|
|
|
- }
|
|
|
+
|
|
|
+ <div className='question-bar'>
|
|
|
+ <span onClick={() => changeProblems('reduce')}>上一题</span>
|
|
|
+ <span>{count + 1}/{problems.length}</span>
|
|
|
+ <span></span>
|
|
|
+ </div>
|
|
|
+ </>
|
|
|
+ )
|
|
|
+ }
|
|
|
+ </div>
|
|
|
+ )
|
|
|
+
|
|
|
}
|