<!-- 积分管理 -->
<template>
  <div class="white-bgc pa-3">
    <integralShow :showMall="false" :taskCenter="false" :title="descriptiveTitle" :isEnterprise="true"></integralShow>
    <div>
      <v-tabs v-model="tab" align-tabs="start" color="primary" bg-color="#fff" @update:model-value="getPositionList">
        <v-tab :value="1">{{ $t('points.redemptionOfPoints') }}</v-tab>
        <v-tab :value="2">{{ $t('points.pointsDetails') }}</v-tab>
      </v-tabs>
    </div>
    <div class="mt-3 white-bgc pa-3 pt-1">
      <div v-if="tab === 2">
        <pointsDetails></pointsDetails>
      </div>
      <div v-if="tab === 1" class="pt-3">
        <pointsMall></pointsMall>
      </div>
    </div>
  </div>
</template>

<script setup>
import pointsDetails from './pointsDetails.vue'
import pointsMall from './pointsMall.vue'
import integralShow from '@/views/integral/components/integralShow.vue'
import { useRoute } from 'vue-router'; const route = useRoute()
import { useRouter } from 'vue-router'; const router = useRouter()
import { ref } from 'vue'
defineOptions({name: 'personal-pointsManagement-index'})
const tab = ref(+route.query?.tab || 1)
const getPositionList = () => {
  if (route.query) router.replace({ path: route.path }) // 不留记录的清除跳转带过来的参数
}
const descriptiveTitle = '您当前可用积分'
</script>
<style lang="scss" scoped>
</style>

