Commit 6ae825a8 by 肖亮

feat:更新tabbar及操作退出

parent 4e8851a4
...@@ -20,20 +20,24 @@ const Equipment = () => { ...@@ -20,20 +20,24 @@ const Equipment = () => {
const getEquimentList = async () => { const getEquimentList = async () => {
try { try {
const data = await equimentServices.getArticleList(); const data = await equimentServices.getArticleList();
console.log('data', data);
setEquimentList(data[0].devices || []); setEquimentList(data[0].devices || []);
} catch (e) { } catch (e) {
BMCUI.show('e'); BMCUI.show('e');
} }
}; };
console.log('equimentList', equimentList);
return ( return (
<SafeAreaView> <SafeAreaView>
<View style={styles.container}> <View style={styles.container}>
<Text style={styles.tip}> <Text style={styles.tip}>
标题文字点击无反馈,文字超长则隐藏,文字超长则隐藏 标题文字点击无反馈,文字超长则隐藏,文字超长则隐藏
</Text> </Text>
<View> <View style={styles.content}>
<FlatList <FlatList
style={styles.list}
data={equimentList} data={equimentList}
keyExtractor={(item, index) => item.deviceId + ''} keyExtractor={(item, index) => item.deviceId + ''}
renderItem={({ item }) => { renderItem={({ item }) => {
......
...@@ -2,6 +2,7 @@ import { StyleSheet } from 'react-native'; ...@@ -2,6 +2,7 @@ import { StyleSheet } from 'react-native';
export default StyleSheet.create({ export default StyleSheet.create({
container: { container: {
flex: 1,
}, },
tip: { tip: {
fontSize: 16, fontSize: 16,
...@@ -12,7 +13,10 @@ export default StyleSheet.create({ ...@@ -12,7 +13,10 @@ export default StyleSheet.create({
color: 'rgba(182, 182, 182, 1)', color: 'rgba(182, 182, 182, 1)',
}, },
content: { content: {
flex: 1,
},
list: {
flex: 1,
}, },
ceil: { ceil: {
backgroundColor: '#fff', backgroundColor: '#fff',
......
...@@ -35,6 +35,8 @@ const errorProcess = (resp, reject, errorToast) => { ...@@ -35,6 +35,8 @@ const errorProcess = (resp, reject, errorToast) => {
const getRequestInfo = async (calback, requestInfo = {}) => { const getRequestInfo = async (calback, requestInfo = {}) => {
const loginInfo = await getLoginInfo() || {}; const loginInfo = await getLoginInfo() || {};
const deviceInfo = await getDeviceInfo() || {}; const deviceInfo = await getDeviceInfo() || {};
console.log('loginInfo', loginInfo);
console.log('deviceInfo', deviceInfo);
const result = { const result = {
'Pvt-Token': loginInfo.pvtToken || '', 'Pvt-Token': loginInfo.pvtToken || '',
'Token': loginInfo.token || '', 'Token': loginInfo.token || '',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment