import React, {Component} from 'react'; import { View, Text, TextInput, TouchableOpacity, Image, PixelRatio, SafeAreaView, ScrollView, } from 'react-native'; import {WingBlank, WhiteSpace} from '@ant-design/react-native'; import {RequestNetwork} from '../../data/encryption'; import {RetrieveData} from '../../data/storage'; import public_css from '../../source/css/public_css'; import {ToastShow} from '../../components/toast/toast'; export default class change_company extends Component { constructor(props) { super(props); this.state = { companyName: this.props.route.params.data, }; } render() { return ( { this.setState({ companyName: text, }); }} /> this.submitData()}> 确认 ); } //提交信息 submitData = async () => { let account = await RetrieveData('account'); let token = await RetrieveData('token'); if (token && account) { const url = '/auth/comm/user/personalInfo/save'; let response = await RequestNetwork( url, token, { mobile: account, company: this.state.companyName, reqChannel: 3, ip: '', }, false, 1, ); if (response) { if (response.code === 0) { ToastShow(1, '编辑成功!'); this.props.route.params.isRefresh(); this.props.navigation.goBack(); } else { ToastShow(1, '编辑失败!'); } } } }; }