UNPKG

yky-wx-components1

Version:

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

104 lines (80 loc) 2.45 kB
import Taro, { Component } from '@tarojs/taro' import { View, Button, Text , Swiper, SwiperItem} from '@tarojs/components' import {AtButton,AtCard,AtTabs, AtTabsPane,AtList, AtListItem,AtTabBar,AtIcon,AtFloatLayout,AtTextarea,AtInput} from 'taro-ui' 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 () { } render () { console.log(this.props,this) let {baseObj,baseInfo}=this.props // 这是容错处理,以防乱传数据 if(!Array.isArray(baseObj)){ baseObj=[] } if(Object.prototype.toString.call(baseInfo) !== '[object Object]'){ baseInfo={} } return ( <View > <AtCard className='basic-card' id='basic-card'> <View className='at-article__h3'>基本信息</View> <View className='basic-con'> { baseObj&&baseObj.map((item,index)=>{ return( <View className='basic-list'><View>{item&&item.name}</View><View>{baseInfo&&baseInfo[item.type]?baseInfo[item.type]:'---'}</View></View> ) }) } </View> </AtCard> {/* <View className='more'>查看更多<AtIcon value='chevron-down' size='16' color='rgba(0,0,0,0.3)'></AtIcon></View> */} </View> ) } } export default approveList