import { ComponentClass } from 'react'
import Taro, { Component } from '@tarojs/taro'
import { View, Image, Label, Input } from '@tarojs/components'
import './index.scss'
import { AtButton } from 'taro-ui';
type PageOwnProps = {
className?: string
currentAmount: any
type: 'recharge' | 'withdraw'
onClick?: any
}
type IProps = PageOwnProps
interface Index {
props: IProps;
}
class Index extends Component {
static options = {
addGlobalClass: true
}
state = {
account: ''
}
handleClick = () => {
this.props.onClick(this.state.account)
}
handleChange = e => {
this.setState({
account: e.detail.value
})
}
render() {
const { currentAmount, type, className } = this.props
const { account } = this.state
return (
{/* 头部 */}
{type === 'recharge' ? '微信支付' : '提现至微信'}
{/* 金额 */}
{type === 'recharge' ? '充值金额' : '提现金额'}
{/* 余额 */}
当前余额:¥{currentAmount}
{type === 'recharge' ? '充值' : '提现'}
)
}
}
export default Index as ComponentClass