Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
manager-app-sz
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
ReactNative
manager-app-sz
Commits
dc3dc6cb
提交
dc3dc6cb
authored
11月 03, 2017
作者:
吴强
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加了身份证读卡
上级
372c8572
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
66 行增加
和
49 行删除
+66
-49
dsrinfodetail.js
src/models/dangshireninfo/dsrinfodetail.js
+21
-0
listhouse.js
src/models/houseinfo/listhouse.js
+0
-1
userinfo.js
src/models/userinfo/userinfo.js
+7
-3
DSRInfoDetailScreen.js
src/routes/main/dangshireninfo/DSRInfoDetailScreen.js
+3
-4
DSRInfoScreeen.js
src/routes/main/dangshireninfo/DSRInfoScreeen.js
+3
-12
UserInfoHomeScreen.js
src/routes/main/userinfo/UserInfoHomeScreen.js
+32
-29
没有找到文件。
src/models/dangshireninfo/dsrinfodetail.js
浏览文件 @
dc3dc6cb
...
...
@@ -2,6 +2,7 @@ import { Toast } from 'antd-mobile';
import
{
NavigationActions
}
from
'react-navigation'
;
import
{
getData
,
getMeta
}
from
'../../utils/DataTemplate'
;
import
{
datasourceApi
}
from
'../../services/datasource'
;
import
{
scan
}
from
'../../services/idcard'
;
export
default
{
namespace
:
'DSRInfoDetail'
,
...
...
@@ -15,6 +16,13 @@ export default {
setList
(
state
,
{
payload
})
{
return
{
...
state
,
singularData
:
payload
.
singularData
};
},
setSingularData
(
state
,
{
payload
})
{
const
{
singularData
}
=
state
;
if
(
singularData
.
dangShiRenXingMing
!==
undefined
)
{
singularData
.
dangShiRenXingMing
=
payload
.
peopleName
;
}
return
{
...
state
,
singularData
};
},
setEnable
(
state
,
{
payload
:
enableEdit
})
{
return
{
...
state
,
enableEdit
};
},
...
...
@@ -56,5 +64,18 @@ export default {
}));
yield
put
({
type
:
'setEnable'
,
payload
:
false
});
},
*
DuKa
(
ignored
,
{
call
,
put
})
{
try
{
Toast
.
loading
(
'读卡中...'
,
0
);
const
result
=
yield
call
(
scan
);
if
(
result
)
{
yield
put
({
type
:
'setSingularData'
,
payload
:
result
});
}
Toast
.
loading
(
'读卡完成'
,
5
);
}
finally
{
Toast
.
loading
(
'读卡失败'
,
10
);
}
//
},
},
};
src/models/houseinfo/listhouse.js
浏览文件 @
dc3dc6cb
...
...
@@ -47,7 +47,6 @@ export default {
const
result
=
yield
call
(
getData
,
coordinate
,
{
pst
:
size
,
psz
:
10
});
const
meta
=
yield
call
(
getMeta
,
coordinate
);
yield
put
({
type
:
'setMetas'
,
payload
:
meta
});
// const result = yield call('', 'query-DSRFWInfo', 'QueryfwTable', { pst: size, psz: 10 });
for
(
const
row
of
result
)
{
yield
put
({
type
:
'addHouse'
,
payload
:
row
});
yield
take
(
'addHouse/@@end'
);
...
...
src/models/userinfo/userinfo.js
浏览文件 @
dc3dc6cb
import
{
NavigationActions
}
from
'react-navigation'
;
import
{
getData
,
getMeta
}
from
'../../utils/DataTemplate'
;
export
default
{
namespace
:
'userInfo'
,
...
...
@@ -9,12 +6,19 @@ export default {
userName
:
undefined
,
currentJiDiName
:
undefined
,
jidiList
:
[],
language
:
''
,
},
subscriptions
:
{
setup
({
dispatch
})
{
// eslint-disable-line
},
},
reducers
:
{
setlanguage
(
state
,
{
payload
:
language
})
{
return
{
...
state
,
language
,
};
},
setUserName
(
state
,
{
payload
:
userName
})
{
return
{
...
state
,
...
...
src/routes/main/dangshireninfo/DSRInfoDetailScreen.js
浏览文件 @
dc3dc6cb
...
...
@@ -7,7 +7,6 @@ import { View, ScrollView } from 'react-native';
import
{
List
,
InputItem
,
Button
,
Toast
}
from
'antd-mobile'
;
import
{
connect
}
from
'react-redux'
;
import
{
createAction
}
from
'../../../utils'
;
import
{
scan
}
from
"../../../services/idcard"
;
@
connect
(({
DSRInfoDetail
})
=>
({
DSRInfoDetail
}))
class
DSRInfoDetailScreen
extends
React
.
Component
{
...
...
@@ -39,9 +38,6 @@ class DSRInfoDetailScreen extends React.Component {
const
{
getFieldProps
}
=
this
.
props
.
form
;
return
(
<
ScrollView
>
<
Button
onClick
=
{()
=>
{
scan
().
then
(
res
=>
console
.
log
(
res
)).
catch
(
err
=>
console
.
error
(
err
));
}}
><
/Button
>
<
List
>
{
metas
.
map
((
m
)
=>
{
...
...
@@ -83,6 +79,9 @@ class DSRInfoDetailScreen extends React.Component {
return
(
<
List
.
Item
>
<
View
style
=
{{
flexDirection
:
'row'
}}
>
<
Button
onClick
=
{()
=>
{
this
.
props
.
dispatch
({
type
:
'DSRInfoDetail/DuKa'
});
}}
><
/Button
>
<
Button
style
=
{{
marginRight
:
8
}}
type
=
"primary"
onClick
=
{
this
.
onEdit
}
>
编辑
<
/Button
>
<
Button
style
=
{{
marginRight
:
8
}}
onClick
=
{
this
.
onSubmit
}
>
保存
<
/Button
>
<
/View
>
...
...
src/routes/main/dangshireninfo/DSRInfoScreeen.js
浏览文件 @
dc3dc6cb
import
React
,
{
Component
}
from
'react'
;
import
{
Text
,
FlatList
}
from
'react-native'
;
import
{
Card
,
WingBlank
,
WhiteSpace
}
from
'antd-mobile'
;
import
{
WingBlank
,
WhiteSpace
}
from
'antd-mobile'
;
import
{
connect
}
from
'react-redux'
;
import
{
createAction
}
from
'../../../utils/index'
;
import
FlatListItem
from
'../houseinfo/FlatListItem'
;
...
...
@@ -16,7 +16,6 @@ class DSRInfoScreeen extends Component {
onEndReached
=
()
=>
{
// 以下是制造新数据
if
(
!
this
.
props
.
loading
)
{
console
.
log
(
'上啦加载'
)
this
.
props
.
dispatch
(
createAction
(
'DSRInfo/getDSRList'
)());
}
};
...
...
@@ -41,11 +40,7 @@ class DSRInfoScreeen extends Component {
renderFooter
=
()
=>
(
<
WingBlank
size
=
"lg"
>
<
WhiteSpace
size
=
"lg"
/>
<
Card
>
<
Card
.
Body
>
<
Text
>
到底了!!!
<
/Text
>
<
/Card.Body
>
<
/Card
>
<
Text
>
到底了!!!
<
/Text
>
<
WhiteSpace
size
=
"lg"
/>
<
/WingBlank
>
);
...
...
@@ -53,11 +48,7 @@ class DSRInfoScreeen extends Component {
renderEmptyView
=
()
=>
(
<
WingBlank
size
=
"lg"
>
<
WhiteSpace
size
=
"lg"
/>
<
Card
>
<
Card
.
Body
>
<
Text
>
当前无内容
<
/Text
>
<
/Card.Body
>
<
/Card
>
<
Text
>
当前无内容
<
/Text
>
<
WhiteSpace
size
=
"lg"
/>
<
/WingBlank
>
);
...
...
src/routes/main/userinfo/UserInfoHomeScreen.js
浏览文件 @
dc3dc6cb
import
React
,
{
PureComponent
}
from
'react'
;
import
{
View
,
StyleSheet
,
RefreshControl
,
Dimensions
,
ScrollView
,
Text
}
from
'react-native'
;
import
{
View
,
StyleSheet
,
Dimensions
,
ScrollView
,
Text
,
Picker
}
from
'react-native'
;
import
{
connect
}
from
'react-redux'
;
import
{
List
,
InputItem
}
from
'antd-mobile'
;
const
width
=
Dimensions
.
get
(
'window'
).
width
;
const
height
=
Dimensions
.
get
(
'window'
).
height
;
// create a component
@
connect
(({
userInfo
})
=>
({
userInfo
}))
class
UserInfoHomeScreen
extends
PureComponent
{
renderHeader
=
()
=>
{
return
(
<
View
style
=
{
styles
.
header
}
>
<
View
style
=
{
styles
.
userContainer
}
>
<
Text
style
=
{
styles
.
avatar
}
/
>
<
View
>
<
View
style
=
{{
flexDirection
:
'row'
}}
>
<
Text
style
=
{{
color
:
'white'
}}
>
素敌
<
/Text
>
<
Text
style
=
{{
marginLeft
:
4
}}
/
>
<
/View
>
<
Text
style
=
{{
color
:
'white'
,
marginTop
:
4
}}
>
个人信息
<
/Text
>
<
/View
>
<
/View
>
<
/View
>
);
};
render
()
{
return
(
<
View
style
=
{{
flex
:
1
,
backgroundColor
:
'#06C1AE'
}}
>
<
View
style
=
{{
flex
:
1
,
backgroundColor
:
'#06C1AE'
}}
>
<
View
style
=
{{
position
:
'absolute'
,
width
,
height
,
backgroundColor
:
'#06C1AE'
}}
/
>
<
ScrollView
refreshControl
=
{
<
RefreshControl
refreshing
=
{
this
.
state
.
isRefreshing
}
onRefresh
=
{()
=>
this
.
onHeaderRefresh
()}
tintColor
=
"gray"
/>
}
>
{
this
.
renderHeader
}
<
ScrollView
>
<
View
style
=
{
styles
.
header
}
>
<
View
style
=
{
styles
.
userContainer
}
>
<
Text
style
=
{
styles
.
avatar
}
/
>
<
View
>
<
View
style
=
{{
flexDirection
:
'row'
}}
>
<
Text
style
=
{{
color
:
'white'
}}
>
素敌
<
/Text
>
<
Text
style
=
{{
marginLeft
:
4
}}
/
>
<
/View
>
<
Text
style
=
{{
color
:
'white'
,
marginTop
:
4
}}
>
个人信息
<
/Text
>
<
/View
>
<
/View
>
<
List
style
=
{{
backgroundColor
:
'white'
}}
className
=
"picker-list"
>
<
Picker
extra
=
"请选择(可选)"
data
=
{
district
}
title
=
"Areas"
{...
getFieldProps
(
'district'
,
{
initialValue
:
[
'340000'
,
'341500'
,
'341502'
],
})}
onOk
=
{
e
=>
console
.
log
(
'ok'
,
e
)}
onDismiss
=
{
e
=>
console
.
log
(
'dismiss'
,
e
)}
>
<
List
.
Item
arrow
=
"horizontal"
>
Multiple
&
cascader
<
/List.Item
>
<
/Picker
>
<
/List
>
<
/View
>
<
/ScrollView
>
<
/View
>
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论