Commit d4e680ee by wangshuo

合并dev分支

parents 99d545a8 5aef9c96
...@@ -13,13 +13,13 @@ import './orderlist.scss'; ...@@ -13,13 +13,13 @@ import './orderlist.scss';
*/ */
const OrderItem = ({ info, tab, children, src, ...restProps }) => { const OrderItem = ({ info, tab, children, ...restProps }) => {
return ( return (
<div className='public-list-item'> <div className='public-list-item'>
<div className="public-content"> <div className="public-content">
{tab} {tab}
<div className="public-cover" > <div className="public-cover" >
<img src={src} alt="" /> <img src={restProps.image_name} alt="" />
</div> </div>
{info} {info}
</div> </div>
......
...@@ -31,21 +31,40 @@ ...@@ -31,21 +31,40 @@
background-size: 80px; background-size: 80px;
} }
.order-cell { .order-information2 {
width: 50%; height: 80px;
height: 45px; background-color: #FFF;
font-size: $font_14; margin-top: 8px;
color: $color_333; position: relative;
margin-left: 20px;
line-height: 20px; .user-icon {
display: inline-block; font-size: 28px;
vertical-align: middle; }
.name { .order-cell {
margin-bottom: 10px; height: 50px;
font-size: 13px;
color: $color_333;
line-height: 20px;
.name {
margin-bottom: 10px;
}
} }
} }
.order-information2::before {
content: '';
left: 0;
right: 0;
bottom: 0;
height: 2px;
position: absolute;
background: -webkit-repeating-linear-gradient(135deg, #ff6c6c 0, #ff6c6c 20%, transparent 0, transparent 25%, #1989fa 0, #1989fa 45%, transparent 0, transparent 50%);
background: repeating-linear-gradient(-45deg, #ff6c6c 0, #ff6c6c 20%, transparent 0, transparent 25%, #1989fa 0, #1989fa 45%, transparent 0, transparent 50%);
background-size: 80px;
}
.order-addsize { .order-addsize {
font-size: 22px !important; font-size: 22px !important;
margin-bottom: 0px; margin-bottom: 0px;
...@@ -61,7 +80,7 @@ ...@@ -61,7 +80,7 @@
.order-list { .order-list {
margin-top: 8px; margin-top: 8px;
background-color: $white; background-color: #F5F5F5;
.public-content { .public-content {
padding: 10px 15px; padding: 10px 15px;
} }
...@@ -72,13 +91,18 @@ ...@@ -72,13 +91,18 @@
height: 22px; height: 22px;
line-height: 22px; line-height: 22px;
margin-left: 10px; margin-left: 10px;
font-size: $font_16; font-size: $font_14;
color: $color_555; color: $color_555;
} }
.order-info { .order-info {
color: $color_666; color: $color_666;
font-size: $font_14; font-size: $font_14;
min-width: 160px;
flex: 1 1 auto;
display: flex;
flex-direction: column;
justify-content: space-around;
.order-title { .order-title {
height: 16px; height: 16px;
...@@ -88,16 +112,11 @@ ...@@ -88,16 +112,11 @@
} }
.order-content { .order-content {
margin-top: 10px;
color: $color_666; color: $color_666;
font-size: $font_14; font-size: $font_14;
line-height: 18px; line-height: 18px;
} }
.order-des {
margin-top: 10px;
}
.order-newprice { .order-newprice {
color: $redprice; color: $redprice;
font-size: $font_16; font-size: $font_16;
...@@ -170,6 +189,9 @@ ...@@ -170,6 +189,9 @@
-webkit-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;
border: 1px solid transparent; border: 1px solid transparent;
} }
.has-info {
background-color: #FF3131;
}
.v-list-item { .v-list-item {
margin-top: 8px; margin-top: 8px;
...@@ -181,6 +203,9 @@ ...@@ -181,6 +203,9 @@
} }
.order-prefer { .order-prefer {
.am-list-content {
font-size: 15px !important;
}
.am-list-line { .am-list-line {
padding: 0 15px; padding: 0 15px;
} }
......
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Flex, NavBar, List, InputItem, Button, WhiteSpace, WingBlank } from 'antd-mobile'; import { Flex, NavBar, List, InputItem, Button, WhiteSpace, WingBlank, Toast } from 'antd-mobile';
import { Formik, Field, Form, withFormik } from 'formik';
class orderinfo extends Component { const InnerForm = ({
render() { values,
const { getFieldProps } = this.props.form; errors,
return ( touched,
<Flex> setFieldValue,
<Flex.Item> handleBlur,
handleSubmit,
isSubmitting,
}) => (
<form>
<InputItem
clear
name="real_name"
onChange={(value) => setFieldValue('real_name', value)}
placeholder="请输入您的真实姓名"
>姓名</InputItem>
<InputItem
clear
type='phone'
name='cellphone'
placeholder="请输入您的手机号码"
onChange={(value) => setFieldValue('cellphone', value)}
>电话</InputItem>
<InputItem
clear
name='qq'
placeholder="请输入您的QQ号码"
maxLength='15'
onChange={(value) => setFieldValue('qq', value)}
>QQ</InputItem>
<div style={{ marginTop: '21px' }}>
<WingBlank>
<Button type='primary' onClick={handleSubmit}>确认</Button>
</WingBlank>
</div>
</form>
);
const MyForm = withFormik({
mapPropsToValues: props => ({ real_name: '', cellphone: '', qq: '' }),
validate: (values, props) => {
const errors = {};
return errors;
},
handleSubmit: (
values,
FormBag
) => {
if (!values.real_name) {
Toast.info('请输入姓名!', undefined, undefined, false);
return;
}
if (!values.cellphone) {
Toast.info('请输入手机号!', undefined, undefined, false);
return;
} else if (!/1\d{10}/g.test(values.cellphone.replace(/\s+/g, ''))) {
Toast.info('请输入正确的手机号!', undefined, undefined, false);
return;
}
if (!values.qq) {
Toast.info('请输入QQ号!', undefined, undefined, false);
return;
} else if (!/\d{5,}/g.test(values.qq)) {
Toast.info('请输入正确QQ号!', undefined, undefined, false);
return;
}
FormBag.props.history.push({
pathname: '/order',
state: values
});
},
})(InnerForm);
class Orderinfo extends Component {
constructor(props) {
super(props);
}
render() {
return (
<div>
<NavBar <NavBar
style={{ "height": "44px" }} style={{ "height": "44px", backgroundColor: '#F7F9FC' }}
className="order-tab" className="order-tab"
mode="light" mode="light"
icon={<i className="iconfont iconiconfront-68"></i>} icon={<i className="iconfont iconiconfront-68"></i>}
> >
报名信息 报名信息
</NavBar> </NavBar>
<div> <MyForm history={this.props.history} />
<List> </div>
<InputItem )
{...getFieldProps('autofocus')} }
clear
placeholder="请输入您的真实姓名"
ref={el => this.autoFocusInst = el}
>电话</InputItem>
<InputItem
{...getFieldProps('focus')}
clear
placeholder="请输入您的手机号码"
ref={el => this.inputRef = el}
>姓名</InputItem>
<InputItem
{...getFieldProps('focus')}
clear
placeholder="请输入您的QQ号码"
ref={el => this.inputRef = el}
>QQ</InputItem>
</List>
<WhiteSpace />
<div style={{marginTop: '21px'}}>
<WingBlank>
<Button type="primary">确认</Button>
</WingBlank>
</div>
</div>
</Flex.Item>
</Flex>
)
}
}
};
export default orderinfo; export default Orderinfo;
\ No newline at end of file \ No newline at end of file
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