Commit 4fc67ca5 by 万亚飞

fix bug

parent 25972d74
......@@ -6,6 +6,7 @@ import JobList from './pages/user/JobList';
import AddMaterial from './pages/user/addMaterial';
import TrainList from './pages/user/TrainList';
import Train from './pages/user/Train';
import Pay from './pages/pay/pay';
import NotFind from './pages/404';
......@@ -58,6 +59,7 @@ class App extends React.Component {
<Route path="/user/train/add" key="add-train" component={Train} />
<Route path="/user/train/:id" key="edit-train" component={Train} />
<Route path="/user/train" component={TrainList} />
<Route path="/pay" component={Pay} />
<Route component={JobList} />
</Switch>
</div>
......
......@@ -13,7 +13,7 @@ class TrainItem extends Component {
<li className="train-item">
{data.auditStatus == '3' && <i className="y-icon-collate" />}
<div className="item-head df box-c">
<span className="fx1">{moment(data.modifyTime).format('YYYY-MM-DD')}</span>
{data.modifyTime && <span className="fx1">{moment(data.modifyTime).format('YYYY-MM-DD')}</span>}
{data.auditStatus == '1' && <span className="fz14 c-green">待核对</span>}
{data.auditStatus == '2' && <span className="fz14 c-red">核对失败</span>}
</div>
......@@ -21,7 +21,7 @@ class TrainItem extends Component {
{data.image && <div className="train-head" style={{ backgroundImage: `url(${data.image})` }} />}
<div className="body-con">
<div className="fz15 c-24 b ellipsis2">{data.info}</div>
{iType === 3 && (
{iType === 3 && data.startTime && (
<div className="c6 mt5">
培训时间:{moment(data.startTime).format('YYYY年MM月')}-{moment(data.endTime).format('YYYY年MM月')}
</div>
......
import React, { Component } from 'react';
class Pay extends Component {
render() {
return (
<div className="pay-box">
<ul className="y-cells">
<li>
<div className="head-cell">
<span className="b">预约咨询(王尼玛)</span>
</div>
<div className="footer-cell">
<span className="fs12"></span>
<span>129.00</span>
</div>
</li>
<li>
<div className="head-cell" />
<div className="footer-cell">
<span>还需支付</span>
<span></span>
<span>129.00</span>
</div>
</li>
<li>
<div className="head-cell">还需支付</div>
<div className="footer-cell c-red">
<span>¥</span>
<span className="fs20">120.00</span>
</div>
</li>
</ul>
<div className="fs12 separate">选择支付方式</div>
<ul className="y-cells pay-list">
<li>
<label for="wechat">
<i className="y-icon-wechat" />
<span className="ml5 flex1">微信支付</span>
<input id="wechat" checked className="y-checkbox" type="radio" name="payType" value="2" />
</label>
</li>
<li>
<label for="alipay">
<i className="y-icon-alipay" />
<span className="ml5 flex1">支付宝支付</span>
<input id="alipay" className="y-checkbox" type="radio" name="payType" value="1" />
</label>
</li>
</ul>
</div>
);
}
}
export default Pay;
......@@ -74,8 +74,8 @@ class Train extends Component {
data: params,
success: res => {
this.setState({
startTime: new Date(res.data.startTime),
endTime: new Date(res.data.endTime),
startTime: res.data.startTime && new Date(res.data.startTime),
endTime: res.data.endTime && new Date(res.data.endTime),
backgroundArea: res.data.info,
imgUrls: [res.data.image]
});
......
......@@ -415,7 +415,8 @@ textarea::placeholder {
letter-spacing: 3px;
}
/*font*/
.fz12 {
.fz12,
.fs12 {
font-size: 12px;
}
.fz14 {
......@@ -433,7 +434,8 @@ textarea::placeholder {
.fz18 {
font-size: 18px;
}
.fz20 {
.fz20,
.fs20 {
font-size: 20px;
}
.fz22 {
......@@ -593,6 +595,45 @@ textarea::placeholder {
.fcolor {
color: rgba(255, 91, 5, 1);
}
.flex1 {
flex-grow: 1;
}
.ml5 {
margin-left: 5px;
}
.ml10 {
margin-left: 10px;
}
input.y-checkbox[type='radio'] {
position: relative;
-webkit-appearance: none;
font-size: 0;
border: 0;
outline: 0;
background-color: transparent;
border-radius: 20px;
border: 1px solid #999;
background-size: contain;
background-repeat: no-repeat;
border-radius: 10px;
width: 20px;
height: 20px;
}
input.y-checkbox:checked {
border: none;
border-radius: none;
}
input.y-checkbox:checked::after {
content: ' ';
width: 20px;
height: 20px;
background-image: url('../images/icon/icon-radio.png');
background-size: contain;
background-repeat: no-repeat;
display: block;
}
/*其他 ellipsis*/
.ellipsis {
overflow: hidden;
......
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