Commit 14fcc746 by 万亚飞

fix bug

parent 4fc67ca5
/**
* Created by mqd on ${DATE}.
*/
import React, { Component } from 'react';
import {Icon} from 'antd-mobile';
import Footer from "../../Components/Footer/Footer";
export default class Loading extends Component {
constructor(props) {
super(props);
this.state = {
};
}
render() {
let {isLoading,Lists,total}=this.props;
return (
<div>
<div>
{
isLoading ? (
<div className="tac pt20 pb20">
<Icon type="loading" size="md"/>
<p className="grey">加载中...</p>
</div>
) : Lists
}
<div>
{this.state.total==0 && <div className="w100p tac pt40 pb40 bg-white">暂无数据</div>}
</div>
</div>
{Lists.length==total && Footer()}
</div>
);
}
}
......@@ -6,7 +6,7 @@ export default function Tips({ money }) {
return null;
}
return (
<div className={'df bg-yellow fz14 ptb10 box-c orange'}>
<div className={'df bg-yellow fs14 ptb10 box-c orange'}>
<div className={'fx1'}>
<div className={'df aic'}>
<i className="iconfont icon-warn-s" />
......
import { nodeAxios } from './nodeAxios';
export default {
intercept(res) {
if (res.code == 0 || res.code == 200) {
return Promise.resolve(res);
} else {
return Promise.reject();
}
},
// node
nodeQiniuFile(data = {}) {
return nodeAxios.post('/qiniu/file', data).then(res => this.intercept(res));
}
};
import axios from 'axios';
const nodeAxios = axios.create({
baseURL: 'https://nodeapi.ydl.com/api',
timeout: 600000,
responseType: 'json',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
Accept: 'application/json'
},
transformRequest: [
data => {
data = JSON.stringify(data);
return data;
}
],
validateStatus: status => status === 200
});
// 响应拦截
nodeAxios.interceptors.response.use((res = {}) => {
return Promise.resolve(res.data);
});
export { nodeAxios };
import React, { Component } from 'react';
import * as qiniu from 'qiniu-js';
import API from './api';
class Page extends Component {
constructor(props) {
super(props);
}
// 获取随机字符串
random_string(len = 32) {
let chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678';
let maxPos = chars.length;
let pwd = '';
for (let i = 0; i < len; i++) {
pwd += chars.charAt(Math.floor(Math.random() * maxPos));
}
return pwd;
}
// 得到后缀名
get_suffix(filename) {
let pos = filename.lastIndexOf('.');
let suffix = '';
if (pos != -1) {
suffix = filename.substring(pos);
}
return suffix;
}
// 推测文件随机名
calculate_object_name(filename) {
let suffix = this.get_suffix(filename);
let g_object_name = this.random_string(10) + suffix;
return g_object_name;
}
fileSelected() {
let _this = this;
let fileList = [];
let files = this.refs.fileDom.files,
filesLen = files.length;
console.log(files);
let file = files[0];
let fileName = this.calculate_object_name(files[0].name);
let putExtra = {
fname: files[0].name,
params: {},
mimeType: ['image/png', 'image/jpeg', 'image/gif']
};
let config = {
useCdnDomain: true,
region: qiniu.region.z0,
useCdnDomain: true
};
let observer = {
next(res) {
_this.qiniuNext.call(_this, res);
},
error(err) {
_this.qiniuError.call(_this, err);
},
complete(res) {
_this.qiniuComplete.call(_this, res);
}
};
API.nodeQiniuFile().then(res => {
let observable = qiniu.upload(file, fileName, res.data, putExtra, config);
observable.subscribe(observer);
});
}
qiniuNext(res) {
// console.log("qiniuNext >>>>>>>")
}
qiniuError(err) {
this.props.refresh({
code: -1,
data: err
});
}
qiniuComplete(res) {
this.props.refresh({
code: 0,
data: res
});
}
componentDidMount() {}
render() {
return (
<input
type="file"
name="file"
ref="fileDom"
accept="image/*"
onChange={() => {
this.fileSelected();
}}
/>
);
}
}
export default Page;
......@@ -14,13 +14,13 @@ class TrainItem extends Component {
{data.auditStatus == '3' && <i className="y-icon-collate" />}
<div className="item-head df box-c">
{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>}
{data.auditStatus == '1' && <span className="fs14 c-green">待核对</span>}
{data.auditStatus == '2' && <span className="fs14 c-red">核对失败</span>}
</div>
<div className="item-body df box-c">
{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>
<div className="fs15 c-24 b ellipsis2">{data.info}</div>
{iType === 3 && data.startTime && (
<div className="c6 mt5">
培训时间:{moment(data.startTime).format('YYYY年MM月')}-{moment(data.endTime).format('YYYY年MM月')}
......
......@@ -24,11 +24,11 @@ export default class FooterButton extends PureComponent {
)}
</div>
{button && button.type ? (
<div className={'fx4 bg-blue white h40 lh40 mr10 fz16 bdrs40'} style={{ background: '#108ee9' }} onClick={joinCourse}>
<div className={'fx4 bg-blue white h40 lh40 mr10 fs16 bdrs40'} style={{ background: '#108ee9' }} onClick={joinCourse}>
{button && button.desc}
</div>
) : (
<div className={'fx4 bg-blue white h40 lh40 mr10 fz16 bdrs40'} style={{ background: '#d8dade' }}>
<div className={'fx4 bg-blue white h40 lh40 mr10 fs16 bdrs40'} style={{ background: '#d8dade' }}>
{button && button.desc}
</div>
)}
......
......@@ -24,11 +24,11 @@ export default class FooterButton extends PureComponent {
)}
</div>
{button && button.type ? (
<div className={'fx4 bg-blue white h40 lh40 mr10 fz16 bdrs40'} style={{ background: '#108ee9' }} onClick={joinCourse}>
<div className={'fx4 bg-blue white h40 lh40 mr10 fs16 bdrs40'} style={{ background: '#108ee9' }} onClick={joinCourse}>
{button && button.desc}
</div>
) : (
<div className={'fx4 bg-blue white h40 lh40 mr10 fz16 bdrs40'} style={{ background: '#d8dade' }}>
<div className={'fx4 bg-blue white h40 lh40 mr10 fs16 bdrs40'} style={{ background: '#d8dade' }}>
{button && button.desc}
</div>
)}
......
......@@ -47,23 +47,6 @@ export default class Layout extends Component {
<Header title={title} border={true} /> */}
<div className="page-content">{children}</div>
{/*<Footer/>
<style global jsx>{`
.container {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
// padding-top: 45px;
}
.container .page-content {
position: relative;
width: 100%;
height: 100%;
}
`}</style>
*/}
</div>
);
}
......
......@@ -10,7 +10,7 @@ export default function TitleBar({ imgName, children, url, className = '' }) {
<b>{children}</b>
</div>
{url && (
<WrapLink className={'box-c bdrs20 bd1 fz12 dib'} url={url}>
<WrapLink className={'box-c bdrs20 bd1 fs12 dib'} url={url}>
<span>更多</span>
</WrapLink>
)}
......
......@@ -7,10 +7,10 @@ export default function TitleBarBig({ imgName, children, url, className = '' })
<div className={`df jcb ${className}`}>
<div className={'df aic'}>
<img src={loadImage(imgName)} alt="" className={'mr10 w25 h25'} />
<span className={'fz18'}>{children}</span>
<span className={'fs18'}>{children}</span>
</div>
{url && (
<WrapLink className={'box-c bdrs20 bd1 fz12 dib'} url={url}>
<WrapLink className={'box-c bdrs20 bd1 fs12 dib'} url={url}>
<span>更多</span>
</WrapLink>
)}
......
......@@ -70,16 +70,16 @@ export default class DepositPay extends Component {
<div className={'deposit-user'}>
<Tips money={depositAmountNeedPay} />
<div className="pt10 box-c tal">
<b className="fz14 box-c">
保证金总余额: <span className="blue fz18">{depositMoney + qualityDepositMoney}</span>
<b className="fs14 box-c">
保证金总余额: <span className="blue fs18">{depositMoney + qualityDepositMoney}</span>
</b>
</div>
<div className={'deposit-pannel'}>
<div className={'deposit-pannel-item bdb1'}>
<div className="fx1 tal">
<div className={'fz17'}>
<div className={'fz14'}>类目保证金余额(元)</div>
<b className={'fz30'}>{depositMoney}</b>
<div className={'fs17'}>
<div className={'fs14'}>类目保证金余额(元)</div>
<b className={'fs30'}>{depositMoney}</b>
</div>
</div>
<div className={'tar'}>
......@@ -111,9 +111,9 @@ export default class DepositPay extends Component {
<div className={'deposit-pannel'}>
<div className={'deposit-pannel-item'}>
<div className="fx1">
<div className={'fz17'}>
<div className={'fz14'}>质量保证金余额(元)</div>
<b className={'fz30'}>{qualityDepositMoney}</b>
<div className={'fs17'}>
<div className={'fs14'}>质量保证金余额(元)</div>
<b className={'fs30'}>{qualityDepositMoney}</b>
</div>
</div>
<div className={'tar'}>
......
import React, { Component } from 'react';
import './pay.less';
class Pay extends Component {
render() {
return (
......@@ -17,16 +17,9 @@ class Pay extends Component {
<li>
<div className="head-cell" />
<div className="footer-cell">
<span>还需支付</span>
<span className="c3">还需支付</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>
<span className="fs24">129.00</span>
</div>
</li>
</ul>
......@@ -48,6 +41,20 @@ class Pay extends Component {
</label>
</li>
</ul>
<div className="fs12 box-c pt30 c6">
<div>付款保障:</div>
<ul>
<li>1.国内专业的心理服务平台,300万客户的选择;</li>
<li>2.CCTV12"我和你说"栏目诚邀合作,信心保障;</li>
<li>3.咨询不满意,随时退款!</li>
</ul>
</div>
<div className="bottom-operate bottom-cover">
<div className="customer">
<span>客服</span>
</div>
<button className="am-button am-button-primary">(¥36.00) 确认付款</button>
</div>
</div>
);
}
......
.pay-box {
height: 100%;
background-color: #f6f6f6;
}
.y-cells {
background: #fff;
}
.y-cells li {
position: relative;
padding: 15px;
display: flex;
font-size: 15px;
}
.y-cells li label {
width: 100%;
display: flex;
align-items: center;
}
.y-cells li:not(:last-child)::after,
.pay-list li:not(:last-child)::after {
content: ' ';
position: absolute;
left: 15px;
right: 15px;
bottom: 0;
height: 1px;
border-bottom: 1px solid #e0e0e0;
transform: scaleY(0.5);
}
.y-cells li .head-cell {
color: #242424;
}
.y-cells li .footer-cell {
flex: 1;
color: #333;
text-align: right;
}
.y-cells li.access .footer-cell:after {
content: ' ';
display: inline-block;
height: 8px;
width: 8px;
border-width: 2px 2px 0 0;
border-color: #b2b2b2;
border-style: solid;
-webkit-transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
position: relative;
top: -2px;
position: absolute;
top: 50%;
margin-top: -5px;
right: 15px;
}
.access .footer-cell {
padding-right: 15px;
}
.separate {
background: #f7f7f7;
height: 30px;
color: #666;
line-height: 30px;
padding-left: 15px;
padding-right: 15px;
}
.pay-box {
.bottom-operate {
height: 55px;
.customer {
font-size: 14px;
text-align: center;
width: 125px;
}
.am-button {
height: 55px;
line-height: 55px;
}
}
}
......@@ -16,7 +16,7 @@ function AddView(props) {
return (
<div className="bottom-operate">
<a
className="am-button am-button-primary"
className="am-button button-cover am-button-primary"
onClick={() => {
linkTo(`/new/user/job/add?index=${props.tabIndex}`);
}}
......
......@@ -206,12 +206,12 @@ class Train extends Component {
<div className="train-name">
<textarea className="yui-textarea" name="backgroundArea" value={backgroundArea} onChange={this.handleInputChange} placeholder="建议一次添加一个受训背景" rows="4" />
</div>
<div className="fz16 b mt20 mb5">上传证书图片</div>
<div className="fs16 b mt20 mb5">上传证书图片</div>
<div className="c-b3">证书信息真实,照片清晰可辨,信息完整无缺失,严禁经过ps处理(最多1张)</div>
<UpLoad certificateFiles={certificateFiles} viewImages={viewImages} refresh={this.refreshFile} delFile={this.delFile} />
</div>
<div className="bottom-operate">
<button disabled={this.state.isEdit && !this.state.hasChange} onClick={this.submitTrain} className="am-button am-button-primary">
<button disabled={this.state.isEdit && !this.state.hasChange} onClick={this.submitTrain} className="am-button button-cover am-button-primary">
提交
</button>
</div>
......
......@@ -78,7 +78,7 @@ class TrainList extends Component {
onClick={() => {
linkTo('/new/user/train/add');
}}
className="am-button am-button-primary"
className="am-button button-cover am-button-primary"
>
添加受训背景
</a>
......
......@@ -178,7 +178,7 @@ class AddMaterial extends Component {
<div className="add-material">
<div className="box-c pt20">
<div className="mb5 rel">
<span className="fz16 b">{materialStr}</span>
<span className="fs16 b">{materialStr}</span>
{materialType === 0 && (
<div onClick={this.toggleRange} className="tip-right">
<span className="mr5">平台认证咨询师范围</span>
......@@ -191,13 +191,13 @@ class AddMaterial extends Component {
<textarea className="yui-textarea" name="backgroundArea" value={backgroundArea} onChange={this.handleInputChange} placeholder={`建议一次添加一个${materialStr}`} rows="4" />
</div>
<div className="fz16 b mt30 mb5">上传证书图片</div>
<div className="fs16 b mt30 mb5">上传证书图片</div>
<div className="c-b3">证书信息真实,照片清晰可辨,信息完整无缺失,严禁经过ps处理(最多1张)</div>
<UpLoad certificateFiles={certificateFiles} viewImages={viewImages} refresh={this.refreshFile} delFile={this.delFile} />
</div>
<div className="bottom-operate">
<button disabled={this.state.isEdit && !this.state.hasChange} onClick={this.submitJob} className="am-button am-button-primary">
<button disabled={this.state.isEdit && !this.state.hasChange} onClick={this.submitJob} className="am-button button-cover am-button-primary">
提交
</button>
</div>
......@@ -221,7 +221,7 @@ class AddMaterial extends Component {
<li>12.婚姻家庭咨询师</li>
</ul>
<div className="y-dialog-btn">
<button onClick={this.toggleRange} className="am-button am-button-primary">
<button onClick={this.toggleRange} className="am-button button-cover am-button-primary">
确定
</button>
</div>
......
......@@ -59,8 +59,17 @@ body {
-webkit-font-smoothing: subpixel-antialiased;
/*流畅滚动*/
}
.page-container {
.container {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
// padding-top: 45px;
}
.container .page-content {
position: relative;
width: 100%;
height: 100%;
}
......@@ -415,36 +424,31 @@ textarea::placeholder {
letter-spacing: 3px;
}
/*font*/
.fz12,
.fs12 {
font-size: 12px;
}
.fz14 {
.fs14 {
font-size: 14px;
}
.fz15 {
.fs15 {
font-size: 15px;
}
.fz16 {
.fs16 {
font-size: 16px;
}
.fz17 {
.fs17 {
font-size: 17px;
}
.fz18 {
.fs18 {
font-size: 18px;
}
.fz20,
.fs20 {
font-size: 20px;
}
.fz22 {
font-size: 22px;
}
.fz24 {
.fs24 {
font-size: 24px;
}
.fz30 {
.fs30 {
font-size: 30px;
}
.mt5 {
......@@ -547,6 +551,9 @@ textarea::placeholder {
padding-top: 20px;
}
.pt30 {
padding-top: 30px;
}
.pt40 {
padding-top: 40px;
}
......@@ -952,6 +959,17 @@ textarea::placeholder {
width: 15px;
height: 15px;
}
.y-icon-wechat {
background-image: url('../images/icon/icon-wechat.png');
width: 16px;
height: 14px;
}
.y-icon-alipay {
background-image: url('../images/icon/icon-alipay.png');
width: 16px;
height: 16px;
}
// 覆盖antd-mobile样式
.am-toast-notice-content .am-toast-text {
min-width: 100px;
......@@ -1054,9 +1072,17 @@ html:not([data-scale]) .am-list-body:after {
padding-left: 15px;
padding-right: 15px;
background-color: #fff;
display: flex;
box-shadow: 0px -2px 4px 0px rgba(0, 0, 0, 0.04);
&.bottom-cover {
padding: 0;
.am-button {
flex-grow: 1;
border-radius: 0;
}
}
}
.bottom-operate .am-button {
.bottom-operate .button-cover {
width: 100%;
border-radius: 30px;
}
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