credit.vue 787 B

1234567891011121314151617181920212223242526272829
  1. <template>
  2. <!-- <view class="sum-score-box">总学分:{{totalCredits}}分</view>
  3. <custom-scroll-list :hasSearcBar="false" :refreshFn="getCreditList" :hasTab="false">
  4. <template #default="{list}">
  5. <scroll-list-card-mes v-for="(item,index) in list" :key="item.noticeId"
  6. :data="item"></scroll-list-card-mes>
  7. </template>
  8. </custom-scroll-list> -->
  9. </template>
  10. <script setup>
  11. import {getCreditList,getCreditTotal} from '@/api/my.js'
  12. import {onLoad,onReady,} from "@dcloudio/uni-app"
  13. import {reactive,ref} from "vue";
  14. let totalCredits = ref('');
  15. onLoad(() => {
  16. getCreditInit()
  17. })
  18. function getCreditInit() {
  19. getTotalData();
  20. }
  21. function getTotalData(){
  22. getCreditTotal({}).then(res => {
  23. totalCredits.value= res.data;
  24. })
  25. }
  26. </script>