Commit 0cd03512 by xuzhenghua

bug

parent 0889a925
...@@ -5,7 +5,6 @@ const CAPTCHAID = '6b0f5f6c8f334f3693ee754ba5692e36' ...@@ -5,7 +5,6 @@ const CAPTCHAID = '6b0f5f6c8f334f3693ee754ba5692e36'
class Captcha extends Component { class Captcha extends Component {
componentDidMount() { componentDidMount() {
const {getInstance, handleError, onVerify} = this.props const {getInstance, handleError, onVerify} = this.props
const el = document.getElementById('captcha') const el = document.getElementById('captcha')
...@@ -31,7 +30,7 @@ class Captcha extends Component { ...@@ -31,7 +30,7 @@ class Captcha extends Component {
render() { render() {
return ( return (
<div id={'captcha'} style={{'marginBottom': '33px'}}></div> <div id={'captcha'} style={{'marginBottom': this.props.mrBtm}}></div>
); );
} }
} }
......
...@@ -8,6 +8,20 @@ ...@@ -8,6 +8,20 @@
width: 100%; width: 100%;
height: 119px; height: 119px;
min-height: 119px; min-height: 119px;
border-radius: 3px;
}
.course-status{
width: 100%;
height: 24px;
position: absolute;
top: 95px;
border-radius: 0 0 3px 3px;
text-align: center;
line-height: 24px;
color: $white;
font-size: 13px;
background-color: #E02E24;
opacity: .6;
} }
.course-title { .course-title {
......
...@@ -9,6 +9,7 @@ const Course = (props) => { ...@@ -9,6 +9,7 @@ const Course = (props) => {
<a onClick={() => props.toDetail(props.id)}> <a onClick={() => props.toDetail(props.id)}>
{/* <Link to={`/detail?id=${props.id}`}> */} {/* <Link to={`/detail?id=${props.id}`}> */}
<img src={props.img} alt=""/> <img src={props.img} alt=""/>
{props.status}
<p className={`course-title ${props.className}`}>{props.title}</p> <p className={`course-title ${props.className}`}>{props.title}</p>
{/* </Link> */} {/* </Link> */}
</a> </a>
......
...@@ -178,7 +178,7 @@ class Index extends Component { ...@@ -178,7 +178,7 @@ class Index extends Component {
<p>查看全部课程</p> <p>查看全部课程</p>
<span>数学基础、数学结构、大数据实战、Python...</span> <span>数学基础、数学结构、大数据实战、Python...</span>
</Link> </Link>
</div> </div>
{/* 直播间预约 */} {/* 直播间预约 */}
...@@ -218,10 +218,11 @@ function CourseList({modules, toDetail}) { ...@@ -218,10 +218,11 @@ function CourseList({modules, toDetail}) {
let isOdd = modules.list.length % 2 === 0 let isOdd = modules.list.length % 2 === 0
// 数量为奇数时,第一个课程显示大图(如后台未上传,前台显示小图),课程数量为偶数时,均显示小图 // 数量为奇数时,第一个课程显示大图(如后台未上传,前台显示小图),课程数量为偶数时,均显示小图
let filterList = '' let filterList = ''
if(isOdd){ if(isOdd){
filterList = modules.list filterList = modules.list
} else { } else {
filterList = modules.list[0].course_img ==='' ? modules.list : modules.list.slice(1) filterList = modules.list[0].course_img === modules.list[0].course_img_small ? modules.list : modules.list.slice(1)
} }
return ( return (
<div className='category'> <div className='category'>
...@@ -237,7 +238,7 @@ function CourseList({modules, toDetail}) { ...@@ -237,7 +238,7 @@ function CourseList({modules, toDetail}) {
<LazyLoad offset={50}> <LazyLoad offset={50}>
<ul className='index-course-detail'> <ul className='index-course-detail'>
{ {
!isOdd && modules.list[0].course_img!=='' && !isOdd && modules.list[0].course_img!== modules.list[0].course_img_small &&
<div className="category-vip" onClick={() => toDetail(modules.list[0].course_id)}> <div className="category-vip" onClick={() => toDetail(modules.list[0].course_id)}>
{/* <Link to={`/detail?id=${modules.list[0].course_id}`}> */} {/* <Link to={`/detail?id=${modules.list[0].course_id}`}> */}
<img src={modules.list[0].course_img_small} alt=""/> <img src={modules.list[0].course_img_small} alt=""/>
...@@ -269,14 +270,26 @@ function CourseList({modules, toDetail}) { ...@@ -269,14 +270,26 @@ function CourseList({modules, toDetail}) {
} }
</div> </div>
) )
const status = (
<div>
{item.is_bargain &&
<p className='course-status'>砍价减{item.bargain_price}</p>
}
{item.is_groupon &&
<p className='course-status'>拼团价{item.groupon_price}</p>
}
</div>
)
return ( return (
<Course <Course
key={index} key={index}
top={top} top={top}
data={item} data={item}
bottom={bottom} bottom={bottom}
status={status}
img={item.course_img_small} img={item.course_img_small}
title={item.course_title} title={item.course_title}
id={item.course_id} id={item.course_id}
toDetail={toDetail} toDetail={toDetail}
className='text-overflow-2' className='text-overflow-2'
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
position: relative; position: relative;
.toapp { .toapp {
position: absolute; position: fixed;
right: 0; right: 0;
top: 117px; top: 117px;
width: 82px; width: 82px;
...@@ -161,18 +161,18 @@ ...@@ -161,18 +161,18 @@
.imgList { .imgList {
padding-top: 20px; padding-top: 20px;
.imgContainer { .imgContainer {
position: relative; position: relative;
width: 44px; width: 44px;
height: 44px; height: 44px;
border-radius: 50%; border-radius: 50%;
margin-right: 20px; margin-right: 20px;
.imgname { .imgname {
margin: 0; margin: 0;
} }
.leaderFlag { .leaderFlag {
position: absolute; position: absolute;
background-color: #0099ff; background-color: #0099ff;
...@@ -184,7 +184,7 @@ ...@@ -184,7 +184,7 @@
text-align: center; text-align: center;
border-radius: 9px; border-radius: 9px;
top: -6px; top: -6px;
span { span {
font-size: 12px; font-size: 12px;
transform: scale(0.9); transform: scale(0.9);
......
import React from 'react' import React from 'react'
import './index.scss' import './index.scss'
import { CallApp} from '../../../common'
const OpenApp = () => { const OpenApp = () => {
return ( return (
<div className='open-app'> <div className='open-app'>
<p className='left'>更多试题请前往App查看</p> <p className='left'>更多试题请前往App查看</p>
<button className='right'>APP打开</button> <CallApp className='right'>APP打开</CallApp>
</div> </div>
) )
} }
......
...@@ -20,10 +20,12 @@ ...@@ -20,10 +20,12 @@
.right { .right {
width: 88px; width: 88px;
height: 22px; height: 22px;
line-height: 22px;
border: 1px solid $active; border: 1px solid $active;
border-radius: 11px; border-radius: 11px;
color: $active; color: $active;
font-size: $font_12; font-size: $font_12;
background: transparent; background: transparent;
text-align: center;
} }
} }
\ No newline at end of file
import React, { Component } from 'react'; import React, { Component } from 'react';
import {Flex, WingBlank, WhiteSpace, List, Radio, Toast} from 'antd-mobile'; import {Flex, WingBlank, WhiteSpace, List, Radio, Toast} from 'antd-mobile';
import {http, getParam, is_weixin } from '@/utils'; import {http, getParam, is_weixin, browser } from '@/utils';
import { OrderItem, HeaderBar } from '@/common/index'; import { OrderItem, HeaderBar } from '@/common/index';
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
import './PayOrder.scss'; import './PayOrder.scss';
import { VList } from '@/common'; import { VList } from '@/common';
const Item = List.Item; const Item = List.Item;
const Brief = Item.Brief; const Brief = Item.Brief;
const RadioItem = Radio.RadioItem; const RadioItem = Radio.RadioItem;
let mockData = [ let mockData = []
{ value: 0, label: '支付宝', icon: 'iconzhifubaox-' }, if(browser.isWeixin) {
{ value: 1, label: '微信支付', icon: 'iconweixinzhifu' }, mockData = [
// { value: 2, label: '花呗分期', icon: 'iconhuabei' }, { value: 1, label: '微信支付', icon: 'iconweixinzhifu' }
]; ];
} else {
mockData = [
{ value: 0, label: '支付宝', icon: 'iconzhifubaox-' },
{ value: 1, label: '微信支付', icon: 'iconweixinzhifu' },
// { value: 2, label: '花呗分期', icon: 'iconhuabei' },
];
}
export default class PayOrder extends Component { export default class PayOrder extends Component {
constructor(props) { constructor(props) {
......
...@@ -156,8 +156,6 @@ ...@@ -156,8 +156,6 @@
.order-title { .order-title {
font-size: 16px; font-size: 16px;
color: $color_333; color: $color_333;
height: 16px;
line-height: 16px;
} }
.order-content { .order-content {
......
...@@ -106,7 +106,7 @@ class Login extends Component { ...@@ -106,7 +106,7 @@ class Login extends Component {
)} )}
/> />
} }
<Captcha getInstance={this.getCaptchaInstance} <Captcha mrBtm={this.state.validate ? '20px' : '33px'} getInstance={this.getCaptchaInstance}
onVerify={this.onVerify} onVerify={this.onVerify}
/> />
<LoginButton active={values.tel && values.veriCode && isEmpty(errors)}/> <LoginButton active={values.tel && values.veriCode && isEmpty(errors)}/>
......
...@@ -136,7 +136,7 @@ class Preferential extends Component { ...@@ -136,7 +136,7 @@ class Preferential extends Component {
<p className='course-status'>砍价减{item.price1}</p> <p className='course-status'>砍价减{item.price1}</p>
} }
{this.state.courseStatus === 2 && {this.state.courseStatus === 2 &&
<p className='course-status'>拼团{item.price}</p> <p className='course-status'>拼团{item.price}</p>
} }
{ {
item.is_aist && <span className='return_cash'></span> item.is_aist && <span className='return_cash'></span>
...@@ -144,10 +144,10 @@ class Preferential extends Component { ...@@ -144,10 +144,10 @@ class Preferential extends Component {
</div> </div>
) )
return ( return (
<VList <VList
key={index} key={index}
img={item.image_name} img={item.image_name}
id={item.course_id} id={item.course_id}
status={status} status={status}
info={Info} info={Info}
toDetail={this.toCourseDetail} toDetail={this.toCourseDetail}
......
...@@ -46,8 +46,8 @@ ...@@ -46,8 +46,8 @@
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
height: 16px; height: 18px;
line-height: 16px; line-height: 18px;
} }
.contact { .contact {
......
html, body, #root {
height: 100%!important;
}
.purchased-box { .purchased-box {
width: 100%; width: 100%;
height: 100%; height: 100%;
......
html, body, #root { html, body, #root {
height: 100%; height: 100%!important;
} }
.cart-page { .cart-page {
......
$tabHeight: 44px; $tabHeight: 44px;
$tabFontSize: 15px; $tabFontSize: 15px;
html, body, #root {
height: 100%!important;
}
#study { #study {
height: 100%; height: 100%;
background: $bg_fff; background: $bg_fff;
......
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