import Taro, { Component } from '@tarojs/taro'
import { View, Image, Text } from '@tarojs/components'

import Footer from '@/c/footer'

import './group.scss'

class Index extends Component {

  config = {
    navigationBarTitleText: '官方群',
    backgroundTextStyle: 'light',
    navigationBarTextStyle: 'white',
    navigationBarBackgroundColor: '#2d8cf0'
  }

  constructor (props) {
    super(props)
    this.state = {
      userInfo: {},
    }
  }

  componentWillMount () {
    
  }


  copyHandle () {
    Taro.setClipboardData({
      data: 'chkn1230',
      success: function (res) {
        Taro.getClipboardData({
          success: function (res) {
            console.log(res.data)
          }
        })
      }
    })
  }

  render () {
    const bg = require('./img/group_bg.png')
    const kf = require('./img/group_kf.jpg')
    return (
      <View className="l-box">
        <View className="group-box">
          <Image className="gb-bg" src={bg} />
          <View className="gb-wrap">
            <View className="gb-p1">和房产大V、南昌房友一起</View>
            <View className="gb-p1">交流分享买房经验</View>
            <View className="gb-p2">添加客服微信加群
              <View className="t">chkn1230</View>
            </View>
            <Button className="gb-btn" onClick={this.copyHandle.bind(this)}>复制微信号</Button>
            <Image className="gb-kf" src={kf} />
          </View>
        </View>
      </View>
    )
  }
}

export default Index
