提交 e00d4cbc authored 作者: 何守志's avatar 何守志

tijiao

......@@ -7,8 +7,9 @@ import {
class MyTopCard extends React.Component{
render(){
const SummaryData=this.props.data;
console.log("zheli"+typeof(null));
if(SummaryData==null)
console.info('CardViewOne页面');
console.info(SummaryData);
if(SummaryData==null||SummaryData.length===0)
{
return(
<div>
......
......@@ -9,7 +9,7 @@ import {
} from 'antd-mobile';
class CardThreeContent extends React.Component{
render(){
const {todayQianYue, todayCheXiao, suoDingTongJi, shiWuSuoTongJi, jinDuTongJi, chengBenTongJi, shiYongFangYuanTongJi, jiDiFangYuanTongJi, xiaoQuTongJi}=this.props.search;
const {todayQianYue, todayCheXiao, suoDingTongJi, jinDuTongJi, chengBenTongJi, shiYongFangYuanTongJi, jiDiFangYuanTongJi, xiaoQuTongJi}=this.props.search;
return(
<div>
<WhiteSpace size="lg" style={{background:"#eee"}} />
......@@ -21,8 +21,6 @@ class CardThreeContent extends React.Component{
<WhiteSpace size="lg" style={{background:"#eee"}} />
<CardThree data={suoDingTongJi}/>
<WhiteSpace size="lg" style={{background:"#eee"}} />
<CardFour data={shiWuSuoTongJi}/>
<WhiteSpace size="lg" style={{background:"#eee"}} />
<CardFive data={jinDuTongJi}/>
<WhiteSpace size="lg" style={{background:"#eee"}} />
<CardSix data={chengBenTongJi}/>
......@@ -325,24 +323,6 @@ class CardThree extends React.Component{
}
}
}
class CardFour extends React.Component{
render(){
return(
<div>
<Card.Header
title={
<span style={ {paddingRight:"0.75rem",fontWeight:"600"}}>事务所统计</span>
}
style={ {padding:"1.2rem 1.3rem",color:'#38c5b8'}}
/>
{/*<MyBodyCard data={this.props.data}/>*/}
</div>
);
}
}
class CardFive extends React.Component{
render(){
return(
......
......@@ -7,8 +7,8 @@ console.log('index.js');
const app = dva({
history: createBrowserHistory({
// eslint-disable-next-line no-undef
//basename: 'bm-wx',
basename: '/',
basename: 'bm-wx',
//basename: '/',
}),
});
......
......@@ -17,18 +17,34 @@ export default {
effects: {
*getSummaryData({ payload }, { take, put, call, select }) {
const payloads = { userName:'admin',password:'admin', type: 'userName', authType: 'password' };
try{
const result = yield call(login, payloads);
console.info(result);
const { tokenId } = result;
yield call(setToken, tokenId);// 这里的yield ,跟C#中的await一样
}
catch (erroer) {
console.info(erroer);
}
// const payloads = { userName:'admin',password:'admin', type: 'userName', authType: 'password' };
// try{
// const result = yield call(login, payloads);
// console.info(result);
// const { tokenId } = result;
// yield call(setToken, tokenId);// 这里的yield ,跟C#中的await一样
// }
// catch (erroer) {
// console.info(erroer);
// }
//
//
// const { pNumber } = payload;
// let coordinate;
// coordinate= {
// containerType: 'module',
// containerName: 'QueryJiDiModule',
// datasourceName: 'QueryDistrictName',
// };
// try {
// const resultss = yield call(getData, coordinate, { pst: 0, psz: 10 ,params:{pNumber:pNumber}});
// console.info('查询的结果');
// console.info(resultss);
// yield put({ type: 'setSummaryData',payload:{resultss} });
// }catch (erroer){
// console.info(erroer);
// }
// 这是以后放到服务器时候用的代码,因为现在要测试,所以要先注释
const { pNumber } = payload;
const coordinate = {
containerType: 'module',
......@@ -43,30 +59,26 @@ export default {
}catch (erroer){
console.info(erroer);
}
// 这是以后放到服务器时候用的代码,因为现在要测试,所以要先注释
// const { pNumber } = payload;
// const coordinate = {
// containerType: 'module',
// containerName: 'QueryJiDiModule',
// datasourceName: 'QueryDistrictName',
// };
// try {
// const resultss = yield call(getData, coordinate, { pst: 0, psz: 10 ,params:{pNumber:pNumber}});
// console.info('查询的结果');
// console.info(resultss);
// yield put({ type: 'setSummaryData',payload:{resultss} });
// }catch (erroer){
// console.info(erroer);
// }
},
*getSummary({ payload }, { take, put, call, select }) {
const { pNumber } = payload;
const coordinate = {
containerType: 'module',
containerName: 'QueryJiDiModule',
datasourceName: 'QueryTotalDistrictName',
};
let coordinate;
if(pNumber==='全市')
{
coordinate= {
containerType: 'module',
containerName: 'QueryJiDiModule',
datasourceName: 'QueryTotalRoot',
};
}else
{
coordinate= {
containerType: 'module',
containerName: 'QueryJiDiModule',
datasourceName: 'QueryTotalDistrictName',
};
}
try {
const resultss = yield call(getData, coordinate, { pst: 0, psz: 10 ,params:{pNumber:pNumber}});
console.info('查询的结果');
......
......@@ -7,7 +7,6 @@ export default {
todayQianYue:null,
todayCheXiao:null,
suoDingTongJi:null,
shiWuSuoTongJi:null,
jinDuTongJi:null,
chengBenTongJi:null,
shiYongFangYuanTongJi:null,
......
import { routerRedux } from 'dva/router';
import {setToken} from "../utils/auth";
import {getToken, setToken} from "../utils/auth";
const fetchToken = async (url) => {
return fetch(`V4/GetWXUserInfo/${url}`,{
......@@ -41,7 +41,13 @@ export default {
yield put(routerRedux.push('/Home'))
}else
{
yield put(routerRedux.push('/Login'))
tokenId=yield call(getToken);
if(tokenId!==null&&tokenId!=="") {
yield put(routerRedux.push('/Home'));
}else{
yield put(routerRedux.push('/Login'));
}
}
},
},
......
......@@ -63,8 +63,8 @@ class HomePage extends React.Component{
label: '闵行区'
},
{
value: '浦东区',
label: '浦东区'
value: '浦东区',
label: '浦东区'
},
{
value: '普陀区',
......
......@@ -22,7 +22,6 @@ class SearchPage extends React.Component{
dispatch({ type: 'search/getResult',payload: { pjName:this.props.match.params.pjName,datasourceName:'QueryTodayQianYue',stateName:'todayQianYue' }});
dispatch({ type: 'search/getResult',payload: { pjName:this.props.match.params.pjName,datasourceName:'QueryTodayCheXiao',stateName:'todayCheXiao'}});
dispatch({ type: 'search/getResult',payload: { pjName:this.props.match.params.pjName,datasourceName:'QuerySuoDingTongJi',stateName:'suoDingTongJi'}});
dispatch({ type: 'search/getResult',payload: { pjName:this.props.match.params.pjName,datasourceName:'QueryShiWuSuoTongJi',stateName:'shiWuSuoTongJi'}});
dispatch({ type: 'search/getResult',payload: { pjName:this.props.match.params.pjName,datasourceName:'QueryJinDuTongJi',stateName:'jinDuTongJi'}});
dispatch({ type: 'search/getResult',payload: { pjName:this.props.match.params.pjName,datasourceName:'QueryChengBenTongJi',stateName:'chengBenTongJi'}});
dispatch({ type: 'search/getResult',payload: { pjName:this.props.match.params.pjName,datasourceName:'QueryShiYongFangYuanTongJi',stateName:'shiYongFangYuanTongJi'}});
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论