123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- import React, {Component} from 'react';
- import {
- View,
- Text,
- TextInput,
- TouchableOpacity,
- Image,
- PixelRatio,
- } from 'react-native';
- import {List, TextareaItem} from '@ant-design/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 (
- <View style={public_css.body}>
- <View style={{flex: 1}}>
- <TextareaItem
- rows={15}
- placeholder="请输入简介信息"
- value={this.state.profiles}
- onChange={text => {
- this.setState({
- profiles: text,
- });
- }}
- count={200}
- />
- </View>
- <View style={[public_css.bottomStaus]}>
- <TouchableOpacity
- style={[public_css.statusBtn, public_css.statusRBtn]}
- onPress={() => this.submitData()}>
- <Image
- source={require('../../source/img/productImg/confirm.png')}
- style={{width: 32, height: 32}}
- />
- <Text style={{color: '#fff'}}>确认</Text>
- </TouchableOpacity>
- </View>
- </View>
- );
- }
- //提交开票信息
- 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 = '/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('服务器故障!');
- }
- }
- };
- }
|