|
@@ -15,17 +15,17 @@
|
|
|
是否完成观看
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="list-item-box" v-for="item in list" :key="item.id">
|
|
|
+ <view class="list-item-box" v-for="(item, index) in list" :key="index">
|
|
|
<view class="list-item">
|
|
|
- {{item.date}}
|
|
|
+ {{item.year}}
|
|
|
</view>
|
|
|
<view class="list-item">
|
|
|
- {{item.score}}/{{item.targetScore}}
|
|
|
+ {{item.credit}}
|
|
|
</view>
|
|
|
- <view class="list-item" v-html="item.status ? '完成学分' : '学分未达标,<br/>不能申请年检'"></view>
|
|
|
+ <view class="list-item" v-html="item.annIns!=='学分未达标不能申请年检' ? '完成学分' : '学分未达标,<br/>不能申请年检'"></view>
|
|
|
<view class="list-item">
|
|
|
- <view class="button" :class="[item.isWatched ? 'primary' : 'error']" @click="onJiaoFei(item)">
|
|
|
- {{item.isWatched ? '已完成观看' : '未完成'}}
|
|
|
+ <view class="button" :class="[item.finish ? 'primary' : 'error']">
|
|
|
+ {{item.finish ? '已完成观看' : '未完成'}}
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -36,48 +36,14 @@
|
|
|
<script setup>
|
|
|
import { ref } from 'vue'
|
|
|
import { onLoad } from '@dcloudio/uni-app'
|
|
|
+ import { loadCredit } from '@/api/edu.js'
|
|
|
const list = ref([])
|
|
|
const initList = () => {
|
|
|
- list.value = [{
|
|
|
- id: '01',
|
|
|
- date: '2024(2024.5-2024.30)',
|
|
|
- score: '24',
|
|
|
- targetScore: '24',
|
|
|
- status: 1,
|
|
|
- isWatched: 1
|
|
|
- },
|
|
|
- {
|
|
|
- id: '02',
|
|
|
- date: '2023(2023.5-2023.30)',
|
|
|
- score: '0',
|
|
|
- targetScore: '24',
|
|
|
- status: 0,
|
|
|
- isWatched: 0
|
|
|
- },
|
|
|
- {
|
|
|
- id: '03',
|
|
|
- date: '2022(2022.5-2022.30)',
|
|
|
- score: '0',
|
|
|
- targetScore: '24',
|
|
|
- status: 0,
|
|
|
- isWatched: 0
|
|
|
- },
|
|
|
- {
|
|
|
- id: '04',
|
|
|
- date: '2021(2021.5-2021.30)',
|
|
|
- score: '0',
|
|
|
- targetScore: '24',
|
|
|
- status: 0,
|
|
|
- isWatched: 0
|
|
|
- },
|
|
|
- {
|
|
|
- id: '02',
|
|
|
- date: '2020(2020.5-2020.30)',
|
|
|
- score: '0',
|
|
|
- targetScore: '24',
|
|
|
- status: 0,
|
|
|
- isWatched: 0
|
|
|
- }]
|
|
|
+ loadCredit().then(res=>{
|
|
|
+ if(res && res?.code ===0){
|
|
|
+ list.value = res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
onLoad(() => {
|
|
|
initList()
|