index.vue 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <!-- 积分商城 -->
  2. <template>
  3. <div class="default-width white-bgc px-3 pt-5 pb-10">
  4. <div class="statisticsBox">
  5. <div class="mt-2">
  6. <span style="font-size: 20px; color: #333; line-height: 28px; font-weight: bold;" class="ml-10">您当前可用积分</span>
  7. <span style="font-size: 14px; color: #777; line-height: 24px; cursor: pointer;" class="ml-2" @click="toPointsDetails">积分明细</span>
  8. </div>
  9. <div class="d-flex justify-space-between align-end my-1">
  10. <span style="font-size: 42px; color: #10897bba; line-height: 50px;" class="ml-10 cursor-pointer" @click="toPointsDetails">{{ integral }}</span>
  11. </div>
  12. </div>
  13. <v-tabs v-model="tab" class="mt-1" align-tabs="start" color="primary" bg-color="#fff" @update:model-value="getPositionList">
  14. <v-tab :value="1">{{ $t('points.exchange') }}</v-tab>
  15. <v-tab :value="2">{{ $t('points.exchangeRecords') }}</v-tab>
  16. </v-tabs>
  17. <div class="mt-5">
  18. <!-- 积分兑换 -->
  19. <div v-if="tab === 1">
  20. <exchange></exchange>
  21. </div>
  22. <!-- 积分兑换记录 -->
  23. <div v-if="tab === 2">
  24. <exchangeRecords></exchangeRecords>
  25. </div>
  26. </div>
  27. </div>
  28. </template>
  29. <script setup>
  30. import exchange from './exchange.vue'
  31. import exchangeRecords from './exchangeRecords.vue'
  32. import { ref } from 'vue'
  33. import { useRoute } from 'vue-router'; const route = useRoute()
  34. import { useRouter } from 'vue-router'; const router = useRouter()
  35. defineOptions({name: 'personal-pointsMall'})
  36. const integral = '135'
  37. const toPointsDetails = () => {
  38. router.push({ path: '/myPublicRecruitment', query: { tab: 2 } })
  39. }
  40. const tab = ref(+route.query?.tab || 1)
  41. </script>
  42. <style lang="scss" scoped>
  43. .statisticsBox {
  44. padding: 10px 0;
  45. border-radius: 10px;
  46. background-color: var(--default-bgc);
  47. // background-color: #f3f3f3;
  48. // font-family: 宋体, SimSun;
  49. }
  50. </style>