import { connect } from '@tarojs/redux'; import { AtList, AtListItem } from 'taro-ui'; import Taro, { Component, Config } from '@tarojs/taro'; import { View, Text, Image } from '@tarojs/components'; import coinKit from '../../utils/coin-kit'; import { mapDefaultProps } from '../../models/utils'; import defaultImage from '../../assets/images/logo.png'; import './index.scss'; import { MyIndexProps, MyState } from './type'; @connect(mapDefaultProps) class Index extends Component { config: Config = { navigationBarTitleText: '个人中心', enablePullDownRefresh: true } state = { nickName: 'MiaoWoo', avatarUrl: defaultImage, } onPullDownRefresh() { const { dispatch } = this.props; if (dispatch) { dispatch({ type: 'my/getAccounts', playload: '02078AC7F16BAF88F9A6F8FA05D5C9F697596402D9EB774A36C74E52A3470EA85B' }) } } componentDidMount() { Taro.startPullDownRefresh(); } render() { const { nickName, avatarUrl } = this.state; const accounts = this.props.accounts.map(a => { return }) return ( {nickName} 查看或编辑个人主页 {accounts} ) } } export default Index