Commit d1799b9c by gaoju

h生产代码

1 parent 36b40e1c
Showing 73 changed files with 1109 additions and 1423 deletions
This diff could not be displayed because it is too large.
......@@ -7,7 +7,6 @@
"precommit": "npm run lint"
},
"dependencies": {
"animate.css": "^3.7.0",
"antd": "^3.12.3",
"antd-mobile": "^2.2.9",
"babel-helpers": "^6.24.1",
......@@ -16,14 +15,10 @@
"dva": "^2.1.0",
"echarts": "^4.2.1",
"html2canvas": "^1.0.0-alpha.12",
"iscroll": "^5.2.0",
"jquery": "^3.3.1",
"moment": "^2.24.0",
"react": "^16.2.0",
"react-addons-css-transition-group": "^15.6.2",
"react-bmap": "^1.0.98",
"react-dom": "^16.2.0",
"react-qmap": "^0.1.5",
"react-sticky": "^6.0.3",
"swiper": "^4.4.6"
},
......
......@@ -10,7 +10,6 @@
height: .8rem;
background: url("../../assets/image/home-frame.png") no-repeat center center;
background-size: 100% 100%;
z-index: 10;
}
bottomButton > .module{
......
......@@ -18,8 +18,8 @@ export default class BottomNav extends Component{
text:'在线专家'
},
{
img:require('../../assets/image/userCenter.png'),
text:'个人中心'
img:require('../../assets/image/performance.png'),
text:'业绩'
},
],
......@@ -34,8 +34,8 @@ export default class BottomNav extends Component{
text:'人员管理'
},
{
img:require('../../assets/image/userCenter.png'),
text:'个人中心'
img:require('../../assets/image/performance.png'),
text:'业绩'
},
],
}
......@@ -58,14 +58,11 @@ export default class BottomNav extends Component{
text: '在线专家'
},
{
img: require('../../assets/image/userCenter.png'),
text: '个人中心'
img: require('../../assets/image/performance.png'),
text: '业绩'
},
];
}
if(this.props.roleId != 3 && this.props.roleId != 2){
list = this.state.moduleList1;
}
return list.map((item,index)=>{
return (
<div className={styles.module} key={index} onClick={()=>{
......@@ -79,8 +76,6 @@ export default class BottomNav extends Component{
}else if(this.props.roleId == 3 && index === 1){
this.props.goGtclientlist()
}else if(this.props.roleId != 3 && this.props.roleId != 2 && index === 1){
this.props.goGtclientlist()
}else if(index === 2){
localStorage.setItem('keyIndex',2)
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';
import enUs from 'antd-mobile/lib/date-picker/locale/en_US';
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.
const utcNow = new Date(now.getTime() + (now.getTimezoneOffset() * 60000));
......@@ -49,20 +49,13 @@ class datePicker extends Component {
}
componentDidMount() {
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=()=>{
console.log(555);
document.getElementsByTagName('body')[0].style.overflowY = 'hidden';
this.setState({
visible: true,
......@@ -70,6 +63,7 @@ class datePicker extends Component {
}
showDate1=()=> {
console.log(4444444);
document.getElementsByTagName('body')[0].style.overflowY = 'hidden';
this.setState({
visible: true,
......@@ -79,9 +73,7 @@ class datePicker extends Component {
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 (
<List className="date-picker-list" style={{ backgroundColor: 'white',opacity:0 ,width:0,display:'none'}}>
{/*<DatePicker
......@@ -96,28 +88,21 @@ class datePicker extends Component {
title="出生日期"
extra="Optional"
value={this.state.date}
minDate={minDate}
minDate={new Date(1963, 0, 1, 0, 0, 0)}
maxDate={new Date()}
onChange={date => {
console.log('--DatePicker--onChange--->',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 })
console.log(44);
this.setState({ date })
}}
onOk = {
(date)=>{
console.log('--DatePicker--ok--->',date)
this.setState({ visible:false })
this.props.getDate(date)
}
}
onDismiss={
()=>{
this.setState({ visible:false,date:this.props.birthday ? new Date(this.props.birthday) : now })
console.log('--DatePicker--onDismiss--->',this.state.date)
this.setState({ visible:false })
}
}
>
......
......@@ -167,19 +167,3 @@ label标签
background-color: black;
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
......@@ -76,22 +76,13 @@ import SwipeActionExample from "../../components/SwipeAction"
<div className={styles.right}>
<div className={styles.top}>
<div className={styles.title}>{item.riskName}</div>
{/**item.riskLabels && item.riskLabels.map((ite,ind)=>{
{item.riskLabels && item.riskLabels.map((ite,ind)=>{
return(
<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}
</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 className={styles.buttom}>
......
import React from 'react';
import { SwipeAction } from 'antd-mobile';
import $ from 'jquery';
import { sortArr } from '../../utils/dataFilter';
import Iscroll from "../../components/Iscroll";
import css from './css.less';
class MemberList extends React.Component{
constructor(props) {
super(props);
......@@ -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','#']
}
}
swipeBack(el, i) {
$(el).find('.am-swipe-cover, .am-swipe-content').css('left', 0);
}
//绑定子组件scroll得方法
maoPointRef = (ref) => {
this.child = ref;
}
render() {
const { dataList, pTitle, showActionSheet, chooseClient, handleAction, renderItem, renderType, filterData, handleEdit,isCheckClientStateForSwipe } = this.props;
const list = sortArr(dataList, renderType);
......@@ -37,80 +37,70 @@ class MemberList extends React.Component{
placeholder={"请输入" + pTitle + "姓名"} />
</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}>
<Iscroll id={"memberList_"+this.props.id}
iscrollOptions={{
probeType:2
}}
onRef={this.maoPointRef}
>
<div className={css.list}>
{
list.length>0 && list.map((itm, index) => {
return <dl key={index} id={'list'+itm.letter} ref={el=>this['list'+itm.letter]=el} >
<dt>{itm.letter}</dt>
{
itm.list.map((item, i) => {
let disabled = false;
if (isCheckClientStateForSwipe) {
disabled = item.currentState && item.currentState !== '2';
}
return <dd key={index + '_' + i} onClick={() => {
if (chooseClient) {
chooseClient(item);
}
}}>
<SwipeAction
disabled={disabled||!isf}
right={[
{
text: '编辑',
onPress: () => {
this.swipeBack(this['list' + itm.letter]);
handleEdit(item);
},
style: { backgroundColor: '#ddd', color: 'white' },
},
{
text: '删除',
onPress: () => {
this.swipeBack(this['list' + itm.letter]);
this.setState({
isShowTips: true
})
isf && handleAction(item);
},
style: { backgroundColor: '#F4333C', color: 'white' },
},
]}
>
{
renderItem(item, index + '_' + i)
}
</SwipeAction>
</dd>
})
<div className={css.scrollListWrap} ref={el=>this.nameList=el}>
<div className={css.list}>
{
list.length>0 && list.map((itm, index) => {
return <dl key={index} ref={el=>this['list'+itm.letter]=el} >
<dt>{itm.letter}</dt>
{
itm.list.map((item, i) => {
let disabled = false;
if (isCheckClientStateForSwipe) {
disabled = item.currentState && item.currentState !== '2';
}
</dl>
})
}
</div>
</Iscroll>
return <dd key={index + '_' + i} onClick={() => {
if (chooseClient) {
chooseClient(item);
}
}}><SwipeAction
disabled={disabled||!isf}
right={[
{
text: '编辑',
onPress: () => {
this.swipeBack(this['list' + itm.letter]);
handleEdit(item);
},
style: { backgroundColor: '#ddd', color: 'white' },
},
{
text: '删除',
onPress: () => {
this.swipeBack(this['list' + itm.letter]);
this.setState({
isShowTips: true
})
isf && handleAction(item);
},
style: { backgroundColor: '#F4333C', color: 'white' },
},
]}
>
{
renderItem(item, index + '_' + i)
}
</SwipeAction>
</dd>
})
}
</dl>
})
}
</div>
</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) => {
return <li key={i} onClick={() => {
for (let j = 0; j < list.length; j++){
if (list[j].letter === item) {
console.log('elementToTarget-->list',item)
this.child.elementToTarget('list' + item);
this['nameList'].scrollTop = this['list' + item].offsetTop;
}
}
......@@ -122,4 +112,4 @@ class MemberList extends React.Component{
}
}
export default MemberList;
\ No newline at end of file
export default MemberList;
......@@ -6,9 +6,6 @@
position: absolute;
right: 0;
top: .7rem;
overflow-y: auto;
height: 69vh;
z-index:5;
li {
color: #666;
......@@ -40,7 +37,7 @@
.btnAdd {
position: fixed;
right: .3rem;
bottom: .08rem;
bottom: .1rem;
width: .6rem;
height: .6rem;
background: url(../../assets/image/add-user.png) no-repeat;
......@@ -92,10 +89,8 @@
}
.scrollListWrap {
position:relative;
background: #f8f8f8;
height: 66vh;
//height: calc(100vh - 190px);
height: 70vh;
overflow-y: scroll;
}
......@@ -129,7 +124,6 @@
font-size: .15rem;
background: #fff;
color: #101010;
padding-right: .15rem;
span {
float: none;
......
import React,{Component} from 'react';
import { connect } from 'dva';
import { SwipeAction, List ,Modal} from 'antd-mobile';
import { SwipeAction, List } from 'antd-mobile';
import styles from "./swipeActive.css"
const alert = Modal.alert;
let alert2=null;
class SwipeActionExample extends Component{
constructor(props){
super(props);
......@@ -14,17 +12,20 @@ class SwipeActionExample extends Component{
componentDidMount(){
}
componentWillUnmount(){
//如果弹框没有关闭则关闭
if(alert2){
alert2.close();
}
}
editor=(item)=>{
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)
}
......@@ -36,19 +37,14 @@ class SwipeActionExample extends Component{
}
delete=(item)=>{
alert2 = alert('', '确定删除吗?', [
{ text: '取消', onPress: () => {
return;
} },
{ text: '确定', onPress: () => {
if(this.props.client) {
console.log(this.props.item.id);
this.props.delete(this.props.item.id)
}else{
this.props.go(item)
}
} },
])
// 通讯录删除
if(this.props.client) {
console.log(this.props.item.id);
this.props.delete(this.props.item.id)
}else{
this.props.go(item)
}
}
history=(item)=>{
......@@ -63,7 +59,7 @@ class SwipeActionExample extends Component{
disabled = {this.props.disabled}
right={[
{
text: '编辑',
text: '修改',
onPress: ()=>{
this.editor(this.props.item)
},
......@@ -105,7 +101,7 @@ class SwipeActionExample extends Component{
<div className={styles.top} style={{marginBottom:'.05rem'}}>
<div className={styles.mytitle}>{this.props.item.riskName}</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>
</div>}
......@@ -119,4 +115,6 @@ class SwipeActionExample extends Component{
)
}
}
// export default withRouter(SwipeActionExample)
export default connect(({home})=>({home}))(SwipeActionExample)
// (Form.create()(History))
......@@ -66,6 +66,4 @@
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"
payload: {
"bannerName":"",
"bannerStatus":1,
"proId":localStorage.getItem("project"),
"pageNo":1,
"pageSize":10,
"project":localStorage.getItem("project"),
"website":localStorage.getItem("website"),
"orgId":localStorage.getItem("orgId"),
},
......@@ -40,13 +42,12 @@ import styles from "./Swiper.css"
storage.setItem("calculationMethod",item.bannerLabel)
storage.setItem("selectd",1)
storage.setItem("seriNo",'')
//storage.setItem("recipients",false)
storage.setItem("recipients",false)
storage.setItem("riskIntroduce",'')
// storage.setItem("thumbnail",item.bannerPath)
storage.setItem("thumbnail",item.bannerUrl)
//storage.setItem("recipientsName",'')
storage.setItem("thumbnail",item.bannerPath)
storage.setItem("recipientsName",'')
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(){
return (
......@@ -74,7 +75,7 @@ import styles from "./Swiper.css"
this.setState({
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>)
})}
</Carousel>
......
......@@ -13,6 +13,103 @@ const EditableRow = ({ form, index, ...props }) => (
</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 {
constructor(props) {
super(props);
......@@ -45,12 +142,7 @@ export default class EditableTable extends React.Component {
count: 2,
};
}
componentWillReceiveProps(nextProps){
this.setState({
dataSource:nextProps.listTable,
columns:nextProps.listTitle,
})
}
componentDidMount(){
this.setState({
dataSource:this.props.listTable,
......
......@@ -45,8 +45,6 @@
/* 我的客户 --- 无*/
.clientless{
/*margin: auto;*/
position: absolute;
height: 100%;
}
.clientless> .client{
width: 1.51rem;
......@@ -60,11 +58,9 @@
margin-bottom: .02rem;
}
.add{
position: absolute;
bottom: .32rem;
width: 3.5rem;
height: 1.22rem;
margin: 0 .32rem 0;
margin: 1.8rem .32rem 0;
}
......@@ -196,16 +192,26 @@ SwipeActionExample{
list-style: none;
}
.btn_confirm{
position: relative;
height: .7rem;
top: .05rem;
/*width: 100%;*/
/*height: 1rem;*/
}
.btn_confirm>img{
width: .6rem;
height: .6rem;
position: relative;
/* margin: auto; */
position: absolute;
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{
justify-content: center;
background-color: #fff;
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 @@
<head>
<meta charset="UTF-8">
<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="Cache-Control" content="no-cache, must-revalidate">
<meta http-equiv="expires" content="0">
</head>
<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>
<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.worker.js"></script>
</body>
</html>
......@@ -19,17 +19,12 @@ app.model(require('./models/poster').default);
app.model(require('./models/databank').default);
app.model(require('./models/GovernorTraining').default);
app.model(require('./models/getCode').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);
app.model(require('./models/Performance').default)
// 4. Router
app.router(require('./router').default);
// 5. Start
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"
export default {
namespace: 'Performance',
......@@ -12,6 +13,7 @@ export default {
if (callback) callback(data.data);
} else {
error && error(data)
// notifyError(data.message);
}
},
*performList({ payload, callback, error}, { call, put }) {
......@@ -22,14 +24,6 @@ export default {
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: {
saveUser(state, { payload }) {
......
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 {
} else {
// if (error) callback(error);
if (error) error(data);
}
},
*Dictionaries({ payload, callback }, { call, put }) {
......@@ -31,21 +30,20 @@ export default {
notifyError(data.message);
}
},
*sendMaster({ payload, callback,error }, { call, put }) {
*PremiumPaymentPeriod({ payload, callback }, { call, put }) {
console.log(payload);
const { data } = yield call(sendMaster, payload);
const { data } = yield call(PremiumPaymentPeriod, payload);
if (data.status) {
if (callback) callback(data.data);
} 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);
const { data } = yield call(isFollow, payload);
const { data } = yield call(sendMaster, payload);
if (data.status) {
if (callback) callback(data.data);
} else {
......@@ -54,15 +52,16 @@ export default {
}
},
*followCustomer({ payload, callback,error }, { call, put }) {
*isFollow({ payload, callback,error }, { call, put }) {
console.log(payload);
const { data } = yield call(followCustomer, payload);
const { data } = yield call(isFollow, payload);
if (data.status) {
if (callback) callback(data.data);
} else {
if (error) error(data.data);
// notifyError(data.message);
}
}
},
......
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 {
namespace: 'home',
state: {
PersonalDetail:{},
AllPlanList:[],
MyPlanList:[],
searchList:[]
},
effects: {
*getBanner({ payload, callback }, { call, put }) {
......@@ -24,7 +25,6 @@ export default {
const { data } = yield call(getPlanList, payload);
if (data.status === true) {
if (callback) callback(data.data);
yield put({ type: 'updatePlanList' ,payload:{planList:data.data}});
} else {
notifyError('退出失败!');
}
......@@ -38,51 +38,33 @@ export default {
// notifyError(data.message);
}
},
*getCustomerInfo({ payload, callback }, { call, put }) {
const { data } = yield call(getCustomerInfo, payload);
if (callback) callback(data);
},
*getRoomList({ payload, callback }, { call, put }) {
const { data } = yield call(GetRoomList, payload);
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) {
*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);
yield put({ type: 'updateSearchList' ,payload:{searchList:data.data}});
} else {
notifyError(data.message);
}
},
*setClickRecord({ payload, callback }, { call, put }) {
const { data } = yield call(setClickRecord, payload);
if (data.status) {
if (callback) callback(data.data);
} else {
notifyError(data.message);
}
}
*getCustomerInfo({ payload, callback }, { call, put }) {
const { data } = yield call(getCustomerInfo, payload);
if (callback) callback(data);
},
},
reducers: {
savePersonalDetail(state, { payload }) {
return { ...state, PersonalDetail: payload.microPlanInfo };
},
updatePlanList(state, { payload }){
return {
...state,
AllPlanList: payload.planList };
},
updateSearchList(state, { payload }){
return {
...state,
...payload };
}
},
subscriptions: {
......
......@@ -21,7 +21,7 @@ export default {
if (data.status === true) {
if (callback) callback(data);
} else {
notifyError(data.message);
// notifyError(data.message);
}
},
*Approve({ payload, callback }, { call, put }) {
......
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 {
*getAllUser({ payload, callback }, { call, put }) {
const { data } = yield call(getAllUser, payload);
if (data.status === true) {
if(data.data && data.data.length===1){
if(data.data.length===1){
yield put({
type: 'saveUser',
payload: data.data,
});
}
let dataList = data.data || [];
if (callback) callback(dataList);
if (callback) callback(data.data);
} else {
notifyError(data.message);
}
......@@ -36,6 +35,18 @@ export default {
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: {
......
import { getMyPlanMessage,PlanClause,payInsurance,getProspectusaAditional,deletePlan,PremiumPaymentPeriod,addReceiveInfo} from '../services/planEditor';
import { notifyError } from '../services/app.js';
import { PlanClause,payInsurance,getProspectusaAditional,deletePlan} from '../services/planEditor';
export default {
namespace: 'planEditor',
state: {
userName: '',
password: '',
termList:'',//产品条款
},
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 }) {
const { data } = yield call(PlanClause, payload);
if (data.status) {
if (callback) callback(data);
} else {
// notifyError(data.message);
if (error) error(data);
}
},
/* 编辑计划书--买入保险 */
*payInsurance({ payload, callback,error }, { call, put }) {
console.log('8888888888888888888888888888 ----购买险种的参数---payInsurance------>',JSON.stringify(payload));
const { data } = yield call(payInsurance, payload);
if (data && data.status) {
if (callback) callback(data);
} else {
if (error) error(data);
// notifyErrorfyError(data.message);
}
},
......@@ -51,9 +38,9 @@ export default {
const { data } = yield call(getProspectusaAditional, payload);
if (data.status) {
if (callback) callback(data);
yield put({ type: 'updateTermList' ,payload:{termList:data.data}});
} else {
if (error) error(data);
// notifyError(data.message);
}
},
......@@ -68,34 +55,8 @@ export default {
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: {
updateTermList(state,action){
return {
...state,
termList : action.payload.termList
}
}
},
subscriptions: {
......
import { GetPosterList, GetPosterInfo } from "../services/poster";
import { GetPosterList } from '../services/poster';
export default {
namespace: "poster",
namespace: 'poster',
state: {
// item: {},
},
effects: {
*getPosterList({ payload, callback }, { call, put }) {
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: {
// saveUser(state, { payload }) {
// console.log(payload);
// return { ...state, item: payload };
// },
},
subscriptions: {
},
subscriptions: {}
};
......@@ -15,10 +15,7 @@ function RouterConfig({ history, app }) {
app,
component: () => import('./routes/Home')
})
const Search = dynamic({
app,
component: () => import('./routes/Home/search')
})
const Welcome = dynamic({
app,
component: () => import('./routes/Welcome')
......@@ -40,6 +37,10 @@ function RouterConfig({ history, app }) {
app,
component: () => import('./routes/ProspectusList')
})
const PlanEditor = dynamic({
app,
component: () => import('./routes/PlanEditor')
})
const AddPlanEditor = dynamic({
app,
component: () => import('./routes/AddPlanEditor')
......@@ -54,7 +55,7 @@ function RouterConfig({ history, app }) {
})
const MyUser = dynamic({
app,
component: () => import('./routes/MyUser/index')
component: () => import('./routes/MyUser')
})
const AddUser = dynamic({
app,
......@@ -104,77 +105,17 @@ function RouterConfig({ history, app }) {
app,
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 (
<ConnectedRouter history={history}>
<Switch>
<Route path="/" exact component={Login} />
<Route path="/welcome" exact component={Welcome} />
<Route path="/home" exact component={Home} />
<Route path="/search" exact component={Search} />
<Route path="/users" exact component={Users} />
<Route path="/poster" exact component={Poster} />
<Route path="/poster/info" exact component={PosterInfo} />
<Route path="/prospectusList" exact component={ProspectusList} />
<Route path="/planEditor" exact component={PlanEditor} />
<Route path="/addPlanEditor" exact component={AddPlanEditor} />
<Route path="/cover" exact component={Cover} />
<Route path="/planResult" exact component={PlanResult} />
......@@ -190,22 +131,7 @@ function RouterConfig({ history, app }) {
<Route path="/governortraining/addclient" exact component={GTAddClient} />
<Route path="/governortraining/chooseclient" exact component={GTChooseClient} />
<Route path="/video/chooseclient" exact component={VideoChooseClient} />
<Route path="/home/myCenter" exact component={MyCenter} />
<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="/home/performance" exact component={Performance}/>
<Route path="*" render={() => <Redirect to="/" />} />
</Switch>
</ConnectedRouter>
......
......@@ -105,7 +105,7 @@ body{
width: .22rem;
height: .2rem;
position: absolute;
top: .14rem;
top: .1rem;
right: 0;
}
......@@ -282,9 +282,6 @@ body{
border-radius: 10px;
color: white;
}
.chakantiaokuan{
min-height: 20px
}
.choose>span{
color: rgb(153, 153, 153);
......@@ -343,26 +340,6 @@ body{
}
:global(.am-modal-body ){
overflow-x: hidden;
}
.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;
}
/*:global(.am-list-item .am-input-control input:disabled ){
color:black !important;
}*/
......@@ -8,7 +8,7 @@ body{
position: relative;
width: 100%;
height: 100%;
/* padding-bottom: 1rem; */
padding-bottom: 1rem;
overflow-y: scroll;
}
/* 列表 */
......@@ -133,6 +133,7 @@ input:disabled{
.label{
padding: 0 0 0 0.12rem;
/* position: absolute; */
}
.label>img{
......@@ -195,7 +196,6 @@ input:disabled{
position: fixed;
bottom: 0;
padding-left: .11rem;
z-index: 5;
}
.bottom>.right{
width: 100%;
......@@ -230,10 +230,3 @@ input:disabled{
.black{
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;
this.props.dispatch({
type:'planEditor/PremiumPaymentPeriod',
type:'addUser/PremiumPaymentPeriod',
payload:{
"riskCode":this.state.riskCode,
"maxAge":this.state.age,
"pageNo":1,
"mainCode": this.state.riskCode
"pageNo":1
},
callback(){
......
......@@ -10,14 +10,10 @@ class Cover extends Component {
}
go = ()=>{
this.props.history.push('/planResult')
// let seriNo = localStorage.getItem("seriNo")
// let riskName = localStorage.getItem("riskName")
// let riskCode = localStorage.getItem("riskCode")
// 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")
let seriNo = localStorage.getItem("seriNo")
let riskName = localStorage.getItem("riskName")
let riskCode = localStorage.getItem("riskCode")
let thumbnail = localStorage.getItem("thumbnail")
window.location.href = window.location.href.split('#')[0]+'#/planResult?seriNo='+seriNo+'&riskName='+riskName +'&riskCode='+riskCode+'&thumbnail='+thumbnail
}
......
......@@ -9,7 +9,7 @@ ul,li,dl,dt,dd{
.pList {
height: 100%; overflow-y: auto;
height: 100%; overflow-y: auto;
dl{
display:flex; margin-top:.1rem; margin-left: .11rem;
dt{
......
......@@ -15,7 +15,6 @@ class DataBank extends Component {
}
componentDidMount() {
sessionStorage.clear();
document.title = '资料库'
const _this = this;
shareHide();
......@@ -23,7 +22,7 @@ class DataBank extends Component {
this.props.dispatch({
type: 'databank/getDataBankList',
payload: {
"configType": "prospectus",
configType: 'prospectus'
},
callback(res) {
if (res.status && res.data.length > 0) {
......@@ -47,7 +46,7 @@ componentWillUnmount(){
{
dataList.map((el, i) => {
return <NavLink key={i} to={{
pathname: "/databank/infolist",
pathname: "/databank/infolist",
search: 'riskCode=' + el.configCode + '&riskName=' + el.configName,
}}><dl>
<dt><img src={el.configInfo} alt='' /></dt>
......
......@@ -21,7 +21,6 @@ class InfoList extends Component {
const { search } = this.props.location;
const _this = this;
let key = Number(sessionStorage.getItem('key'));
shareHide();
Toast.loading('loading...');
if (search) {
......@@ -44,7 +43,7 @@ class InfoList extends Component {
type: 'databank/getDataInfoList',
payload: {
productId: riskCode,
dataType: data[key].configCode,
dataType: data[0].configCode,
orgId: window.localStorage.getItem('orgId'),
proId: window.localStorage.getItem('project')
},
......@@ -87,10 +86,6 @@ class InfoList extends Component {
render() {
let chooseIdx = 0;
if(sessionStorage.getItem("key")){
chooseIdx = Number(sessionStorage.getItem("key"))
}
const { dataList } = this.state;
return (
<Fragment>
......@@ -98,12 +93,11 @@ class InfoList extends Component {
<div className={css.pTagList}>
<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.setState({
chooseIdx: i
})
sessionStorage.setItem( "key", i);
}}>{el.configName}</li>)
}
</ul>
......@@ -129,19 +123,6 @@ class InfoList extends Component {
if(/xls|xlsx/i.test(el.dataFormat)) type = 'excel';
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') {
window.location.href = el.dataPath
} else if (/doc|docx|xls|xlsx|ppt|pptx/i.test(el.dataFormat)) {
......
......@@ -8,13 +8,7 @@ class Preview extends Component {
super()
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() {
const { state } = this.props.location;
let fileType = '';
......@@ -34,9 +28,7 @@ class Preview extends Component {
// </iframe>
}
{
(fileType==='mp4') && (
<video width="100%" style={{background:'black'}} ref={(node) =>{this.videoElement = node}} src={state.url} controls ></video>
)
(fileType==='mp4') && <video width="100%" autoPlay src={state.url}></video>
}
</div>
)
......
......@@ -7,7 +7,6 @@ import { dataFilter } from '../../utils/dataFilter';
import shareHide from "../../utils/shareHide";
import css from './css.less';
const stateName = ['未提交','已提交','已提交','已提交','已成单','已上传','跟进中','停止跟进']
class Audit extends Component{
constructor(props) {
super(props);
......@@ -23,12 +22,10 @@ class Audit extends Component{
}
}
componentDidMount() {
document.title = '我的客户';
componentDidMount() {
shareHide();
// Toast.loading('loading...', 88);
Toast.loading('loading...', 88);
this.getClientUnpassList();
// this.getClientPassedList();
}
getClientPassedList() {
......@@ -60,7 +57,7 @@ class Audit extends Component{
type: 'governortraining/getClientList',
payload: {
id: window.localStorage.getItem("id"),
// auditedState: 0
auditedState: 0
},
callback(res) {
if (res.status) {
......@@ -78,52 +75,106 @@ class Audit extends Component{
chooseClient(pass, item) {
localStorage.setItem('auditClientInfo', JSON.stringify({ ...item, isShowPassedInfo: pass }));
// this.props.dispatch(routerRedux.push({
// pathname: '/governortraining/auditinfo'
// }));
this.props.history.push({pathname: '/governortraining/auditinfo'})
this.props.dispatch(routerRedux.push({
pathname: '/governortraining/auditinfo'
}));
}
render() {
return <div className={css.auditWrap}>
<div>
<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>
{
this.state.clientList.length === 0 && this.state.show1 && (
<div>
<div className={css.splitline}></div>
<div className={css.noData}>
<div className={css.img}></div>
当前无数据
</div>
</div>
)
this.state.clientList.length === 0 && this.state.show1 && < div >
<div className={css.splitline}></div>
<div className={css.noData}>
<div className={css.img}></div>
您当前客户均已审核完毕
</div>
</div>
}
{ this.state.clientList.length>0 && this.state.show1 && <MemberList
id="audit"
height='86vh'
dataList={this.state.storeclientList}
dataList={this.state.storeclientList}
renderType={['name']}
filterData={(keywords) => {
this.setState({
storeclientList: dataFilter(this.state.clientList, ['name'], keywords)
})
}}
renderItem={item => {
return <div className={css.clientItem}>
<span className={css.name}>{item.name}</span>
<span className={css.time}>{item.commitTime ? item.commitTime.substr(0,16) : ""}</span>
<span className={css.status}>{stateName[item.currentState]}</span>
<span className={css.name}>{item.name}</span><span className={css.time}>{item.createTime.substr(0,16)}</span>
</div>
}}
chooseClient={this.chooseClient.bind(this,false)}
pTitle='客户' />}
</div>
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>
</Tabs>
</div>
}
}
}
export default connect()(Audit);
export default connect()(Audit);
\ No newline at end of file
......@@ -3,21 +3,14 @@ import { connect } from 'dva';
import { routerRedux } from 'dva/router';
import ConfirmPop from '../../components/Modal/confirmPop';
import shareHide from "../../utils/shareHide";
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 {
constructor(props) {
super(props);
this.state = {
dataList: null,
dataList: [],
isShowTips: false,
tit: '',
isPass: false,
......@@ -26,13 +19,14 @@ class ClientInfo extends Component {
}
componentDidMount() {
document.title = '客户信息';
const auditInfo = JSON.parse(localStorage.getItem('auditClientInfo'));
shareHide();
if (auditInfo) {
this.setState({
dataList: auditInfo
})
} else {
// this.props.dispatch(routerRedux.push('/governortraining/audit'));
}
}
handlePass(item) {
......@@ -68,35 +62,122 @@ class ClientInfo extends Component {
render(){
let labels = [];
const { dataList } = this.state;
if(!dataList){
return <div/>
if (dataList.label && dataList.label !== '') {
labels = dataList.label.split(',');
}
return (
<div className={css.clientInfoBox}>
<ul className={css.itemBox}>
<li>
<span className={css.label}>姓名</span>
<span className={css.value}>{dataList.name}</span>
</li>
<li>
<span className={css.label}>性别</span>
<span className={css.value}>{
dataList.sex === '0' ? '男' : dataList.sex === '1' ? '女' : ''
}</span>
</li>
<li>
<span className={css.label}>提交时间</span>
<span className={css.value}>{dataList.commitTime ? dataList.commitTime.substr(0,16) : ""}</span>
</li>
<li>
<span className={css.label}>跟进情况</span>
<span className={css.value}>{stateName[dataList.currentState]}</span>
</li>
<li>
<span className={css.label}>所属客户经理</span>
<span className={css.value}>{dataList.managerName}</span>
</li>
</ul>
{
dataList && <div>
<ul className={css.itemBox}>
<li>
<span className={css.label}>姓名</span>
<span className={css.value}>{dataList.name}</span>
</li>
<li>
<span className={css.label}>性别</span>
<span className={css.value}>{
dataList.sex === '0' ? '男' : dataList.sex === '1' ? '女' : ''
}</span>
</li>
<li>
<span className={css.label}>年龄</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>
</ul>
<ul className={css.itemBox}>
<li>
<span className={css.label}>希望购买产品</span>
<span className={css.value}>{dataList.product}</span>
</li>
<li>
<span className={css.label}>缴费期间</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>
</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>
)
}
......
......@@ -69,14 +69,10 @@ class ClientList extends Component {
}
componentDidMount() {
document.title = '我的客户经理';
shareHide();
Toast.loading('loading...', 99);
this.getManagerList();
}
componentWillUnmount(){
ActionSheet.close();
}
render() {
const _this = this;
return (
......@@ -87,27 +83,22 @@ class ClientList extends Component {
您当前并无客户经理
</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()
}} />
</div>}
{
(this.state.managerList.length > 0) && this.state.show && < MemberList
height="74vh"
dataList={this.state.storeManagerList}
dataList={this.state.managerList}
renderType={['name']}
filterData={(keywords) => {
this.setState({
storeManagerList: dataFilter(this.state.managerList, ['name'], keywords)
managerList: dataFilter(this.state.storeManagerList, ['name'], keywords)
})
}}
renderItem={item => {
return <div className={css.managerItem} onClick={()=>{
let governortrainingClient = {...item ,disabled2:true};
localStorage.setItem('governortrainingClient', JSON.stringify(governortrainingClient));
this.props.dispatch(routerRedux.push('/governortraining/addclient'));
}}>
return <div className={css.managerItem}>
<span className={css.name}>{item.name}</span><span className={css.time}>{item.number}</span>
</div>
}}
......
......@@ -14,14 +14,11 @@ span {
.clientless {
height: 100%;
overflow: hidden;
.add{
position: absolute;
bottom: 1rem;
.add {
width: 3.5rem;
//height: .7rem;
margin: 0 .32rem 0;
height: 1.22rem;
margin: 1.8rem .32rem;
}
}
.splitline {
width: 100%;
......@@ -44,12 +41,10 @@ span {
.ac_wrap {
position: relative;
height: 100%;
background: #F8F8F8;
padding-top: .1rem;
overflow-y: auto;
z-index:1;
.aclist_wrap {
background: white; margin-bottom: .1rem; padding-left: .11rem;
span{ margin-right: 0;}
......@@ -162,13 +157,7 @@ span {
}
}
.clientInfoBox {
position: fixed;
width: 100%;
height:100%;
overflow: hidden;
background: #fff;
left:0;
top:0;
padding-bottom:.8rem; overflow-y: auto; height: 100%;
.itemBox{
margin-top:.1rem; background:#fff;
li{
......@@ -178,7 +167,7 @@ span {
width:1.23rem; position: relative;
}
.value{
color:#000; line-height: .21rem; margin: .15rem 0 .14rem;
color:#666; line-height: .21rem; margin: .15rem 0 .14rem;
}
&.require{
position: relative;
......@@ -252,9 +241,3 @@ span {
.label{
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
......@@ -18,34 +18,29 @@ body{
}
.search{
width: 3.8rem;
height: .32rem;
background-color: #F4F4F4;
border-radius: 25.6px;
margin: 0px auto 9.6px;
position: relative;
width: 100%;
padding: .1rem .17rem;
z-index: 10;
top: 0;
}
.search::before {
.search img{
position: absolute;
margin:.09rem .15rem;
width: .15rem;
height: .15rem;
content: '';
background: url(../../assets/image/search.png) no-repeat;
background-size: 100%;
left: .35rem;
top: .19rem;
z-index: 10;
}
.search input{
box-sizing: border-box;
width: 100%;
position: absolute;
border: none;
border-radius: .16rem;
background: #F4F4F4;
height: .32rem;
line-height: .32rem;
padding: 0;
padding-left: .42rem;
outline:none;
left: .4rem;
top: 0.08rem;
background-color: #F4F4F4;
font-size: .14rem;
color: #999;
width:3.25rem ;
}
/*content*/
......@@ -53,7 +48,7 @@ body{
position: relative;
width: 100%;
background-color: #F8F8F8;
/* padding-top: 16px; */
padding-top: 16px;
padding-bottom: .9rem;
......@@ -66,14 +61,6 @@ body{
overflow: hidden;
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倍*/
......@@ -81,15 +68,12 @@ body{
.nav{
display: flex;
font-size: 0.18rem;
margin: .2rem 0;
flex-wrap: wrap;
margin: .32rem 0;
}
.module{
text-align: center;
/* flex: 1; */
width: 25%;
margin-bottom: 0.15rem;
flex: 1;
}
.module>img{
width: .5rem;
......@@ -105,8 +89,8 @@ body{
.planList{
width: 3.92rem;
background-color: white;
/* border-radius: 16px; */
margin: 0 auto .4rem ;
border-radius: 16px;
margin: 0 auto .8rem ;
}
.planList > div >p {
......@@ -128,7 +112,7 @@ body{
height: 100%;
}
.right{
width: 2.9rem;
width: 2.8rem;
height: .8rem;
float: right;
position: relative;
......@@ -157,22 +141,6 @@ body{
width: .34rem;
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{
display: inline-block;
float: right;
......@@ -181,7 +149,7 @@ body{
top: 0;
right: 0;
}
.planList span{
span{
margin-right: .1rem;
float: right;
}
......@@ -243,7 +211,7 @@ body{
.codeWrap{
/* background:#FF9D5C; */
}
:global(.codeWrap .am-modal-transparent .am-modal-content){
:global(.am-modal-transparent .am-modal-content){
padding:0;
}
:global(.am-modal-close){
......@@ -255,140 +223,3 @@ body{
:global(.am-wingblank.am-wingblank-lg){
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
......@@ -4,9 +4,6 @@ import styles from './Login.css'
import $ from 'jquery';
import { Toast } from 'antd-mobile';
import shareHide from "../../utils/shareHide";
import {urlGetParams} from "../../utils/dataFilter";
let t1 = null;//是一个 全局事件
class Login extends Component {
constructor(props){
super(props)
......@@ -38,7 +35,7 @@ class Login extends Component {
$.ajax({
//几个参数需要注意一下
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",
headers: {
'deviceId':this.state.userOpenId, //微信号 userOpenId
......@@ -59,16 +56,7 @@ class Login extends Component {
storage.setItem("orgId", userInfo.orgId ? userInfo.orgId : '') //机构id
storage.setItem("project", userInfo.project ? userInfo.project:'') //项目id
storage.setItem("website", userInfo.website ? userInfo.website:'') //网点id
if(userInfo.roleId == 2 || userInfo.roleId == 3){
// 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('该用户无权限,请联系管理员。')
}
that.props.history.push('/welcome');
},
error : function(result) {
// console.log(result.responseJSON.content);
......@@ -81,12 +69,9 @@ class Login extends Component {
Toast.info(val);
}
componentWillUnmount() {
window.clearInterval(t1);//组件卸载时删除定时器
$('body,#root').removeClass('loginRelease');
}
componentDidMount() {
document.title = '华夏O2O智慧工作平台';
localStorage.clear();
shareHide();
$(document).on('blur', 'input,textarea', function () {
document.activeElement.scrollIntoView();
......@@ -101,10 +86,10 @@ class Login extends Component {
storage.setItem("weixin_id",'') //微信号
storage.setItem("superiorid",'') //角色
let url = window.location.href;
const matchs = urlGetParams(url);
const matchs = decodeURI(url).match(/userOpenId=(.*)&publicOpenId=(.*)/i);
if(matchs){
let userOpenId = matchs.userOpenId;
let publicOpenId = matchs.publicOpenId;
let userOpenId = matchs[1];
let publicOpenId = matchs[2];
this.setState({
userOpenId,
publicOpenId
......@@ -119,7 +104,7 @@ class Login extends Component {
</div>
<div className={styles.phone}>
<img src={require('../../assets/image/home-shadow.png')} alt=""/>
<input type="number" pattern="[0-9]*" placeholder="输入手机号码"
<input type="number" placeholder="输入手机号码"
value={this.state.mobile}
onChange={
(e)=>{
......@@ -138,16 +123,13 @@ class Login extends Component {
this.showToast('请填写正确的手机号!')
return false
}
if(that.state.send){//已发送之后不能再发送接口了
return;
}
that.props.dispatch({
type:'login/checkUser',
payload:{
"number": mobile
},
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",
headers:{"deviceId": that.state.userOpenId},
success:function(result){
......@@ -155,16 +137,16 @@ class Login extends Component {
that.setState({
send:true,
})
t1 = window.setInterval(function () {
let t1 = window.setInterval(function () {
that.setState({
second:that.state.second-1
})
if(that.state.second ===0 ){
window.clearInterval(t1);
that.setState({
send:false,
second:60
})
window.clearInterval(t1);//删除定时器
}
},1000)
}});
......@@ -180,7 +162,7 @@ class Login extends Component {
}}>获取验证码</span>
}
{
this.state.send &&<span>{this.state.second}</span>
this.state.send &&<span >{this.state.second}</span>
}
</div>
<div className={styles.verification}>
......
......@@ -22,7 +22,6 @@ class MyUser extends Component {
storeNameList1:[],
nameList1:[],
show:false,
loadingFlag:true
}
}
addUser = ()=>{
......@@ -36,15 +35,16 @@ class MyUser extends Component {
this.props.history.push('/amendClient')
}
componentWillMount(){
Toast.loading('loading...',0);
this.getUser();
}
componentDidMount(){
document.title = '我的客户';
shareHide();
this.getUser();
this.getUser1();
}
componentWillUnmount(){
document.title = '';
......@@ -58,16 +58,16 @@ class MyUser extends Component {
"currentState":0,
},
callback(data) {
Toast.hide();
let { hasClient } = that.state;
hasClient[0] = data.length > 0;
that.setState({
nameList: data,
// nameList: [],
storeNameList: data,
hasClient,
show:true,
//loadingFlag:false
})
// that.props.amentClient();
}
})
}
......@@ -80,15 +80,14 @@ class MyUser extends Component {
"id":localStorage.getItem("id"),
},
callback(data){
Toast.hide();
let { hasClient } = that.state;
hasClient[1] = data.length > 0;
that.setState({
nameList1: data,
// nameList1: [],
hasClient,
storeNameList1: data,
show:true,
loadingFlag:false
})
}
......@@ -130,27 +129,10 @@ class MyUser extends Component {
}
render() {
if(this.state.loadingFlag){
return <div></div>
}
return (
<div className={styles.box}>
{
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}
storeNameList = {this.state.storeNameList}
storeNameList1 = {this.state.storeNameList1}
goAddUser = {this.goAddUser}
content={'修改'}
dataFilterToProp= {this.dataFilterToProp.bind(this)}
hasClient={this.state.hasClient} />
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} />
}
</div>
)
......
......@@ -200,6 +200,19 @@ body{
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{
font-size: .14rem;
color: #101010;
......@@ -216,14 +229,6 @@ body{
padding: 0 .2rem;
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{
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{
}
.life>p{
/* color: #FF9D5C;
color: #FF9D5C;
font-size: .17rem;
position: absolute;
top: .08rem;
left: 50%;
margin-left: -.25rem; */
color: #FF9D5C;
font-size: .17rem;
position: relative;
top: -.38rem;
margin: 0 auto;
margin-left: -.25rem;
}
.insureMessage{
......@@ -238,18 +233,6 @@ body{
line-height: .4rem;
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{
}
/** { touch-action: pan-y; }*/
span{float: none}
/*:global(.am-list-item){
:global(.am-list-item){
padding-left: 0;
}*/
}
.list{
padding-left: .11rem;
/* margin-left: .2rem; */
......@@ -342,25 +325,16 @@ span{float: none}
background: #FFF7F1;
}
.welcome p.btn {
left: 50%;
bottom: 66px;
width: 1rem;
height: 1rem;
margin-left: -.43rem;
margin-bottom: 0;
text-align: center;
.welcome p.p {
text-align: center;
position: absolute;
top: 50%;
color: #FF9D5C;
font-size: .2rem;
left:0; width: 100%;
line-height: .26rem;
margin-top: 2rem;
}
.welcome p span {
display: block;
}
......@@ -399,14 +373,3 @@ span{float: none}
.plus>img{
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'
import { connect } from 'dva'
import { Link } from 'dva/router'
import shareHide from "../../utils/shareHide";
import {Toast} from "antd-mobile";
import NoData from "../../components/NoData";
import styles from './poster.less';
......@@ -14,31 +12,20 @@ class Poster extends Component {
posterList: [],
selIdx: 0,
filterType: ['鸡汤', '节日', '产品'],
loadingFlag:true
}
}
componentWillMount(){
//Toast.loading('loading...',0);
}
componentDidMount() {
document.title = '海报'
shareHide();
let key = Number(sessionStorage.getItem("key"));
if(key == 1){
this.filter('节日');
}else if (key == 2) {
this.filter('产品');
}else{
this.filter('鸡汤');
}
this.filter('鸡汤');
}
componentWillUnmount(){
document.title = ''
}
filter(type) {
Toast.loading('loading...',0)
const _this = this;
this.props.dispatch({
type: 'poster/getPosterList',
......@@ -48,16 +35,13 @@ class Poster extends Component {
agentCode2: window.localStorage.getItem('project')
},
callback(res) {
Toast.hide();
if (typeof res.data === 'object') {
_this.setState({
posterList: res.data,
loadingFlag:false
posterList: res.data
})
} else {
_this.setState({
posterList: [],
loadingFlag:false
posterList: []
})
}
}
......@@ -66,14 +50,15 @@ class Poster extends Component {
render() {
let selIdx = 0;
if(sessionStorage.getItem("key")){
selIdx = Number(sessionStorage.getItem("key"))
}
const { posterList } = this.state;
if(this.state.loadingFlag){
return <div></div>
const roleId = window.localStorage.getItem('roleId');
let position = '';
switch (roleId) {
case '2':
position = '客户经理';
break;
default:
position = '督训';
}
return (
<div className={styles.wrapper}>
......@@ -81,12 +66,11 @@ class Poster extends Component {
<div className={styles.splitline}></div><ul className={styles.tags}>
{
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.setState({
selIdx:i
})
sessionStorage.setItem( "key", i);
}}>{el}</li>
})
}
......@@ -94,17 +78,14 @@ class Poster extends Component {
<ul className={styles.pList}>
{
posterList.length>0 ? posterList.map((el, i) => {
posterList.map((el, i) => {
return <li key={i}>
<Link to={{
pathname: "/poster/info",
state: {
id: el.reportCode,
reportImage: el.reportImage
}
search: '?imgpath=' + el.reportImage + '&position=' + position + '&name=' + window.localStorage.getItem('name') + '&phone=' + window.localStorage.getItem('number'),
}}><img alt="" src={el.reportImage} /></Link>
</li>
}): <NoData />
})
}
</ul>
</div>
......
......@@ -7,7 +7,7 @@ body{
margin:0; padding:0;
}
:global(.am-tabs-default-bar-tab){
font-size: .17rem;
font-size: .17rem;
color:#ABABAB;
}
:global(.am-tabs-default-bar-tab-active){
......@@ -50,7 +50,7 @@ body{
flex-wrap: wrap;
padding-left:.06rem;
margin-top: .05rem;
li{
li{
width: 1.24rem;
height: 2.24rem;
background: pink;
......@@ -65,7 +65,7 @@ body{
margin-top: .1rem;
background: white;
dl{
display: flex;
display: flex;
padding-top: .1rem;
dt{
width: .8rem; height: .8rem;
......@@ -74,7 +74,7 @@ body{
margin-left: .1rem;
}
dd{
padding-left: .14rem;
padding-left: .14rem;
width: 3.1rem;
.tit{
color:#333;
......@@ -135,106 +135,34 @@ body{
display: flex;
overflow-y: auto;
flex-flow: column;
.date_section{
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;
}
justify-content: space-between;
.poster{
position: relative;
width: 3.26rem;
height: 5.8rem;
margin: 0 auto;
font-variant: small-caps;
width: 3.54rem;
height: 6.4rem;
margin: .2rem auto;
img{
position: relative;
z-index: 1;
width: 100%;
height: 100%;
}
.info{
position: absolute;
display:flex;
left:0; bottom:0;
width: 100%;
z-index: 4;
padding: .12rem;
padding: .13rem 0 .12rem .2rem;
box-sizing: border-box;
&:before{
position: absolute; left:0; top:0;
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 {
......@@ -245,10 +173,6 @@ body{
z-index: 6;
}
}
.post_tips {
color:#999; font-size: .14rem; text-align: center;
line-height: .26rem;
}
.operation{
height: 1.27rem;
width: 100%;
......@@ -284,22 +208,4 @@ body{
background-size: 100%;
}
}
}
.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
......@@ -3,7 +3,6 @@ import { connect } from 'dva'
import shareHide from "../../utils/shareHide";
import Tabs from "../../components/Tabs"
import {Toast} from "antd-mobile"
......@@ -15,7 +14,6 @@ class ProspectusList extends Component {
tab:['所有','我的'],
allPlanList:[],
myPlanList:[],
loadingFlag:true
}
}
......@@ -29,9 +27,9 @@ class ProspectusList extends Component {
pageNo:"0"
},
callback(data){
// data.sort((a,b)=>{
// return Date.parse(b.createTime) - Date.parse(a.createTime)
// })
data.sort((a,b)=>{
return Date.parse(b.createTime) - Date.parse(a.createTime)
})
that.setState({
myPlanList:data
})
......@@ -46,28 +44,19 @@ class ProspectusList extends Component {
payload:{
riskName:"",
riskStatus:1, //1 启用
"proId":localStorage.getItem("project"),
"project":localStorage.getItem("project"),
"website":localStorage.getItem("website"),
"orgId":localStorage.getItem("orgId"),
},
callback(data){
Toast.hide();
console.log(data);
that.setState({
allPlanList:data,
loadingFlag:false
allPlanList:data
})
},
})
}
componentWillMount(){
Toast.loading('loading...',0);
}
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 = '计划书';
let that = this;
/* 计划书接口 */
......@@ -81,17 +70,10 @@ class ProspectusList extends Component {
render() {
console.log(this.props.login);
if(this.state.loadingFlag){
return <div></div>
}
return (
<div style={{height:'100%',backgroundColor:'white'}}>
{/*<HeaderNav title={this.state.navTitle} />*/}
<Tabs title={this.state.tab}
allPlanList = {this.state.allPlanList}
myPlanList = {this.state.myPlanList}
getMyPlan={this.getMyPlan}
style={{paddingTop:0}}/>
<Tabs title={this.state.tab} allPlanList = {this.state.allPlanList} myPlanList = {this.state.myPlanList} getMyPlan={this.getMyPlan} style={{paddingTop:0}}/>
</div>
)
}
......
......@@ -6,9 +6,7 @@ body{
.welcome{
width: 4.14rem;
height: 100%;
background: url('../../assets/image/welcome.png') no-repeat center center/100%;
background-size: contain;
background-color: white;
background: url('../../assets/image/welcome.png')no-repeat center center/100%;
}
/*
.welcome img{
......@@ -17,26 +15,3 @@ body{
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
import React, { Component } from 'react'
import { connect } from 'dva'
import shareHide from "../../utils/shareHide";
import {urlGetParams} from "../../utils/dataFilter";
import styles from './Welcome.css'
// import ReactCSSTransitionGroup from "react-addons-css-transition-group";
class Welcome extends Component {
constructor(){
super()
this.state={
phoneNum:urlGetParams(window.location.href).phoneNum ? false : true
}
}
go = ()=> {
let url = window.location.href;
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;
this.props.history.push('/home');
}
componentDidMount() {
document.title = '华夏O2O智慧工作平台';
shareHide();
setTimeout(this.go,2000)
setTimeout(this.go,2000)
}
render() {
let animate = {
textAlign:'center',
position:'absolute',
top:'70%',
fontSize: '.2rem',
width: '100%',
}
return (
<div className={styles.welcome}>
{this.state.phoneNum && <div className={styles.FadeInFrame} style={animate}>
恭喜您成功注册智慧工作平台<br/>
开启智慧工作之旅
</div>}
{/*<img src={require('../../assets/image/welcome.png')} alt=""/>*/}
</div>
)
}
......
......@@ -7,12 +7,8 @@ span {
body{
background: white;
}
.modalWrap{
:global(.am-modal-content){
background: none;
}
:global(.am-modal-content){
background: none;
}
.splitline {
width: 100%;
......@@ -40,14 +36,14 @@ body{
box-sizing: border-box;
}
.btn_close {
position: absolute;
position: absolute;
right: .18rem; top: .2rem;
width: .14rem; height: .14rem;
background: url('../../assets/image/icon_close.png') no-repeat; background-size: 100%;
}
}
.btn_chooseClient1{
width: 3rem; height: .4rem; border: 1px solid #FF9D5C; text-align: center;
width: 3rem; height: .4rem; border: 1px solid #FF9D5C; text-align: center;
line-height: .4rem; margin: .2rem auto; border-radius: .2rem; color:#fff; background:#FF9D5C;
}
.clientInfo {
......@@ -121,7 +117,7 @@ body{
}
}
.btn_submit {
width: 3.5rem; height: 1.16rem;
width: 3.5rem; height: 1.16rem;
background:url('../../assets/image/btn_submit.png') no-repeat; background-size: 100%;
margin: 0 auto;
}
......@@ -140,7 +136,7 @@ body{
height: 100%;
background: white;
.listWrap{
position: relative;
position: relative;
height: 100%;
.indexList{
position: absolute;
......@@ -157,9 +153,9 @@ body{
.search{
padding: .1rem .17rem;
padding-bottom:0;
input {
input {
box-sizing: border-box;
width: 100%; border: none;
width: 100%; border: none;
border-radius: .16rem;
background:#F4F4F4;
height: .32rem; line-height: .32rem;
......@@ -220,10 +216,10 @@ body{
border-top:1px solid #F8F8F8;
content:''; overflow: hidden;
}
.time{
.time{
margin-right: .3rem;
}
:global(.name){
position: relative;
padding-left: .3rem;
......@@ -242,7 +238,7 @@ body{
background: url('../../assets/image/icon_chosen.png') no-repeat;
background-size:100%;
}
}
}
dd:first-of-type {
......@@ -297,4 +293,4 @@ body{
margin-right: .11rem;
}
}
}
}
\ No newline at end of file
......@@ -14,7 +14,7 @@ class ExpertVideo extends Component {
}
}
handleSubmit() {
}
render() {
const { show, handleClose, handleShowChoosePop,handleNoneClient } = this.props;
......@@ -23,19 +23,18 @@ class ExpertVideo extends Component {
<Modal
popup
animationType="slide-up"
wrapClassName={css.modalWrap}
visible={show}
visible = {show}
>
<div className={css.line}></div>
<div className={css.e_wrap}>
<div className={css.title}>
在线专家
<span className={css.btn_close} onClick={handleClose}></span>
</div>
<div className={css.btn_chooseClient1} onClick={handleShowChoosePop}>选择客户</div>
<div className={css.btn_chooseClient1} onClick={handleNoneClient}>无客户</div>
</div>
</Modal>
</div>
......
......@@ -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',
headers:headersPost,
body: JSON.stringify(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',
headers:headersPost,
body: JSON.stringify(params),
});
}
/* 投保人手机号是否在跟进中 */
export async function followCustomer(params) {
return request('/o2o/customer/followCustomer', {
export async function isFollow(params) {
return request('/o2o/customer/getAllCustomer', {
method: 'post',
headers:headersPost,
body: JSON.stringify(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',
headers:headersPost,
body: JSON.stringify(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 getSearchList(params) {
return request('/o2o/home/search', {
/* 获取当前登录人的信息 */
export async function getCustomerInfo(params) {
return request('/o2o/customer/getLoginInfo', {
method: 'post',
headers: headersPost,
headers:headersPost,
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) {
});
}
/*获取房间列表 */
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) {
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) {
}
/* 我的计划书--获取被保人信息 */
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 { headersPost } from '../utils/Constants';
/* 获取海报列表*/
/* 获取客户*/
export async function GetPosterList(params) {
return request('/o2o/report/getReportConfigList', {
method: 'post',
......@@ -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 moment = require('moment');
/**
* 按拼音第一个字母排序
* @param {需要排序的数据表} arr
* @param {需要排序的数据表} arr
* 数据按name字段排序 (需注意)
*/
export function sortArr(arr, renderType) {
......@@ -36,7 +35,7 @@ export function sortArr(arr, renderType) {
result.splice(0, 1);
result.push(last_arr);
}
return result;
} else {
return []
......@@ -58,163 +57,7 @@ export function dataFilter(arr, renderType, keywords) {
}
}
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
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) {
* @return {object} An object containing either "data" or "err"
*/
export default function request(url, options, type) {
let newOptions = {...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)
return fetch(url, options)
.then(checkStatus)
.then(type === 'img' ? d => { return d.blob(); } : parseJSON )
.then(data => ({data}))
......
import $ from 'jquery';
import {setClickRecord} from '../services/home';
/**
* 分享
* @param {*} options
......@@ -14,7 +13,7 @@ import {setClickRecord} from '../services/home';
export default function share (options) {
$.ajax({
type: 'POST',
url: 'https://iwpuat.ihxlife.com/o2o/wx/cover',
url: 'https://zmt.ihxlife.com/o2o/wx/cover',
data: JSON.stringify({
shareGoal: options.decodeUrl
}),
......@@ -43,9 +42,6 @@ export default function share (options) {
imgUrl: options.thumbnail,
success: function (res) {
// console.log('分享成功')
if(options.record){
setClickRecord({...options.record});//记录转发
}
},
cancel: function (res) {
//alert('已取消');
......@@ -61,9 +57,6 @@ export default function share (options) {
imgUrl: options.thumbnail,
success: function (res) {
// console.log('分享成功')
if(options.record){
setClickRecord({...options.record});//记录分享
}
},
cancel: function (res) {
//alert('已取消');
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!