yky-wx-components1
Version:
Taro实现微信小程序红包雨效果
117 lines (92 loc) • 3.5 kB
JavaScript
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'
import { toISOString } from 'core-js/core/date'
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 ,currentTab,taskObj} = this.props
if (!baseInfo) {
baseInfo = {}
}
return (
<View >
<AtCard className='card-list' onClick={(e)=>{this.props.fn(e,baseInfo)}} >
{/* <AtCard className='card-list' > */}
<View className='header' >
<View>{baseInfo[this.props.title]}</View>
<View className='click'>
<Text hidden={baseInfo.isPermitted == '1' && baseInfo.isAssigned == '1' ? false : true}>已领取</Text>
<Text hidden={baseInfo.isPermitted == '0' && baseInfo.isAssigned == '1' ? false : true}>他人领取</Text>
<Text hidden={baseInfo.isPermitted == '0' && baseInfo.isAssigned == '0' ? false : true}>待领取</Text>
</View>
{/* <View className='click'>
<Text hidden={baseInfo.flowStatus == '0' ? false : true}>审批中</Text>
<Text hidden={baseInfo.flowStatus == '1' ? false : true}>已完成</Text>
<Text hidden={baseInfo.flowStatus == '' ? false : true}>已取消</Text>
</View> */}
</View>
<View className='con-list'>
<View className='cancelBtn' >{this.props.btnName}</View>
{/* <View className='cancelBtn' hidden={item.isPermitted == '1' && item.isAssigned == '1' && currentTab === 0 ? false : true} >取消领取</View> */}
{/* <View className='cancelBtn' hidden={item.flowStatus == '0' && currentTab === 1 ? false : true} onClick={this.cancleStatus.bind(this, item.flowStatus, item.flowType, item.bizId, item.taskId)}>取消流程</View> */}
{
taskObj&&taskObj.map((item,index)=>{
return(
<View >{item&&item.name}<Text>{item&&item.type?baseInfo[item.type]:"---"}</Text></View>
)
})
}
</View>
</AtCard>
</View>
)
}
}
export default approveList