<template>
  <div class="topCaseInfo flex-h">
    <i class="iconfont icon-dingwei"></i>
      <span>{{data.caseName}}</span>
      <a v-if="data.ShowSelect" @click="selectCase">请选择</a>
      <div class="flex-item">
        <span v-if="data.recommendCode && fromPage === 'sales'">我的推荐码{{data.recommendCode}}</span>
        <span v-else></span>
        <span>{{userName}}您好！</span>
      </div>
  </div>
</template>

<script>

export default {
  name: '',
  props: ['data', 'userName' ,'fromPage'],
  data () {
    return {

    }
  },
  computed: {

  },
  components: {

  },
  created () {

  },
  methods: {
    selectCase () { // 选择案场
      this.$emit('selectCase')
    },
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
@import 'page.scss';
</style>
