<template>
  <v-header title="积分返现" scroll backgroundColor="#F6F6F6">
    <view class="integral-container flex">
      <view class="integral-header flex relative">
        <view class="integral-header-item row">
          <view class="flex-all-1 flex jCenter">
            <view class="integral-header-title">我的收益</view>
            <view class="integral-header-price">{{user.profit || '0.00'}}</view>
          </view>
          <view @click.stop="routerWith" class="integral-hash row center">
            <image src="/static/images/hash.png" class="integral-hash-icon"></image>
            <view class="flex-all-1">提现</view>
            <text class="iconfont iconfont-more integral-hash-more"></text>
          </view>
        </view>
        <view class="flex-all-1 integral-content jCenter">
          我的邀请人数：{{user.inviteCount || 0}}
        </view>
        <image src="/static/images/decorate.png" class="absolute integral-decorate"></image>
      </view>
      <view class="integral-introduce">
        <view class="integral-introduce-title">说明：</view>
        <view class="introduce-introduce-content">
          <view>1.邀请好友一起使用沣胜食品商城，您会获得--奖励</view>
          <view>2.使用您的推广码人数越多，您获得的奖励越多</view>
          <view>3.一个用户只能绑定一次推广码</view>
        </view>
      </view>
      <view class="flex-all-1"></view>
      <view class="center">
        <view @click="openPoster" class="integral-button center">分享给好友</view>
      </view>
    </view>
    <poster ref="poster" :authorize="authorize" @openSetting="openSetting"></poster>
  </v-header>
</template>

<script>
import vHeader from '@/components/v-header/main.vue';
import poster from '@/components/poster/poster';
import authorize from '@/mixins/authorize';
import user from '@/mixins/user';
export default {
  name: "integral",
  mixins:[authorize,user],
  components:{
    vHeader,
    poster
  },
  methods:{
    routerWith(){
      return this.$router.navigateTo({
        name:'withdrawal'
      });
    }
  },
  created(){
    this.$store.dispatch('updateUserInfoPromise',true);
  }
}
</script>

<style scoped lang="scss" src="./style.scss">

</style>