|
@@ -18,23 +18,19 @@ import {
|
|
|
ToastAndroid,
|
|
|
Button,
|
|
|
StatusBar,
|
|
|
- Modal,
|
|
|
- TouchableHighlight,
|
|
|
- DeviceEventEmitter
|
|
|
+ Modal
|
|
|
} from 'react-native';
|
|
|
-import AndroidUtil from '../../util/AndroidUtil';
|
|
|
-import BasePage from '../BasePage';
|
|
|
-import CourseTitle from './CourseTitle';
|
|
|
-import ChosePhoto from './ChosePhoto';
|
|
|
-import RegionModal from './RegionModal';
|
|
|
-import BirthdayModal from './BirthdayModal';
|
|
|
-import GradeSelectionModal from './GradeSelectionModal';
|
|
|
-import Header from './Header';
|
|
|
-import PersonalInfoDialog from './PersonalInfoDialog';
|
|
|
+import BasePage from './BasePage';
|
|
|
+import CourseTitle from '../pages/components/CourseTitle';
|
|
|
+import ChosePhoto from '../pages/components/ChosePhoto';
|
|
|
+import RegionModal from '../pages/components/RegionModal';
|
|
|
+import BirthdayModal from '../pages/components/BirthdayModal';
|
|
|
+import GradeSelectionModal from '../pages/components/GradeSelectionModal';
|
|
|
+import PersonalInfoDialog from '../pages/components/PersonalInfoDialog';
|
|
|
import { NavigationActions, StackActions } from 'react-navigation';
|
|
|
-import asyncStorage from '../utils/asyncStorage';
|
|
|
-import user from '../services/user';
|
|
|
-import wechat from '../utils/wechat';
|
|
|
+import asyncStorage from './utils/asyncStorage';
|
|
|
+import http_user from './services/user';
|
|
|
+import wechat from './utils/wechat';
|
|
|
type Props = {};
|
|
|
|
|
|
export default class PersonalInfo extends BasePage {
|
|
@@ -49,7 +45,7 @@ export default class PersonalInfo extends BasePage {
|
|
|
birthday_month: 0,
|
|
|
birthday_day: 0,
|
|
|
birthday_time: 0,
|
|
|
- photo_uri: require('../images/userInfo/default_photo.png'),
|
|
|
+ photo_uri: require('./images/userInfo/default_photo.png'),
|
|
|
phone: '',
|
|
|
phone_bind_result: false,
|
|
|
phone_bind_type: 1, //1是绑定,2是修改
|
|
@@ -94,7 +90,7 @@ export default class PersonalInfo extends BasePage {
|
|
|
}}
|
|
|
>
|
|
|
<ImageBackground
|
|
|
- source={require('../images/userInfo/top.png')}
|
|
|
+ source={require('./images/userInfo/top.png')}
|
|
|
style={{
|
|
|
flex: 3,
|
|
|
width: '100%',
|
|
@@ -637,7 +633,7 @@ export default class PersonalInfo extends BasePage {
|
|
|
onPress={() => this.logout()}
|
|
|
>
|
|
|
<ImageBackground
|
|
|
- source={require('../images/userInfo/logoutbg1.png')}
|
|
|
+ source={require('./images/userInfo/logoutbg1.png')}
|
|
|
style={{
|
|
|
flex: 1,
|
|
|
width: '100%',
|
|
@@ -722,7 +718,7 @@ export default class PersonalInfo extends BasePage {
|
|
|
//onPress={() => this.arrowpress(type)}
|
|
|
>
|
|
|
<Image
|
|
|
- source={require('../images/userInfo/arrow.png')}
|
|
|
+ source={require('./images/userInfo/arrow.png')}
|
|
|
style={{
|
|
|
width: '20%',
|
|
|
height: '30%'
|
|
@@ -736,29 +732,29 @@ export default class PersonalInfo extends BasePage {
|
|
|
let headerpath;
|
|
|
switch (type) {
|
|
|
case 0:
|
|
|
- headerpath = require('../images/userInfo/headportrait.png');
|
|
|
+ headerpath = require('./images/userInfo/headportrait.png');
|
|
|
|
|
|
break;
|
|
|
case 1:
|
|
|
- headerpath = require('../images/userInfo/nickname.png');
|
|
|
+ headerpath = require('./images/userInfo/nickname.png');
|
|
|
break;
|
|
|
case 2:
|
|
|
- headerpath = require('../images/userInfo/birthday.png');
|
|
|
+ headerpath = require('./images/userInfo/birthday.png');
|
|
|
break;
|
|
|
case 3:
|
|
|
- headerpath = require('../images/userInfo/location.png');
|
|
|
+ headerpath = require('./images/userInfo/location.png');
|
|
|
break;
|
|
|
case 4:
|
|
|
- headerpath = require('../images/userInfo/school.png');
|
|
|
+ headerpath = require('./images/userInfo/school.png');
|
|
|
break;
|
|
|
case 5:
|
|
|
- headerpath = require('../images/userInfo/grade.png');
|
|
|
+ headerpath = require('./images/userInfo/grade.png');
|
|
|
break;
|
|
|
case 6:
|
|
|
- headerpath = require('../images/userInfo/phone.png');
|
|
|
+ headerpath = require('./images/userInfo/phone.png');
|
|
|
break;
|
|
|
case 7:
|
|
|
- headerpath = require('../images/userInfo/wechat.png');
|
|
|
+ headerpath = require('./images/userInfo/wechat.png');
|
|
|
break;
|
|
|
}
|
|
|
// alert(headerpath);
|
|
@@ -823,7 +819,7 @@ export default class PersonalInfo extends BasePage {
|
|
|
nickName: result['nickname']
|
|
|
}
|
|
|
};
|
|
|
- user.bind_wechat(opts).then((res) => {
|
|
|
+ http_user.bind_wechat(opts).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
this.setState({
|
|
|
wechat_nickName: res['nickname'],
|
|
@@ -894,7 +890,7 @@ export default class PersonalInfo extends BasePage {
|
|
|
method: 'PUT', //请求方法
|
|
|
body: object //请求体
|
|
|
};
|
|
|
- user.update_UserInfo(opts).then((res) => {
|
|
|
+ http_user.update_UserInfo(opts).then((res) => {
|
|
|
console.log(res);
|
|
|
});
|
|
|
}
|