import React, {Component} from 'react'; import { View, Text, TextInput, TouchableOpacity, Image, PixelRatio, } from 'react-native'; import {ShowToast} from '../../components/rootToast/root_toast'; import {GetDataPost} from '../../data/encryption'; import {RetrieveData} from '../../data/storage'; import public_css from '../../source/css/public_css'; export default class change_nick_name extends Component { constructor(props) { super(props); this.state = { profiles: this.props.route.params.data.state.profiles, }; } render() { return ( { this.setState({ profiles: text, }); }} multiline={true} numberOfLines={5} textAlignVertical={'top'} /> this.submitData()}> 确认 ); } //提交开票信息 submitData = async () => { let account = await RetrieveData('account'); let token = await RetrieveData('token'); if (token && account) { account = account.substring(1, account.length - 1); token = token.substring(1, token.length - 1); const url = 'https://app.taxbk.cn:9443/auth/comm/user/personalInfo/save'; let response = await GetDataPost( url, token, { mobile: account, personalProfile: this.state.profiles, reqChannel: 3, ip: '', }, false, 1, ); if (response) { if (response.code == 0) { ShowToast('修改成功!'); await this.props.route.params.data.getUserInformation(); this.props.navigation.goBack(); } } else { ShowToast('服务器故障!'); } } }; }