Commit 65cfca61 by FE

modify bug 08.16

parent 70151df2
...@@ -239,8 +239,8 @@ function CourseList({modules}) { ...@@ -239,8 +239,8 @@ function CourseList({modules}) {
const bottom = ( const bottom = (
<div> <div>
{!item.isbuy && <p className="course-price"> {!item.isbuy && <p className="course-price">
<span className="new">¥{item.price}</span> <span className="new">¥{item.discounts_price}</span>
<span className="old">¥{item.discounts_price}</span> <span className="old">¥{item.price}</span>
</p> </p>
} }
{item.isbuy && {item.isbuy &&
......
...@@ -56,7 +56,7 @@ class UseCoupon extends PureComponent { ...@@ -56,7 +56,7 @@ class UseCoupon extends PureComponent {
}) })
.then(res => { .then(res => {
const data = res.data const data = res.data
if (data.code === 200) { if (data.code === 0) {
const coupon = data.data const coupon = data.data
......
...@@ -81,7 +81,7 @@ class OutLine extends Component { ...@@ -81,7 +81,7 @@ class OutLine extends Component {
6-可试听但无试听权限 6-可试听但无试听权限
*/} */}
{ // 试听 { // 试听
!introduce.is_aist && item.class_status === 7 && !introduce.is_aist && item.class_status === 6 &&
<span className='btn-right-10 audition' <span className='btn-right-10 audition'
onClick={this.props.toAudition}>试听 onClick={this.props.toAudition}>试听
<i className='iconfont iconcelluar'></i> <i className='iconfont iconcelluar'></i>
......
...@@ -5,6 +5,8 @@ import classnames from 'classnames' ...@@ -5,6 +5,8 @@ import classnames from 'classnames'
import { Tag } from '../../common' import { Tag } from '../../common'
import OpenApp from './OpenApp' import OpenApp from './OpenApp'
import { http, html, htmlDecode} from '@/utils' import { http, html, htmlDecode} from '@/utils'
import { config } from 'rxjs';
import { Object } from 'core-js';
export default class Examination extends PureComponent { export default class Examination extends PureComponent {
...@@ -20,9 +22,13 @@ export default class Examination extends PureComponent { ...@@ -20,9 +22,13 @@ export default class Examination extends PureComponent {
componentDidMount() { componentDidMount() {
http.get(`${API.home}/m/dailyQuestion`) http.get(`${API.home}/m/dailyQuestion`)
.then(res => { .then(res => {
this.setState({ const { data: { data, code } } = res;
questionData: res.data.data if(code === 200) {
}) const newData = Object.assign(data, {analysis: data.analysis.length> 0? data.analysis.split('\n'): []})
this.setState({
questionData: newData
})
}
}) })
} }
...@@ -86,7 +92,7 @@ const Answer = React.memo(({content, isShowAnswer}) => { ...@@ -86,7 +92,7 @@ const Answer = React.memo(({content, isShowAnswer}) => {
return ( return (
<div className={classnames('answer', {scale: isShowAnswer})}> <div className={classnames('answer', {scale: isShowAnswer})}>
<p className='legend'>解析</p> <p className='legend'>解析</p>
<p className='content' dangerouslySetInnerHTML={{__html: content}}/> {content.length>0 && content.map((item, index) => <p key={index} className='content' dangerouslySetInnerHTML={{__html: item}}/>)}
</div> </div>
) )
}) })
...@@ -156,7 +156,7 @@ class SharePoster extends Component { ...@@ -156,7 +156,7 @@ class SharePoster extends Component {
// 获取二维码 // 获取二维码
getCodeWe() { getCodeWe() {
let _this = this let _this = this
let qrCodeLink = `/detail/${getParam('courseId')}/${getParam('dist_code')}` let qrCodeLink = `http://m.julyedu.com/detail/${getParam('courseId')}/${getParam('dist_code')}`
return new Promise(resolve => { return new Promise(resolve => {
QRCode.toDataURL(qrCodeLink, {}, function (err, url) { QRCode.toDataURL(qrCodeLink, {}, function (err, url) {
_this.setState({ _this.setState({
......
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