Commit 0cd03512 by xuzhenghua

bug

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