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

heshouzhi

上级 701f6b0b
......@@ -14,6 +14,7 @@
"lowdb": "^1.0.0",
"prop-types": "^15.6.1",
"react": "^16.2.0",
"react-async-wrapper": "^0.1.4",
"react-dom": "^16.2.0",
"react-weui": "^1.1.3",
"urijs": "^1.19.1",
......
......@@ -15,22 +15,22 @@ class MyTopCard extends React.Component{
<Card full>
<Card.Header
title={
<div style={{fontSize:"0.85rem"}}>
<div style={{fontSize:"0.9rem"}}>
<span style={ {paddingRight:"0.75rem",color:'#38c5b8',fontWeight:"600"}}>总证数</span>
<span >0</span>
</div>
}
style={ {padding:"1.2rem 1.3rem",color:'#38c5b8'}}
/>
<Card.Body style={{padding:"0 1.5rem",fontSize:"0.7rem"}}>
<Flex style={{padding:"1rem 0"}}>
<Card.Body style={{padding:"0 1.5rem",fontSize:"0.8rem"}}>
<Flex style={{padding:"0.4rem 0"}}>
<Flex.Item style={{marginRight:"0.75rem"}}>
<Flex style={{justifyContent:"space-between"}}>
<div>已签约证数</div>
<div>0</div>
</Flex>
</Flex.Item>
<Flex.Item style={{marginLeft:"0.75rem"}}>
<Flex.Item style={{marginLeft:"0.8rem"}}>
<Flex style={{justifyContent:"space-between"}}>
<div>证均成本</div>
<div>0</div>
......@@ -38,14 +38,14 @@ class MyTopCard extends React.Component{
</Flex.Item>
</Flex>
<Flex style={{padding:"1rem 0"}}>
<Flex.Item style={{marginRight:"0.75rem"}}>
<Flex style={{padding:"0.4rem 0"}}>
<Flex.Item style={{marginRight:"0.8rem"}}>
<Flex style={{justifyContent:"space-between"}}>
<div>安置房套数</div>
<div>0</div>
</Flex>
</Flex.Item>
<Flex.Item style={{marginLeft:"0.75rem"}}>
<Flex.Item style={{marginLeft:"0.8rem"}}>
<Flex style={{justifyContent:"space-between"}}>
<div>面积成本</div>
<div>0</div>
......@@ -53,14 +53,14 @@ class MyTopCard extends React.Component{
</Flex.Item>
</Flex>
<Flex style={{padding:"1rem 0"}}>
<Flex.Item style={{marginRight:"0.75rem"}}>
<Flex style={{padding:"0.4rem 0"}}>
<Flex.Item style={{marginRight:"0.8rem"}}>
<Flex style={{justifyContent:"space-between"}}>
<div>产权调换比例</div>
<div>0</div>
</Flex>
</Flex.Item>
<Flex.Item style={{marginLeft:"0.75rem"}}>
<Flex.Item style={{marginLeft:"0.8rem"}}>
<Flex style={{justifyContent:"space-between"}}>
<div>货币补偿比例</div>
<div>0</div>
......@@ -80,7 +80,7 @@ class MyTopCard extends React.Component{
<Card full>
<Card.Header
title={
<div style={{fontSize:"0.85rem"}}>
<div style={{fontSize:"0.9rem"}}>
<span style={ {paddingRight:"0.75rem",color:'#38c5b8',fontWeight:"600"}}>总证数</span>
<span >{SummaryData[0].xiangMuZongHuShu}</span>
</div>
......@@ -88,14 +88,14 @@ class MyTopCard extends React.Component{
style={ {padding:"1.2rem 1.3rem",color:'#38c5b8'}}
/>
<Card.Body style={{padding:"0 1.5rem",fontSize:"0.7rem"}}>
<Flex style={{padding:"1rem 0"}}>
<Flex.Item style={{marginRight:"0.75rem"}}>
<Flex style={{padding:"0.4rem 0"}}>
<Flex.Item style={{marginRight:"0.8rem"}}>
<Flex style={{justifyContent:"space-between"}}>
<div>已签约证数</div>
<div>{SummaryData[0].yiQianYueHuShu}</div>
</Flex>
</Flex.Item>
<Flex.Item style={{marginLeft:"0.75rem"}}>
<Flex.Item style={{marginLeft:"0.8rem"}}>
<Flex style={{justifyContent:"space-between"}}>
<div>证均成本</div>
<div>{SummaryData[0].zhengJunChengBen}</div>
......@@ -103,14 +103,14 @@ class MyTopCard extends React.Component{
</Flex.Item>
</Flex>
<Flex style={{padding:"1rem 0"}}>
<Flex.Item style={{marginRight:"0.75rem"}}>
<Flex style={{padding:"0.4rem 0"}}>
<Flex.Item style={{marginRight:"0.8rem"}}>
<Flex style={{justifyContent:"space-between"}}>
<div>安置房套数</div>
<div>{SummaryData.anZhiFangTaoShu}</div>
</Flex>
</Flex.Item>
<Flex.Item style={{marginLeft:"0.75rem"}}>
<Flex.Item style={{marginLeft:"0.8rem"}}>
<Flex style={{justifyContent:"space-between"}}>
<div>面积成本</div>
<div>{SummaryData.mianJiChengBen}</div>
......@@ -118,14 +118,14 @@ class MyTopCard extends React.Component{
</Flex.Item>
</Flex>
<Flex style={{padding:"1rem 0"}}>
<Flex.Item style={{marginRight:"0.75rem"}}>
<Flex style={{padding:"0.4rem 0"}}>
<Flex.Item style={{marginRight:"0.8rem"}}>
<Flex style={{justifyContent:"space-between"}}>
<div>产权调换比例</div>
<div>{SummaryData.chanQuanDiaoHuanBiLi}</div>
</Flex>
</Flex.Item>
<Flex.Item style={{marginLeft:"0.75rem"}}>
<Flex.Item style={{marginLeft:"0.8rem"}}>
<Flex style={{justifyContent:"space-between"}}>
<div>货币补偿比例</div>
<div>{SummaryData.huoBiBuChangBiLi}</div>
......
......@@ -31,7 +31,7 @@ class MyBodyCard extends React.Component{
<div key={index}>
<Card full onClick={()=>this.pushRoute(item)}>
<Card.Header
style={ {padding:"0",color:'#38c5b8',fontSize:"0.85rem"}}
style={ {padding:"0",color:'#38c5b8',fontSize:"0.9rem"}}
title={
<div style={ {padding:"1.2rem 1.3rem",color:'#38c5b8',width:"100%"}}>
<Flex style={{justifyContent:"space-between",alignItems:"flex-start"}}>
......@@ -52,29 +52,29 @@ class MyBodyCard extends React.Component{
}
/>
<Card.Body>
<Flex>
<Flex style={{padding:"0.4rem 0"}}>
<Flex.Item><Badge className={styles.mybadgetwo} style={{background:"none"}} text={
<div style={{color:"#333"}}>
<div style={{color:"#333",fontSize:"0.8rem"}}>
<span style={ {paddingRight:"15px"}}>已签约总数</span>
<span >{item.yiQianYueHuShu}</span>
</div>
}/></Flex.Item>
<Flex.Item><Badge style={{background:"none"}} text={
<div style={{color:"#333"}}>
<div style={{color:"#333",fontSize:"0.8rem"}}>
<span style={ {paddingRight:"0.75rem"}}>签约比例</span>
<span >{item.qianYueHuShuBiLi}</span>
</div>
}/></Flex.Item>
</Flex>
<Flex>
<Flex style={{padding:"0.4rem 0"}}>
<Flex.Item><Badge style={{background:"none"}} text={
<div style={{color:"#333"}}>
<div style={{color:"#333",fontSize:"0.8rem"}}>
<span style={ {paddingRight:"0.75rem"}}>产权调换比例</span>
<span >{item.chanQuanDiaoHuanBiLi}</span>
</div>
}/></Flex.Item>
<Flex.Item><Badge style={{background:"none"}} text={
<div style={{color:"#333"}}>
<div style={{color:"#333",fontSize:"0.8rem"}}>
<span style={ {paddingRight:"0.75rem"}}>货币补偿比例</span>
<span >{item.huoBiBuChangBiLi}</span>
</div>
......
......@@ -7,7 +7,8 @@ console.log('index.js');
const app = dva({
history: createBrowserHistory({
// eslint-disable-next-line no-undef
basename: 'bm-wx',
//basename: 'bm-wx',
basename: '/',
}),
});
......
import { getData } from '../../utils/DataTemplate';
import {setToken} from "../../utils/auth";
import {login} from "../../services/login";
export default {
namespace: 'home',
......@@ -15,33 +17,18 @@ 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 { 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);
// }
// 这是以后放到服务器时候用的代码,因为现在要测试,所以要先注释
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;
const coordinate = {
containerType: 'module',
......@@ -56,6 +43,21 @@ 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 }) {
......
import React from 'react';
import { Router, Route, Switch } from 'dva/router';
import { Router, IndexRoute, Route, Switch } from 'dva/router';
import dynamic from 'dva/dynamic';
import MiddleSelectPage from "./routes/MiddleSelectPage";
//import SearchPage from "./routes/Home/SearchPage";
......@@ -17,9 +17,11 @@ function RouterConfig({ history, app }) {
app,
component: () => import('./routes/Home/SearchPage'),
}) ;
return (
<Router history={history}>
<Switch>
<IndexRoute component={HomePage}/>
<Route path="/" exact component={MiddleSelectPage} />
<Route path="/Home" component={HomePage} />
<Route path="/Login" component={IndexPage} />
......
......@@ -14,8 +14,8 @@ import MyBodyCard from "../../components/CardViewTwo";
class HomePage extends React.Component{
componentWillMount() {
const { dispatch } = this.props;
dispatch({ type: 'home/getSummary',payload: { pNumber:'浦东新区' }});
dispatch({ type: 'home/getSummaryData',payload: { pNumber:'浦东新区' }});
// dispatch({ type: 'home/getSummary',payload: { pNumber:'浦东新区' }});
}
onChange=(value)=>{
console.info("改变了");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论