Commit 6da10838 by zhanghaozhe

题库适配

parent 04606300
import React, { Component } from 'react'; import React, { Component } from 'react';
import './index.scss' import './index.scss'
import { HeaderBar, CallApp, CaptchaAli } from "@common/index" import { HeaderBar, CallApp, CaptchaAli } from "@common/index"
import { isToday } from "date-fns";
import { http } from "@/utils" import { http } from "@/utils"
import { Toast } from "antd-mobile"; import { Toast } from "antd-mobile";
import { Link } from 'react-router-dom'
class Problems extends Component { class Problems extends Component {
...@@ -55,9 +55,10 @@ class Problems extends Component { ...@@ -55,9 +55,10 @@ class Problems extends Component {
{ {
!isShowCaptcha ? !isShowCaptcha ?
<> <>
<HeaderBar title='机器学习' arrow={true} cart={false}></HeaderBar> <HeaderBar title={quesInfo && quesInfo.category} arrow={true} cart={false}></HeaderBar>
<div className="topic"> <div className="topic">
{quesInfo && quesInfo.ques} <span>{quesInfo && quesInfo.order_id}.</span>
<span dangerouslySetInnerHTML={{__html: quesInfo && quesInfo.ques}}></span>
</div> </div>
{ {
!isShowAnswer && !isShowAnswer &&
...@@ -73,16 +74,18 @@ class Problems extends Component { ...@@ -73,16 +74,18 @@ class Problems extends Component {
isShowAnswer && isShowAnswer &&
<div className={`content ${isShowAnswer ? 'slideInDown' : ''}`}> <div className={`content ${isShowAnswer ? 'slideInDown' : ''}`}>
<div className={'title'}>解析</div> <div className={'title'}>解析</div>
<span> <span dangerouslySetInnerHTML={{__html: quesInfo.analysis}}></span>
{quesInfo.analysis}
</span>
</div> </div>
} }
<footer> <footer>
<div className="app">更多题目请 <CallApp text={'前往APP'}/></div> <div className="app">更多题目请 <CallApp text={'前往APP'}/></div>
<div className="op"> <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> </div>
</footer> </footer>
</> </>
......
#problems { #problems {
height: 100%; height: 100%;
padding: 58px 0 54px; padding: 58px 0 54px;
overflow-x: hidden;
.detail-header { .detail-header {
position: fixed; 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