|
|
|
@ -12,49 +12,66 @@ |
|
|
|
|
</view> |
|
|
|
|
<view class="list"> |
|
|
|
|
<template v-if="list.length > 0"> |
|
|
|
|
<view v-for="(item, index) in list" class="list-item flex flex-center-x" @click="toContent"> |
|
|
|
|
<view v-for="(item, index) in list" class="list-item flex flex-center-x" @click="toContent(item)"> |
|
|
|
|
<view class="item-left"> |
|
|
|
|
<view class="title"> |
|
|
|
|
<image src="@/static/images/learning/icon.png" mode="aspectFill"></image> |
|
|
|
|
<text>{{ item.name }}</text> |
|
|
|
|
<text>{{ item.title }}</text> |
|
|
|
|
</view> |
|
|
|
|
<view class="content"> |
|
|
|
|
<view>词汇量:{{ item.count }}</view> |
|
|
|
|
<view>题目数量:{{ item.count || '' }}</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="item-right"> |
|
|
|
|
<image v-if="item.type === 1" src="@/static/images/learning/nolock.png" mode="aspectFill"></image> |
|
|
|
|
<image v-if="item.type === 2" src="@/static/images/learning/lock.png" mode="aspectFill"></image> |
|
|
|
|
<!-- <image v-if="item.type === 1" src="@/static/images/learning/nolock.png" mode="aspectFill"></image> |
|
|
|
|
<image v-if="item.type === 2" src="@/static/images/learning/lock.png" mode="aspectFill"></image> --> |
|
|
|
|
<view class="list-more"></view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</template> |
|
|
|
|
</view> |
|
|
|
|
<view class="question-wrong" @click="toQuestionWrong">错题集</view> |
|
|
|
|
</BaseContainer> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import Advert from '@/components/Advert/index.vue'; |
|
|
|
|
import { specialTestPaper } from '@/api/learning'; |
|
|
|
|
export default { |
|
|
|
|
components: { |
|
|
|
|
Advert, |
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
list: [ // 0:免费 1:解锁 2:锁住 |
|
|
|
|
{ name: '2021-2022大学英语四级词汇背诵', count: '1000', type: 0 }, |
|
|
|
|
{ name: '2021-2022大学英语四级词汇背诵', count: '1000', type: 0 }, |
|
|
|
|
{ name: '2021-2022大学英语四级词汇背诵', count: '1000', type: 1 }, |
|
|
|
|
{ name: '2021-2022大学英语四级词汇背诵', count: '1000', type: 1 }, |
|
|
|
|
{ name: '2021-2022大学英语四级词汇背诵', count: '1000', type: 2 }, |
|
|
|
|
{ name: '2021-2022大学英语四级词汇背诵', count: '1000', type: 2 } |
|
|
|
|
], |
|
|
|
|
list: [], |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
onLoad(options) { |
|
|
|
|
this.id = options.id; |
|
|
|
|
this.specialTestPaper(); |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
toContent() { |
|
|
|
|
toContent(item) { |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/learningCenter/reciteContent', |
|
|
|
|
url: `/pages/special/question_index?id=${item.id}&is_analysis=${1}`, |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
async specialTestPaper() { |
|
|
|
|
try { |
|
|
|
|
const { data } = await specialTestPaper({ |
|
|
|
|
special_id: 1 || this.id, |
|
|
|
|
type: 2, |
|
|
|
|
relationship: 6 |
|
|
|
|
}); |
|
|
|
|
console.log(data); |
|
|
|
|
this.list = [...data]; |
|
|
|
|
} catch (err) { |
|
|
|
|
console.log(err); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
toQuestionWrong() { |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/topic/question_wrong', |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
@ -171,5 +188,20 @@ import Advert from '@/components/Advert/index.vue'; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.question-wrong { |
|
|
|
|
position: absolute; |
|
|
|
|
width: 110rpx; |
|
|
|
|
height: 110rpx; |
|
|
|
|
background: linear-gradient(90deg, #4AA5FA 0%, #0F74BB 100%); |
|
|
|
|
box-shadow: 0rpx 8rpx 22rpx 5rpx rgba(77,144,190,0.34); |
|
|
|
|
border-radius: 50%; |
|
|
|
|
right: 30rpx; |
|
|
|
|
bottom: 245rpx; |
|
|
|
|
display: flex; |
|
|
|
|
justify-content: center; |
|
|
|
|
align-items: center; |
|
|
|
|
font-size: 22rpx; |
|
|
|
|
color: #fff; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</style> |