wennjie hace 6 años
padre
commit
ea667ae898

+ 40 - 18
huiliaoAPP/src/components/LoginInput.js

@@ -1,8 +1,7 @@
 import React,{Component} from 'react';
 import {View ,Image,TextInput,StyleSheet,Text,Button} from  'react-native';
 
-import {Device} from '../tool'
-
+import {Device,Icon} from '../tool'
 
 class LoginInput extends Component{
     constructor(props){
@@ -55,25 +54,46 @@ class LoginInput extends Component{
     render(){
         const { type ,placeholder,style } = this.props
         const { active } = this.state
-        const lock = active ? require('../../assets/2x/Login/lock-click.png') :require('../../assets/2x/Login/lock.png')
-        const phone = active ? require('../../assets/2x/Login/phone-click.png') :require('../../assets/2x/Login/phone.png')
+
         const imageBox=()=>{
             if(type==='password'){
-                return (
-                    <Image
-                    style={styles.lockimage}
-                        source={lock}
-                    >
-                    </Image>
-                )
+                if(active){
+                    return (
+                        <Image
+                        style={styles.lockimage}
+                         source={Icon.Login.lockClick}
+                        >
+                        </Image>
+                    )
+                }else{
+                    return (
+                        <Image
+                        style={styles.lockimage}
+                         source={Icon.Login.lock}
+                        >
+                        </Image>
+                    )
+    
+                }
             }else{
-                return (
-                    <Image
-                    style={styles.phoneimage}
-                        source={phone}
-                    >
-                    </Image>
-                )
+                if(active){
+                    return (
+                        <Image
+                        style={styles.phoneimage}
+                         source={Icon.Login.phoneClick}
+                        >
+                        </Image>
+                    )
+                }else{
+                    return (
+                        <Image
+                        style={styles.phoneimage}
+                         source={Icon.Login.phone}
+                        >
+                        </Image>
+                    )
+    
+                }
             }
             
         }
@@ -94,6 +114,8 @@ class LoginInput extends Component{
                     placeholder={placeholder} 
                     style={[styles.input,{height:Device.scale(35),padding:0}]} />
                 </View>
+                
+
             </View>
         )
     }

+ 7 - 4
huiliaoAPP/src/navigators/BottomTabNavigator.js

@@ -1,8 +1,10 @@
 import React from 'react';
 import {createBottomTabNavigator} from 'react-navigation';
 import TabBarItem from '../components/TabBarItem';
-import {Device} from '../tool'
-import {DeviceEventEmitter} from 'react-native'
+import Device from '../tool/Device'
+import {Text,DeviceEventEmitter} from 'react-native'
+import {Icon } from '../tool'
+
 import  RightButton from "../components/RightButton";
 
 //mine
@@ -93,7 +95,7 @@ BottomTabNavigator.navigationOptions = ({ navigation }) => {
     title = '消息';
     headerRight=(
       <RightButton 
-        Icon={require('../../assets/2x/message/add.png')}
+        Icon={Icon.Message.add}
         Click={()=>{
           navigation.dispatch({type:'OPENMENUMESSAGE'})
       }} />)
@@ -102,9 +104,10 @@ BottomTabNavigator.navigationOptions = ({ navigation }) => {
     title = '通讯录';
     headerRight=(
       <RightButton 
-        Icon={require('../../assets/2x/contact/add.png')}
+        Icon={Icon.Contact.add}
         Click={()=>{
           DeviceEventEmitter.emit('OPENMENUCONTACT');
+          // navigation.dispatch({type:'OPENMENUCONTACT'})
         }} />)
   }else if(routeName === 'MineTab'){
     title = '我的';

+ 24 - 15
huiliaoAPP/src/pages/Contact/AddFriend/index.js

@@ -1,36 +1,41 @@
 import React from 'react';
-import { Image,StyleSheet, Text, View,TextInput ,TouchableOpacity} from 'react-native';
+import { Image, ScrollView, Alert ,StyleSheet, Text, View,TextInput ,TouchableOpacity} from 'react-native';
+import Button from 'antd-mobile-rn/lib/button';
+import { List,Switch,SearchBar } from 'antd-mobile-rn';
 import commonStyles from '../../../styles/styles'
-import {Device} from '../../../tool'
-
+import {Icon,Device} from '../../../tool'
 
+const Item = List.Item;
+const Brief = Item.Brief;
 
 
 
 export default class AddFriend extends React.Component {
   constructor(props) {
     super(props);
+    this. state = {
+      //value: '美食',
+    };
   }
 
   static navigationOptions ={
     title:'添加朋友'
    }
-   
+  onBlur = (value) => {
+   //跳转
+  }
+
   render() {
     const {navigation} =this.props
-    const Icon_in = require('../../../../assets/2x/in.png')
-    const Icon_Contact_scan = require('../../../../assets/2x/contact/scan.png')
-    const Icon_Contact_search = require('../../../../assets/2x/contact/search.png')
-    const Icon_Contact_phoneCall = require('../../../../assets/2x/contact/phoneCall.png')
-    const Icon_Contact_code = require('../../../../assets/2x/contact/code.png')
     return (
       <View style={commonStyles.page}>
         <View style={styles.searchBarWrap}>
           <View style={styles.serchWrap}>
-             <Image style={styles.searchImg} source={Icon_Contact_search}/>
+             <Image style={styles.searchImg} source={Icon.Contact.search}/>
              <TextInput
                 style={[styles.searchBar,{padding:0}]}
                 placeholder="手机号/ID号搜索"
+              //  onFocus
               />
           </View>
         </View>
@@ -39,7 +44,7 @@ export default class AddFriend extends React.Component {
           <TouchableOpacity onPress={()=>{
             navigation.navigate({ routeName:"QrCode" })
           }}>
-          <Image style={styles.idEWM}  source={Icon_Contact_code}/>
+          <Image style={styles.idEWM}  source={Icon.Contact.code}/>
           </TouchableOpacity>
           
         </View>
@@ -49,22 +54,22 @@ export default class AddFriend extends React.Component {
           navigation.navigate({ routeName:"QRScannerView" })
         }}>
         <View style={styles.list}>
-             <Image style={styles.scanImg} source={Icon_Contact_scan}/>
+             <Image style={styles.scanImg} source={Icon.Contact.scan}/>
              <View style={styles.listTitle}>
                <Text style={styles.listOne}>扫一扫</Text>
                <Text style={styles.listTwo}>扫描二维码名片</Text>
              </View>
-             <Image style={styles.inImg} source={Icon_in}/>
+             <Image style={styles.inImg} source={Icon.in}/>
           </View>
         </TouchableOpacity>
           
           <View style={styles.list}>
-             <Image style={styles.scanImg} source={Icon_Contact_phoneCall}/>
+             <Image style={styles.scanImg} source={Icon.Contact.phoneCall}/>
              <View style={styles.listTitle}>
                <Text style={styles.listOne}>手机联系人</Text>
                <Text style={styles.listTwo}>添加或邀请通讯录中的朋友</Text>
              </View>
-             <Image style={styles.inImg}  source={Icon_in}/>
+             <Image style={styles.inImg}  source={Icon.in}/>
           </View>
         </View>
       </View>
@@ -78,6 +83,10 @@ const styles = StyleSheet.create({
   searchBarWrap:{
     backgroundColor:'#f0f0f0',
     height:Device.scale(58),
+    // paddingLeft:8,
+    // paddingRight:8,
+    // paddingTop:11,
+    // paddingBottom:11,
   },
   serchWrap:{
     borderRadius:Device.scale(8),

+ 12 - 5
huiliaoAPP/src/pages/Contact/CheckValidation/index.js

@@ -1,25 +1,32 @@
 import React from 'react';
-import { Image,StyleSheet, Text, View,TextInput } from 'react-native';
-import { Button } from 'antd-mobile-rn';
-import {Device} from '../../../tool'
+import { Image, ScrollView, Alert ,StyleSheet, Text, View,TextInput } from 'react-native';
+import { List,Switch,SearchBar,Button } from 'antd-mobile-rn';
+import {Icon,Device} from '../../../tool'
 import commonStyles from '../../../styles/styles'
+const Item = List.Item;
+const Brief = Item.Brief;
 
 
 
 export default class App extends React.Component {
   constructor(props) {
     super(props);
+    this. state = {
+      //value: '美食',
+    };
   }
   static navigationOptions ={
     title:'详细资料'
    }
+  onBlur = (value) => {
+   //跳转
+  }
 
   render() {
-    const Icon_Contact_code = require('../../../../assets/2x/contact/code.png')
     return (
       <View style={commonStyles.page}>
         <View style={styles.listWrap}>
-           <Image style={styles.scanImg} source={Icon_Contact_code}/>
+           <Image style={styles.scanImg} source={Icon.Contact.code}/>
            <View style={styles.info}>
              <Text style={styles.infoName}>春花</Text>
              <Text style={styles.infoId}>ID:123456</Text>

+ 2 - 2
huiliaoAPP/src/pages/Contact/DetailedInfo/index.js

@@ -1,7 +1,7 @@
 import React from 'react';
 import { Image, ScrollView, Alert ,StyleSheet, Text, View,TextInput } from 'react-native';
 import { List,Switch,SearchBar,Button } from 'antd-mobile-rn';
-import {Device} from '../../../tool'
+import {Icon,Device} from '../../../tool'
 import commonStyles from '../../../styles/styles'
 
 const Item = List.Item;
@@ -30,7 +30,7 @@ export default class App extends React.Component {
     return (
       <View style={commonStyles.page}>
         <View style={styles.listWrap}>
-           <Image style={styles.scanImg} source={require('../../../../assets/icon.png')}/>
+           <Image style={styles.scanImg} source={Icon.Contact.search}/>
            <View style={styles.info}>
              <Text style={styles.infoName}>春花</Text>
              <Text style={styles.infoId}>ID:123456</Text>

+ 10 - 11
huiliaoAPP/src/pages/Contact/NewFriend/index.js

@@ -1,9 +1,12 @@
 import React from 'react';
-import { Image ,StyleSheet, Text, View,TextInput,TouchableOpacity } from 'react-native';
-
-import {Device} from '../../../tool'
+import { Image, ScrollView, Alert ,StyleSheet, Text, View,TextInput,TouchableOpacity } from 'react-native';
+import Button from 'antd-mobile-rn/lib/button';
+import { List,Switch,SearchBar } from 'antd-mobile-rn';
+import {Icon,Device} from '../../../tool'
 import commonStyles from '../../../styles/styles'
 
+const Item = List.Item;
+const Brief = Item.Brief;
 
 
 
@@ -23,15 +26,11 @@ export default class App extends React.Component {
 
   render() {
     const {navigation} =this.props
-    const Icon_Contact_scan = require('../../../../assets/2x/contact/scan.png')
-    const Icon_Contact_search = require('../../../../assets/2x/contact/search.png')
-    const Icon_Contact_phone = require('../../../../assets/2x/contact/phone.png')
-
     return (
       <View style={commonStyles.page}>
         <View style={styles.searchBarWrap}>
           <View style={styles.serchWrap}>
-             <Image style={styles.searchImg} source={Icon_Contact_search}/>
+             <Image style={styles.searchImg} source={Icon.Contact.search}/>
              <TextInput
                 style={[styles.searchBar,{padding:0}]}
                 placeholder="手机号/ID号搜索"
@@ -40,7 +39,7 @@ export default class App extends React.Component {
           </View>
         </View>
         <View style={styles.phoneCont}>
-          <Image style={styles.phoneImg} source={Icon_Contact_phone}/>
+          <Image style={styles.phoneImg} source={Icon.Contact.phone}/>
           <Text style={styles.labelName} >添加手机联系人</Text>
         </View>
         <View style={styles.listWrap}>
@@ -51,7 +50,7 @@ export default class App extends React.Component {
           }}>
           <Image 
               style={styles.scanImg}
-              source={Icon_Contact_scan}
+              source={Icon.Contact.scan}
               
               />
           </TouchableOpacity>
@@ -68,7 +67,7 @@ export default class App extends React.Component {
           <View style={styles.list}>
              <Image 
               style={styles.scanImg}
-              source={Icon_Contact_scan}
+              source={Icon.Contact.scan}
               onPress={()=>{
                 alert(1)
               }}

+ 3 - 6
huiliaoAPP/src/pages/Contact/Search/index.js

@@ -20,19 +20,16 @@ export default class App extends React.Component {
   }
   render() {
     const {navigation} =this.props
-    const Icon_Contact_search = require('../../../../assets/2x/contact/search.png')
-    const Icon_Contact_searchBg = require('../../../../assets/2x/contact/searchBg.png')
-    const Icon_Contact_close = require('../../../../assets/2x/contact/close.png')
     return (
      <View >
           <View style={[styles.searchBarWrap,{paddingTop:Device.statusBarHeight,height:Device.navBarHeight}]}>
               <View style={styles.serchWrap}>
-                <Image style={styles.searchImg} source={Icon_Contact_search}/>
+                <Image style={styles.searchImg} source={Icon.Contact.search}/>
                 <TextInput
                     style={[styles.searchBar,{padding:0}]}
                     placeholder="搜索"
                   />
-                <Image style={styles.clear} source={Icon_Contact_close}/>
+                <Image style={styles.clear} source={Icon.Contact.close}/>
               </View>
               <View style={styles.cancel}>
                  <Text style={styles.cancelTitle}
@@ -45,7 +42,7 @@ export default class App extends React.Component {
     
          <View style={styles.tipWrap}>
               <View style={styles.tip1}>
-                  <Image style={styles.iconImg1} source={Icon_Contact_searchBg}/>
+                  <Image style={styles.iconImg1} source={Icon.Contact.searchBg}/>
                   <View style={styles.tipTitleWrap}>
                     <Text style={styles.search}>搜索:</Text>
                     <Text style={styles.searchNum}>13281203999</Text>

+ 3 - 4
huiliaoAPP/src/pages/Contact/components/ContactList/index.js

@@ -9,11 +9,11 @@ import {
   TouchableOpacity,
 } from 'react-native'
 import {connect} from 'react-redux'
-import {Device} from '../../../../tool'
+import 'pinyin4js'
+import {Device,Icon} from '../../../../tool'
 import  SearchBar from '../searchBar'
 import ItemInContact from '../ItemInContact';
 import SeparatorLine from './SeparatorLine';
-import simplePinyin from 'simple-pinyin';
 
 
  class ContactList extends Component {
@@ -143,7 +143,6 @@ import simplePinyin from 'simple-pinyin';
   render() {
     const { contacts, labels } = this.state
     const {navigation} =this.props.props
-    const Icon_Contact_search = require('../../../../../assets/2x/contact/search.png')
     const scollTo = (item) => {
       // 当viewPosition 为 0 时将它滚动到屏幕顶部,为 1 时将它滚动到屏幕底部,为 0.5 时将它滚动到屏幕中央。
       this._flatList.scrollToIndex({viewPosition:0, index:item.index})
@@ -185,7 +184,7 @@ import simplePinyin from 'simple-pinyin';
                     onPress={()=> scollTo(item)}>
                         <Image 
                         style={{width:Device.scale(12),height:Device.scale(12)}}
-                        source={Icon_Contact_search}></Image>
+                        source={Icon.Contact.search}></Image>
                     </TouchableOpacity>
                   )
               }

+ 4 - 3
huiliaoAPP/src/pages/Contact/components/ItemInContact.js

@@ -1,7 +1,7 @@
 import React from 'react';
 import { Image} from 'react-native';
 import { StyleSheet, Text, View } from 'react-native';
-import {Device} from '../../../tool'
+import {Icon,Device} from '../../../tool'
 export default class App extends React.Component {
 
   constructor(props){
@@ -9,11 +9,12 @@ export default class App extends React.Component {
   }
   render() {
     const {username,telphone,head} = this.props.item
-    const Icon_Contact_newFriendIcon = require('../../../../assets/2x/contact/newFriendIcon.png')
+
+    const {navigation} =this.props.props
     return (
           <View style={styles.tipWrap}>
               <View style={styles.tip1}>
-                  <Image style={styles.iconImg1} source={Icon_Contact_newFriendIcon}/>
+                  <Image style={styles.iconImg1} source={Icon.Contact.newFriendIcon}/>
                   <View style={styles.tipTitleWrap}>
                     <Text style={styles.tipName}>{username}</Text>
                     <Text style={styles.tipNum}>{telphone}</Text>

+ 12 - 8
huiliaoAPP/src/pages/Contact/components/searchBar.js

@@ -2,7 +2,7 @@ import React from 'react';
 import { Image, ScrollView,TextInput} from 'react-native';
 import { StyleSheet, Text, View } from 'react-native';
 import { List } from 'antd-mobile-rn';
-import {Device} from '../../../tool'
+import {Icon,Device} from '../../../tool'
 import {connect} from 'react-redux'
 
 
@@ -15,14 +15,18 @@ class SearchBar extends React.Component {
 
   render() {
     const {navigation} =this.props.props
-    const Icon_Contact_newFriendIcon = require('../../../../assets/2x/contact/newFriendIcon.png')
-    const Icon_Contact_search = require('../../../../assets/2x/contact/search.png')
-    const Icon_Contact_groupChatIcon = require('../../../../assets/2x/contact/groupChatIcon.png')
-
     return (
       <View style={styles.searchBarWrap}>
       <View style={styles.serchWrap}>
-         <Image style={styles.searchImg} source={Icon_Contact_search}/>
+         <Image style={styles.searchImg} source={Icon.Contact.search}/>
+         {/* <TextInput
+            style={[styles.searchBar,{padding:0}]}
+            placeholder="手机号/ID号搜索"
+          
+           onFocus={()=>{
+            navigation.navigate({ routeName:"Search" })
+           }}
+          /> */}
           <Text
              style={[styles.searchBar,{padding:0}]}
              onPress={()=>{
@@ -39,11 +43,11 @@ class SearchBar extends React.Component {
         }}
         
         >
-          <Image style={styles.iconImg} source={Icon_Contact_newFriendIcon}/>
+          <Image style={styles.iconImg} source={Icon.Contact.newFriendIcon}/>
           <Text style={styles.tipTitle}>新的朋友</Text>
         </View>
         <View style={styles.tip1}>
-          <Image style={styles.iconImg} source={Icon_Contact_groupChatIcon}/>
+          <Image style={styles.iconImg} source={Icon.Contact.groupChatIcon}/>
           <Text style={styles.tipTitle}>群聊</Text>
         </View>
       </View>

+ 14 - 4
huiliaoAPP/src/pages/Login/index.js

@@ -1,16 +1,21 @@
 import React,{Component} from 'react';
 import PropTypes from 'prop-types';
-import {StyleSheet, View,StatusBar,Image ,Text,AsyncStorage} from 'react-native';
+import {StyleSheet, View,StatusBar,Image ,Text,Dimensions,AsyncStorage} from 'react-native';
 import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view'
 import {Button} from 'antd-mobile-rn';
 import commonStyle from '../../styles/styles.js';
 import LoginInput from '../../components/LoginInput';
-import {Device} from '../../tool'
+import {Device ,Icon} from '../../tool'
+
 import Leancloud from '../../leancloud'
 
+const {width,height} = Dimensions.get('window');
+
+
 class LoginScreen extends Component{
   static navigationOptions = {title: '登录',header:null}
   async componentWillMount(){
+
     let user = JSON.parse(await AsyncStorage.getItem('USERINFO'))
     if(user) {
       this.setState({
@@ -19,7 +24,9 @@ class LoginScreen extends Component{
       },()=>{
         this.submit()
       })
+     
     }
+
   }
   constructor(props){
     super(props)
@@ -49,12 +56,12 @@ class LoginScreen extends Component{
         >  
         </StatusBar>  
         <View style={styles.bgView}>
-          <Image source={require('../../../assets/2x/Login/bg.png')} style={styles.bgViewImage}></Image>
+          <Image source={Icon.Login.bg} style={styles.bgViewImage}></Image>
         </View>
 
         <View style={[styles.form,{}]}>
             <Text style={{fontSize:Device.scale(17),color:'#b3b3b3',marginTop:Device.scale(10)}}>登录</Text>
-            <Image source={require('../../../assets/2x/Login/line.png')} style={{height:2,width:Device.scale(60),marginTop:Device.scale(10)}}></Image>
+            <Image source={Icon.Login.line} style={{height:2,width:Device.scale(60),marginTop:Device.scale(10)}}></Image>
             <LoginInput type='text' style={{marginTop:Device.scale(45)}}
               onChange={(telphone)=>{
                 this.setState({
@@ -102,6 +109,9 @@ const styles = StyleSheet.create({
     position:'absolute',
     padding:Device.scale(26),
     alignItems:'center',
+    // borderWidth:1,
+    // borderColor:'red',
+    // borderStyle:'solid'
   },
   btn:{
     width:Device.scale(280),

+ 3 - 6
huiliaoAPP/src/pages/Mine/Infomation/index.js

@@ -8,7 +8,7 @@ import ImagePicker from 'react-native-image-crop-picker';
 import commonStyle from '../../../styles/styles.js';
 // import FileSystem from 'react-native-filesystem';
 
-import {Device} from '../../../tool';
+import {Device ,Icon} from '../../../tool';
 
 
 
@@ -100,16 +100,13 @@ class Infomation extends Component {
     render(){
         const {UserAction } =this.props
         const { id ,username ,head,mobilePhoneNumber} =UserAction
-        const Icon_icon = require('../../../../assets/icon.png')
-        const Icon_Mine_code = require('../../../../assets/2x/code.png')
-      
         if(head){
              source = {
                 uri:head,
                 cache: 'force-cache'
             }
         }else{
-            source = Icon_icon
+            source = Icon.icon
         }
         return (
             <View style={commonStyle.page}>
@@ -168,7 +165,7 @@ class Infomation extends Component {
                     onClick={() => {this.push('QrCode')}}
                     extra={
                         <Image
-                        source={Icon_Mine_code}
+                        source={Icon.Mine.code}
                         style={{ width: Device.scale(29), height: Device.scale(29) }}
                         />
                     }

+ 4 - 8
huiliaoAPP/src/pages/Mine/index.js

@@ -3,7 +3,7 @@ import { View ,Text,Image,StyleSheet} from 'react-native';
 import commonStyle from '../../styles/styles.js';
 import { connect } from 'react-redux';
 import { List } from 'antd-mobile-rn';
-import {Device} from '../../tool'
+import {Device,Icon} from '../../tool'
 const Item = List.Item;
 const Brief = Item.Brief;
 
@@ -18,10 +18,6 @@ class Mine extends Component {
     render(){
         const {UserAction } =this.props
         const {username,id,head} =UserAction
-
-        const Icon_icon = require('../../../assets/icon.png')
-        const Icon_Mine_set = require('../../../assets/2x/set.png')
-        const Icon_Mine_code = require('../../../assets/2x/code.png')
         let source={}
         if(head){
              source = {
@@ -29,7 +25,7 @@ class Mine extends Component {
                 cache: 'force-cache'
             }
         }else{
-            source = Icon_icon
+            source = Icon.icon
         }
         
         return (
@@ -48,7 +44,7 @@ class Mine extends Component {
                         }
                         extra={
                         <Image
-                            source={Icon_Mine_code}
+                            source={Icon.Mine.code}
                             style={styles.code}
                         />
                         }
@@ -65,7 +61,7 @@ class Mine extends Component {
                         onClick={()=>{this.push('Setting')}}
                         thumb={
                             <Image
-                             source={Icon_Mine_set}
+                             source={Icon.Mine.set}
                               style={
                                   styles.icon
                               }

+ 44 - 42
huiliaoAPP/src/tool/icon.js

@@ -1,46 +1,48 @@
-console.log(1)
 
-//login
-export const Icon_Login_bg = require('../../assets/2x/Login/bg.png')
-export const Icon_Login_line = require('../../assets/2x/Login/line.png')
-export const Icon_Login_lock = require('../../assets/2x/Login/lock.png')
-export const Icon_Login_lockClick = require('../../assets/2x/Login/lock-click.png')
-export const Icon_Login_phone = require('../../assets/2x/Login/phone.png')
-export const Icon_Login_phoneClick = require('../../assets/2x/Login/phone-click.png')
 
-//all
-export const Icon_return = require('../../assets/2x/return.png')
-export const Icon_in = require('../../assets/2x/in.png')
-export const Icon_icon = require('../../assets/icon.png')
+const Icon ={
+    return:require('../../assets/2x/return.png'),
+    in:require('../../assets/2x/in.png'),
+    icon:require('../../assets/icon.png'),
+    Login:{
+        bg:require('../../assets/2x/Login/bg.png'),
+        line:require('../../assets/2x/Login/line.png'),
+        lock:require('../../assets/2x/Login/lock.png'),
+        lockClick:require('../../assets/2x/Login/lock-click.png'),
+        phone:require('../../assets/2x/Login/phone.png'),
+        phoneClick:require('../../assets/2x/Login/phone-click.png')
+    },
+    Mine:{
+        set:require('../../assets/2x/set.png'),
+        code:require('../../assets/2x/code.png'),
+        codeBg:require('../../assets/2x/code-bg.png')
 
-//mine
-export const Icon_Mine_set = require('../../assets/2x/set.png')
-export const Icon_Mine_code = require('../../assets/2x/code.png')
-export const Icon_Mine_codeBg = require('../../assets/2x/code-bg.png')
-console.log(2)
-//message
-export const Icon_Message_add = require('../../assets/2x/message/add.png')
+    },
+    Message:{
+        add:require('../../assets/2x/message/add.png')
+    },
+    Contact:{
+        newFriendIcon:require('../../assets/2x/contact/newFriendIcon.png'),
+        scan:require('../../assets/2x/contact/scan.png'),
+        search:require('../../assets/2x/contact/search.png'),
+        groupChatIcon:require('../../assets/2x/contact/groupChatIcon.png'),
+        phone:require('../../assets/2x/contact/phone.png'),
+        phoneClick:require('../../assets/2x/contact/phone-click.png'),
+        phoneCall:require('../../assets/2x/contact/phoneCall.png'),
+        searchBg:require('../../assets/2x/contact/searchBg.png'),
+        addClick:require('../../assets/2x/contact/add-click.png'),
+        add:require('../../assets/2x/contact/add.png'),
+        close:require('../../assets/2x/contact/close.png'),
+        code:require('../../assets/2x/contact/code.png')
+    },
+    TabIcon:{
+        mine:require('../../assets/tabicon/mine.png'),
+        mineClick:require('../../assets/tabicon/mineClick.png'),
+        news:require('../../assets/tabicon/news.png'),
+        newsClick:require('../../assets/tabicon/newsClick.png'),
+        phoneClick:require('../../assets/tabicon/phoneClick.png'),
+        phone:require('../../assets/tabicon/phone.png'),
+    }
+}
 
-//contact
-export const Icon_Contact_newFriendIcon = require('../../assets/2x/contact/newFriendIcon.png')
-export const Icon_Contact_scan = require('../../assets/2x/contact/scan.png')
-export const Icon_Contact_search = require('../../assets/2x/contact/search.png')
-export const Icon_Contact_groupChatIcon = require('../../assets/2x/contact/groupChatIcon.png')
-export const Icon_Contact_phone = require('../../assets/2x/contact/phone.png')
-export const Icon_Contact_phoneClick = require('../../assets/2x/contact/phone-click.png')
-export const Icon_Contact_phoneCall = require('../../assets/2x/contact/phoneCall.png')
-export const Icon_Contact_searchBg = require('../../assets/2x/contact/searchBg.png')
-export const Icon_Contact_addClick = require('../../assets/2x/contact/add-click.png')
-export const Icon_Contact_add = require('../../assets/2x/contact/add.png')
-export const Icon_Contact_close = require('../../assets/2x/contact/close.png')
-export const Icon_Contact_code = require('../../assets/2x/contact/code.png')
-
-//tabicon
-export const Icon_TabIcon_mine = require('../../assets/tabicon/mine.png')
-export const Icon_TabIconmineClick = require('../../assets/tabicon/mineClick.png')
-export const Icon_TabIconnews = require('../../assets/tabicon/news.png')
-export const Icon_TabIconnewsClick = require('../../assets/tabicon/newsClick.png')
-export const Icon_TabIconphoneClick = require('../../assets/tabicon/phoneClick.png')
-export const Icon_TabIconphone = require('../../assets/tabicon/phone.png')
-
-console.log(3)
+export default Icon

+ 3 - 1
huiliaoAPP/src/tool/index.js

@@ -1,8 +1,10 @@
 import Device from './Device'
 import requestPermission from './requestPermission';
+import Icon from './icon';
 
 
 export {
     Device,
-    requestPermission
+    requestPermission,
+    Icon
 }