Commit d1799b9c by gaoju

h生产代码

1 parent 36b40e1c
Showing 73 changed files with 997 additions and 1311 deletions
This diff could not be displayed because it is too large.
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
"precommit": "npm run lint" "precommit": "npm run lint"
}, },
"dependencies": { "dependencies": {
"animate.css": "^3.7.0",
"antd": "^3.12.3", "antd": "^3.12.3",
"antd-mobile": "^2.2.9", "antd-mobile": "^2.2.9",
"babel-helpers": "^6.24.1", "babel-helpers": "^6.24.1",
...@@ -16,14 +15,10 @@ ...@@ -16,14 +15,10 @@
"dva": "^2.1.0", "dva": "^2.1.0",
"echarts": "^4.2.1", "echarts": "^4.2.1",
"html2canvas": "^1.0.0-alpha.12", "html2canvas": "^1.0.0-alpha.12",
"iscroll": "^5.2.0",
"jquery": "^3.3.1", "jquery": "^3.3.1",
"moment": "^2.24.0", "moment": "^2.24.0",
"react": "^16.2.0", "react": "^16.2.0",
"react-addons-css-transition-group": "^15.6.2",
"react-bmap": "^1.0.98",
"react-dom": "^16.2.0", "react-dom": "^16.2.0",
"react-qmap": "^0.1.5",
"react-sticky": "^6.0.3", "react-sticky": "^6.0.3",
"swiper": "^4.4.6" "swiper": "^4.4.6"
}, },
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
height: .8rem; height: .8rem;
background: url("../../assets/image/home-frame.png") no-repeat center center; background: url("../../assets/image/home-frame.png") no-repeat center center;
background-size: 100% 100%; background-size: 100% 100%;
z-index: 10;
} }
bottomButton > .module{ bottomButton > .module{
......
...@@ -18,8 +18,8 @@ export default class BottomNav extends Component{ ...@@ -18,8 +18,8 @@ export default class BottomNav extends Component{
text:'在线专家' text:'在线专家'
}, },
{ {
img:require('../../assets/image/userCenter.png'), img:require('../../assets/image/performance.png'),
text:'个人中心' text:'业绩'
}, },
], ],
...@@ -34,8 +34,8 @@ export default class BottomNav extends Component{ ...@@ -34,8 +34,8 @@ export default class BottomNav extends Component{
text:'人员管理' text:'人员管理'
}, },
{ {
img:require('../../assets/image/userCenter.png'), img:require('../../assets/image/performance.png'),
text:'个人中心' text:'业绩'
}, },
], ],
} }
...@@ -58,14 +58,11 @@ export default class BottomNav extends Component{ ...@@ -58,14 +58,11 @@ export default class BottomNav extends Component{
text: '在线专家' text: '在线专家'
}, },
{ {
img: require('../../assets/image/userCenter.png'), img: require('../../assets/image/performance.png'),
text: '个人中心' text: '业绩'
}, },
]; ];
} }
if(this.props.roleId != 3 && this.props.roleId != 2){
list = this.state.moduleList1;
}
return list.map((item,index)=>{ return list.map((item,index)=>{
return ( return (
<div className={styles.module} key={index} onClick={()=>{ <div className={styles.module} key={index} onClick={()=>{
...@@ -79,8 +76,6 @@ export default class BottomNav extends Component{ ...@@ -79,8 +76,6 @@ export default class BottomNav extends Component{
}else if(this.props.roleId == 3 && index === 1){ }else if(this.props.roleId == 3 && index === 1){
this.props.goGtclientlist() this.props.goGtclientlist()
}else if(this.props.roleId != 3 && this.props.roleId != 2 && index === 1){
this.props.goGtclientlist()
}else if(index === 2){ }else if(index === 2){
localStorage.setItem('keyIndex',2) localStorage.setItem('keyIndex',2)
this.props.goPerformance() this.props.goPerformance()
......
/*.am-calendar{*/
/*width: .68rem !important;*/
/*}*/
/*.am-calendar>span{*/
/*width: 100%;*/
/*max-width: 680px;*/
/*}*/
/*.am-calendar .content{*/
/*position: fixed;*/
/*display: -ms-flexbox;*/
/*display: flex;*/
/*-ms-flex-direction: column;*/
/*flex-direction: column;*/
/*width: 6.8rem;*/
/*height: 100%;*/
/*top: 0;*/
/*left: 50%;*/
/*margin-left: -3.4rem;*/
/*z-index: 999;*/
/*background: #fff;*/
/*}*/
...@@ -4,8 +4,8 @@ import { DatePicker, List } from 'antd-mobile'; ...@@ -4,8 +4,8 @@ import { DatePicker, List } from 'antd-mobile';
import enUs from 'antd-mobile/lib/date-picker/locale/en_US'; import enUs from 'antd-mobile/lib/date-picker/locale/en_US';
const nowTimeStamp = new Date('1963-01-01'); const nowTimeStamp = new Date('1963-01-01');
const today = new Date();
const now = new Date(); const now = new Date(nowTimeStamp);
// GMT is not currently observed in the UK. So use UTC now. // GMT is not currently observed in the UK. So use UTC now.
const utcNow = new Date(now.getTime() + (now.getTimezoneOffset() * 60000)); const utcNow = new Date(now.getTime() + (now.getTimezoneOffset() * 60000));
...@@ -49,20 +49,13 @@ class datePicker extends Component { ...@@ -49,20 +49,13 @@ class datePicker extends Component {
} }
componentDidMount() { componentDidMount() {
this.props.onRef(this) this.props.onRef(this)
this.setState({
date: this.props.birthday ? new Date(this.props.birthday) : now
})
console.log('componentDidMount---',this.props.birthday)
}
componentWillReceiveProps(nextProps) { // 父组件重传props时就会调用这个方法
if(nextProps.birthday && nextProps.birthday != this.state.date){
this.setState({
date:new Date(nextProps.birthday)
})
}
} }
showDate=()=>{ showDate=()=>{
console.log(555);
document.getElementsByTagName('body')[0].style.overflowY = 'hidden'; document.getElementsByTagName('body')[0].style.overflowY = 'hidden';
this.setState({ this.setState({
visible: true, visible: true,
...@@ -70,6 +63,7 @@ class datePicker extends Component { ...@@ -70,6 +63,7 @@ class datePicker extends Component {
} }
showDate1=()=> { showDate1=()=> {
console.log(4444444);
document.getElementsByTagName('body')[0].style.overflowY = 'hidden'; document.getElementsByTagName('body')[0].style.overflowY = 'hidden';
this.setState({ this.setState({
visible: true, visible: true,
...@@ -79,9 +73,7 @@ class datePicker extends Component { ...@@ -79,9 +73,7 @@ class datePicker extends Component {
render() { render() {
let defaultdate = today.getFullYear()-101;//默认范围值为100岁
console.log('render---',this.props.birthday)
let minDate = this.props.minYear ? new Date(this.props.minYear, today.getMonth(), today.getDate() + 1) : new Date(defaultdate, 0, 1, 0, 0, 0);
return ( return (
<List className="date-picker-list" style={{ backgroundColor: 'white',opacity:0 ,width:0,display:'none'}}> <List className="date-picker-list" style={{ backgroundColor: 'white',opacity:0 ,width:0,display:'none'}}>
{/*<DatePicker {/*<DatePicker
...@@ -96,28 +88,21 @@ class datePicker extends Component { ...@@ -96,28 +88,21 @@ class datePicker extends Component {
title="出生日期" title="出生日期"
extra="Optional" extra="Optional"
value={this.state.date} value={this.state.date}
minDate={minDate} minDate={new Date(1963, 0, 1, 0, 0, 0)}
maxDate={new Date()} maxDate={new Date()}
onChange={date => { onChange={date => {
console.log('--DatePicker--onChange--->',date) console.log(44);
//this.setState({ date }) this.setState({ date })
}}
onValueChange={(date,index) => {
let data1 = new Date(date[0],date[1],date[2]);
console.log('--DatePicker--onValueChange--->',data1)
this.setState({ date:data1 })
}} }}
onOk = { onOk = {
(date)=>{ (date)=>{
console.log('--DatePicker--ok--->',date)
this.setState({ visible:false }) this.setState({ visible:false })
this.props.getDate(date) this.props.getDate(date)
} }
} }
onDismiss={ onDismiss={
()=>{ ()=>{
this.setState({ visible:false,date:this.props.birthday ? new Date(this.props.birthday) : now }) this.setState({ visible:false })
console.log('--DatePicker--onDismiss--->',this.state.date)
} }
} }
> >
......
...@@ -167,19 +167,3 @@ label标签 ...@@ -167,19 +167,3 @@ label标签
background-color: black; background-color: black;
margin-top: .2rem; margin-top: .2rem;
} }
.blueSpan{
float: right;
margin-right: .1rem;
}
.blueSpan>div{
background-color: #8ec5f3;
font-size: .15rem;
width: .4rem;
height: .2rem;
line-height: .2rem;
margin-top: .03rem;
text-align: center;
color: white;
border-radius: 5px;
transform: scale(0.9);
}
\ No newline at end of file \ No newline at end of file
...@@ -76,21 +76,12 @@ import SwipeActionExample from "../../components/SwipeAction" ...@@ -76,21 +76,12 @@ import SwipeActionExample from "../../components/SwipeAction"
<div className={styles.right}> <div className={styles.right}>
<div className={styles.top}> <div className={styles.top}>
<div className={styles.title}>{item.riskName}</div> <div className={styles.title}>{item.riskName}</div>
{/**item.riskLabels && item.riskLabels.map((ite,ind)=>{ {item.riskLabels && item.riskLabels.map((ite,ind)=>{
return( return(
<span key={ind} className={ite === '新品'?styles.orangeSpan:styles.redSpan}> <span key={ind} className={ite === '新品'?styles.orangeSpan:styles.redSpan}>
{ ite =='热门' ?<img src={require("../../assets/image/label-hot.png")} alt=""/>:ite =='新品' ?<img src={require("../../assets/image/label-newProduct.png")} alt=""/> :null} { ite =='热门' ?<img src={require("../../assets/image/label-hot.png")} alt=""/>:ite =='新品' ?<img src={require("../../assets/image/label-newProduct.png")} alt=""/> :null}
</span> </span>
) )
})**/}
{item.riskLabels && item.riskLabels.map((ite,ind)=>{
return(
<span key={ind} className={ite == '新品' || ite == '热门' ? (ite == '新品' ? styles.orangeSpan:styles.redSpan) : styles.blueSpan}>
{ ite =='新品' && <img src={require("../../assets/image/label-newProduct.png")} alt=""/>}
{ ite =='热门' && <img src={require("../../assets/image/label-hot.png")} alt=""/>}
{ (ite !='新品' && ite !='热门') && <div><b style={{fontWeight:'lighter'}}>{ite}</b></div> }
</span>
)
})} })}
</div> </div>
......
import React from 'react'; import React from 'react';
import { SwipeAction } from 'antd-mobile'; import { SwipeAction } from 'antd-mobile';
import $ from 'jquery'; import $ from 'jquery';
import { sortArr } from '../../utils/dataFilter'; import { sortArr } from '../../utils/dataFilter';
import Iscroll from "../../components/Iscroll";
import css from './css.less'; import css from './css.less';
class MemberList extends React.Component{ class MemberList extends React.Component{
constructor(props) { constructor(props) {
super(props); super(props);
...@@ -14,13 +15,12 @@ class MemberList extends React.Component{ ...@@ -14,13 +15,12 @@ class MemberList extends React.Component{
letters: ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','#'] letters: ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','#']
} }
} }
swipeBack(el, i) { swipeBack(el, i) {
$(el).find('.am-swipe-cover, .am-swipe-content').css('left', 0); $(el).find('.am-swipe-cover, .am-swipe-content').css('left', 0);
} }
//绑定子组件scroll得方法
maoPointRef = (ref) => {
this.child = ref;
}
render() { render() {
const { dataList, pTitle, showActionSheet, chooseClient, handleAction, renderItem, renderType, filterData, handleEdit,isCheckClientStateForSwipe } = this.props; const { dataList, pTitle, showActionSheet, chooseClient, handleAction, renderItem, renderType, filterData, handleEdit,isCheckClientStateForSwipe } = this.props;
const list = sortArr(dataList, renderType); const list = sortArr(dataList, renderType);
...@@ -37,17 +37,11 @@ class MemberList extends React.Component{ ...@@ -37,17 +37,11 @@ class MemberList extends React.Component{
placeholder={"请输入" + pTitle + "姓名"} /> placeholder={"请输入" + pTitle + "姓名"} />
</div> </div>
<div className={css.subTip}>所有{pTitle}<i>({dataList.length}人)</i></div> <div className={css.subTip}>所有{pTitle}<i>({dataList.length}人)</i></div>
<div className={css.scrollListWrap} style={{height:this.props.height ? this.props.height : '66vh'}} ref={el=>this.nameList=el}> <div className={css.scrollListWrap} ref={el=>this.nameList=el}>
<Iscroll id={"memberList_"+this.props.id}
iscrollOptions={{
probeType:2
}}
onRef={this.maoPointRef}
>
<div className={css.list}> <div className={css.list}>
{ {
list.length>0 && list.map((itm, index) => { list.length>0 && list.map((itm, index) => {
return <dl key={index} id={'list'+itm.letter} ref={el=>this['list'+itm.letter]=el} > return <dl key={index} ref={el=>this['list'+itm.letter]=el} >
<dt>{itm.letter}</dt> <dt>{itm.letter}</dt>
{ {
itm.list.map((item, i) => { itm.list.map((item, i) => {
...@@ -59,8 +53,7 @@ class MemberList extends React.Component{ ...@@ -59,8 +53,7 @@ class MemberList extends React.Component{
if (chooseClient) { if (chooseClient) {
chooseClient(item); chooseClient(item);
} }
}}> }}><SwipeAction
<SwipeAction
disabled={disabled||!isf} disabled={disabled||!isf}
right={[ right={[
{ {
...@@ -95,22 +88,19 @@ class MemberList extends React.Component{ ...@@ -95,22 +88,19 @@ class MemberList extends React.Component{
}) })
} }
</div> </div>
</Iscroll>
</div> </div>
{ {
// 是否有选择操作 // 是否有选择操作
showActionSheet && <div className={css.btnAdd} onClick={ showActionSheet }></div> showActionSheet && <div className={css.btnAdd} onClick={ showActionSheet }></div>
} }
<ul className={css.indexList} style={{height:this.props.height ? this.props.height : '69vh'}}> <ul className={css.indexList}>
{ {
// 右侧字母索引 // 右侧字母索引
this.state.letters.map((item,i) => { this.state.letters.map((item,i) => {
return <li key={i} onClick={() => { return <li key={i} onClick={() => {
for (let j = 0; j < list.length; j++){ for (let j = 0; j < list.length; j++){
if (list[j].letter === item) { if (list[j].letter === item) {
console.log('elementToTarget-->list',item) this['nameList'].scrollTop = this['list' + item].offsetTop;
this.child.elementToTarget('list' + item);
} }
} }
......
...@@ -6,9 +6,6 @@ ...@@ -6,9 +6,6 @@
position: absolute; position: absolute;
right: 0; right: 0;
top: .7rem; top: .7rem;
overflow-y: auto;
height: 69vh;
z-index:5;
li { li {
color: #666; color: #666;
...@@ -40,7 +37,7 @@ ...@@ -40,7 +37,7 @@
.btnAdd { .btnAdd {
position: fixed; position: fixed;
right: .3rem; right: .3rem;
bottom: .08rem; bottom: .1rem;
width: .6rem; width: .6rem;
height: .6rem; height: .6rem;
background: url(../../assets/image/add-user.png) no-repeat; background: url(../../assets/image/add-user.png) no-repeat;
...@@ -92,10 +89,8 @@ ...@@ -92,10 +89,8 @@
} }
.scrollListWrap { .scrollListWrap {
position:relative;
background: #f8f8f8; background: #f8f8f8;
height: 66vh; height: 70vh;
//height: calc(100vh - 190px);
overflow-y: scroll; overflow-y: scroll;
} }
...@@ -129,7 +124,6 @@ ...@@ -129,7 +124,6 @@
font-size: .15rem; font-size: .15rem;
background: #fff; background: #fff;
color: #101010; color: #101010;
padding-right: .15rem;
span { span {
float: none; float: none;
......
import React,{Component} from 'react'; import React,{Component} from 'react';
import { connect } from 'dva'; import { connect } from 'dva';
import { SwipeAction, List ,Modal} from 'antd-mobile'; import { SwipeAction, List } from 'antd-mobile';
import styles from "./swipeActive.css" import styles from "./swipeActive.css"
const alert = Modal.alert;
let alert2=null;
class SwipeActionExample extends Component{ class SwipeActionExample extends Component{
constructor(props){ constructor(props){
super(props); super(props);
...@@ -14,17 +12,20 @@ class SwipeActionExample extends Component{ ...@@ -14,17 +12,20 @@ class SwipeActionExample extends Component{
componentDidMount(){ componentDidMount(){
} }
componentWillUnmount(){
//如果弹框没有关闭则关闭
if(alert2){
alert2.close();
}
}
editor=(item)=>{ editor=(item)=>{
if(item.seriNo){ if(item.seriNo){
// this.props.goPlan(item)
/*this.props.dispatch(routerRedux.push({
pathname: '/planEditor',
query: {
seriNo:item.seriNo,
riskName:item.riskName,
},
}));*/
this.props.go1(item) this.props.go1(item)
} }
...@@ -36,19 +37,14 @@ class SwipeActionExample extends Component{ ...@@ -36,19 +37,14 @@ class SwipeActionExample extends Component{
} }
delete=(item)=>{ delete=(item)=>{
alert2 = alert('', '确定删除吗?', [ // 通讯录删除
{ text: '取消', onPress: () => {
return;
} },
{ text: '确定', onPress: () => {
if(this.props.client) { if(this.props.client) {
console.log(this.props.item.id); console.log(this.props.item.id);
this.props.delete(this.props.item.id) this.props.delete(this.props.item.id)
}else{ }else{
this.props.go(item) this.props.go(item)
} }
} },
])
} }
history=(item)=>{ history=(item)=>{
...@@ -63,7 +59,7 @@ class SwipeActionExample extends Component{ ...@@ -63,7 +59,7 @@ class SwipeActionExample extends Component{
disabled = {this.props.disabled} disabled = {this.props.disabled}
right={[ right={[
{ {
text: '编辑', text: '修改',
onPress: ()=>{ onPress: ()=>{
this.editor(this.props.item) this.editor(this.props.item)
}, },
...@@ -105,7 +101,7 @@ class SwipeActionExample extends Component{ ...@@ -105,7 +101,7 @@ class SwipeActionExample extends Component{
<div className={styles.top} style={{marginBottom:'.05rem'}}> <div className={styles.top} style={{marginBottom:'.05rem'}}>
<div className={styles.mytitle}>{this.props.item.riskName}</div> <div className={styles.mytitle}>{this.props.item.riskName}</div>
</div> </div>
<div className={styles.detail}>{this.props.item.insSex == 'M'?'男':'女'} &nbsp;&nbsp; {this.props.item.insAge} &nbsp;&nbsp;&nbsp; 期缴保费:{this.props.item.prem}元 </div> <div className={styles.detail}>{this.props.item.insSex== 'M'?'男':'女'} &nbsp;&nbsp; {this.props.item.insAge} &nbsp;&nbsp;&nbsp; 期缴保费:{this.props.item.prem}元 </div>
<div className={styles.detail2}>制作时间:{this.props.item.createTime}</div> <div className={styles.detail2}>制作时间:{this.props.item.createTime}</div>
</div> </div>
</div>} </div>}
...@@ -119,4 +115,6 @@ class SwipeActionExample extends Component{ ...@@ -119,4 +115,6 @@ class SwipeActionExample extends Component{
) )
} }
} }
// export default withRouter(SwipeActionExample)
export default connect(({home})=>({home}))(SwipeActionExample) export default connect(({home})=>({home}))(SwipeActionExample)
// (Form.create()(History))
...@@ -66,6 +66,4 @@ ...@@ -66,6 +66,4 @@
background: none !important; background: none !important;
} }
:global(.am-modal-transparent .am-modal-content){
padding-top: 15px;
}
:global(ul.slider-list){
height:1.4rem !important;
}
:global(.ant-carousel .slick-dots){
position: absolute;
/*bottom: 50px;*/
}
...@@ -22,7 +22,9 @@ import styles from "./Swiper.css" ...@@ -22,7 +22,9 @@ import styles from "./Swiper.css"
payload: { payload: {
"bannerName":"", "bannerName":"",
"bannerStatus":1, "bannerStatus":1,
"proId":localStorage.getItem("project"), "pageNo":1,
"pageSize":10,
"project":localStorage.getItem("project"),
"website":localStorage.getItem("website"), "website":localStorage.getItem("website"),
"orgId":localStorage.getItem("orgId"), "orgId":localStorage.getItem("orgId"),
}, },
...@@ -40,13 +42,12 @@ import styles from "./Swiper.css" ...@@ -40,13 +42,12 @@ import styles from "./Swiper.css"
storage.setItem("calculationMethod",item.bannerLabel) storage.setItem("calculationMethod",item.bannerLabel)
storage.setItem("selectd",1) storage.setItem("selectd",1)
storage.setItem("seriNo",'') storage.setItem("seriNo",'')
//storage.setItem("recipients",false) storage.setItem("recipients",false)
storage.setItem("riskIntroduce",'') storage.setItem("riskIntroduce",'')
// storage.setItem("thumbnail",item.bannerPath) storage.setItem("thumbnail",item.bannerPath)
storage.setItem("thumbnail",item.bannerUrl) storage.setItem("recipientsName",'')
//storage.setItem("recipientsName",'')
let roleId =localStorage.getItem("roleId"); let roleId =localStorage.getItem("roleId");
window.location.href= window.location.href.split('#')[0]+ '#/addplaneditor?riskName='+item.bannerName+'&riskCode='+item.bannerCode +'&calculationMethod='+ item.bannerLabel + '&riskIntroduce=&thumbnail='+item.bannerUrl+'&selectd=1&roleId='+ roleId +'&Id='+ localStorage.getItem('id') + '&seriNo=' window.location.href= window.location.href.split('#')[0]+ '#/addplaneditor?riskName='+item.bannerName+'&riskCode='+item.bannerCode +'&calculationMethod='+ item.bannerLabel + '&recipients=false&riskIntroduce=&thumbnail='+item.bannerPath+'&recipientsName=&selectd=1&roleId='+ roleId + '&seriNo='
} }
render(){ render(){
return ( return (
...@@ -74,7 +75,7 @@ import styles from "./Swiper.css" ...@@ -74,7 +75,7 @@ import styles from "./Swiper.css"
this.setState({ this.setState({
moveend: 0 moveend: 0
}) })
}} ><img src={item.bannerPath} alt="" style={{ width: '3.92rem',height:'1.8rem', borderRadius: '.12rem', }} }} ><img src={item.bannerPath} alt="" style={{ width: '3.92rem', borderRadius: '.12rem', }}
/> </div>) /> </div>)
})} })}
</Carousel> </Carousel>
......
...@@ -13,6 +13,103 @@ const EditableRow = ({ form, index, ...props }) => ( ...@@ -13,6 +13,103 @@ const EditableRow = ({ form, index, ...props }) => (
</EditableContext.Provider> </EditableContext.Provider>
); );
const EditableFormRow = Form.create()(EditableRow);
class EditableCell extends React.Component {
state = {
editing: false,
}
componentDidMount() {
if (this.props.editable) {
document.addEventListener('click', this.handleClickOutside, true);
}
}
/* componentWillUnmount() {
if (this.props.editable) {
document.removeEventListener('click', this.handleClickOutside, true);
}
}*/
toggleEdit = () => {
const editing = !this.state.editing;
this.setState({ editing }, () => {
if (editing) {
this.input.focus();
}
});
}
handleClickOutside = (e) => {
const { editing } = this.state;
if (editing && this.cell !== e.target && !this.cell.contains(e.target)) {
this.save();
}
}
save = () => {
const { record, handleSave } = this.props;
this.form.validateFields((error, values) => {
if (error) {
return;
}
this.toggleEdit();
handleSave({ ...record, ...values });
});
}
render() {
const { editing } = this.state;
const {
// editable,
// dataIndex,
// title,
// record,
// index,
// handleSave,
...restProps
} = this.props;
return (
<td ref={node => (this.cell = node)} {...restProps}>
{/*{editable ? (*/}
{/*<EditableContext.Consumer>*/}
{/*{(form) => {*/}
{/*this.form = form;*/}
{/*return (*/}
{/*editing ? (*/}
{/*<FormItem style={{ margin: 0 }}>*/}
{/*{form.getFieldDecorator(dataIndex, {*/}
{/*rules: [{*/}
{/*required: true,*/}
{/*message: `${title} is required.`,*/}
{/*}],*/}
{/*initialValue: record[dataIndex],*/}
{/*})(*/}
{/*<Input*/}
{/*ref={node => (this.input = node)}*/}
{/*onPressEnter={this.save}*/}
{/*/>*/}
{/*)}*/}
{/*</FormItem>*/}
{/*) : (*/}
{/*<div*/}
{/*className="editable-cell-value-wrap"*/}
{/*style={{ paddingRight: 24 }}*/}
{/*onClick={this.toggleEdit}*/}
{/*>*/}
{/*{restProps.children}*/}
{/*</div>*/}
{/*)*/}
{/*);*/}
{/*}}*/}
{/*</EditableContext.Consumer>*/}
{/*) : restProps.children}*/}
</td>
);
}
}
export default class EditableTable extends React.Component { export default class EditableTable extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);
...@@ -45,12 +142,7 @@ export default class EditableTable extends React.Component { ...@@ -45,12 +142,7 @@ export default class EditableTable extends React.Component {
count: 2, count: 2,
}; };
} }
componentWillReceiveProps(nextProps){
this.setState({
dataSource:nextProps.listTable,
columns:nextProps.listTitle,
})
}
componentDidMount(){ componentDidMount(){
this.setState({ this.setState({
dataSource:this.props.listTable, dataSource:this.props.listTable,
......
...@@ -45,8 +45,6 @@ ...@@ -45,8 +45,6 @@
/* 我的客户 --- 无*/ /* 我的客户 --- 无*/
.clientless{ .clientless{
/*margin: auto;*/ /*margin: auto;*/
position: absolute;
height: 100%;
} }
.clientless> .client{ .clientless> .client{
width: 1.51rem; width: 1.51rem;
...@@ -60,11 +58,9 @@ ...@@ -60,11 +58,9 @@
margin-bottom: .02rem; margin-bottom: .02rem;
} }
.add{ .add{
position: absolute;
bottom: .32rem;
width: 3.5rem; width: 3.5rem;
height: 1.22rem; height: 1.22rem;
margin: 0 .32rem 0; margin: 1.8rem .32rem 0;
} }
...@@ -196,16 +192,26 @@ SwipeActionExample{ ...@@ -196,16 +192,26 @@ SwipeActionExample{
list-style: none; list-style: none;
} }
.btn_confirm{ .btn_confirm{
position: relative; /*width: 100%;*/
height: .7rem; /*height: 1rem;*/
top: .05rem;
} }
.btn_confirm>img{ .btn_confirm>img{
width: .6rem; width: .6rem;
height: .6rem; height: .6rem;
position: relative; /* margin: auto; */
position: absolute;
right: .2rem; right: .2rem;
float: right; bottom: .1rem;
}
.btn_confirm1>img{
width: .6rem;
height: .6rem;
/* margin: auto; */
position: absolute;
right: -4rem;
bottom: .1rem;
} }
...@@ -238,9 +244,5 @@ SwipeActionExample{ ...@@ -238,9 +244,5 @@ SwipeActionExample{
justify-content: center; justify-content: center;
background-color: #fff; background-color: #fff;
overflow: hidden; overflow: hidden;
min-height: 100%;
} }
/*:global(.am-list-line){*/
/*padding-left: 15px;*/
/*}*/
import React from "react";
export default class Select extends React.Component {
constructor(props) {
super(props);
this.state = {
projects: [],
value: 1
};
}
componentDidMount() {
console.log(this.props.list);
this.setState({
projects: this.props.list,
value: 1
});
}
handleClick() {
this.setState({
projects: [
{ id: 4, name: "水果" },
{ id: 5, name: "西瓜" },
{ id: 6, name: "哈哈哈" }
],
value: 4
});
}
handleChange = e => {
this.setState({
value: e.target.value
});
this.props.changeValue(e.target.value)
console.log(e.target.value);
};
render() {
let projects = this.state.projects;
return (
<div>
<select
value={this.state.value}
onChange={this.handleChange}
>
{projects.length > 0 &&
projects.map((item, i) => {
return (
<option key={i} value={item.name}>
{item.name}
</option>
);
})}
</select>
</div>
);
}
}
...@@ -3,19 +3,17 @@ ...@@ -3,19 +3,17 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no">
<title>&nbsp;</title> <title>华夏O2O</title>
<meta http-equiv="pragma" content="no-cache"> <meta http-equiv="pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate"> <meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
<meta http-equiv="expires" content="0"> <meta http-equiv="expires" content="0">
</head> </head>
<body> <body>
<script type="text/javascript">
document.title='\u200E';//设置title为空
</script>
<script type="text/javascript" src="https://api.map.baidu.com/api?v=3.0&ak=kbGgAESiajyhOwzTsjcACyXlDtvoMBp8"></script>
<div id="root"></div> <div id="root"></div>
<script src="https://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script> <script src="https://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
<script src="https://zmt.ihxlife.com/pdf.js"></script> <script src="https://zmt.ihxlife.com/pdf.js"></script>
<script src="https://zmt.ihxlife.com/pdf.worker.js"></script> <script src="https://zmt.ihxlife.com/pdf.worker.js"></script>
</body> </body>
</html> </html>
...@@ -19,17 +19,12 @@ app.model(require('./models/poster').default); ...@@ -19,17 +19,12 @@ app.model(require('./models/poster').default);
app.model(require('./models/databank').default); app.model(require('./models/databank').default);
app.model(require('./models/GovernorTraining').default); app.model(require('./models/GovernorTraining').default);
app.model(require('./models/getCode').default); app.model(require('./models/getCode').default);
app.model(require('./models/Performance').default); app.model(require('./models/Performance').default)
app.model(require('./models/Invitation').default);
app.model(require('./models/infoCenter').default);
app.model(require('./models/BusinessCard').default);
app.model(require('./models/industrynews').default);
app.model(require('./models/exchangeCommunity').default);
app.model(require('./models/myCenter').default);
// 4. Router // 4. Router
app.router(require('./router').default); app.router(require('./router').default);
// 5. Start // 5. Start
app.start('#root'); app.start('#root');
......
import {policyList,performList,achievementRank} from '../services/performance'; import { notifyError } from '../services/app.js';
import {policyList,performList} from '../services/performance';
import {Toast} from "antd-mobile" import {Toast} from "antd-mobile"
export default { export default {
namespace: 'Performance', namespace: 'Performance',
...@@ -12,6 +13,7 @@ export default { ...@@ -12,6 +13,7 @@ export default {
if (callback) callback(data.data); if (callback) callback(data.data);
} else { } else {
error && error(data) error && error(data)
// notifyError(data.message);
} }
}, },
*performList({ payload, callback, error}, { call, put }) { *performList({ payload, callback, error}, { call, put }) {
...@@ -22,14 +24,6 @@ export default { ...@@ -22,14 +24,6 @@ export default {
error&& error(data) error&& error(data)
} }
}, },
*achievementRank({ payload, callback, error}, { call, put }) {
const { data } = yield call(achievementRank, payload);
if (data.status === true) {
if (callback) callback(data.data);
} else {
error&& error(data)
}
}
}, },
reducers: { reducers: {
saveUser(state, { payload }) { saveUser(state, { payload }) {
......
import { notifyError } from '../services/app.js'; import { notifyError } from '../services/app.js';
import { addUser,Dictionaries,sendMaster,isFollow,followCustomer} from '../services/addUser'; import { addUser,Dictionaries,PremiumPaymentPeriod ,sendMaster,isFollow} from '../services/addUser';
...@@ -19,7 +19,6 @@ export default { ...@@ -19,7 +19,6 @@ export default {
} else { } else {
// if (error) callback(error); // if (error) callback(error);
if (error) error(data); if (error) error(data);
} }
}, },
*Dictionaries({ payload, callback }, { call, put }) { *Dictionaries({ payload, callback }, { call, put }) {
...@@ -31,21 +30,20 @@ export default { ...@@ -31,21 +30,20 @@ export default {
notifyError(data.message); notifyError(data.message);
} }
}, },
*PremiumPaymentPeriod({ payload, callback }, { call, put }) {
*sendMaster({ payload, callback,error }, { call, put }) {
console.log(payload); console.log(payload);
const { data } = yield call(sendMaster, payload); const { data } = yield call(PremiumPaymentPeriod, payload);
if (data.status) { if (data.status) {
if (callback) callback(data.data); if (callback) callback(data.data);
} else { } else {
if (error) error(data.data); notifyError(data.message);
// notifyError(data.message);
} }
}, },
*isFollow({ payload, callback,error }, { call, put }) {
*sendMaster({ payload, callback,error }, { call, put }) {
console.log(payload); console.log(payload);
const { data } = yield call(isFollow, payload); const { data } = yield call(sendMaster, payload);
if (data.status) { if (data.status) {
if (callback) callback(data.data); if (callback) callback(data.data);
} else { } else {
...@@ -54,15 +52,16 @@ export default { ...@@ -54,15 +52,16 @@ export default {
} }
}, },
*followCustomer({ payload, callback,error }, { call, put }) { *isFollow({ payload, callback,error }, { call, put }) {
console.log(payload); console.log(payload);
const { data } = yield call(followCustomer, payload); const { data } = yield call(isFollow, payload);
if (data.status) { if (data.status) {
if (callback) callback(data.data); if (callback) callback(data.data);
} else { } else {
if (error) error(data.data); if (error) error(data.data);
// notifyError(data.message);
} }
} },
......
import { notifyError } from '../services/app.js'; import { notifyError } from '../services/app.js';
import { getBanner,getPlanList,getMyPlan,getCustomerInfo,GetRoomList,getSearchList,setClickRecord} from '../services/home'; import { getBanner,getPlanList,getMyPlan,getMyPlanMessage,getCustomerInfo} from '../services/home';
export default { export default {
namespace: 'home', namespace: 'home',
state: { state: {
PersonalDetail:{}, PersonalDetail:{},
AllPlanList:[],
MyPlanList:[],
searchList:[]
}, },
effects: { effects: {
*getBanner({ payload, callback }, { call, put }) { *getBanner({ payload, callback }, { call, put }) {
...@@ -24,7 +25,6 @@ export default { ...@@ -24,7 +25,6 @@ export default {
const { data } = yield call(getPlanList, payload); const { data } = yield call(getPlanList, payload);
if (data.status === true) { if (data.status === true) {
if (callback) callback(data.data); if (callback) callback(data.data);
yield put({ type: 'updatePlanList' ,payload:{planList:data.data}});
} else { } else {
notifyError('退出失败!'); notifyError('退出失败!');
} }
...@@ -38,51 +38,33 @@ export default { ...@@ -38,51 +38,33 @@ export default {
// notifyError(data.message); // notifyError(data.message);
} }
}, },
*getCustomerInfo({ payload, callback }, { call, put }) { *getMyPlanMessage({ payload, callback }, { call, put }) {
const { data } = yield call(getCustomerInfo, payload); const { data } = yield call(getMyPlanMessage, payload);
if (callback) callback(data); if (data.status === true) {
}, yield put({
*getRoomList({ payload, callback }, { call, put }) { type: 'savePersonalDetail',
const { data } = yield call(GetRoomList, payload); payload: data.data,
if (data.code === 0) { });
if (callback) callback(data);
} else {
notifyError(data.message);
}
},
*getSearchList({ payload, callback }, { call, put }) {
const { data } = yield call(getSearchList, payload);
if (data.status) {
if (callback) callback(data.data); if (callback) callback(data.data);
yield put({ type: 'updateSearchList' ,payload:{searchList:data.data}});
} else { } else {
notifyError(data.message); notifyError(data.message);
} }
}, },
*setClickRecord({ payload, callback }, { call, put }) { *getCustomerInfo({ payload, callback }, { call, put }) {
const { data } = yield call(setClickRecord, payload); const { data } = yield call(getCustomerInfo, payload);
if (data.status) { if (callback) callback(data);
if (callback) callback(data.data); },
} else {
notifyError(data.message);
}
}
}, },
reducers: { reducers: {
savePersonalDetail(state, { payload }) { savePersonalDetail(state, { payload }) {
return { ...state, PersonalDetail: payload.microPlanInfo }; return { ...state, PersonalDetail: payload.microPlanInfo };
}, },
updatePlanList(state, { payload }){
return {
...state,
AllPlanList: payload.planList };
},
updateSearchList(state, { payload }){
return {
...state,
...payload };
}
}, },
subscriptions: { subscriptions: {
......
...@@ -21,7 +21,7 @@ export default { ...@@ -21,7 +21,7 @@ export default {
if (data.status === true) { if (data.status === true) {
if (callback) callback(data); if (callback) callback(data);
} else { } else {
notifyError(data.message); // notifyError(data.message);
} }
}, },
*Approve({ payload, callback }, { call, put }) { *Approve({ payload, callback }, { call, put }) {
......
import { notifyError } from '../services/app.js'; import { notifyError } from '../services/app.js';
import { getAllUser,deleteCustomer } from '../services/myUser'; import { getAllUser,deleteCustomer,GetRoomList } from '../services/myUser';
...@@ -16,14 +16,13 @@ export default { ...@@ -16,14 +16,13 @@ export default {
*getAllUser({ payload, callback }, { call, put }) { *getAllUser({ payload, callback }, { call, put }) {
const { data } = yield call(getAllUser, payload); const { data } = yield call(getAllUser, payload);
if (data.status === true) { if (data.status === true) {
if(data.data && data.data.length===1){ if(data.data.length===1){
yield put({ yield put({
type: 'saveUser', type: 'saveUser',
payload: data.data, payload: data.data,
}); });
} }
let dataList = data.data || []; if (callback) callback(data.data);
if (callback) callback(dataList);
} else { } else {
notifyError(data.message); notifyError(data.message);
} }
...@@ -36,6 +35,18 @@ export default { ...@@ -36,6 +35,18 @@ export default {
notifyError(data.message); notifyError(data.message);
} }
}, },
*getRoomList({ payload, callback }, { call, put }) {
const { data } = yield call(GetRoomList, payload);
if (data.code === 0) {
if (callback) callback(data);
} else {
notifyError(data.message);
}
},
}, },
reducers: { reducers: {
......
import { getMyPlanMessage,PlanClause,payInsurance,getProspectusaAditional,deletePlan,PremiumPaymentPeriod,addReceiveInfo} from '../services/planEditor';
import { notifyError } from '../services/app.js'; import { notifyError } from '../services/app.js';
import { PlanClause,payInsurance,getProspectusaAditional,deletePlan} from '../services/planEditor';
export default { export default {
namespace: 'planEditor', namespace: 'planEditor',
state: { state: {
userName: '', userName: '',
password: '', password: '',
termList:'',//产品条款
}, },
effects: { effects: {
// 计划书 获取险种信息
*getMyPlanMessage({ payload, callback }, { call, put }) {
const { data } = yield call(getMyPlanMessage, payload);
if (data.status === true) {
yield put({
type: 'savePersonalDetail',
payload: data.data,
});
if (callback) callback(data.data);
} else {
notifyError(data.message);
}
},
// 计划书查看条款 // 计划书查看条款
*PlanClause({ payload, callback ,error}, { call, put }) { *PlanClause({ payload, callback ,error}, { call, put }) {
const { data } = yield call(PlanClause, payload); const { data } = yield call(PlanClause, payload);
if (data.status) { if (data.status) {
if (callback) callback(data); if (callback) callback(data);
} else { } else {
// notifyError(data.message);
if (error) error(data); if (error) error(data);
} }
}, },
/* 编辑计划书--买入保险 */ /* 编辑计划书--买入保险 */
*payInsurance({ payload, callback,error }, { call, put }) { *payInsurance({ payload, callback,error }, { call, put }) {
console.log('8888888888888888888888888888 ----购买险种的参数---payInsurance------>',JSON.stringify(payload));
const { data } = yield call(payInsurance, payload); const { data } = yield call(payInsurance, payload);
if (data && data.status) { if (data && data.status) {
if (callback) callback(data); if (callback) callback(data);
} else { } else {
if (error) error(data); if (error) error(data);
// notifyErrorfyError(data.message);
} }
}, },
...@@ -51,9 +38,9 @@ export default { ...@@ -51,9 +38,9 @@ export default {
const { data } = yield call(getProspectusaAditional, payload); const { data } = yield call(getProspectusaAditional, payload);
if (data.status) { if (data.status) {
if (callback) callback(data); if (callback) callback(data);
yield put({ type: 'updateTermList' ,payload:{termList:data.data}});
} else { } else {
if (error) error(data); if (error) error(data);
// notifyError(data.message);
} }
}, },
...@@ -68,34 +55,8 @@ export default { ...@@ -68,34 +55,8 @@ export default {
if (error) error(data); if (error) error(data);
} }
}, },
/* 获取险种的缴费期间 */
*PremiumPaymentPeriod({ payload, callback }, { call, put }) {
console.log(payload);
const { data } = yield call(PremiumPaymentPeriod, payload);
if (data.status) {
if (callback) callback(data.data);
} else {
notifyError(data.message);
}
},
/* 更新收件人的信息 */
*addReceiveInfo({ payload, callback }, { call, put }) {
console.log(payload);
const { data } = yield call(addReceiveInfo, payload);
if (data.status) {
if (callback) callback(data.data);
} else {
notifyError(data.message);
}
},
}, },
reducers: { reducers: {
updateTermList(state,action){
return {
...state,
termList : action.payload.termList
}
}
}, },
subscriptions: { subscriptions: {
......
import { GetPosterList, GetPosterInfo } from "../services/poster"; import { GetPosterList } from '../services/poster';
export default { export default {
namespace: "poster", namespace: 'poster',
state: { state: {
// item: {}, // item: {},
}, },
effects: { effects: {
*getPosterList({ payload, callback }, { call, put }) { *getPosterList({ payload, callback }, { call, put }) {
const { data } = yield call(GetPosterList, payload); const { data } = yield call(GetPosterList, payload);
callback && callback(data); // console.log(data)
callback && callback(data)
// if (data.status == true) {
// console.log(data.data);
// if(data.data.length==1){
// yield put({
// type: 'saveUser',
// payload: data.data,
// });
// }
// console.log(666666);
// if (callback) callback(data.data);
// } else {
// notifyError('!');
// }
}, },
*getPosterInfo({ payload, callback, error }, { call, put }) {
const { data } = yield call(GetPosterInfo, payload);
if (data.status) {
callback && callback(data.data);
} else {
error && error(data);
}
}
}, },
reducers: { reducers: {
// saveUser(state, { payload }) { // saveUser(state, { payload }) {
// console.log(payload); // console.log(payload);
// return { ...state, item: payload }; // return { ...state, item: payload };
// }, // },
},
subscriptions: {
}, },
subscriptions: {}
}; };
...@@ -15,10 +15,7 @@ function RouterConfig({ history, app }) { ...@@ -15,10 +15,7 @@ function RouterConfig({ history, app }) {
app, app,
component: () => import('./routes/Home') component: () => import('./routes/Home')
}) })
const Search = dynamic({
app,
component: () => import('./routes/Home/search')
})
const Welcome = dynamic({ const Welcome = dynamic({
app, app,
component: () => import('./routes/Welcome') component: () => import('./routes/Welcome')
...@@ -40,6 +37,10 @@ function RouterConfig({ history, app }) { ...@@ -40,6 +37,10 @@ function RouterConfig({ history, app }) {
app, app,
component: () => import('./routes/ProspectusList') component: () => import('./routes/ProspectusList')
}) })
const PlanEditor = dynamic({
app,
component: () => import('./routes/PlanEditor')
})
const AddPlanEditor = dynamic({ const AddPlanEditor = dynamic({
app, app,
component: () => import('./routes/AddPlanEditor') component: () => import('./routes/AddPlanEditor')
...@@ -54,7 +55,7 @@ function RouterConfig({ history, app }) { ...@@ -54,7 +55,7 @@ function RouterConfig({ history, app }) {
}) })
const MyUser = dynamic({ const MyUser = dynamic({
app, app,
component: () => import('./routes/MyUser/index') component: () => import('./routes/MyUser')
}) })
const AddUser = dynamic({ const AddUser = dynamic({
app, app,
...@@ -104,77 +105,17 @@ function RouterConfig({ history, app }) { ...@@ -104,77 +105,17 @@ function RouterConfig({ history, app }) {
app, app,
component: () => import('./routes/Performance') component: () => import('./routes/Performance')
}) })
const MyRank = dynamic({
app,
component: () => import('./routes/MyRank')
})
const MyCenter = dynamic({
app,
component: () => import('./routes/MyCenter')
})
const Website = dynamic({
app,
component: () => import('./routes/MyCenter/websiteDetail')
})
const Invitation = dynamic({
app,
component: () => import('./routes/Invitation')
})
const InvtAddEdit = dynamic({
app,
component: () => import('./routes/Invitation/addEdit')
})
const InvtPreview = dynamic({
app,
component: () => import('./routes/Invitation/preview')
})
const InfoCenter = dynamic({
app,
component: () => import('./routes/InfoCenter')
})
const InfoCenterList = dynamic({
app,
component: () => import('./routes/InfoCenter/infoList')
})
const BusinessCard = dynamic({
app,
component: () => import('./routes/BusinessCard')
})
const BusinessCardAddEdit = dynamic({
app,
component: () => import('./routes/BusinessCard/addEdit')
})
const BusinessCardBackground = dynamic({
app,
component: () => import('./routes/BusinessCard/Background')
})
const IndustryNews = dynamic({
app,
component: () => import('./routes/industrynews')
})
const IndustryNewsDetail = dynamic({
app,
component: () => import('./routes/industrynews/detail')
})
const ExchangeCommunity = dynamic({
app,
component: () => import('./routes/ExchangeCommunity')
})
const QuestionDetail = dynamic({
app,
component: () => import('./routes/ExchangeCommunity/questionDetail')
})
return ( return (
<ConnectedRouter history={history}> <ConnectedRouter history={history}>
<Switch> <Switch>
<Route path="/" exact component={Login} /> <Route path="/" exact component={Login} />
<Route path="/welcome" exact component={Welcome} /> <Route path="/welcome" exact component={Welcome} />
<Route path="/home" exact component={Home} /> <Route path="/home" exact component={Home} />
<Route path="/search" exact component={Search} />
<Route path="/users" exact component={Users} /> <Route path="/users" exact component={Users} />
<Route path="/poster" exact component={Poster} /> <Route path="/poster" exact component={Poster} />
<Route path="/poster/info" exact component={PosterInfo} /> <Route path="/poster/info" exact component={PosterInfo} />
<Route path="/prospectusList" exact component={ProspectusList} /> <Route path="/prospectusList" exact component={ProspectusList} />
<Route path="/planEditor" exact component={PlanEditor} />
<Route path="/addPlanEditor" exact component={AddPlanEditor} /> <Route path="/addPlanEditor" exact component={AddPlanEditor} />
<Route path="/cover" exact component={Cover} /> <Route path="/cover" exact component={Cover} />
<Route path="/planResult" exact component={PlanResult} /> <Route path="/planResult" exact component={PlanResult} />
...@@ -190,22 +131,7 @@ function RouterConfig({ history, app }) { ...@@ -190,22 +131,7 @@ function RouterConfig({ history, app }) {
<Route path="/governortraining/addclient" exact component={GTAddClient} /> <Route path="/governortraining/addclient" exact component={GTAddClient} />
<Route path="/governortraining/chooseclient" exact component={GTChooseClient} /> <Route path="/governortraining/chooseclient" exact component={GTChooseClient} />
<Route path="/video/chooseclient" exact component={VideoChooseClient} /> <Route path="/video/chooseclient" exact component={VideoChooseClient} />
<Route path="/home/myCenter" exact component={MyCenter} /> <Route path="/home/performance" exact component={Performance}/>
<Route path="/home/myUser/website" exact component={Website} />
<Route path="/performance" exact component={Performance} />
<Route path="/myRank" exact component={MyRank} />
<Route path="/invitation" exact component={Invitation} />
<Route path="/invitation/addedit" exact component={InvtAddEdit} />
<Route path="/invitation/preview" exact component={InvtPreview} />
<Route path="/infocenter" exact component={InfoCenter} />
<Route path="/infocenter/list" exact component={InfoCenterList} />
<Route path="/businessCard" exact component={BusinessCard} />
<Route path="/businessCard/addedit" exact component={BusinessCardAddEdit} />
<Route path="/businessCard/cardBackground" exact component={BusinessCardBackground} />
<Route path="/industrynews" exact component={IndustryNews} />
<Route path="/industrynews/detail" exact component={IndustryNewsDetail} />
<Route path="/exchangeCommunity" exact component={ExchangeCommunity} />
<Route path="/exchangeCommunity/questionDetail" exact component={QuestionDetail} />
<Route path="*" render={() => <Redirect to="/" />} /> <Route path="*" render={() => <Redirect to="/" />} />
</Switch> </Switch>
</ConnectedRouter> </ConnectedRouter>
......
...@@ -105,7 +105,7 @@ body{ ...@@ -105,7 +105,7 @@ body{
width: .22rem; width: .22rem;
height: .2rem; height: .2rem;
position: absolute; position: absolute;
top: .14rem; top: .1rem;
right: 0; right: 0;
} }
...@@ -282,9 +282,6 @@ body{ ...@@ -282,9 +282,6 @@ body{
border-radius: 10px; border-radius: 10px;
color: white; color: white;
} }
.chakantiaokuan{
min-height: 20px
}
.choose>span{ .choose>span{
color: rgb(153, 153, 153); color: rgb(153, 153, 153);
...@@ -343,26 +340,6 @@ body{ ...@@ -343,26 +340,6 @@ body{
} }
:global(.am-modal-body ){ /*:global(.am-list-item .am-input-control input:disabled ){
overflow-x: hidden; color:black !important;
} }*/
.modal{
position: fixed;
margin-left: -2.07rem;
left: 50%;
width: 4.14rem;
max-width: 680px;
max-height: 6rem;
overflow-y: scroll;
overflow-x: hidden;
}
.inputDisabled{
background: none;
border: none !important;
font-size: 0.15rem;
-webkit-opacity:1;
opacity: 1;
color: #000;
-webkit-text-fill-color: #000;
}
...@@ -8,7 +8,7 @@ body{ ...@@ -8,7 +8,7 @@ body{
position: relative; position: relative;
width: 100%; width: 100%;
height: 100%; height: 100%;
/* padding-bottom: 1rem; */ padding-bottom: 1rem;
overflow-y: scroll; overflow-y: scroll;
} }
/* 列表 */ /* 列表 */
...@@ -133,6 +133,7 @@ input:disabled{ ...@@ -133,6 +133,7 @@ input:disabled{
.label{ .label{
padding: 0 0 0 0.12rem; padding: 0 0 0 0.12rem;
/* position: absolute; */
} }
.label>img{ .label>img{
...@@ -195,7 +196,6 @@ input:disabled{ ...@@ -195,7 +196,6 @@ input:disabled{
position: fixed; position: fixed;
bottom: 0; bottom: 0;
padding-left: .11rem; padding-left: .11rem;
z-index: 5;
} }
.bottom>.right{ .bottom>.right{
width: 100%; width: 100%;
...@@ -230,10 +230,3 @@ input:disabled{ ...@@ -230,10 +230,3 @@ input:disabled{
.black{ .black{
color:#000 !important; color:#000 !important;
} }
:global(.am-list-item .am-input-control input:disabled){
color: #000 !important;
opacity: 1;
-webkit-opacity:1;
-webkit-text-fill-color: #000;
}
...@@ -756,12 +756,11 @@ let that = this; ...@@ -756,12 +756,11 @@ let that = this;
this.props.dispatch({ this.props.dispatch({
type:'planEditor/PremiumPaymentPeriod', type:'addUser/PremiumPaymentPeriod',
payload:{ payload:{
"riskCode":this.state.riskCode, "riskCode":this.state.riskCode,
"maxAge":this.state.age, "maxAge":this.state.age,
"pageNo":1, "pageNo":1
"mainCode": this.state.riskCode
}, },
callback(){ callback(){
......
...@@ -10,14 +10,10 @@ class Cover extends Component { ...@@ -10,14 +10,10 @@ class Cover extends Component {
} }
go = ()=>{ go = ()=>{
this.props.history.push('/planResult') this.props.history.push('/planResult')
// let seriNo = localStorage.getItem("seriNo") let seriNo = localStorage.getItem("seriNo")
// let riskName = localStorage.getItem("riskName") let riskName = localStorage.getItem("riskName")
// let riskCode = localStorage.getItem("riskCode") let riskCode = localStorage.getItem("riskCode")
// let thumbnail = localStorage.getItem("thumbnail") let thumbnail = localStorage.getItem("thumbnail")
let seriNo = sessionStorage.getItem("seriNo")
let riskName = sessionStorage.getItem("riskName")
let riskCode = sessionStorage.getItem("riskCode")
let thumbnail = sessionStorage.getItem("thumbnail")
window.location.href = window.location.href.split('#')[0]+'#/planResult?seriNo='+seriNo+'&riskName='+riskName +'&riskCode='+riskCode+'&thumbnail='+thumbnail window.location.href = window.location.href.split('#')[0]+'#/planResult?seriNo='+seriNo+'&riskName='+riskName +'&riskCode='+riskCode+'&thumbnail='+thumbnail
} }
......
...@@ -15,7 +15,6 @@ class DataBank extends Component { ...@@ -15,7 +15,6 @@ class DataBank extends Component {
} }
componentDidMount() { componentDidMount() {
sessionStorage.clear();
document.title = '资料库' document.title = '资料库'
const _this = this; const _this = this;
shareHide(); shareHide();
...@@ -23,7 +22,7 @@ class DataBank extends Component { ...@@ -23,7 +22,7 @@ class DataBank extends Component {
this.props.dispatch({ this.props.dispatch({
type: 'databank/getDataBankList', type: 'databank/getDataBankList',
payload: { payload: {
"configType": "prospectus", configType: 'prospectus'
}, },
callback(res) { callback(res) {
if (res.status && res.data.length > 0) { if (res.status && res.data.length > 0) {
......
...@@ -21,7 +21,6 @@ class InfoList extends Component { ...@@ -21,7 +21,6 @@ class InfoList extends Component {
const { search } = this.props.location; const { search } = this.props.location;
const _this = this; const _this = this;
let key = Number(sessionStorage.getItem('key'));
shareHide(); shareHide();
Toast.loading('loading...'); Toast.loading('loading...');
if (search) { if (search) {
...@@ -44,7 +43,7 @@ class InfoList extends Component { ...@@ -44,7 +43,7 @@ class InfoList extends Component {
type: 'databank/getDataInfoList', type: 'databank/getDataInfoList',
payload: { payload: {
productId: riskCode, productId: riskCode,
dataType: data[key].configCode, dataType: data[0].configCode,
orgId: window.localStorage.getItem('orgId'), orgId: window.localStorage.getItem('orgId'),
proId: window.localStorage.getItem('project') proId: window.localStorage.getItem('project')
}, },
...@@ -87,10 +86,6 @@ class InfoList extends Component { ...@@ -87,10 +86,6 @@ class InfoList extends Component {
render() { render() {
let chooseIdx = 0;
if(sessionStorage.getItem("key")){
chooseIdx = Number(sessionStorage.getItem("key"))
}
const { dataList } = this.state; const { dataList } = this.state;
return ( return (
<Fragment> <Fragment>
...@@ -98,12 +93,11 @@ class InfoList extends Component { ...@@ -98,12 +93,11 @@ class InfoList extends Component {
<div className={css.pTagList}> <div className={css.pTagList}>
<ul> <ul>
{ {
this.state.filter.length > 0 && this.state.filter.map((el, i) => <li key={i} className={chooseIdx === i ? 'on' : ''} onClick={() => { this.state.filter.length > 0 && this.state.filter.map((el, i) => <li key={i} className={this.state.chooseIdx === i ? 'on' : ''} onClick={() => {
this.filterData(el.configCode) this.filterData(el.configCode)
this.setState({ this.setState({
chooseIdx: i chooseIdx: i
}) })
sessionStorage.setItem( "key", i);
}}>{el.configName}</li>) }}>{el.configName}</li>)
} }
</ul> </ul>
...@@ -129,19 +123,6 @@ class InfoList extends Component { ...@@ -129,19 +123,6 @@ class InfoList extends Component {
if(/xls|xlsx/i.test(el.dataFormat)) type = 'excel'; if(/xls|xlsx/i.test(el.dataFormat)) type = 'excel';
return <li key={i} className={type} onClick={() => { return <li key={i} className={type} onClick={() => {
//记录点击数
this.props.dispatch({
type:"home/setClickRecord",
payload: {
"operCode": el.dataCode,
"operFunction": 100100,
"operTitle": el.dataName,
"operType": 201,
},
callback(data){
console.log('资料库点击一次')
}
});
if (type === 'pdf') { if (type === 'pdf') {
window.location.href = el.dataPath window.location.href = el.dataPath
} else if (/doc|docx|xls|xlsx|ppt|pptx/i.test(el.dataFormat)) { } else if (/doc|docx|xls|xlsx|ppt|pptx/i.test(el.dataFormat)) {
......
...@@ -8,13 +8,7 @@ class Preview extends Component { ...@@ -8,13 +8,7 @@ class Preview extends Component {
super() super()
this.state={ } this.state={ }
} }
componentDidMount(){
if(this.videoElement){//解决ios自动全屏问题
this.videoElement.setAttribute('webkit-playsinline', 'true');// Fix fullscreen problem on IOS 8 and 9
this.videoElement.setAttribute('playsinline', 'true'); // Fix fullscreen problem on IOS 10
this.videoElement.setAttribute('x5-playsinline', 'true'); // Fix fullscreen problem on IOS 10
}
}
render() { render() {
const { state } = this.props.location; const { state } = this.props.location;
let fileType = ''; let fileType = '';
...@@ -34,9 +28,7 @@ class Preview extends Component { ...@@ -34,9 +28,7 @@ class Preview extends Component {
// </iframe> // </iframe>
} }
{ {
(fileType==='mp4') && ( (fileType==='mp4') && <video width="100%" autoPlay src={state.url}></video>
<video width="100%" style={{background:'black'}} ref={(node) =>{this.videoElement = node}} src={state.url} controls ></video>
)
} }
</div> </div>
) )
......
...@@ -7,7 +7,6 @@ import { dataFilter } from '../../utils/dataFilter'; ...@@ -7,7 +7,6 @@ import { dataFilter } from '../../utils/dataFilter';
import shareHide from "../../utils/shareHide"; import shareHide from "../../utils/shareHide";
import css from './css.less'; import css from './css.less';
const stateName = ['未提交','已提交','已提交','已提交','已成单','已上传','跟进中','停止跟进']
class Audit extends Component{ class Audit extends Component{
constructor(props) { constructor(props) {
super(props); super(props);
...@@ -24,11 +23,9 @@ class Audit extends Component{ ...@@ -24,11 +23,9 @@ class Audit extends Component{
} }
componentDidMount() { componentDidMount() {
document.title = '我的客户';
shareHide(); shareHide();
// Toast.loading('loading...', 88); Toast.loading('loading...', 88);
this.getClientUnpassList(); this.getClientUnpassList();
// this.getClientPassedList();
} }
getClientPassedList() { getClientPassedList() {
...@@ -60,7 +57,7 @@ class Audit extends Component{ ...@@ -60,7 +57,7 @@ class Audit extends Component{
type: 'governortraining/getClientList', type: 'governortraining/getClientList',
payload: { payload: {
id: window.localStorage.getItem("id"), id: window.localStorage.getItem("id"),
// auditedState: 0 auditedState: 0
}, },
callback(res) { callback(res) {
if (res.status) { if (res.status) {
...@@ -78,32 +75,36 @@ class Audit extends Component{ ...@@ -78,32 +75,36 @@ class Audit extends Component{
chooseClient(pass, item) { chooseClient(pass, item) {
localStorage.setItem('auditClientInfo', JSON.stringify({ ...item, isShowPassedInfo: pass })); localStorage.setItem('auditClientInfo', JSON.stringify({ ...item, isShowPassedInfo: pass }));
// this.props.dispatch(routerRedux.push({ this.props.dispatch(routerRedux.push({
// pathname: '/governortraining/auditinfo' pathname: '/governortraining/auditinfo'
// })); }));
this.props.history.push({pathname: '/governortraining/auditinfo'})
} }
render() { render() {
return <div className={css.auditWrap}> return <div className={css.auditWrap}>
<Tabs
tabs={[{ title: '未审核', sub: '1' }, { title: '已审核', sub: '2' }]}
// page={1}
onChange={(t, i) => {
if (i === 0 && this.state.clientList.length === 0) { this.getClientUnpassList(); } else if (this.state.cientListed.length === 0){
this.getClientPassedList();
}
}}
>
<div> <div>
{ {
this.state.clientList.length === 0 && this.state.show1 && ( this.state.clientList.length === 0 && this.state.show1 && < div >
<div>
<div className={css.splitline}></div> <div className={css.splitline}></div>
<div className={css.noData}> <div className={css.noData}>
<div className={css.img}></div> <div className={css.img}></div>
当前无数据 您当前客户均已审核完毕
</div> </div>
</div> </div>
)
} }
{ this.state.clientList.length>0 && this.state.show1 && <MemberList { this.state.clientList.length>0 && this.state.show1 && <MemberList
id="audit"
height='86vh'
dataList={this.state.storeclientList} dataList={this.state.storeclientList}
renderType={['name']} renderType={['name']}
filterData={(keywords) => { filterData={(keywords) => {
...@@ -114,14 +115,64 @@ class Audit extends Component{ ...@@ -114,14 +115,64 @@ class Audit extends Component{
}} }}
renderItem={item => { renderItem={item => {
return <div className={css.clientItem}> return <div className={css.clientItem}>
<span className={css.name}>{item.name}</span> <span className={css.name}>{item.name}</span><span className={css.time}>{item.createTime.substr(0,16)}</span>
<span className={css.time}>{item.commitTime ? item.commitTime.substr(0,16) : ""}</span>
<span className={css.status}>{stateName[item.currentState]}</span>
</div> </div>
}} }}
chooseClient={this.chooseClient.bind(this,false)} chooseClient={this.chooseClient.bind(this,false)}
pTitle='客户' />} pTitle='未审核客户' />}
</div>
<div>
{
this.state.cientListed.length === 0 && this.state.show && < div >
<div className={css.splitline}></div>
<div className={css.noData}>
<div className={css.img}></div>
您当前没有已审核客户
</div>
</div>
}
{this.state.cientListed.length>0 && this.state.show && <MemberList
dataList={this.state.storecientListed}
renderType={['name']}
chooseClient={this.chooseClient.bind(this,true)}
filterData={(keywords) => {
this.setState({
storecientListed: dataFilter(this.state.cientListed, ['name'], keywords)
})
}}
renderItem={item => {
let status = '';
switch (item.currentState) {
case '2':
status = '审核退回';
break;
case '3':
status = '审核通过';
break;
case '4':
status = '已成单';
break;
case '5':
status = '已上传';
break;
case '6':
status = '跟进中';
break;
case '7':
status = '停止跟进';
break;
default:
}
return <div className={css.clientItem}>
<span className={css.name}>{item.name}</span>
<span className={css.time}>{item.createTime.substr(0, 16)}</span>
<span className={css.status}>{status}</span>
</div>
}}
pTitle='已审核客户' />}
</div> </div>
</Tabs>
</div> </div>
} }
} }
......
...@@ -3,21 +3,14 @@ import { connect } from 'dva'; ...@@ -3,21 +3,14 @@ import { connect } from 'dva';
import { routerRedux } from 'dva/router'; import { routerRedux } from 'dva/router';
import ConfirmPop from '../../components/Modal/confirmPop'; import ConfirmPop from '../../components/Modal/confirmPop';
import shareHide from "../../utils/shareHide"; import shareHide from "../../utils/shareHide";
import css from './css.less'; import css from './css.less';
let isIPhone = new RegExp('\\biPhone\\b|\\biPod\\b', 'i').test(window.navigator.userAgent);
let moneyKeyboardWrapProps = '';
if (isIPhone) {
moneyKeyboardWrapProps = {
onTouchStart: e => e.preventDefault(),
};
}
const stateName = ['未提交','已提交','已提交','已提交','已成单','已上传','跟进中','停止跟进']
class ClientInfo extends Component { class ClientInfo extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
dataList: null, dataList: [],
isShowTips: false, isShowTips: false,
tit: '', tit: '',
isPass: false, isPass: false,
...@@ -26,13 +19,14 @@ class ClientInfo extends Component { ...@@ -26,13 +19,14 @@ class ClientInfo extends Component {
} }
componentDidMount() { componentDidMount() {
document.title = '客户信息';
const auditInfo = JSON.parse(localStorage.getItem('auditClientInfo')); const auditInfo = JSON.parse(localStorage.getItem('auditClientInfo'));
shareHide(); shareHide();
if (auditInfo) { if (auditInfo) {
this.setState({ this.setState({
dataList: auditInfo dataList: auditInfo
}) })
} else {
// this.props.dispatch(routerRedux.push('/governortraining/audit'));
} }
} }
handlePass(item) { handlePass(item) {
...@@ -68,11 +62,13 @@ class ClientInfo extends Component { ...@@ -68,11 +62,13 @@ class ClientInfo extends Component {
render(){ render(){
let labels = []; let labels = [];
const { dataList } = this.state; const { dataList } = this.state;
if(!dataList){ if (dataList.label && dataList.label !== '') {
return <div/> labels = dataList.label.split(',');
} }
return ( return (
<div className={css.clientInfoBox}> <div className={css.clientInfoBox}>
{
dataList && <div>
<ul className={css.itemBox}> <ul className={css.itemBox}>
<li> <li>
<span className={css.label}>姓名</span> <span className={css.label}>姓名</span>
...@@ -85,18 +81,103 @@ class ClientInfo extends Component { ...@@ -85,18 +81,103 @@ class ClientInfo extends Component {
}</span> }</span>
</li> </li>
<li> <li>
<span className={css.label}>提交时间</span> <span className={css.label}>年龄</span>
<span className={css.value}>{dataList.commitTime ? dataList.commitTime.substr(0,16) : ""}</span> <span className={css.value}>{dataList.age}</span>
</li>
<li>
<span className={css.label}>手机号码</span>
<span className={css.value}>{dataList.number}</span>
</li>
<li>
<span className={css.label}>婚姻状况</span>
<span className={css.value}>{dataList.maritalStatus}</span>
</li>
<li>
<span className={css.label}>学历</span>
<span className={css.value}>{dataList.education}</span>
</li>
</ul>
<ul className={css.itemBox}>
<li>
<span className={css.label}>职业类型</span>
<span className={css.value}>{dataList.occupational}</span>
</li>
<li>
<span className={css.label}>年收入(万元)</span>
<span className={css.value}>{dataList.annualIncome}</span>
</li>
</ul>
<ul className={css.itemBox}>
<li>
<span className={css.label}>所在省市</span>
<span className={css.value}>{dataList.province}</span>
</li>
<li>
<span className={css.label}>详细地址</span>
<span className={css.value}>{dataList.address}</span>
</li> </li>
</ul>
<ul className={css.itemBox}>
<li> <li>
<span className={css.label}>跟进情况</span> <span className={css.label}>希望购买产品</span>
<span className={css.value}>{stateName[dataList.currentState]}</span> <span className={css.value}>{dataList.product}</span>
</li> </li>
<li> <li>
<span className={css.label}>所属客户经理</span> <span className={css.label}>缴费期间</span>
<span className={css.value}>{dataList.managerName}</span> <span className={css.value}>{dataList.payment}</span>
</li>
<li>
<span className={css.label}>缴费频次</span>
<span className={css.value}>{dataList.frequency}</span>
</li>
<li>
<span className={css.label}>保额</span>
<span className={css.value}>{dataList.insuredAmount}</span>
</li> </li>
</ul> </ul>
{labels.length>0 && <div className={css.clientLabels}>
<div className={css.tit}><span>客户标签</span></div>
<p className={css.labels}>
{labels.map((el, i) => <span key={i}>{el}</span>)}
</p>
</div>}
</div>
}
{!dataList.isShowPassedInfo && <div className={css.footer}>
<div className={css.btn_reject} onClick={() => {
this.setState({
tit: '您是否确定驳回该客户信息?',
isShowTips: true,
isPass: false,
confirmTit:'驳回'
});
}}>驳回</div>
<div className={css.btn_passed} onClick={() => {
this.setState({
tit: '您是否确定通过该客户信息?',
isShowTips: true,
isPass: true,
confirmTit:'通过'
})
}}>通过</div>
</div>}
{dataList.isShowPassedInfo && <div className={css.footer}>
<div className={css.btn_passed} onClick={() => {
this.props.history.replace('/governortraining/audit');
}}>确定</div>
</div>}
<ConfirmPop show={this.state.isShowTips} title={this.state.confirmTit} handleOK={() => {
this.state.isPass ? this.handlePass(dataList) : this.handleReject(dataList);
this.setState({
isShowTips: false
})
}} handleCancel={() => {
this.setState({
isShowTips: false
})
}} >
<p>{this.state.tit}</p>
</ConfirmPop>
</div> </div>
) )
} }
......
...@@ -69,14 +69,10 @@ class ClientList extends Component { ...@@ -69,14 +69,10 @@ class ClientList extends Component {
} }
componentDidMount() { componentDidMount() {
document.title = '我的客户经理';
shareHide(); shareHide();
Toast.loading('loading...', 99); Toast.loading('loading...', 99);
this.getManagerList(); this.getManagerList();
} }
componentWillUnmount(){
ActionSheet.close();
}
render() { render() {
const _this = this; const _this = this;
return ( return (
...@@ -87,27 +83,22 @@ class ClientList extends Component { ...@@ -87,27 +83,22 @@ class ClientList extends Component {
您当前并无客户经理 您当前并无客户经理
</p> </p>
<p>点击下方按钮添加</p> <p>点击下方按钮添加</p>
<img src={require('../../assets/image/addUsers2.png')} alt="" className={css.add} onClick={() => { <img src={require('../../assets/image/addUsers.png')} alt="" className={css.add} onClick={() => {
this.showActionSheet() this.showActionSheet()
}} /> }} />
</div>} </div>}
{ {
(this.state.managerList.length > 0) && this.state.show && < MemberList (this.state.managerList.length > 0) && this.state.show && < MemberList
height="74vh" dataList={this.state.managerList}
dataList={this.state.storeManagerList}
renderType={['name']} renderType={['name']}
filterData={(keywords) => { filterData={(keywords) => {
this.setState({ this.setState({
storeManagerList: dataFilter(this.state.managerList, ['name'], keywords) managerList: dataFilter(this.state.storeManagerList, ['name'], keywords)
}) })
}} }}
renderItem={item => { renderItem={item => {
return <div className={css.managerItem} onClick={()=>{ return <div className={css.managerItem}>
let governortrainingClient = {...item ,disabled2:true};
localStorage.setItem('governortrainingClient', JSON.stringify(governortrainingClient));
this.props.dispatch(routerRedux.push('/governortraining/addclient'));
}}>
<span className={css.name}>{item.name}</span><span className={css.time}>{item.number}</span> <span className={css.name}>{item.name}</span><span className={css.time}>{item.number}</span>
</div> </div>
}} }}
......
...@@ -14,14 +14,11 @@ span { ...@@ -14,14 +14,11 @@ span {
.clientless { .clientless {
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
.add{ .add {
position: absolute;
bottom: 1rem;
width: 3.5rem; width: 3.5rem;
//height: .7rem; height: 1.22rem;
margin: 0 .32rem 0; margin: 1.8rem .32rem;
} }
} }
.splitline { .splitline {
width: 100%; width: 100%;
...@@ -44,12 +41,10 @@ span { ...@@ -44,12 +41,10 @@ span {
.ac_wrap { .ac_wrap {
position: relative;
height: 100%; height: 100%;
background: #F8F8F8; background: #F8F8F8;
padding-top: .1rem; padding-top: .1rem;
overflow-y: auto; overflow-y: auto;
z-index:1;
.aclist_wrap { .aclist_wrap {
background: white; margin-bottom: .1rem; padding-left: .11rem; background: white; margin-bottom: .1rem; padding-left: .11rem;
span{ margin-right: 0;} span{ margin-right: 0;}
...@@ -162,13 +157,7 @@ span { ...@@ -162,13 +157,7 @@ span {
} }
} }
.clientInfoBox { .clientInfoBox {
position: fixed; padding-bottom:.8rem; overflow-y: auto; height: 100%;
width: 100%;
height:100%;
overflow: hidden;
background: #fff;
left:0;
top:0;
.itemBox{ .itemBox{
margin-top:.1rem; background:#fff; margin-top:.1rem; background:#fff;
li{ li{
...@@ -178,7 +167,7 @@ span { ...@@ -178,7 +167,7 @@ span {
width:1.23rem; position: relative; width:1.23rem; position: relative;
} }
.value{ .value{
color:#000; line-height: .21rem; margin: .15rem 0 .14rem; color:#666; line-height: .21rem; margin: .15rem 0 .14rem;
} }
&.require{ &.require{
position: relative; position: relative;
...@@ -252,9 +241,3 @@ span { ...@@ -252,9 +241,3 @@ span {
.label{ .label{
margin-right: 0; margin-right: 0;
} }
:global(.am-list-item .am-input-control input:disabled){
color: #000 !important;
opacity: 1;
-webkit-opacity:1;
-webkit-text-fill-color: #000;
}
\ No newline at end of file \ No newline at end of file
...@@ -18,34 +18,29 @@ body{ ...@@ -18,34 +18,29 @@ body{
} }
.search{ .search{
width: 3.8rem;
height: .32rem;
background-color: #F4F4F4;
border-radius: 25.6px;
margin: 0px auto 9.6px;
position: relative; position: relative;
width: 100%;
padding: .1rem .17rem;
z-index: 10;
top: 0;
} }
.search::before { .search img{
position: absolute; position: absolute;
margin:.09rem .15rem;
width: .15rem; width: .15rem;
height: .15rem; height: .15rem;
content: '';
background: url(../../assets/image/search.png) no-repeat;
background-size: 100%;
left: .35rem;
top: .19rem;
z-index: 10;
} }
.search input{ .search input{
box-sizing: border-box; position: absolute;
width: 100%;
border: none; border: none;
border-radius: .16rem; outline:none;
background: #F4F4F4; left: .4rem;
height: .32rem; top: 0.08rem;
line-height: .32rem; background-color: #F4F4F4;
padding: 0;
padding-left: .42rem;
font-size: .14rem; font-size: .14rem;
color: #999;
width:3.25rem ;
} }
/*content*/ /*content*/
...@@ -53,7 +48,7 @@ body{ ...@@ -53,7 +48,7 @@ body{
position: relative; position: relative;
width: 100%; width: 100%;
background-color: #F8F8F8; background-color: #F8F8F8;
/* padding-top: 16px; */ padding-top: 16px;
padding-bottom: .9rem; padding-bottom: .9rem;
...@@ -66,14 +61,6 @@ body{ ...@@ -66,14 +61,6 @@ body{
overflow: hidden; overflow: hidden;
margin: 0 auto; margin: 0 auto;
} }
.content > .banner :global(ul.slider-list){
height:1.4rem !important;
}
.content > .banner :global(.ant-carousel .slick-dots){
position: absolute;
/*bottom: 50px;*/
}
/* UI的1.6倍*/ /* UI的1.6倍*/
...@@ -81,15 +68,12 @@ body{ ...@@ -81,15 +68,12 @@ body{
.nav{ .nav{
display: flex; display: flex;
font-size: 0.18rem; font-size: 0.18rem;
margin: .2rem 0; margin: .32rem 0;
flex-wrap: wrap;
} }
.module{ .module{
text-align: center; text-align: center;
/* flex: 1; */ flex: 1;
width: 25%;
margin-bottom: 0.15rem;
} }
.module>img{ .module>img{
width: .5rem; width: .5rem;
...@@ -105,8 +89,8 @@ body{ ...@@ -105,8 +89,8 @@ body{
.planList{ .planList{
width: 3.92rem; width: 3.92rem;
background-color: white; background-color: white;
/* border-radius: 16px; */ border-radius: 16px;
margin: 0 auto .4rem ; margin: 0 auto .8rem ;
} }
.planList > div >p { .planList > div >p {
...@@ -128,7 +112,7 @@ body{ ...@@ -128,7 +112,7 @@ body{
height: 100%; height: 100%;
} }
.right{ .right{
width: 2.9rem; width: 2.8rem;
height: .8rem; height: .8rem;
float: right; float: right;
position: relative; position: relative;
...@@ -157,22 +141,6 @@ body{ ...@@ -157,22 +141,6 @@ body{
width: .34rem; width: .34rem;
height: .18rem; height: .18rem;
} }
.blueSpan{
float: right;
margin-right: .1rem;
}
.blueSpan>div{
background-color: #8ec5f3;
font-size: .15rem;
width: .4rem;
height: .2rem;
line-height: .2rem;
margin-top: .03rem;
text-align: center;
color: white;
border-radius: 5px;
transform: scale(0.9);
}
.label{ .label{
display: inline-block; display: inline-block;
float: right; float: right;
...@@ -181,7 +149,7 @@ body{ ...@@ -181,7 +149,7 @@ body{
top: 0; top: 0;
right: 0; right: 0;
} }
.planList span{ span{
margin-right: .1rem; margin-right: .1rem;
float: right; float: right;
} }
...@@ -243,7 +211,7 @@ body{ ...@@ -243,7 +211,7 @@ body{
.codeWrap{ .codeWrap{
/* background:#FF9D5C; */ /* background:#FF9D5C; */
} }
:global(.codeWrap .am-modal-transparent .am-modal-content){ :global(.am-modal-transparent .am-modal-content){
padding:0; padding:0;
} }
:global(.am-modal-close){ :global(.am-modal-close){
...@@ -255,140 +223,3 @@ body{ ...@@ -255,140 +223,3 @@ body{
:global(.am-wingblank.am-wingblank-lg){ :global(.am-wingblank.am-wingblank-lg){
margin: 0; margin: 0;
} }
/*消息中心*/
.infolist{
display: flex;
width: 3.92rem;
background-color: white;
border-top-left-radius: 16px;
border-top-right-radius: 16px;
border-bottom: 1px solid #F8F8F8;
margin: 0 auto;
}
.infolist .carousel_item {
height: 36px;
line-height: 36px;
padding-left: 10px;
background-color: white;
color: #000000;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.infolist .newInfo{
position: relative;
color:#FB5150;
float: none;
margin: 0;
}
.infolist .arrowBtn{
width:.6rem;
line-height:36px;
text-align: right;
padding-right: .08rem;
}
/*站内搜索*/
.searchWarp{
width:100%;
height:100%;
}
.searchWarp .searchContent{
width: 100%;
height: calc(100vh - 44px);
}
.searchWarp .tabsContent{
display: flex;
justify-content: center;
background-color: #fff;
height: calc(100vh - 120px);
overflow-y: auto;
position: relative;
}
.searchWarp .tabsContent .tipsRight1{
background: url("../../assets/image/tips1.png");
background-size: cover;
}
.searchWarp .tabsContent .tipsRight2{
background: url("../../assets/image/tips2.png");
background-size: cover;
}
.searchWarp .tabsContent .tipsRight3{
background: url("../../assets/image/tips3.png");
background-size: cover;
}
.searchWarp .tabsContent .tipsRight4{
background: url("../../assets/image/tips4.png");
background-size: cover;
}
.searchWarp .tabsContent .tipsRight5{
background: url("../../assets/image/tips5.png");
background-size: cover;
}
.searchWarp .tabsContent .tipsRight1,.tipsRight2,.tipsRight3,.tipsRight4,.tipsRight5{
color: white;
display: inline;
padding: 5px;
border-radius: 10px;
font-size: 12px;
}
.searchContent .tabsHeader{
background: white;
padding: 10px 8px;
}
.searchContent .tabsHeader>button{
border-radius: 16px;
line-height: 24px;
padding: 5px 16px;
border: none;
background: white;
margin: 5px 8px;
cursor: pointer;
color: #101010;
border: 1px solid #e8e8e8;
font-size: .175rem;
box-shadow: 0px 0px 5px #e8e8e8;
}
.searchContent .tabsHeader>button.active{
color: white;
background: #FF9D5C
}
.searchWarp :global(.am-list-line){
padding: 8px 10px;
}
.searchWarp .search {
position: relative;
display: flex;
padding: .1rem .17rem;
background: white;
}
.searchWarp .search::before {
position: absolute;
width: .15rem;
height: .15rem;
content: '';
background: url(../../assets/image/search.png) no-repeat;
background-size: 100%;
left: .35rem;
top: .19rem;
z-index: 10;
}
.searchWarp .search input{
box-sizing: border-box;
width: 100%;
border: none;
border-radius: .16rem;
background: #F4F4F4;
height: .32rem;
line-height: .32rem;
padding: 0;
padding-left: .42rem;
font-size: .14rem;
}
.searchWarp .search .cancelButton{
font-size: .16rem;
color: #101010;
width: .5rem;
padding: .05rem 0 0 .05rem;
}
\ No newline at end of file \ No newline at end of file
...@@ -4,9 +4,6 @@ import styles from './Login.css' ...@@ -4,9 +4,6 @@ import styles from './Login.css'
import $ from 'jquery'; import $ from 'jquery';
import { Toast } from 'antd-mobile'; import { Toast } from 'antd-mobile';
import shareHide from "../../utils/shareHide"; import shareHide from "../../utils/shareHide";
import {urlGetParams} from "../../utils/dataFilter";
let t1 = null;//是一个 全局事件
class Login extends Component { class Login extends Component {
constructor(props){ constructor(props){
super(props) super(props)
...@@ -38,7 +35,7 @@ class Login extends Component { ...@@ -38,7 +35,7 @@ class Login extends Component {
$.ajax({ $.ajax({
//几个参数需要注意一下 //几个参数需要注意一下
type: "POST",//方法类型 type: "POST",//方法类型
url: "https://iwpuat.ihxlife.com/o2o/authentication/mobile" ,//url url: "https://zmt.ihxlife.com/o2o/authentication/mobile" ,//url
contentType: "application/x-www-form-urlencoded", contentType: "application/x-www-form-urlencoded",
headers: { headers: {
'deviceId':this.state.userOpenId, //微信号 userOpenId 'deviceId':this.state.userOpenId, //微信号 userOpenId
...@@ -59,16 +56,7 @@ class Login extends Component { ...@@ -59,16 +56,7 @@ class Login extends Component {
storage.setItem("orgId", userInfo.orgId ? userInfo.orgId : '') //机构id storage.setItem("orgId", userInfo.orgId ? userInfo.orgId : '') //机构id
storage.setItem("project", userInfo.project ? userInfo.project:'') //项目id storage.setItem("project", userInfo.project ? userInfo.project:'') //项目id
storage.setItem("website", userInfo.website ? userInfo.website:'') //网点id storage.setItem("website", userInfo.website ? userInfo.website:'') //网点id
if(userInfo.roleId == 2 || userInfo.roleId == 3){ that.props.history.push('/welcome');
// that.props.history.push('/welcome');
// let url = window.location.href;
// let param1 = window.location.origin+'/index.html#/welcome?' + url.split('?')[1] + "&phoneNum="+mobile;
// window.location.href = param1;
that.props.history.push({pathname:'/welcome',query:{phoneNum:mobile}});
}else {
that.showToast('该用户无权限,请联系管理员。')
}
}, },
error : function(result) { error : function(result) {
// console.log(result.responseJSON.content); // console.log(result.responseJSON.content);
...@@ -81,12 +69,9 @@ class Login extends Component { ...@@ -81,12 +69,9 @@ class Login extends Component {
Toast.info(val); Toast.info(val);
} }
componentWillUnmount() { componentWillUnmount() {
window.clearInterval(t1);//组件卸载时删除定时器
$('body,#root').removeClass('loginRelease'); $('body,#root').removeClass('loginRelease');
} }
componentDidMount() { componentDidMount() {
document.title = '华夏O2O智慧工作平台';
localStorage.clear();
shareHide(); shareHide();
$(document).on('blur', 'input,textarea', function () { $(document).on('blur', 'input,textarea', function () {
document.activeElement.scrollIntoView(); document.activeElement.scrollIntoView();
...@@ -101,10 +86,10 @@ class Login extends Component { ...@@ -101,10 +86,10 @@ class Login extends Component {
storage.setItem("weixin_id",'') //微信号 storage.setItem("weixin_id",'') //微信号
storage.setItem("superiorid",'') //角色 storage.setItem("superiorid",'') //角色
let url = window.location.href; let url = window.location.href;
const matchs = urlGetParams(url); const matchs = decodeURI(url).match(/userOpenId=(.*)&publicOpenId=(.*)/i);
if(matchs){ if(matchs){
let userOpenId = matchs.userOpenId; let userOpenId = matchs[1];
let publicOpenId = matchs.publicOpenId; let publicOpenId = matchs[2];
this.setState({ this.setState({
userOpenId, userOpenId,
publicOpenId publicOpenId
...@@ -119,7 +104,7 @@ class Login extends Component { ...@@ -119,7 +104,7 @@ class Login extends Component {
</div> </div>
<div className={styles.phone}> <div className={styles.phone}>
<img src={require('../../assets/image/home-shadow.png')} alt=""/> <img src={require('../../assets/image/home-shadow.png')} alt=""/>
<input type="number" pattern="[0-9]*" placeholder="输入手机号码" <input type="number" placeholder="输入手机号码"
value={this.state.mobile} value={this.state.mobile}
onChange={ onChange={
(e)=>{ (e)=>{
...@@ -138,16 +123,13 @@ class Login extends Component { ...@@ -138,16 +123,13 @@ class Login extends Component {
this.showToast('请填写正确的手机号!') this.showToast('请填写正确的手机号!')
return false return false
} }
if(that.state.send){//已发送之后不能再发送接口了
return;
}
that.props.dispatch({ that.props.dispatch({
type:'login/checkUser', type:'login/checkUser',
payload:{ payload:{
"number": mobile "number": mobile
}, },
callback(){ callback(){
$.ajax({url:"https://iwpuat.ihxlife.com/o2o/code/sms?mobile="+ mobile, $.ajax({url:"https://zmt.ihxlife.com/o2o/code/sms?mobile="+ mobile,
type : "get", type : "get",
headers:{"deviceId": that.state.userOpenId}, headers:{"deviceId": that.state.userOpenId},
success:function(result){ success:function(result){
...@@ -155,16 +137,16 @@ class Login extends Component { ...@@ -155,16 +137,16 @@ class Login extends Component {
that.setState({ that.setState({
send:true, send:true,
}) })
t1 = window.setInterval(function () { let t1 = window.setInterval(function () {
that.setState({ that.setState({
second:that.state.second-1 second:that.state.second-1
}) })
if(that.state.second ===0 ){ if(that.state.second ===0 ){
window.clearInterval(t1);
that.setState({ that.setState({
send:false, send:false,
second:60 second:60
}) })
window.clearInterval(t1);//删除定时器
} }
},1000) },1000)
}}); }});
...@@ -180,7 +162,7 @@ class Login extends Component { ...@@ -180,7 +162,7 @@ class Login extends Component {
}}>获取验证码</span> }}>获取验证码</span>
} }
{ {
this.state.send &&<span>{this.state.second}秒</span> this.state.send &&<span >{this.state.second}秒</span>
} }
</div> </div>
<div className={styles.verification}> <div className={styles.verification}>
......
...@@ -22,7 +22,6 @@ class MyUser extends Component { ...@@ -22,7 +22,6 @@ class MyUser extends Component {
storeNameList1:[], storeNameList1:[],
nameList1:[], nameList1:[],
show:false, show:false,
loadingFlag:true
} }
} }
addUser = ()=>{ addUser = ()=>{
...@@ -36,15 +35,16 @@ class MyUser extends Component { ...@@ -36,15 +35,16 @@ class MyUser extends Component {
this.props.history.push('/amendClient') this.props.history.push('/amendClient')
} }
componentWillMount(){
Toast.loading('loading...',0);
this.getUser();
}
componentDidMount(){ componentDidMount(){
document.title = '我的客户'; document.title = '我的客户';
shareHide(); shareHide();
this.getUser();
this.getUser1(); this.getUser1();
} }
componentWillUnmount(){ componentWillUnmount(){
document.title = ''; document.title = '';
...@@ -58,16 +58,16 @@ class MyUser extends Component { ...@@ -58,16 +58,16 @@ class MyUser extends Component {
"currentState":0, "currentState":0,
}, },
callback(data) { callback(data) {
Toast.hide();
let { hasClient } = that.state; let { hasClient } = that.state;
hasClient[0] = data.length > 0; hasClient[0] = data.length > 0;
that.setState({ that.setState({
nameList: data, nameList: data,
// nameList: [],
storeNameList: data, storeNameList: data,
hasClient, hasClient,
show:true, show:true,
//loadingFlag:false
}) })
// that.props.amentClient();
} }
}) })
} }
...@@ -80,15 +80,14 @@ class MyUser extends Component { ...@@ -80,15 +80,14 @@ class MyUser extends Component {
"id":localStorage.getItem("id"), "id":localStorage.getItem("id"),
}, },
callback(data){ callback(data){
Toast.hide();
let { hasClient } = that.state; let { hasClient } = that.state;
hasClient[1] = data.length > 0; hasClient[1] = data.length > 0;
that.setState({ that.setState({
nameList1: data, nameList1: data,
// nameList1: [],
hasClient, hasClient,
storeNameList1: data, storeNameList1: data,
show:true, show:true,
loadingFlag:false
}) })
} }
...@@ -130,27 +129,10 @@ class MyUser extends Component { ...@@ -130,27 +129,10 @@ class MyUser extends Component {
} }
render() { render() {
if(this.state.loadingFlag){
return <div></div>
}
return ( return (
<div className={styles.box}> <div className={styles.box}>
{ {
this.state.show &&<Tabs title={this.state.tab} this.state.show &&<Tabs title={this.state.tab} user={this.state.user} letter={this.state.letter} addUser={this.addUser} editor={this.editor} delete={this.delete} amentClient = {this.amentClient} nameList = {this.state.nameList} nameList1 = {this.state.nameList1} goAddUser = {this.goAddUser} content={'修改'} dataFilterToProp= {this.dataFilterToProp.bind(this)} hasClient={this.state.hasClient} />
user={this.state.user}
letter={this.state.letter}
addUser={this.addUser}
editor={this.editor}
delete={this.delete}
amentClient = {this.amentClient}
nameList = {this.state.nameList}
nameList1 = {this.state.nameList1}
storeNameList = {this.state.storeNameList}
storeNameList1 = {this.state.storeNameList1}
goAddUser = {this.goAddUser}
content={'修改'}
dataFilterToProp= {this.dataFilterToProp.bind(this)}
hasClient={this.state.hasClient} />
} }
</div> </div>
) )
......
...@@ -200,6 +200,19 @@ body{ ...@@ -200,6 +200,19 @@ body{
margin-right: .1rem; margin-right: .1rem;
} }
.ulilast .spanPad{
position: relative;
display:flex;
justify-content: flex-start;
padding-left: .15rem;
}
.ulilast .spanPad i{
position: absolute;
font-style: normal;
width: .4rem;
top:0; right: 0;
}
.policyList>p{ .policyList>p{
font-size: .14rem; font-size: .14rem;
color: #101010; color: #101010;
...@@ -216,14 +229,6 @@ body{ ...@@ -216,14 +229,6 @@ body{
padding: 0 .2rem; padding: 0 .2rem;
box-sizing: border-box; box-sizing: border-box;
} }
.display_block_img{
width:100%;
height: 2.12rem;
background: linear-gradient(top,#FFC59F,#FF9D5B);
border-radius: .1rem;
display: none;
box-sizing: border-box;
}
.cliessCentext{ .cliessCentext{
text-align: center; text-align: center;
} }
......
body{
width:100%;
max-width: 680px;
margin: auto;
background-color: #FF9D5C;
}
.box{
width: 100%;
height: 100%;
background-color: #FF9D5C;
padding-top:.01rem;
padding-bottom: .6rem;
overflow-x: hidden;
}
/*被保人信息*/
.recognizee{
width: 3.92rem;
border-radius: 10px;
margin: .1rem auto;
border: 1px solid #FF9D5C;
overflow: hidden;
}
.message{
padding-left: .15rem;
height: .4rem;
font-size: .16rem;
background-color: #FFF1E8;
line-height: .4rem;
color: #101010;
}
.detail{
width: 3.92rem;
background-color: white;
}
.sex{
height: .5rem;
line-height: .5rem;
padding: 0 .15rem;
}
.sex>.left{
font-size: .15rem;
color: #101010;
display: inline-block;
float: left;
}
.sex>.right{
/*background-color: #666666;*/
display: inline-block;
float: right;
height: .5rem;
position: relative;
}
.sex>.right>.date{
/*display: block;*/
margin-right: .4rem;
width: 1.2rem;
margin-top: .08rem;
border: none;
}
.sex>.right>span{
display: inline-block;
width: .6rem;
height: .3rem;
border: 1px solid #666666;
font-size: .15rem;
text-align: center;
line-height: .3rem;
margin-left: .15rem;
margin-right: 0;
border-radius: 4px;
}
.boy{
position: absolute;
top: .1rem;
right: .75rem;
}
.girl{
position: absolute;
right: 0rem;
top:.1rem;
}
.selectBoy{
position: absolute;
color:#FF5167;
border: 1px solid #FF5167 !important;
top: .1rem;
right: .75rem;
border-radius: 4px;
}
.selectGirl{
position: absolute;
color:#FF5167;
border: 1px solid #FF5167 !important;
right: 0rem;
top:.1rem;
border-radius: 4px;
}
.right>img{
width: .22rem;
height: .2rem;
position: absolute;
top: .1rem;
right: 0;
}
/*投保人非本人*/
.self{
display: inline-block;
}
.select{
width: .2rem;
height: 0.4rem;
float: right;
margin-right: .2rem;
position: relative;
}
.selectd1{
right: 1rem;
}
.selectd2{
right:.3rem;
}
.yes{
position: absolute;
right:.7rem;
}
.no{
position: absolute;
right:.01rem;
}
.select>div>img{
margin-left: .1rem;
width: .2rem;
height: .2rem;
position: absolute;
top: .1rem;
}
.left{
position: relative;
}
.left>input{
position: absolute;
border: none;
outline: none;
left: .8rem;
top: 0.15rem;
font-size: .14rem;
color: #999;
width: 2.25rem;
}
/*险种选择*/
.editor{
width: .16rem !important;
height: .16rem !important;
top:.2rem !important;
}
.recipients{
right: 0rem;
}
:global(.am-button)>span{
float: none;
}
/*底部首年保费*/
.bottom{
width: 100%;
max-width:680px;
margin: 0 auto;
height: .74rem;
background-color: white;
position: fixed;
bottom: 0;
padding-left: .11rem;
z-index: 100;
}
.bottom>.left{
height: .74rem;
float: left;
margin-top: .11rem;
}
.bottom>.left>p{
height: .35rem;
position: relative;
font-size: .15rem;
color: #FF9D5C;
}
.bottom>.left>.num{
color: #FB5150;
font-size: .2rem;
position: relative;
top:-.35rem;
}
.bottom>.left>.num>span{
font-size: .15rem;
float: none;
}
.bottom>.right{
float: right;
font-size: .15rem;
padding-top: .2rem;
}
.bottom>.right> span{
padding: .1rem .13rem;
border: 1px solid #FF9D5C;
border-radius: 4px;
color: #FF9D5C;
float: none;
}
.bottom>.right>.color{
background-color: #FF9D5C;
color:white;
border: 1px dashed #FF9D5C;
}
.choose{
width: 1.5rem; height: .3rem;
border: 1px solid #F0F0F1;
font-size: .15rem;
border-radius: .04rem;
text-align: left; padding-left:.1rem;
color:#999; box-sizing: border-box;
}
.choose:after{
float:right;
width: .12rem; height: .1rem;
margin-top: .11rem; margin-right: .1rem;
background: url('../../assets/image/icon_arrowDown.png') no-repeat;
content:''; background-size: 100%;
}
.choose>span{
float: none;
line-height: .3rem;
}
.e_phoneNum {
width: 100%;
padding-left: 0;
}
.e_phoneNum:global(.am-list-line){
padding-right:0;
justify-content: space-between;
}
.e_phoneNum:global(.am-input-control){
width: 1.5rem; height: .3rem;
border: 1px solid #F0F0F1;
border-radius: .04rem;
flex-grow: 0;
flex-basis: auto;
}
.e_phoneNum>input { padding: 0 .1rem; font-size: .15rem;}
:global(.am-list){
background-color: white;
}
:global(.am-list-content){
padding-left: .11rem;
}
.deta{
padding: 0 .1rem;
float: right;
background-color: #ddd;
font-size: .14rem;
border-radius: 10px;
color: white;
}
.choose>span{
color: rgb(153, 153, 153);
font-size: .15rem;
}
.input::-webkit-input-placeholder {
color:rgb(153,153,153);
font-size: .15rem;
}
/* Mozilla Firefox 4 to 18 */
.input:-moz-placeholder {
color:rgb(153,153,153);
font-size: .15rem;
}
/* Mozilla Firefox 19+ */
.input::-moz-placeholder {
color:rgb(153,153,153);
font-size: .15rem;
}
/* Internet Explorer 10+ */
.input:-ms-input-placeholder {
color:rgb(153,153,153);
font-size: .15rem;
}
.choose>span{
color:#000
}
...@@ -70,17 +70,12 @@ body{ ...@@ -70,17 +70,12 @@ body{
} }
.life>p{ .life>p{
/* color: #FF9D5C; color: #FF9D5C;
font-size: .17rem; font-size: .17rem;
position: absolute; position: absolute;
top: .08rem; top: .08rem;
left: 50%; left: 50%;
margin-left: -.25rem; */ margin-left: -.25rem;
color: #FF9D5C;
font-size: .17rem;
position: relative;
top: -.38rem;
margin: 0 auto;
} }
.insureMessage{ .insureMessage{
...@@ -238,18 +233,6 @@ body{ ...@@ -238,18 +233,6 @@ body{
line-height: .4rem; line-height: .4rem;
margin-left: .2rem; margin-left: .2rem;
} }
.illness_hxf{
width: .87rem;
height: .4rem;
background-color: #FF9D5C;
border-radius: 6px;
display: inline-block;
font-size: .15rem;
color: #FFFFFF;
text-align: center;
line-height: .4rem;
margin: 0 .2rem;
}
/* 保单利益*/ /* 保单利益*/
...@@ -291,9 +274,9 @@ body{ ...@@ -291,9 +274,9 @@ body{
} }
/** { touch-action: pan-y; }*/ /** { touch-action: pan-y; }*/
span{float: none} span{float: none}
/*:global(.am-list-item){ :global(.am-list-item){
padding-left: 0; padding-left: 0;
}*/ }
.list{ .list{
padding-left: .11rem; padding-left: .11rem;
/* margin-left: .2rem; */ /* margin-left: .2rem; */
...@@ -342,25 +325,16 @@ span{float: none} ...@@ -342,25 +325,16 @@ span{float: none}
background: #FFF7F1; background: #FFF7F1;
} }
.welcome p.btn { .welcome p.p {
left: 50%;
bottom: 66px;
width: 1rem;
height: 1rem;
margin-left: -.43rem;
margin-bottom: 0;
text-align: center; text-align: center;
position: absolute; position: absolute;
top: 50%; top: 50%;
color: #FF9D5C; color: #FF9D5C;
font-size: .2rem; font-size: .2rem;
left:0; width: 100%;
line-height: .26rem; line-height: .26rem;
margin-top: 2rem; margin-top: 2rem;
} }
.welcome p span {
display: block;
}
...@@ -399,14 +373,3 @@ span{float: none} ...@@ -399,14 +373,3 @@ span{float: none}
.plus>img{ .plus>img{
width: 100%; width: 100%;
} }
.modalCss1{
position: fixed;
margin-left: -2.07rem;
left: 50%;
width: 4.14rem;
max-width: 680px;
max-height:6rem;
overflow-y:auto
}
...@@ -2,8 +2,6 @@ import React, { Component } from 'react' ...@@ -2,8 +2,6 @@ import React, { Component } from 'react'
import { connect } from 'dva' import { connect } from 'dva'
import { Link } from 'dva/router' import { Link } from 'dva/router'
import shareHide from "../../utils/shareHide"; import shareHide from "../../utils/shareHide";
import {Toast} from "antd-mobile";
import NoData from "../../components/NoData";
import styles from './poster.less'; import styles from './poster.less';
...@@ -14,31 +12,20 @@ class Poster extends Component { ...@@ -14,31 +12,20 @@ class Poster extends Component {
posterList: [], posterList: [],
selIdx: 0, selIdx: 0,
filterType: ['鸡汤', '节日', '产品'], filterType: ['鸡汤', '节日', '产品'],
loadingFlag:true
} }
} }
componentWillMount(){
//Toast.loading('loading...',0);
}
componentDidMount() { componentDidMount() {
document.title = '海报' document.title = '海报'
shareHide(); shareHide();
let key = Number(sessionStorage.getItem("key"));
if(key == 1){
this.filter('节日');
}else if (key == 2) {
this.filter('产品');
}else{
this.filter('鸡汤'); this.filter('鸡汤');
} }
}
componentWillUnmount(){ componentWillUnmount(){
document.title = '' document.title = ''
} }
filter(type) { filter(type) {
Toast.loading('loading...',0)
const _this = this; const _this = this;
this.props.dispatch({ this.props.dispatch({
type: 'poster/getPosterList', type: 'poster/getPosterList',
...@@ -48,16 +35,13 @@ class Poster extends Component { ...@@ -48,16 +35,13 @@ class Poster extends Component {
agentCode2: window.localStorage.getItem('project') agentCode2: window.localStorage.getItem('project')
}, },
callback(res) { callback(res) {
Toast.hide();
if (typeof res.data === 'object') { if (typeof res.data === 'object') {
_this.setState({ _this.setState({
posterList: res.data, posterList: res.data
loadingFlag:false
}) })
} else { } else {
_this.setState({ _this.setState({
posterList: [], posterList: []
loadingFlag:false
}) })
} }
} }
...@@ -66,14 +50,15 @@ class Poster extends Component { ...@@ -66,14 +50,15 @@ class Poster extends Component {
render() { render() {
let selIdx = 0;
if(sessionStorage.getItem("key")){
selIdx = Number(sessionStorage.getItem("key"))
}
const { posterList } = this.state; const { posterList } = this.state;
const roleId = window.localStorage.getItem('roleId');
if(this.state.loadingFlag){ let position = '';
return <div></div> switch (roleId) {
case '2':
position = '客户经理';
break;
default:
position = '督训';
} }
return ( return (
<div className={styles.wrapper}> <div className={styles.wrapper}>
...@@ -81,12 +66,11 @@ class Poster extends Component { ...@@ -81,12 +66,11 @@ class Poster extends Component {
<div className={styles.splitline}></div><ul className={styles.tags}> <div className={styles.splitline}></div><ul className={styles.tags}>
{ {
this.state.filterType.map((el, i) => { this.state.filterType.map((el, i) => {
return <li className={selIdx ===i?'on':''} key={i} onClick={() => { return <li className={this.state.selIdx===i?'on':''} key={i} onClick={() => {
this.filter(el); this.filter(el);
this.setState({ this.setState({
selIdx:i selIdx:i
}) })
sessionStorage.setItem( "key", i);
}}>{el}</li> }}>{el}</li>
}) })
} }
...@@ -94,17 +78,14 @@ class Poster extends Component { ...@@ -94,17 +78,14 @@ class Poster extends Component {
<ul className={styles.pList}> <ul className={styles.pList}>
{ {
posterList.length>0 ? posterList.map((el, i) => { posterList.map((el, i) => {
return <li key={i}> return <li key={i}>
<Link to={{ <Link to={{
pathname: "/poster/info", pathname: "/poster/info",
state: { search: '?imgpath=' + el.reportImage + '&position=' + position + '&name=' + window.localStorage.getItem('name') + '&phone=' + window.localStorage.getItem('number'),
id: el.reportCode,
reportImage: el.reportImage
}
}}><img alt="" src={el.reportImage} /></Link> }}><img alt="" src={el.reportImage} /></Link>
</li> </li>
}): <NoData /> })
} }
</ul> </ul>
</div> </div>
......
...@@ -135,106 +135,34 @@ body{ ...@@ -135,106 +135,34 @@ body{
display: flex; display: flex;
overflow-y: auto; overflow-y: auto;
flex-flow: column; flex-flow: column;
.date_section{ justify-content: space-between;
position: absolute;
top: .1rem;
z-index: 5;
height: .22rem;
line-height: .22rem;
width: 1.7rem;
left: 50%;
margin-left: -.85rem;
text-align: center;
color:#333333;
font-size: .14rem;
font-family: Arial, Helvetica, sans-serif;
border-radius: .1rem;
background:#fff;
}
.poster{ .poster{
position: relative; position: relative;
width: 3.26rem; width: 3.54rem;
height: 5.8rem; height: 6.4rem;
margin: 0 auto; margin: .2rem auto;
font-variant: small-caps;
img{ img{
position: relative; position: relative;
z-index: 1; z-index: 1;
width: 100%; width: 100%;
height: 100%;
} }
.info{ .info{
position: absolute; position: absolute;
display:flex;
left:0; bottom:0; left:0; bottom:0;
width: 100%; width: 100%;
z-index: 4; z-index: 4;
padding: .12rem; padding: .13rem 0 .12rem .2rem;
box-sizing: border-box; box-sizing: border-box;
&:before{ &:before{
position: absolute; left:0; top:0; position: absolute; left:0; top:0;
width:100%; height: 100%; background:#000; width:100%; height: 100%; background:#000;
opacity: .4; z-index: 1; opacity: .4; content:''; z-index: 1;
}
.content{
position: relative;
display:flex;
justify-content:space-between;
width:100%;
height: .9rem;
z-index: 2;
color: white;
align-items: center;
.contentBg {
position: absolute;
left:0; top:0;
width: 100%; height: 100%;
z-index: 1;
}
.infoSplice {
position: absolute;z-index: 3;
width: 1px; height: .6rem; left: .76rem; top: .14rem;
}
.info_name{
position: relative;
display: table-cell;
width:.76rem;
color:#333;
font-size: .2rem;
//padding-top: .3rem;
flex-shrink: 0;
//height: .9rem;
text-align: center;
vertical-align:middle;
z-index: 2;
}
.info_mid{
position: relative;
z-index: 3;
font-size:.15rem;
// padding-left: .12rem;
width:40%;
//padding-top: .22rem;
color:#666;
}
.info_img{
position: relative;
z-index: 4;
width:.78rem;
height: .78rem;
text-align: right;
margin-right:.06rem;
margin-top :.06rem;
.info_bg{
position: relative;
width: 100%; height: 100%;
}
.info_qrcode{
position: absolute;
width: .7rem; height: .7rem;
left: .04rem; top: .04rem;
}
} }
li{
position: relative; z-index: 4;
color:rgb(236, 232, 232);
font-size: .18rem;
line-height: .25rem;
} }
} }
.posterImg { .posterImg {
...@@ -245,10 +173,6 @@ body{ ...@@ -245,10 +173,6 @@ body{
z-index: 6; z-index: 6;
} }
} }
.post_tips {
color:#999; font-size: .14rem; text-align: center;
line-height: .26rem;
}
.operation{ .operation{
height: 1.27rem; height: 1.27rem;
width: 100%; width: 100%;
...@@ -285,21 +209,3 @@ body{ ...@@ -285,21 +209,3 @@ body{
} }
} }
} }
\ No newline at end of file \ No newline at end of file
.haveNoData{
position: relative;
top: 0;
left: 0;
margin: 50% 0 0 50%;
transform: translate(-50%,-50%);
img{
width:2rem;
height:2rem;
}
.text{
text-align: center;
font-size: .2rem;
margin-top: .1rem;
color: #9b9b9b;
}
}
\ No newline at end of file \ No newline at end of file
...@@ -3,7 +3,6 @@ import { connect } from 'dva' ...@@ -3,7 +3,6 @@ import { connect } from 'dva'
import shareHide from "../../utils/shareHide"; import shareHide from "../../utils/shareHide";
import Tabs from "../../components/Tabs" import Tabs from "../../components/Tabs"
import {Toast} from "antd-mobile"
...@@ -15,7 +14,6 @@ class ProspectusList extends Component { ...@@ -15,7 +14,6 @@ class ProspectusList extends Component {
tab:['所有','我的'], tab:['所有','我的'],
allPlanList:[], allPlanList:[],
myPlanList:[], myPlanList:[],
loadingFlag:true
} }
} }
...@@ -29,9 +27,9 @@ class ProspectusList extends Component { ...@@ -29,9 +27,9 @@ class ProspectusList extends Component {
pageNo:"0" pageNo:"0"
}, },
callback(data){ callback(data){
// data.sort((a,b)=>{ data.sort((a,b)=>{
// return Date.parse(b.createTime) - Date.parse(a.createTime) return Date.parse(b.createTime) - Date.parse(a.createTime)
// }) })
that.setState({ that.setState({
myPlanList:data myPlanList:data
}) })
...@@ -46,28 +44,19 @@ class ProspectusList extends Component { ...@@ -46,28 +44,19 @@ class ProspectusList extends Component {
payload:{ payload:{
riskName:"", riskName:"",
riskStatus:1, //1 启用 riskStatus:1, //1 启用
"proId":localStorage.getItem("project"), "project":localStorage.getItem("project"),
"website":localStorage.getItem("website"), "website":localStorage.getItem("website"),
"orgId":localStorage.getItem("orgId"), "orgId":localStorage.getItem("orgId"),
}, },
callback(data){ callback(data){
Toast.hide();
console.log(data); console.log(data);
that.setState({ that.setState({
allPlanList:data, allPlanList:data
loadingFlag:false
}) })
}, },
}) })
} }
componentWillMount(){
Toast.loading('loading...',0);
}
componentDidMount(){ componentDidMount(){
let key = sessionStorage.getItem("key");
let tab = this.props.location.query ? this.props.location.query.key : key;
sessionStorage.clear();
sessionStorage.setItem("key",tab);
document.title = '计划书'; document.title = '计划书';
let that = this; let that = this;
/* 计划书接口 */ /* 计划书接口 */
...@@ -81,17 +70,10 @@ class ProspectusList extends Component { ...@@ -81,17 +70,10 @@ class ProspectusList extends Component {
render() { render() {
console.log(this.props.login); console.log(this.props.login);
if(this.state.loadingFlag){
return <div></div>
}
return ( return (
<div style={{height:'100%',backgroundColor:'white'}}> <div style={{height:'100%',backgroundColor:'white'}}>
{/*<HeaderNav title={this.state.navTitle} />*/} {/*<HeaderNav title={this.state.navTitle} />*/}
<Tabs title={this.state.tab} <Tabs title={this.state.tab} allPlanList = {this.state.allPlanList} myPlanList = {this.state.myPlanList} getMyPlan={this.getMyPlan} style={{paddingTop:0}}/>
allPlanList = {this.state.allPlanList}
myPlanList = {this.state.myPlanList}
getMyPlan={this.getMyPlan}
style={{paddingTop:0}}/>
</div> </div>
) )
} }
......
...@@ -6,9 +6,7 @@ body{ ...@@ -6,9 +6,7 @@ body{
.welcome{ .welcome{
width: 4.14rem; width: 4.14rem;
height: 100%; height: 100%;
background: url('../../assets/image/welcome.png') no-repeat center center/100%; background: url('../../assets/image/welcome.png')no-repeat center center/100%;
background-size: contain;
background-color: white;
} }
/* /*
.welcome img{ .welcome img{
...@@ -17,26 +15,3 @@ body{ ...@@ -17,26 +15,3 @@ body{
height: 100%; height: 100%;
} }
*/ */
.animated{
position: absolute;
width: 100px;
font-size: 50px;
top: 50px;
left: 50%;
margin-left: -50px;
}
.FadeInFrame{
-webkit-animation-name: fadeIn; /*动画名称*/
-webkit-animation-duration: 2s; /*动画持续时间*/
-webkit-animation-iteration-count: 1; /*动画次数*/
-webkit-animation-delay: 0s; /*延迟时间*/
}
@-webkit-keyframes fadeIn {
from {
opacity: 0; /*初始状态 透明度为0*/
}
to{
opacity: 1; /*结尾状态 透明度为1*/
}
}
\ No newline at end of file \ No newline at end of file
import React, { Component } from 'react' import React, { Component } from 'react'
import { connect } from 'dva' import { connect } from 'dva'
import shareHide from "../../utils/shareHide"; import shareHide from "../../utils/shareHide";
import {urlGetParams} from "../../utils/dataFilter";
import styles from './Welcome.css' import styles from './Welcome.css'
// import ReactCSSTransitionGroup from "react-addons-css-transition-group";
class Welcome extends Component { class Welcome extends Component {
constructor(){ constructor(){
super() super()
this.state={ this.state={
phoneNum:urlGetParams(window.location.href).phoneNum ? false : true
} }
} }
go = ()=> { go = ()=> {
let url = window.location.href; this.props.history.push('/home');
let location = "";
//后台重定向到欢迎页面时,2秒后跳转home页面,并将参数带过去。
if(this.props.location.query){//登录页面过来,携带了phoneNum参数
location = window.location.origin+'/index.html#/home?' + url.split('?')[1] + "&phoneNum="+this.props.location.query.phoneNum;
}else {
location = window.location.origin+'/index.html#/home?' + url.split('?')[1];
}
window.location.href = location;
} }
componentDidMount() { componentDidMount() {
document.title = '华夏O2O智慧工作平台';
shareHide(); shareHide();
setTimeout(this.go,2000) setTimeout(this.go,2000)
} }
render() { render() {
let animate = {
textAlign:'center',
position:'absolute',
top:'70%',
fontSize: '.2rem',
width: '100%',
}
return ( return (
<div className={styles.welcome}> <div className={styles.welcome}>
{this.state.phoneNum && <div className={styles.FadeInFrame} style={animate}> {/*<img src={require('../../assets/image/welcome.png')} alt=""/>*/}
恭喜您成功注册智慧工作平台<br/>
开启智慧工作之旅
</div>}
</div> </div>
) )
} }
......
...@@ -7,12 +7,8 @@ span { ...@@ -7,12 +7,8 @@ span {
body{ body{
background: white; background: white;
} }
:global(.am-modal-content){
.modalWrap{
:global(.am-modal-content){
background: none; background: none;
}
} }
.splitline { .splitline {
width: 100%; width: 100%;
......
...@@ -23,8 +23,7 @@ class ExpertVideo extends Component { ...@@ -23,8 +23,7 @@ class ExpertVideo extends Component {
<Modal <Modal
popup popup
animationType="slide-up" animationType="slide-up"
wrapClassName={css.modalWrap} visible = {show}
visible={show}
> >
<div className={css.line}></div> <div className={css.line}></div>
<div className={css.e_wrap}> <div className={css.e_wrap}>
......
...@@ -23,9 +23,10 @@ export async function Dictionaries(params) { ...@@ -23,9 +23,10 @@ export async function Dictionaries(params) {
} }
/* 提交至督训*/
export async function sendMaster(params) { /* 缴费期间 ,保险期间*/
return request('/o2o/wx/sendMaster', { export async function PremiumPaymentPeriod(params) {
return request('/o2o/MicroPlan/getProspectusPeriod', {
method: 'post', method: 'post',
headers:headersPost, headers:headersPost,
body: JSON.stringify(params), body: JSON.stringify(params),
...@@ -33,18 +34,20 @@ export async function sendMaster(params) { ...@@ -33,18 +34,20 @@ export async function sendMaster(params) {
} }
/* 投保人手机号是否在跟进中 开始弃用2019-7-1 */
export async function isFollow(params) { /* 提交至督训*/
return request('/o2o/customer/getAllCustomer', { export async function sendMaster(params) {
return request('/o2o/wx/sendMaster', {
method: 'post', method: 'post',
headers:headersPost, headers:headersPost,
body: JSON.stringify(params), body: JSON.stringify(params),
}); });
} }
/* 投保人手机号是否在跟进中 */ /* 投保人手机号是否在跟进中 */
export async function followCustomer(params) { export async function isFollow(params) {
return request('/o2o/customer/followCustomer', { return request('/o2o/customer/getAllCustomer', {
method: 'post', method: 'post',
headers:headersPost, headers:headersPost,
body: JSON.stringify(params), body: JSON.stringify(params),
......
...@@ -35,9 +35,10 @@ export async function getMyPlan(params) { ...@@ -35,9 +35,10 @@ export async function getMyPlan(params) {
} }
/* 获取当前登录人的信息 */
export async function getCustomerInfo(params) { /* 我的计划书--获取被保人信息 */
return request('/o2o/customer/getLoginInfo', { export async function getMyPlanMessage(params) {
return request('/o2o/proposalInterest/getProposalInterestBySeriNo', {
method: 'post', method: 'post',
headers:headersPost, headers:headersPost,
body: JSON.stringify(params), body: JSON.stringify(params),
...@@ -45,50 +46,16 @@ export async function getCustomerInfo(params) { ...@@ -45,50 +46,16 @@ export async function getCustomerInfo(params) {
}); });
} }
/*获取z专家房间列表 */
export async function GetRoomList(params) {
return request('/o2o/weapp/webrtc_room/get_room_list', {
method: 'post',
headers: headersPost,
body: JSON.stringify(params),
});
} /* 获取当前登录人的信息 */
/*获取查找的内容 */ export async function getCustomerInfo(params) {
export async function getSearchList(params) { return request('/o2o/customer/getLoginInfo', {
return request('/o2o/home/search', {
method: 'post', method: 'post',
headers: headersPost, headers:headersPost,
body: JSON.stringify(params), body: JSON.stringify(params),
}); });
} }
/*点击记录存储
operFunction (integer, optional): 操作功能(行业动态-100110; 计划书-100120; 邀请函-100130; 资料库-100100) ,
operType 操作类型(浏览-201; 转发-202) ,
operCode (string, optional): 操作条目对应的主键code ,
*/
export async function setClickRecord(params) {
let userInfo = JSON.parse(localStorage.getItem('userInfo'));
let param = null;
if(params.phoneNum){
param = params;
}else {
param = {...params,
"phoneNum": userInfo.number,
"orgId": userInfo.orgId,
"pointId": userInfo.website,
"proId": userInfo.project,
"userId": userInfo.id
};
}
return request('/o2o/dataStatic/save', {
method: 'post',
headers: headersPost,
body: JSON.stringify(param),
});
}
...@@ -24,5 +24,14 @@ export async function deleteCustomer(params) { ...@@ -24,5 +24,14 @@ export async function deleteCustomer(params) {
}); });
} }
/*获取房间列表 */
export async function GetRoomList(params) {
return request('/o2o/weapp/webrtc_room/get_room_list', {
method: 'post',
headers: headersPost,
body: JSON.stringify(params),
});
}
...@@ -16,11 +16,3 @@ export async function performList(params) { ...@@ -16,11 +16,3 @@ export async function performList(params) {
body: JSON.stringify(params), body: JSON.stringify(params),
}) })
} }
//个人排行榜查询
export async function achievementRank(params) {
return request('/o2o/achievement/ranking',{
method: 'post',
headers:headersPost,
body: JSON.stringify(params),
})
}
...@@ -51,37 +51,3 @@ export async function deletePlan(params) { ...@@ -51,37 +51,3 @@ export async function deletePlan(params) {
} }
/* 我的计划书--获取被保人信息 */
export async function getMyPlanMessage(params) {
return request('/o2o/proposalInterest/getProposalInterestBySeriNo', {
method: 'post',
headers:headersPost,
body: JSON.stringify(params),
});
}
/* 缴费期间 ,保险期间*/
export async function PremiumPaymentPeriod(params) {
console.log('getProspectusPeriod----------------------------------------->>>>',params)
return request('/o2o/MicroPlan/getProspectusPeriod', {
method: 'post',
headers:headersPost,
body: JSON.stringify(params),
});
}
/* 缴费期间 ,保险期间*/
export async function addReceiveInfo(params) {
console.log('getProspectusPeriod----------------------------------------->>>>',params)
return request('/o2o/MicroPlan/saveReceivePeopleInfo', {
method: 'post',
headers:headersPost,
body: JSON.stringify(params),
});
}
import request from '../utils/request'; import request from '../utils/request';
import { headersPost } from '../utils/Constants'; import { headersPost } from '../utils/Constants';
/* 获取海报列表*/ /* 获取客户*/
export async function GetPosterList(params) { export async function GetPosterList(params) {
return request('/o2o/report/getReportConfigList', { return request('/o2o/report/getReportConfigList', {
method: 'post', method: 'post',
...@@ -10,15 +10,6 @@ export async function GetPosterList(params) { ...@@ -10,15 +10,6 @@ export async function GetPosterList(params) {
}); });
} }
/* 获取海报信息*/
export async function GetPosterInfo(params) {
return request("/o2o/report/getReportBaseById", {
method: "post",
headers: headersPost,
body: JSON.stringify(params)
});
}
var pinyin = require("chinese-to-pinyin"); var pinyin = require("chinese-to-pinyin");
var moment = require('moment');
/** /**
* 按拼音第一个字母排序 * 按拼音第一个字母排序
* @param {需要排序的数据表} arr * @param {需要排序的数据表} arr
...@@ -60,161 +59,5 @@ export function dataFilter(arr, renderType, keywords) { ...@@ -60,161 +59,5 @@ export function dataFilter(arr, renderType, keywords) {
return ar; return ar;
} }
/*
url参数解析,返回一个参数对象
*/
export function urlGetParams(url) {
let json = {};
if(url) {
let url1 = window.decodeURI(url).split('?').pop();
let url2 = url1.split('&');
if(url2.length>0){
for(let i in url2){
let item = url2[i].split('=');
json[item[0]] = item[1];
}
}
}
return json;
}
/*
计算年龄
*/
export function getBirthdayAge (dateString) {
let today = new Date();
// let aDate = dateString.split('-');
// let birthDate = new Date(aDate[0] + '-' + (parseInt(aDate[1]) < 10 ? '0' + aDate[1] : aDate[1]) + (parseInt(aDate[2]) < 10 ? '-0' + aDate[2] : '-'+aDate[2]));
let birthDate = new Date(moment(dateString).format("YYYY-MM-DD"));
let age = Number(today.getFullYear()) - Number(birthDate.getFullYear());
let m = today.getMonth() - birthDate.getMonth();
if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) {
age--;
}
return age ;
}
/*
根据key值为value 在计划书中查出对应的计划书
*/
export function getPlanInListWithCode (key,value,list) {
let [minekey,minevalue,AllList]= [key,value,list];
let targetList = {};
for(let i in AllList){
if(String(AllList[i][minekey]) === String(minevalue)){
targetList = AllList[i];
break;
}
}
return targetList ;
}
export let filterDate = {
'YY_MM_DD': ()=> {
// 以YY-MM-DD格式返回当前日期
let date = new Date();
return date.getFullYear() +'-'+ (date.getMonth()+1) +'-'+date.getDate();
},
'FromDateToTarget': (num)=>{
//从当前日期算 距离 num年前 是那一年
let date = new Date();
let date2 = date.getFullYear();
if(num){
return date2-num-1;
}else{
return date2;
}
}
}
/*
判断string1,string2时候同时存在arry数组中
*/
export function isContain(string1,string2,arry){
if(arry.indexOf(string1) > -1 && arry.indexOf(string2) > -1) {
return true
}else{
return false
}
return false
}
export let arrayDeal = {
// 交集
'Intersect': (a,b)=> {
let BB = new Set(b);
return a.filter(x => BB.has(x));
},
// 差集
'Minus': (a,b)=> {
let BB = new Set(b);
return a.filter(x => !BB.has(x));
},
// 补集
'Complement': (a,b)=> {
let AA = new Set(a);
let BB = new Set(b);
return [...a.filter(x => !BB.has(x)), ...b.filter(x => !AA.has(x))];
},
// 并集
'UnionSet': (a,b)=> {
return Array.from(new Set([...a, ...b]));
}
}
export function StandardFormat (str){
//将 ****-*-* 转成标准的 ****-**-**
let string1 = String(str);
if (string1){
let arr1 = string1.split("-");
if (arr1[1].length==1){
arr1[1] = "0"+arr1[1];
}
if (arr1[2].length==1){
arr1[2] = "0"+arr1[2];
}
return arr1.join("-");
}
return string1;
}
//从数组对象中找出特定你的数组
export function getTargetList (param,list){
let key = param;
let AllList = list;
let newList=[];
if(AllList.length>0){
for(let ii in AllList){
if(AllList[ii].riskLabels){
if(AllList[ii].riskLabels.indexOf(key) != -1){
newList.push(AllList[ii]);
}
}
}
}
return newList;
}
//获取职位
export function getCardName(id){
let roleid = String(id);
switch (roleid) {
case "2":
return "客户经理";
break;
case "3":
return "督训";
break;
default:
break;
}
}
//获取字符串的字符长度
export function GetLength(str){
let str1 = String(str);
if(str1 != ""){
return str1.replace(/[\u0391-\uFFE5]/g,"aa").length; //先把中文替换成两个字节的英文,在计算长度
}
return 0;
}
\ No newline at end of file \ No newline at end of file
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
...@@ -22,20 +22,7 @@ function checkStatus(response) { ...@@ -22,20 +22,7 @@ function checkStatus(response) {
* @return {object} An object containing either "data" or "err" * @return {object} An object containing either "data" or "err"
*/ */
export default function request(url, options, type) { export default function request(url, options, type) {
let newOptions = {...options} return fetch(url, options)
if(localStorage.getItem('orgId')){
newOptions.headers ={
...newOptions.headers,
orgId :localStorage.getItem('orgId')
}
}
if(localStorage.getItem('project')){
newOptions.headers ={
...newOptions.headers,
proId :localStorage.getItem('project')
}
}
return fetch(url, newOptions)
.then(checkStatus) .then(checkStatus)
.then(type === 'img' ? d => { return d.blob(); } : parseJSON ) .then(type === 'img' ? d => { return d.blob(); } : parseJSON )
.then(data => ({data})) .then(data => ({data}))
......
import $ from 'jquery'; import $ from 'jquery';
import {setClickRecord} from '../services/home';
/** /**
* 分享 * 分享
* @param {*} options * @param {*} options
...@@ -14,7 +13,7 @@ import {setClickRecord} from '../services/home'; ...@@ -14,7 +13,7 @@ import {setClickRecord} from '../services/home';
export default function share (options) { export default function share (options) {
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
url: 'https://iwpuat.ihxlife.com/o2o/wx/cover', url: 'https://zmt.ihxlife.com/o2o/wx/cover',
data: JSON.stringify({ data: JSON.stringify({
shareGoal: options.decodeUrl shareGoal: options.decodeUrl
}), }),
...@@ -43,9 +42,6 @@ export default function share (options) { ...@@ -43,9 +42,6 @@ export default function share (options) {
imgUrl: options.thumbnail, imgUrl: options.thumbnail,
success: function (res) { success: function (res) {
// console.log('分享成功') // console.log('分享成功')
if(options.record){
setClickRecord({...options.record});//记录转发
}
}, },
cancel: function (res) { cancel: function (res) {
//alert('已取消'); //alert('已取消');
...@@ -61,9 +57,6 @@ export default function share (options) { ...@@ -61,9 +57,6 @@ export default function share (options) {
imgUrl: options.thumbnail, imgUrl: options.thumbnail,
success: function (res) { success: function (res) {
// console.log('分享成功') // console.log('分享成功')
if(options.record){
setClickRecord({...options.record});//记录分享
}
}, },
cancel: function (res) { cancel: function (res) {
//alert('已取消'); //alert('已取消');
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!