UNPKG

yky-wx-components1

Version:

Taro实现微信小程序红包雨效果

182 lines (146 loc) 5.85 kB
import Taro, { Component } from '@tarojs/taro' import { View, Button, Text, Swiper, SwiperItem, Picker } from '@tarojs/components' import { AtButton, AtCard, AtTabs, AtTabsPane, AtList, AtAccordion, AtListItem, AtTabBar, AtIcon, AtFloatLayout, AtTextarea, AtInput } from 'taro-ui' import { imgUrl, judgeEmpty, exportBaseUrl, hidebankCard, encrypt,toThousands, CZBANK, openPDF } from '../utils/utils' import moment from 'moment' import { get, set } from '../../global_data' import './index.less' class approveList extends Component { static options = { addGlobalClass: true } SectionCustom = {} config = { navigationBarTitleText: '审批', navigationBarBackgroundColor: '#F7F7F7', navigationBarTextStyle: 'white', navigationStyle: "custom", } // 索引tab栏 constructor() { super(...arguments) this.state = { current: 0, fixedTab: false, value: '', fuKuanReason: false, Beizhuvalue: '', EyeFlag: false, costInformationCurent: 0, // sectionCustom: {} } } refSectionCustom = (ref) => { this.SectionCustom = ref } componentWillReceiveProps(nextProps) { } componentWillUnmount() { } onLoad(options) { console.log(options, 'ppp') // let item = JSON.parse(options.item) // this.setState({ // item // }) } componentDidShow() { } componentDidHide() { } // nav-bar高度 componentDidMount() { } selectorChange(e,data){ console.log(e,data) data.fn(e) } render() { console.log(this.props, this, 123) let { baseObj, baseInfo, baseFormList } = this.props // 这是容错处理,以防乱传数据 return ( <View > {/* {baseFormList && baseFormList.map((item, index) => { return <View> {item.type === 'Picker' && item.secondType === 'date' && <View className='page-section'> <View> <Picker mode='date' > <View className='picker'> {item.title}<Text className="picker-content">{'3r35'}</Text> </View> </Picker> </View> </View>} {item.type === 'Picker' && item.secondType === 'selector' && <View className='page-section'> <View> <Picker mode='selector' range={[]} > <View className='picker'> {item.title}<Text className="picker-content"> </Text> </View> </Picker> </View> </View>} </View> })} */} {baseFormList&&baseFormList.map( (data,index) => { console.log(data.inputBoxDatas) return <View> {/* 输入项 */} {/* 文本输入框 */} {data && data.type == "Picker" && data.secondType == "date" && data.isHidden == true && <View className='page-section'> <View> <Picker mode='date' onChange={(e)=>{this.props.handleChangeIput123(e,data, index)}}> <View className='picker'> {data.title}<Text className="picker-content">{data.value?data.value:'请选择'}</Text> </View> </Picker> </View> </View>} {data && data.type == "Picker" && data.secondType == "selector" &&data.isHidden == true && <View className='page-section'> <View> <Picker mode='selector' range={data.options} onChange={(e)=>{this.props.handleChangeIput123(e,data, index)}}> <View className='picker'> {data.title}<Text className="picker-content">{data.options[parseInt(data.value)]?data.options[parseInt(data.value)]:'请选择'}</Text> </View> </Picker> </View> </View>} {data && data.type == "input" &&data.isHidden == true && <View className='page-section noPadding'> <AtInput title={data.title} type='digit' maxLength={'20'} border={false} placeholder='请输入' // disabled={accreditInfo.imitMoney && accreditInfo.imitMoney!=='' && accreditInfo.imitMoney!==null ? true : false} value={judgeEmpty( '')} onChange={(e)=>{this.props.handleChangeIput123(e,data, index)}} > <Text className="unit-addon"></Text> </AtInput> </View>} {/* {data && data.type == "AtInput" &&<View className='page-section noPadding'> <AtInput title={data.title} type='digit' maxLength={'20'} border={false} placeholder='请输入' // disabled={accreditInfo.imitMoney && accreditInfo.imitMoney!=='' && accreditInfo.imitMoney!==null ? true : false} value={judgeEmpty(this.xianShiObj.imitMoney, '')} // onChange={(e)=>{this.handleChangeIput(e, 'imitMoney')}} > <Text className="unit-addon"></Text> </AtInput> </View>} */} </View > } ) } </View> ) } } export default approveList