Commit 6da10838 by zhanghaozhe

题库适配

parent 04606300
import React, { Component } from 'react';
import './index.scss'
import { HeaderBar, CallApp, CaptchaAli } from "@common/index"
import { isToday } from "date-fns";
import { http } from "@/utils"
import { Toast } from "antd-mobile";
import { Link } from 'react-router-dom'
class Problems extends Component {
......@@ -55,9 +55,10 @@ class Problems extends Component {
{
!isShowCaptcha ?
<>
<HeaderBar title='机器学习' arrow={true} cart={false}></HeaderBar>
<HeaderBar title={quesInfo && quesInfo.category} arrow={true} cart={false}></HeaderBar>
<div className="topic">
{quesInfo && quesInfo.ques}
<span>{quesInfo && quesInfo.order_id}.</span>
<span dangerouslySetInnerHTML={{__html: quesInfo && quesInfo.ques}}></span>
</div>
{
!isShowAnswer &&
......@@ -73,16 +74,18 @@ class Problems extends Component {
isShowAnswer &&
<div className={`content ${isShowAnswer ? 'slideInDown' : ''}`}>
<div className={'title'}>解析</div>
<span>
{quesInfo.analysis}
</span>
<span dangerouslySetInnerHTML={{__html: quesInfo.analysis}}></span>
</div>
}
<footer>
<div className="app">更多题目请 <CallApp text={'前往APP'}/></div>
<div className="op">
<a href="javascript:void(0);" className={'nav'}>上一题</a>
<a href="javascript:void(0);" className={'nav'}>下一题</a>
{
between && !!between.up && <Link to={`/problems/${between.up}`} className={'nav'}>上一题</Link>
}
{
between && !!between.down && <Link to={`/problems/${between.down}`} className={'nav'}>下一题</Link>
}
</div>
</footer>
</>
......
#problems {
height: 100%;
padding: 58px 0 54px;
overflow-x: hidden;
.detail-header {
position: fixed;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment