import { connect } from '@tarojs/redux'; import { AtCard, AtNoticebar } from 'taro-ui'; import { View, Image } from '@tarojs/components'; import Taro, { Component, Config } from '@tarojs/taro'; import logoImg from '../../assets/images/logo.png'; import { mapDefaultProps } from '../../models/utils'; import './index.scss'; import { IndexProps, IndexState } from './type'; @connect(mapDefaultProps) export default class Index extends Component { config: Config = { navigationBarTitleText: '首页', enablePullDownRefresh: true } state = { notify: '通知: 钱包目前处于测试阶段 如果发现BUG 请及时反馈!' } componentDidMount() { Taro.startPullDownRefresh(); } async onPullDownRefresh() { await this.props.dispatch({ type: 'index/getCurrentInfo' }) } render() { const data = this.props const info = ( 软件版本: {data.version} 当前高度: {data.block} 流通数量: {data.supply} 百 分 比: {data.percent} 当前收益: {data.lastNumber} 来 自: {data.lastMiner} {data.lastName} ) return ( {this.state.notify} 泰瑞管家 {info} ) } }