import Taro, { Component } from '@tarojs/taro';
import './index.scss'




export default class checkinsuccess extends Component {
  state = {
    
    addPoints:'',
  }
    componentWillMount () {
    console.log(this.$router.params, '22222')

    const  addPoints  = this.$router.params.addPoints
    this.setState({
      addPoints:addPoints
    })
    // this.setState({
    //   id: id
    // })
    // console.log(id, type)
    // this.getcheckinDetails(id, type)
    // // this.getcheckinDetails()
// addPoints  = this.$router.params.addPoints
  }

  toshop () {
    wx.switchTab({
      url: '/pages/shop/index'
    });
  }

  render () {

    return (
      <View className="checkin" style="width:100vw;height:100vh;background:rgba(245,245,245,1);" >
        <View style="text-align: center;">
          <Image className="img" src={require('@assets/checkin/checkinsuccessfully.png')}  ></Image>
        </View>
        <View>
          {this.state.addPoints && (<Text className="text1" style="">+{this.state.addPoints}积分</Text>)}
          <Text className="text2" style="">恭喜您签到成功!</Text>
        </View>
        <View >
          
          {/* <Text  className="text3" onClick={this.toshop} style="">您已签到成功,快去参加活动吧更多好礼在积分商城等着你> </Text> */}
        </View>
        {/* </Text>

        <Text style="position: absolute; font-size:16px;font-weight:400;color:rgba(153,153,153,1);line-height:22px;top:327px;left:81px"> */}

      </View>

    );
  }
}