Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
manager-app-sz
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
ReactNative
manager-app-sz
Commits
2d5ac12d
提交
2d5ac12d
authored
11月 13, 2017
作者:
吴强
浏览文件
操作
浏览文件
下载
差异文件
添加新增人口Detail界面
上级
fd550773
4101203e
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
23 个修改的文件
包含
558 行增加
和
286 行删除
+558
-286
rn1.log
rn1.log
+0
-0
pickerComponent.js
src/components/pickerComponent.js
+7
-38
dsrinfo.js
src/models/dangshireninfo/dsrinfo.js
+3
-3
domain.js
src/models/domain.js
+111
-8
houseDetail.js
src/models/houseinfo/houseDetail.js
+23
-3
index.js
src/models/index.js
+2
-0
DSRInfoDetailScreen.js
src/routes/main/dangshireninfo/DSRInfoDetailScreen.js
+18
-17
DSRInfoScreeen.js
src/routes/main/dangshireninfo/DSRInfoScreeen.js
+1
-9
HouseDetail.js
src/routes/main/houseinfo/HouseDetail.js
+35
-148
HouseScreen.js
src/routes/main/houseinfo/HouseScreen.js
+24
-0
ObligeeInfo.js
src/routes/main/houseinfo/ObligeeInfo.js
+1
-1
editHouseDetail.js
src/routes/main/houseinfo/editHouseDetail.js
+63
-0
erJiScreen.js
src/routes/main/houseinfo/erJiScreen.js
+2
-2
index.js
src/routes/main/index.js
+46
-30
addPeopleInfo.js
src/routes/main/peopleInfo/addPeopleInfo.js
+3
-3
peopleDetailEditScreen.js
src/routes/main/peopleInfo/peopleDetailEditScreen.js
+0
-0
index.js
src/routes/main/quanshuInfo/index.js
+20
-0
quanshuDetail.js
src/routes/main/quanshuInfo/quanshuDetail.js
+3
-0
quanshuList.js
src/routes/main/quanshuInfo/quanshuList.js
+113
-0
setting.png
src/routes/main/setting.png
+0
-0
UserInfoHomeScreen.js
src/routes/main/userinfo/UserInfoHomeScreen.js
+80
-24
touxiang.png
src/routes/main/userinfo/touxiang.png
+0
-0
login.js
src/services/login.js
+3
-0
没有找到文件。
rn1.log
0 → 100644
浏览文件 @
2d5ac12d
差异被折叠。
点击展开。
src/components/pickerComponent.js
浏览文件 @
2d5ac12d
import
React
,
{
PureComponent
}
from
'react'
;
import
{
View
}
from
'react-native'
;
import
{
WhiteSpace
,
List
,
Picker
}
from
'antd-mobile'
;
import
{
createAction
}
from
'../utils/index'
;
class
PickerComponent
extends
PureComponent
{
onClick
=
()
=>
{
this
.
props
.
dispatch
(
createAction
(
'domain/fetch'
)()
);
this
.
props
.
onClick
(
);
};
onPickerChange
=
(
val
)
=>
{
let
colNum
=
1
;
const
d
=
[...
this
.
props
.
data
];
const
asyncValue
=
[...
val
];
if
(
val
[
0
]
!==
undefined
)
{
d
.
forEach
((
i
)
=>
{
if
(
i
.
value
===
'zj'
)
{
colNum
=
2
;
if
(
!
i
.
children
)
{
i
.
children
=
[{
value
:
'zj-nb'
,
label
:
'宁波'
,
},
{
value
:
'zj-hz'
,
label
:
'杭州'
,
}];
asyncValue
.
push
(
'zj-nb'
);
}
else
if
(
val
[
1
]
===
'zj-hz'
)
{
i
.
children
.
forEach
((
j
)
=>
{
if
(
j
.
value
===
'zj-hz'
)
{
j
.
children
=
[{
value
:
'zj-hz-xh'
,
label
:
'西湖区'
,
}];
asyncValue
.
push
(
'zj-hz-xh'
);
}
});
colNum
=
3
;
}
}
});
}
else
{
colNum
=
1
;
}
this
.
props
.
onPickerChange
(
val
);
};
render
()
{
const
{
data
,
pathVal
,
cols
}
=
this
.
props
;
return
(
<
View
>
<
WhiteSpace
size
=
"lg"
/>
<
List
style
=
{{
backgroundColor
:
'white'
}}
className
=
"picker-list"
>
<
Picker
data
=
{
this
.
props
.
data
}
cols
=
{
this
.
props
.
cols
}
value
=
{
this
.
props
.
asyncValue
}
data
=
{
data
}
cols
=
{
3
}
value
=
{
pathVal
}
onPickerChange
=
{
this
.
onPickerChange
}
onOk
=
{
v
=>
console
.
log
(
v
)}
>
<
List
.
Item
arrow
=
"horizontal"
onClick
=
{
this
.
onClick
}
>
当前基地
<
/List.Item
>
<
/Picker
>
...
...
src/models/dangshireninfo/dsrinfo.js
浏览文件 @
2d5ac12d
...
...
@@ -46,7 +46,7 @@ export default {
},
*
getDSRList
({
payload
},
{
take
,
put
,
call
,
select
})
{
const
{
clear
,
pName
}
=
payload
;
console
.
info
(
payload
);
//
console.info(payload);
if
(
clear
===
'clear'
)
{
yield
put
({
type
:
'clearList'
,
payload
:
{}
});
}
...
...
@@ -58,8 +58,8 @@ export default {
datasourceName
:
'QueryDSRInfoTable'
,
};
const
result
=
yield
call
(
getData
,
coordinate
,
{
pst
:
size
,
psz
:
10
,
params
:
{
pName
}
});
console
.
info
(
'查询的结果'
);
console
.
info
(
result
);
//
console.info('查询的结果');
//
console.info(result);
const
meta
=
yield
call
(
getMeta
,
coordinate
);
yield
put
({
type
:
'setMetas'
,
payload
:
meta
});
// const result = yield call('', 'query-DSRFWInfo', 'QueryfwTable', { pst: size, psz: 10 });
...
...
src/models/domain.js
浏览文件 @
2d5ac12d
/* eslint-disable prefer-destructuring,guard-for-in */
import
{
NavigationActions
}
from
'react-navigation'
;
import
{
fetchDomains
,
switchDomain
,
currentDomain
}
from
'../services/domain'
;
import
{
getDomain
,
setDomain
}
from
'../utils/auth'
;
import
{
delToken
,
getDomain
,
setDomain
,
delDomain
,
getUser
,
delUser
}
from
'../utils/auth'
;
import
{
logout
}
from
'../services/login'
;
const
findTarget
=
(
list
,
dmpath
)
=>
{
// 循环 list,元素el
// 如果 el.value == dmpath, return el;
// 否则 findTarget(el.children, dmpath)
// 如果找到,返回找到的
// 如果没找到,继续循环
// 循环结束: return null;
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
if
(
list
[
i
].
value
===
dmpath
)
{
return
list
[
i
];
}
else
{
const
data
=
findTarget
(
list
[
i
].
children
,
dmpath
);
// console.log(data);
if
(
data
)
{
return
data
;
}
}
}
return
null
;
};
const
createData
=
async
(
list
,
dmpath
,
payload
)
=>
{
console
.
log
(
list
);
console
.
log
(
dmpath
);
// 根据path用fetchDomains 查出children
let
childrens
;
let
pathArray
;
if
(
dmpath
!==
'/'
)
{
childrens
=
await
fetchDomains
(
dmpath
);
console
.
log
(
childrens
);
const
childrenPath
=
childrens
[
0
].
path
;
pathArray
=
[...
payload
,
childrenPath
];
}
else
{
pathArray
=
[...
payload
];
}
const
childrenData
=
[];
childrens
.
map
(({
name
,
path
})
=>
{
childrenData
.
push
({
label
:
name
,
value
:
path
,
children
:
[]
});
return
childrenData
;
});
// 根据path在list查出需要添加children的对象target
const
findData
=
findTarget
(
list
,
dmpath
);
findData
.
children
=
childrenData
;
console
.
log
(
findData
);
const
data
=
list
;
console
.
log
(
list
);
return
{
data
,
pathArray
};
};
export
default
{
namespace
:
'domain'
,
...
...
@@ -8,6 +58,10 @@ export default {
state
:
{
init
:
undefined
,
list
:
[],
listChildren
:
[],
arrayPath
:
[],
cols
:
''
,
userInfo
:
''
,
},
subscriptions
:
{
...
...
@@ -20,16 +74,33 @@ export default {
const
domain
=
yield
call
(
getDomain
);
const
init
=
domain
?
domain
.
path
:
undefined
;
const
list
=
yield
call
(
fetchDomains
,
'/'
,
true
);
const
datas
=
[];
list
.
map
(({
name
,
path
})
=>
{
datas
.
push
({
label
:
name
,
value
:
path
,
children
:
[]
});
return
datas
;
});
yield
put
({
type
:
'queryInit'
,
payload
:
init
});
yield
put
({
type
:
'queryList'
,
payload
:
list
});
yield
put
({
type
:
'queryArryPath'
,
payload
:
[
'/'
]
});
yield
put
({
type
:
'queryList'
,
payload
:
datas
});
},
*
fetchParam
(
dmpath
,
{
put
,
call
})
{
const
domain
=
yield
call
(
getDomain
);
const
init
=
domain
?
domain
.
path
:
undefined
;
const
list
=
yield
call
(
fetchDomains
,
dmpath
);
yield
put
({
type
:
'queryInit'
,
payload
:
init
});
yield
put
({
type
:
'queryList'
,
payload
:
list
});
*
fetchParam
({
payload
},
{
put
,
call
,
select
})
{
console
.
log
(
payload
);
let
dmpath
=
''
;
if
(
payload
.
length
===
1
)
{
dmpath
=
payload
[
0
];
}
else
if
(
payload
.
length
===
2
)
{
dmpath
=
payload
[
1
];
}
else
{
dmpath
=
payload
[
2
];
}
const
{
list
}
=
yield
select
(
state
=>
state
.
domain
);
// const target = yield call(findTarget, list, dmpath);
// console.log(target);
const
datas
=
yield
call
(
createData
,
list
,
dmpath
,
payload
);
console
.
log
(
datas
);
yield
put
({
type
:
'queryList'
,
payload
:
datas
.
data
});
yield
put
({
type
:
'queryArryPath'
,
payload
:
datas
.
pathArray
});
},
*
switch
({
payload
:
domainPath
},
{
put
,
call
})
{
yield
call
(
switchDomain
,
domainPath
);
...
...
@@ -37,9 +108,29 @@ export default {
yield
call
(
setDomain
,
name
,
path
);
yield
put
({
type
:
'queryInit'
,
payload
:
path
});
},
*
logout
(
ignored
,
{
put
,
call
})
{
yield
call
(
logout
);
yield
call
(
delToken
);
yield
call
(
delUser
);
yield
call
(
delDomain
);
yield
put
(
NavigationActions
.
navigate
({
routeName
:
'Login'
,
}));
},
*
getUserInfo
(
ignored
,
{
put
,
call
})
{
const
userInfo
=
yield
call
(
getUser
);
// console.log(userInfo);
yield
put
({
type
:
'queryUserInfo'
,
payload
:
userInfo
});
},
},
reducers
:
{
queryUserInfo
(
state
,
{
payload
:
userInfo
})
{
return
{
...
state
,
userInfo
,
};
},
queryInit
(
state
,
{
payload
:
init
})
{
return
{
...
state
,
...
...
@@ -52,6 +143,18 @@ export default {
list
,
};
},
queryListChildren
(
state
,
{
payload
:
listChildren
})
{
return
{
...
state
,
listChildren
,
};
},
queryArryPath
(
state
,
{
payload
:
arrayPath
})
{
return
{
...
state
,
arrayPath
,
};
},
},
};
src/models/houseinfo/houseDetail.js
浏览文件 @
2d5ac12d
import
{
getData
}
from
'../../utils/DataTemplate'
;
import
{
Toast
}
from
'antd-mobile'
;
import
{
NavigationActions
}
from
'react-navigation'
;
import
{
getData
,
getMeta
}
from
'../../utils/DataTemplate'
;
import
{
datasourceApi
}
from
'../../services/datasource'
;
export
default
{
...
...
@@ -6,17 +8,29 @@ export default {
state
:
{
singularData
:
{},
enableEdit
:
false
,
metas
:
[],
},
reducers
:
{
setList
(
state
,
{
payload
})
{
console
.
info
({
...
state
,
singularData
:
payload
.
singularData
});
return
{
...
state
,
singularData
:
payload
.
singularData
};
},
setMeta
(
state
,
{
payload
})
{
return
{
...
state
,
metas
:
payload
,
};
},
setEnable
(
state
,
{
payload
:
enableEdit
})
{
return
{
...
state
,
enableEdit
};
},
},
effects
:
{
*
jumpPage
({
payload
:
id
},
{
put
})
{
yield
put
(
NavigationActions
.
navigate
({
routeName
:
'HouseDetailEditInfo'
,
params
:
{
id
},
}));
},
*
getHouseDetail
({
payload
},
{
call
,
put
})
{
const
coordinate
=
{
containerType
:
'module'
,
...
...
@@ -26,8 +40,10 @@ export default {
const
result
=
yield
call
(
getData
,
coordinate
,
{
pst
:
0
,
psz
:
10
,
params
:
{
pID
:
payload
}
});
const
singularData
=
result
[
0
];
yield
put
({
type
:
'setList'
,
payload
:
{
singularData
:
{
...
singularData
}
}
});
const
metas
=
yield
call
(
getMeta
,
coordinate
);
yield
put
({
type
:
'setMeta'
,
payload
:
metas
});
},
*
updateHouseDetail
({
payload
},
{
call
})
{
*
updateHouseDetail
({
payload
},
{
call
,
put
})
{
const
coordinate
=
{
containerType
:
'module'
,
containerName
:
'query-DSRFWInfo'
,
...
...
@@ -37,6 +53,10 @@ export default {
console
.
info
({
key
:
payload
.
id
,
params
:
payload
.
singularData
});
const
result
=
yield
call
(
api
.
update
,
coordinate
,
{
key
:
payload
.
id
,
params
:
payload
.
singularData
});
console
.
info
(
result
);
Toast
.
success
(
'修改成功!'
,
0.5
);
yield
put
(
NavigationActions
.
navigate
({
routeName
:
'HouseList'
,
}));
},
},
};
src/models/index.js
浏览文件 @
2d5ac12d
...
...
@@ -7,6 +7,7 @@ import DSRInfo from './dangshireninfo/dsrinfo';
import
DSRInfoDetail
from
'./dangshireninfo/dsrinfodetail'
;
import
peopleInfo
from
'./peopleInfo/peopleInfo'
;
import
domain
from
'./domain'
;
import
userInfo
from
'./userinfo/userinfo'
;
export
default
[
welcome
,
...
...
@@ -18,4 +19,5 @@ export default [
DSRInfo
,
DSRInfoDetail
,
peopleInfo
,
userInfo
,
];
src/routes/main/dangshireninfo/DSRInfoDetailScreen.js
浏览文件 @
2d5ac12d
...
...
@@ -4,7 +4,7 @@
import
React
from
'react'
;
import
{
createForm
}
from
'rc-form'
;
import
{
View
,
ScrollView
}
from
'react-native'
;
import
{
List
,
InputItem
,
Toast
,
WhiteSpace
}
from
'antd-mobile'
;
import
{
List
,
InputItem
,
Toast
,
WhiteSpace
,
WingBlank
}
from
'antd-mobile'
;
import
Icon
from
'react-native-vector-icons/FontAwesome'
;
import
{
connect
}
from
'react-redux'
;
import
{
createAction
}
from
'../../../utils'
;
...
...
@@ -118,19 +118,20 @@ class DSRInfoDetailScreen extends React.Component {
return
(
<
ScrollView
>
<
WhiteSpace
/>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
}}
>
<
Icon
.
Button
name
=
"edit"
backgroundColor
=
"#08BBF9"
onPress
=
{
this
.
onEdit
}
>
编辑
<
/Icon.Button
>
<
/View
>
<
WhiteSpace
/>
<
WhiteSpace
/>
<
List
>
{
<
WingBlank
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
}}
>
{
/* <Icon.Button
name="edit"
backgroundColor="#08BBF9"
onPress={this.onEdit}
>
编辑
</Icon.Button> */
}
<
/View
>
<
WhiteSpace
/>
<
List
>
{
metas
.
map
((
m
)
=>
{
return
(
<
List
.
Item
...
...
@@ -140,10 +141,10 @@ class DSRInfoDetailScreen extends React.Component {
{
m
.
label
}
<
/List.Item
>
);
})
}
<
/List
>
})
}
<
/List
>
<
/WingBlank
>
<
/ScrollView
>
);
}
...
...
src/routes/main/dangshireninfo/DSRInfoScreeen.js
浏览文件 @
2d5ac12d
...
...
@@ -10,27 +10,19 @@ import SearchComponent from '../../../components/searchComponent';
class
DSRInfoScreeen
extends
Component
{
componentDidMount
()
{
const
{
dispatch
}
=
this
.
props
;
console
.
info
(
'界面加载完成是,输出的searchValue'
);
console
.
info
(
this
.
props
.
DSRInfo
);
dispatch
(
createAction
(
'DSRInfo/getDSRList'
)({
clear
:
''
,
pName
:
this
.
props
.
DSRInfo
.
searchValue
}));
}
onSearchSubmit
=
(
pName
)
=>
{
console
.
info
(
'点击搜索时,输出的searchValue前'
);
console
.
info
(
this
.
props
.
DSRInfo
);
this
.
props
.
dispatch
(
createAction
(
'DSRInfo/getDSRList'
)({
clear
:
'clear'
,
pName
}));
console
.
info
(
'点击搜索时,输出的searchValue后'
);
console
.
info
(
this
.
props
.
DSRInfo
);
};
onSearchChange
=
(
pName
)
=>
{
this
.
props
.
dispatch
(
createAction
(
'DSRInfo/setSearchValue'
)(
pName
));
console
.
info
(
'每次改变的值searchValue'
);
console
.
info
(
this
.
props
.
DSRInfo
);
};
// 上拉加载更多
onEndReached
=
()
=>
{
// 以下是制造新数据
if
(
!
this
.
props
.
loading
)
{
console
.
info
(
'执行了上啦加载'
);
//
console.info('执行了上啦加载');
this
.
props
.
dispatch
(
createAction
(
'DSRInfo/getDSRList'
)({
clear
:
''
,
pName
:
this
.
props
.
DSRInfo
.
searchValue
}));
}
};
...
...
src/routes/main/houseinfo/HouseDetail.js
浏览文件 @
2d5ac12d
import
React
,
{
Component
}
from
'react'
;
import
{
View
,
ScrollView
}
from
'react-native'
;
import
{
List
,
InputItem
,
Button
,
Toast
}
from
'antd-mobile'
;
import
{
View
,
ScrollView
,
Text
}
from
'react-native'
;
import
{
List
,
InputItem
,
Button
,
Toast
,
WhiteSpace
,
WingBlank
}
from
'antd-mobile'
;
import
Icon
from
'react-native-vector-icons/FontAwesome'
;
import
{
createForm
}
from
'rc-form'
;
import
{
connect
}
from
'react-redux'
;
import
{
createAction
}
from
'../../../utils/index'
;
...
...
@@ -11,157 +12,43 @@ class HouseDetail extends Component {
const
{
dispatch
,
ListHouse
}
=
this
.
props
;
dispatch
(
createAction
(
'HouseDetail/getHouseDetail'
)(
ListHouse
.
houseID
));
}
onSubmit
=
()
=>
{
this
.
props
.
form
.
validateFields
({
force
:
true
},
(
error
,
value
)
=>
{
if
(
!
error
)
{
// 校验成功执行这里的代码
this
.
props
.
dispatch
(
createAction
(
'HouseDetail/updateHouseDetail'
)({
id
:
this
.
props
.
ListHouse
.
houseID
,
singularData
:
value
}));
}
else
{
// 执行出现错误,弹出错处理
Toast
.
show
(
'Validation failed'
);
}
});
};
onReset
=
()
=>
{
this
.
props
.
form
.
resetFields
();
};
validateFWBianMa
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
)
{
callback
();
}
else
{
callback
(
new
Error
(
'At least four charactors for account'
));
}
};
modifyInfo
=
()
=>
{
this
.
props
.
dispatch
(
createAction
({
type
:
'setEnable'
,
payload
:
{
enableEdit
:
true
}
}));
const
{
ListHouse
}
=
this
.
props
;
this
.
props
.
dispatch
(
createAction
(
'HouseDetail/jumpPage'
)(
ListHouse
.
houseID
));
};
render
()
{
const
{
getFieldProps
}
=
this
.
props
.
form
;
const
{
fwLouCeng
}
=
this
.
props
.
HouseDetail
.
singularData
;
if
(
this
.
props
.
HouseDetail
.
enableEdit
===
true
)
{
return
(
<
View
>
<
List
>
<
InputItem
{...
getFieldProps
(
'fwBiaMa'
,
{
initialValue
:
this
.
props
.
HouseDetail
.
singularData
.
fwBiaMa
,
rules
:
[
{
required
:
true
,
message
:
'房屋编码不允许为空'
},
{
validator
:
this
.
validateFWBianMa
},
],
})}
clear
placeholder
=
"请输入房屋编码"
ref
=
{(
el
)
=>
{
this
.
customFocusInst
=
el
;
}}
>
房屋编码
<
/InputItem
>
<
InputItem
{...
getFieldProps
(
'fwDiZhi'
)}
clear
placeholder
=
"请输入"
ref
=
{(
el
)
=>
{
this
.
customFocusInst
=
el
;
}}
>
房屋地址
<
/InputItem
>
<
InputItem
{...
getFieldProps
(
'fwLouDongHao'
)}
clear
placeholder
=
"请输入"
ref
=
{(
el
)
=>
{
this
.
customFocusInst
=
el
;
}}
>
楼栋号
<
/InputItem
>
<
InputItem
{...
getFieldProps
(
'fwLouCeng'
)}
clear
placeholder
=
"请输入"
ref
=
{(
el
)
=>
{
this
.
customFocusInst
=
el
;
}}
>
楼层
<
/InputItem
>
<
InputItem
{...
getFieldProps
(
'fwFangHao'
)}
clear
placeholder
=
"请输入"
ref
=
{(
el
)
=>
{
this
.
customFocusInst
=
el
;
}}
>
房号
<
/InputItem
>
<
InputItem
{...
getFieldProps
(
'WangGeBianHao'
)}
clear
placeholder
=
"请输入房屋编码"
ref
=
{(
el
)
=>
{
this
.
customFocusInst
=
el
;
}}
>
网格
<
/InputItem
>
<
InputItem
{...
getFieldProps
(
'fwSuoShuJieDao'
)}
clear
placeholder
=
"请输入"
ref
=
{(
el
)
=>
{
this
.
customFocusInst
=
el
;
}}
>
街道
<
/InputItem
>
<
InputItem
{...
getFieldProps
(
'fwShenBaoMianJi'
)}
clear
placeholder
=
"请输入"
ref
=
{(
el
)
=>
{
this
.
customFocusInst
=
el
;
}}
>
申报面积
<
/InputItem
>
<
List
.
Item
>
<
View
style
=
{{
flexDirection
:
'row'
}}
>
<
Button
type
=
"primary"
size
=
"large"
onClick
=
{
this
.
onSubmit
}
>
Submit
<
/Button
>
<
Button
size
=
"large"
onClick
=
{
this
.
onReset
}
>
Reset
<
/Button
>
<
/View
>
<
/List.Item
>
<
/List
>
<
/View
>
);
}
else
{
// console.log(this.props.HouseDetail);
const
{
singularData
,
metas
}
=
this
.
props
.
HouseDetail
;
const
list
=
metas
.
map
(({
key
,
label
})
=>
{
const
data
=
singularData
[
key
];
return
(
<
View
>
<
Button
type
=
"primary"
size
=
"small"
onClick
=
{
this
.
modifyInfo
}
>
编辑
<
/Button
>
<
ScrollView
showsVerticalScrollIndicator
=
{
true
}
>
<
List
renderHeader
=
{()
=>
'Basic Style'
}
className
=
"my-list"
>
<
List
.
Item
key
=
{(
this
.
props
.
HouseDetail
.
singularData
.
fwBiaMa
)}
extra
=
{(
this
.
props
.
HouseDetail
.
singularData
.
fwBiaMa
)}
>
房屋编码
<
/List.Item
>
<
List
.
Item
key
=
{(
this
.
props
.
HouseDetail
.
singularData
.
fwDiZhi
)}
extra
=
{(
this
.
props
.
HouseDetail
.
singularData
.
fwDiZhi
)}
>
房屋地址
<
/List.Item
>
<
List
.
Item
key
=
{(
this
.
props
.
HouseDetail
.
singularData
.
fwLouDongHao
)}
extra
=
{(
this
.
props
.
HouseDetail
.
singularData
.
fwLouDongHao
)}
>
楼栋号
<
/List.Item
>
<
List
.
Item
key
=
{(
fwLouCeng
)}
extra
=
{(
fwLouCeng
)}
>
楼层
<
/List.Item
>
<
List
.
Item
key
=
{(
this
.
props
.
HouseDetail
.
singularData
.
fwFangHao
)}
extra
=
{(
this
.
props
.
HouseDetail
.
singularData
.
fwFangHao
)}
>
房号
<
/List.Item
>
<
List
.
Item
key
=
{(
this
.
props
.
HouseDetail
.
singularData
.
WangGeBianHao
)}
extra
=
{(
this
.
props
.
HouseDetail
.
singularData
.
WangGeBianHao
)}
>
网格
<
/List.Item
>
<
List
.
Item
key
=
{(
this
.
props
.
HouseDetail
.
singularData
.
fwSuoShuJieDao
)}
extra
=
{(
this
.
props
.
HouseDetail
.
singularData
.
fwSuoShuJieDao
)}
>
街道
<
/List.Item
>
<
List
.
Item
key
=
{(
this
.
props
.
HouseDetail
.
singularData
.
fwSuoShuSheQu
)}
extra
=
{(
this
.
props
.
HouseDetail
.
singularData
.
fwSuoShuSheQu
)}
>
社区
<
/List.Item
>
<
List
.
Item
key
=
{(
this
.
props
.
HouseDetail
.
singularData
.
fwShenBaoMianJi
)}
extra
=
{(
this
.
props
.
HouseDetail
.
singularData
.
fwShenBaoMianJi
)}
>
申报面积
<
/List.Item
>
<
List
.
Item
key
=
{(
this
.
props
.
HouseDetail
.
singularData
.
fwShenBaoMianJi
)}
extra
=
{(
this
.
props
.
HouseDetail
.
singularData
.
fwShenBaoMianJi
)}
>
申报面积
<
/List.Item
>
<
List
.
Item
key
=
{(
this
.
props
.
HouseDetail
.
singularData
.
fwShenBaoMianJi
)}
extra
=
{(
this
.
props
.
HouseDetail
.
singularData
.
fwShenBaoMianJi
)}
>
申报面积
<
/List.Item
>
<
List
.
Item
key
=
{(
this
.
props
.
HouseDetail
.
singularData
.
fwShenBaoMianJi
)}
extra
=
{(
this
.
props
.
HouseDetail
.
singularData
.
fwShenBaoMianJi
)}
>
申报面积
<
/List.Item
>
<
List
.
Item
key
=
{(
this
.
props
.
HouseDetail
.
singularData
.
fwShenBaoMianJi
)}
extra
=
{(
this
.
props
.
HouseDetail
.
singularData
.
fwShenBaoMianJi
)}
>
申报面积
<
/List.Item
>
<
List
.
Item
key
=
{(
this
.
props
.
HouseDetail
.
singularData
.
fwShenBaoMianJi
)}
extra
=
{(
this
.
props
.
HouseDetail
.
singularData
.
fwShenBaoMianJi
)}
>
申报面积
<
/List.Item
>
<
/List
>
<
/ScrollView
>
<
/View
>
<
List
.
Item
key
=
{
key
}
extra
=
{
data
}
>
{
label
}
<
/List.Item
>
);
}
});
return
(
<
View
>
<
ScrollView
>
<
View
style
=
{{
flex
:
1
,
flexDirection
:
'column'
}}
>
<
WhiteSpace
/>
<
View
style
=
{{
width
:
80
,
height
:
40
}}
>
<
Button
type
=
"primary"
onClick
=
{
this
.
modifyInfo
}
>
编辑
<
/Button
>
<
/View
>
<
WhiteSpace
/>
<
View
>
<
List
className
=
"my-list"
>
{
list
}
<
/List
>
<
/View
>
<
/View
>
<
/ScrollView
>
<
WhiteSpace
/>
<
/View
>
);
}
}
export
default
createForm
()(
HouseDetail
);
...
...
src/routes/main/houseinfo/HouseScreen.js
0 → 100644
浏览文件 @
2d5ac12d
/**
* Created by zhouhuan on 2017/11/9.
*/
import
{
StackNavigator
}
from
'react-navigation'
;
import
HouseDetail
from
'./HouseDetail'
;
import
EditHouseDetail
from
'./editHouseDetail'
;
const
HouseScreen
=
StackNavigator
(
{
HouseDetailInfo
:
{
screen
:
HouseDetail
,
},
HouseDetailEditInfo
:
{
screen
:
EditHouseDetail
,
},
},
{
headerMode
:
'none'
,
navigationOptions
:
{
gesturesEnabled
:
false
,
},
},
);
export
default
HouseScreen
;
src/routes/main/houseinfo/ObligeeInfo.js
浏览文件 @
2d5ac12d
...
...
@@ -70,7 +70,7 @@ class ObligeeInfo extends React.Component {
};
render
()
{
const
{
sourceData
,
isDetail
,
detailData
,
editable
,
disabled
}
=
this
.
props
.
obligeeInfo
;
console
.
log
(
this
.
props
.
obligeeInfo
);
//
console.log(this.props.obligeeInfo);
const
data
=
[
sourceData
];
// console.log(data);
const
{
getFieldProps
}
=
this
.
props
.
form
;
...
...
src/routes/main/houseinfo/editHouseDetail.js
0 → 100644
浏览文件 @
2d5ac12d
/**
* Created by zhouhuan on 2017/11/9.
*/
import
React
from
'react'
;
import
{
View
,
ScrollView
,
Text
}
from
'react-native'
;
import
{
List
,
InputItem
,
Button
,
Toast
,
WhiteSpace
}
from
'antd-mobile'
;
import
{
createForm
}
from
'rc-form'
;
import
{
connect
}
from
'react-redux'
;
import
{
createAction
}
from
'../../../utils/index'
;
@
connect
(({
HouseDetail
,
ListHouse
})
=>
({
HouseDetail
,
ListHouse
}))
class
EditHouseDetail
extends
React
.
Component
{
componentDidMount
()
{
const
{
dispatch
,
ListHouse
}
=
this
.
props
;
dispatch
(
createAction
(
'HouseDetail/getHouseDetail'
)(
ListHouse
.
houseID
));
}
onSubmit
=
()
=>
{
this
.
props
.
form
.
validateFields
({
force
:
true
},
(
error
,
value
)
=>
{
if
(
!
error
)
{
this
.
props
.
dispatch
(
createAction
(
'HouseDetail/updateHouseDetail'
)({
id
:
this
.
props
.
ListHouse
.
houseID
,
singularData
:
value
}));
}
else
{
Toast
.
show
(
'Validation failed'
);
}
});
};
onReset
=
()
=>
{
this
.
props
.
form
.
resetFields
();
};
render
()
{
console
.
log
(
this
.
props
.
HouseDetail
);
const
{
singularData
,
metas
}
=
this
.
props
.
HouseDetail
;
const
{
getFieldProps
}
=
this
.
props
.
form
;
const
list
=
metas
.
map
(({
key
,
label
})
=>
{
const
data
=
singularData
[
key
];
return
(
<
InputItem
{...
getFieldProps
(
key
,
{
initialValue
:
data
,
})}
clear
ref
=
{(
el
)
=>
{
this
.
customFocusInst
=
el
;
}}
>
{
label
}
<
/InputItem
>
);
});
return
(
<
View
>
<
ScrollView
>
<
List
>
{
list
}
<
List
.
Item
>
<
View
style
=
{{
flexDirection
:
'row'
}}
>
<
Button
type
=
"primary"
onClick
=
{
this
.
onSubmit
}
>
保存
<
/Button
>
<
/View
>
<
/List.Item
>
<
/List
>
<
/ScrollView
>
<
/View
>
);
}
}
export
default
createForm
()(
EditHouseDetail
);
src/routes/main/houseinfo/erJiScreen.js
浏览文件 @
2d5ac12d
import
{
TabNavigator
}
from
'react-navigation'
;
import
Empty
from
'../../empty'
;
import
House
Detail
from
'./HouseDetail
'
;
import
House
Screen
from
'./HouseScreen
'
;
import
ObligeeInfo
from
'./ObligeeInfo'
;
const
ErJiScreen
=
TabNavigator
(
{
HouseDetail
:
{
screen
:
House
Detail
,
screen
:
House
Screen
,
navigationOptions
:
{
lazy
:
true
,
tabBarLabel
:
'详细信息'
,
...
...
src/routes/main/index.js
浏览文件 @
2d5ac12d
import
React
,
{
Component
}
from
'react'
;
import
{
View
,
Text
,
Image
,
StyleSheet
,
ToolbarAndroid
}
from
'react-native'
;
import
{
TabNavigator
}
from
'react-navigation'
;
import
{
View
,
Text
,
Image
,
StyleSheet
,
ToolbarAndroid
,
Dimensions
}
from
'react-native'
;
import
{
TabNavigator
,
StackNavigator
}
from
'react-navigation'
;
import
Icon
from
'react-native-vector-icons/MaterialIcons'
;
import
userInfoPageScreen
from
'./userinfo/index'
;
import
fwInfo
from
'./fwInfo'
;
...
...
@@ -8,6 +8,7 @@ import peopleInfoErJiScreen from './peopleInfo/index';
import
chatsIcon
from
'../../../image/chats-icon.png'
;
import
Empty
from
'../empty'
;
import
DSRErJiScreen
from
'./dangshireninfo/index'
;
import
quanshuInfoErJiScreen
from
'./quanshuInfo/index'
;
import
TabBarComponent
from
'../../components/tabBarComponent'
;
const
Content
=
TabNavigator
({
...
...
@@ -18,7 +19,7 @@ const Content = TabNavigator({
tabBarLabel
:
'房屋信息'
,
// Note: By default the icon is only shown on iOS. Search the showIcon option below.
tabBarIcon
:
()
=>
(
<
Icon
name
=
"home"
size
=
{
28
}
color
=
"#
3b5998
"
/>
<
Icon
name
=
"home"
size
=
{
28
}
color
=
"#
FFFFFF
"
/>
),
},
},
...
...
@@ -29,21 +30,18 @@ const Content = TabNavigator({
tabBarLabel
:
'权利人信息'
,
// Note: By default the icon is only shown on iOS. Search the showIcon option below.
tabBarIcon
:
()
=>
(
<
Icon
name
=
"person"
size
=
{
28
}
/
>
<
Icon
name
=
"person"
size
=
{
28
}
color
=
"#FFFFFF"
/>
),
},
},
QSInfo
:
{
screen
:
Empty
(
'权属信息的新增,修改,还可以勾选房子'
,
'DSRInfoScreen'
)
,
screen
:
quanshuInfoErJiScreen
,
navigationOptions
:
{
lazy
:
true
,
tabBarLabel
:
'权属信息'
,
// Note: By default the icon is only shown on iOS. Search the showIcon option below.
tabBarIcon
:
()
=>
(
<
Image
source
=
{
chatsIcon
}
style
=
{[
styles
.
icon
]}
/
>
<
Icon
name
=
"library-books"
size
=
{
28
}
color
=
"#FFFFFF"
/>
),
},
},
...
...
@@ -54,10 +52,7 @@ const Content = TabNavigator({
tabBarLabel
:
'人口信息'
,
// Note: By default the icon is only shown on iOS. Search the showIcon option below.
tabBarIcon
:
()
=>
(
<
Image
source
=
{
chatsIcon
}
style
=
{[
styles
.
icon
]}
/
>
<
Icon
name
=
"group-add"
size
=
{
28
}
color
=
"#FFFFFF"
/>
),
},
},
...
...
@@ -82,45 +77,66 @@ const Content = TabNavigator({
animationEnabled
:
true
,
tabBarOptions
:
{
activeTintColor
:
'#e91e63'
,
inactiveTintColor
:
'
gray
'
,
inactiveTintColor
:
'
#FFFFFF
'
,
labelStyle
:
{
fontSize
:
12
,
},
showIcon
:
true
,
},
});
const
MainWindow
=
StackNavigator
(
{
Content
:
{
screen
:
Content
,
},
personCenter
:
{
screen
:
userInfoPageScreen
,
},
},
{
headerMode
:
'none'
,
navigationOptions
:
{
gesturesEnabled
:
false
,
},
},
);
class
MainPage
extends
Component
{
onActionSelected
=
()
=>
{
this
.
props
.
navigation
.
navigate
(
'personCenter'
);
}
render
()
{
return
(
<
View
style
=
{{
flex
:
1
}}
>
<
View
style
=
{{
height
:
3
6
,
backgroundColor
:
'#08BBF9'
,
flexDirection
:
'row'
}}
>
<
View
style
=
{{
flex
:
1
,
alignItems
:
'center'
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
4
6
,
backgroundColor
:
'#08BBF9'
,
flexDirection
:
'row'
}}
>
{
/*
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
<Text style={{ fontSize: 18, color: 'white', alignSelf: 'center' }}>深圳房屋普查</Text>
<
/View
>
</View> */
}
<
ToolbarAndroid
title
=
"深圳房屋普查"
style
=
{
styles
.
toolbar
}
actions
=
{[{
title
:
'个人中心'
,
show
:
'never'
}]}
onActionSelected
=
{
this
.
onActionSelected
}
titleColor
=
"#FFFFFF"
/>
<
/View
>
<
Content
navigation
=
{
this
.
props
.
navigation
}
/
>
<
MainWindow
navigation
=
{
this
.
props
.
navigation
}
/
>
<
/View
>
);
}
}
MainPage
.
router
=
Content
.
router
;
MainPage
.
router
=
MainWindow
.
router
;
const
styles
=
StyleSheet
.
create
({
toolbar
:
{
backgroundColor
:
'#2196F3'
,
height
:
40
,
width
:
Dimensions
.
get
(
'window'
).
width
,
alignSelf
:
'center'
,
},
icon
:
{
width
:
26
,
height
:
26
,
},
containerToolbar
:
{
flex
:
1
,
justifyContent
:
'flex-start'
,
alignItems
:
'stretch'
,
backgroundColor
:
'#F5FCFF'
,
},
toolbar
:
{
backgroundColor
:
'#e9eaed'
,
height
:
56
,
},
});
export
default
MainPage
;
...
...
src/routes/main/peopleInfo/addPeopleInfo.js
浏览文件 @
2d5ac12d
...
...
@@ -24,6 +24,9 @@ class AddPeopleInfo extends React.Component {
}
});
};
onEditBack
=
()
=>
{
this
.
props
.
dispatch
(
createAction
(
'peopleInfo/onEBack'
)(
'clear'
));
};
validateNoNull
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
)
{
callback
();
...
...
@@ -31,9 +34,6 @@ class AddPeopleInfo extends React.Component {
callback
(
new
Error
(
'At least four charactors for account'
));
}
};
onEditBack
=
()
=>
{
this
.
props
.
dispatch
(
createAction
(
'peopleInfo/onEBack'
)(
'clear'
));
};
render
()
{
const
{
getFieldProps
}
=
this
.
props
.
form
;
const
{
detailData
,
metas
}
=
this
.
props
.
peopleInfo
;
...
...
src/routes/main/peopleInfo/peopleDetailEditScreen.js
0 → 100644
浏览文件 @
2d5ac12d
src/routes/main/quanshuInfo/index.js
0 → 100644
浏览文件 @
2d5ac12d
/**
* Created by zhouhuan on 2017/11/9.
*/
import
{
StackNavigator
}
from
'react-navigation'
;
import
QuanshuList
from
'./quanshuList'
;
const
quanshuInfoErJiScreen
=
StackNavigator
(
{
quanshuInfoList
:
{
screen
:
QuanshuList
,
},
},
{
headerMode
:
'none'
,
navigationOptions
:
{
gesturesEnabled
:
false
,
},
},
);
export
default
quanshuInfoErJiScreen
;
src/routes/main/quanshuInfo/quanshuDetail.js
0 → 100644
浏览文件 @
2d5ac12d
/**
* Created by zhouhuan on 2017/11/13.
*/
src/routes/main/quanshuInfo/quanshuList.js
0 → 100644
浏览文件 @
2d5ac12d
/**
* Created by zhouhuan on 2017/11/13.
*/
import
React
,
{
Component
}
from
'react'
;
import
{
Text
,
FlatList
,
View
}
from
'react-native'
;
import
{
WingBlank
,
WhiteSpace
}
from
'antd-mobile'
;
import
{
connect
}
from
'react-redux'
;
import
{
createAction
}
from
'../../../utils/index'
;
import
FlatListItem
from
'../../../components/FlatListItem'
;
import
SearchComponent
from
'../../../components/searchComponent'
;
@
connect
(({
DSRInfo
})
=>
({
DSRInfo
/* , loading: !!loading.effects['obligeeInfo/getObligeeInfo'] */
}))
class
QuanshuList
extends
Component
{
componentDidMount
()
{
const
{
dispatch
}
=
this
.
props
;
dispatch
(
createAction
(
'DSRInfo/getDSRList'
)({
clear
:
''
,
pName
:
this
.
props
.
DSRInfo
.
searchValue
}));
}
onSearchSubmit
=
(
pName
)
=>
{
this
.
props
.
dispatch
(
createAction
(
'DSRInfo/getDSRList'
)({
clear
:
'clear'
,
pName
}));
};
onSearchChange
=
(
pName
)
=>
{
this
.
props
.
dispatch
(
createAction
(
'DSRInfo/setSearchValue'
)(
pName
));
};
// 上拉加载更多
onEndReached
=
()
=>
{
// 以下是制造新数据
if
(
!
this
.
props
.
loading
)
{
// console.info('执行了上啦加载');
this
.
props
.
dispatch
(
createAction
(
'DSRInfo/getDSRList'
)({
clear
:
''
,
pName
:
this
.
props
.
DSRInfo
.
searchValue
}));
}
};
onPressItem
=
(
id
)
=>
{
this
.
props
.
dispatch
(
createAction
(
'DSRInfo/jumpPage'
)(
id
));
};
getItemLayout
=
(
data
,
index
)
=>
(
{
length
:
120
,
offset
:
(
120
+
1
)
*
index
,
index
}
);
/**
* 此函数用于为给定的item生成一个不重复的Key。
* Key的作用是使React能够区分同类元素的不同个体,以便在刷新时能够确定其变化的位置,减少重新渲染的开销。
* 若不指定此函数,则默认抽取item.key作为key值。
* 若item.key也不存在,则使用数组下标
*
* @param item
* @private
*/
// 这里指定使用数组下标作为唯一索引
keyExtractor
=
item
=>
`
${
item
.
id
}
`
;
// Footer布局
renderFooter
=
()
=>
(
<
WingBlank
size
=
"lg"
>
<
WhiteSpace
size
=
"lg"
/>
<
Text
>
到底了!!!
<
/Text
>
<
WhiteSpace
size
=
"lg"
/>
<
/WingBlank
>
);
// 空布局
renderEmptyView
=
()
=>
(
<
WingBlank
size
=
"lg"
>
<
WhiteSpace
size
=
"lg"
/>
<
Text
>
当前无内容
<
/Text
>
<
WhiteSpace
size
=
"lg"
/>
<
/WingBlank
>
);
// 下拉刷新
renderRefresh
=
()
=>
{
if
(
!
this
.
props
.
loading
)
{
this
.
props
.
dispatch
(
createAction
(
'DSRInfo/getDSRList'
)({
clear
:
'clear'
,
pName
:
this
.
props
.
DSRInfo
.
searchValue
}));
}
};
/**
* 使用箭头函数防止不必要的re-render;
* 如果使用bind方式来绑定onPressItem,每次都会生成一个新的函数,导致props在===比较时返回false,
* 从而触发自身的一次不必要的重新render,也就是FlatListItem组件每次都会重新渲染。
*
* @param id
* @private
*/
renderItem
=
({
item
})
=>
{
return
(
<
FlatListItem
title
=
{
item
.
dangShiRenXingMing
}
meta
=
{
this
.
props
.
DSRInfo
.
metas
}
item
=
{
item
}
onPressItem
=
{
this
.
onPressItem
}
/
>
);
};
render
()
{
return
(
<
View
>
<
SearchComponent
onSearchSubmit
=
{
this
.
onSearchSubmit
}
onSearchChange
=
{
this
.
onSearchChange
}
/
>
<
FlatList
data
=
{
this
.
props
.
DSRInfo
.
sourceData
}
keyExtractor
=
{
this
.
keyExtractor
}
renderItem
=
{
this
.
renderItem
}
// 决定当距离内容最底部还有多远时触发onEndReached回调;数值范围0~1,例如:0.5表示可见布局的最底端距离content最底端等于可见布局一半高度的时候调用该回调
onEndReachedThreshold
=
{
0.3
}
// 当列表被滚动到距离内容最底部不足onEndReacchedThreshold设置的距离时调用
onEndReached
=
{
this
.
onEndReached
}
ListFooterComponent
=
{
this
.
renderFooter
}
ListEmptyComponent
=
{
this
.
renderEmptyView
}
refreshing
=
{
this
.
props
.
loading
||
false
}
onRefresh
=
{
this
.
renderRefresh
}
// 是一个可选的优化,用于避免动态测量内容,+1是加上分割线的高度
/
>
<
/View
>
);
}
}
export
default
QuanshuList
;
src/routes/main/setting.png
0 → 100644
浏览文件 @
2d5ac12d
416 Bytes
src/routes/main/userinfo/UserInfoHomeScreen.js
浏览文件 @
2d5ac12d
/* eslint-disable prefer-destructuring */
import
React
,
{
PureComponent
}
from
'react'
;
import
{
View
,
StyleSheet
,
Dimensions
,
ScrollView
,
Text
}
from
'react-native'
;
import
{
View
,
StyleSheet
,
Dimensions
,
ScrollView
,
Image
,
Text
}
from
'react-native'
;
import
{
WingBlank
,
Card
,
WhiteSpace
,
List
,
Button
,
Toast
}
from
'antd-mobile'
;
import
{
connect
}
from
'react-redux'
;
import
PickerComponent
from
'../../../components/pickerComponent'
;
import
{
createAction
}
from
'../../../utils/index'
;
const
width
=
Dimensions
.
get
(
'window'
).
width
;
const
height
=
Dimensions
.
get
(
'window'
).
height
;
// create a component
@
connect
(({
userInfo
})
=>
({
userInfo
}))
@
connect
(({
userInfo
,
domain
})
=>
({
userInfo
,
domain
}))
class
UserInfoHomeScreen
extends
PureComponent
{
componentDidMount
()
{
this
.
props
.
dispatch
(
createAction
(
'domain/getUserInfo'
)());
}
onClick
=
()
=>
{
this
.
props
.
dispatch
(
createAction
(
'domain/fetch'
)());
};
onPickerChange
=
(
path
)
=>
{
// console.log(path);
this
.
props
.
dispatch
(
createAction
(
'domain/fetchParam'
)(
path
));
};
onLogout
=
()
=>
{
console
.
log
(
'注销'
);
this
.
props
.
dispatch
(
createAction
(
'domain/logout'
)());
};
onModify
=
()
=>
{
Toast
.
offline
(
'功能正在完善中...'
,
2
);
};
render
()
{
const
{
list
,
listChildren
,
arrayPath
,
cols
,
userInfo
}
=
this
.
props
.
domain
;
// console.log(arrayPath);
console
.
log
(
userInfo
);
let
datas
=
[];
if
(
listChildren
.
length
===
0
)
{
datas
=
list
;
}
else
{
datas
=
listChildren
;
}
return
(
<
View
style
=
{{
flex
:
1
,
backgroundColor
:
'#06C1AE'
}}
>
<
View
style
=
{{
position
:
'absolute'
,
width
,
height
,
backgroundColor
:
'#06C1AE'
}}
/
>
<
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
>
<
PickerComponent
/>
<
View
style
=
{{
flex
:
1
}}
>
{
/* <View style={{ position: 'absolute', width, height, backgroundColor: '#06C1AE' }} /> */
}
<
View
style
=
{
styles
.
header
}
>
<
View
style
=
{
styles
.
userContainer
}
>
<
Image
style
=
{
styles
.
avatar
}
source
=
{
require
(
'./touxiang.png'
)}
/
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
card
}
>
<
WhiteSpace
/>
<
Card
>
<
Card
.
Body
>
<
List
>
<
List
.
Item
extra
=
{
userInfo
.
name
}
>
姓名
<
/List.Item
>
<
/List
>
<
List
>
<
List
.
Item
extra
=
{
userInfo
.
id
}
>
电话号码
<
/List.Item
>
<
/List
>
<
/Card.Body
>
<
/Card
>
<
WhiteSpace
/>
<
/View
>
<
View
>
<
WhiteSpace
/>
<
WingBlank
>
<
Button
type
=
"ghost"
onClick
=
{
this
.
onModify
}
>
修改密码
<
/Button><WhiteSpace /
>
<
Button
type
=
"ghost"
onClick
=
{
this
.
onLogout
}
>
注销
<
/Button><WhiteSpace /
>
<
/WingBlank
>
<
WhiteSpace
/>
<
/View
>
<
WingBlank
>
<
View
style
=
{
styles
.
pickerCom
}
>
<
PickerComponent
onClick
=
{
this
.
onClick
}
onPickerChange
=
{
this
.
onPickerChange
}
data
=
{
datas
}
pathVal
=
{
arrayPath
}
cols
=
{
cols
}
/
>
<
/View
>
<
/
ScrollView
>
<
/
WingBlank
>
<
/View
>
);
}
...
...
@@ -44,15 +89,26 @@ const styles = StyleSheet.create({
userContainer
:
{
flexDirection
:
'row'
,
alignItems
:
'center'
,
margin
:
10
,
justifyContent
:
'center'
,
marginTop
:
20
,
},
avatar
:
{
width
:
5
0
,
height
:
5
0
,
width
:
8
0
,
height
:
8
0
,
marginRight
:
10
,
borderRadius
:
25
,
borderRadius
:
40
,
borderWidth
:
2
,
borderColor
:
'#51D3C6'
,
borderColor
:
'#ffffff'
,
},
pickerCom
:
{
// marginTop: 100,
},
card
:
{
// height: Dimensions.get('window').height / 2,
marginBottom
:
30
,
},
cardText
:
{
textAlign
:
'right'
,
},
});
export
default
UserInfoHomeScreen
;
src/routes/main/userinfo/touxiang.png
0 → 100644
浏览文件 @
2d5ac12d
10.0 KB
src/services/login.js
浏览文件 @
2d5ac12d
...
...
@@ -30,3 +30,6 @@ export async function login(payload) {
export
async
function
userInfo
()
{
return
request
(
`
${
config
.
apiContextPath
}
/api/user/info`
);
}
export
async
function
logout
()
{
return
post
(
`
${
config
.
apiContextPath
}
/api/auth/logout`
);
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论