|
@@ -71,9 +71,10 @@
|
|
|
</view>
|
|
|
<!-- 按钮 -->
|
|
|
<view class="study_btns">
|
|
|
- <view class="exam_word intos" @click.stop="toDailyPractice(item)">每日一练</view>
|
|
|
- <view class="exam_word intos" @click.stop="toRandomPractice(item)">随机联系</view>
|
|
|
- <view class="exam_word intos" @click="studyques(item,index)">章节练习</view>
|
|
|
+ <view v-for="(child, c_index) in item.paperVos" :key="c_index" class="exam_word intos"
|
|
|
+ @click.stop="toDailyPractice(item, child)">{{ child.paperName }}</view>
|
|
|
+ <!-- <view class="exam_word intos" @click.stop="toRandomPractice(item)">随机联系</view> -->
|
|
|
+ <view class="exam_word intos" @click="studyques(item)">章节练习</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
@@ -143,19 +144,22 @@ export default {
|
|
|
url:'/pages/course/index'
|
|
|
})
|
|
|
},
|
|
|
- toDailyPractice(item) {
|
|
|
+ toDailyPractice(item, child) {
|
|
|
console.log('item', item);
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages2/dailyPractice/index?goodsId=' + item.goodsId + '&orderGoodsId=' + item.orderGoodsId
|
|
|
- })
|
|
|
- },
|
|
|
- toRandomPractice(item) {
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages2/randomPractice/index?goodsId=' + item.goodsId + '&orderGoodsId=' + item.orderGoodsId
|
|
|
- })
|
|
|
+ if (child.paperName == '每日一练') {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages2/dailyPractice/index?goodsId=' + item.goodsId + '&orderGoodsId=' + item.orderGoodsId
|
|
|
+ })
|
|
|
+ } else if (child.paperName == '随机练习') {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages2/randomPractice/index?goodsId=' + item.goodsId + '&orderGoodsId=' + item.orderGoodsId
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.studyques(item)
|
|
|
+ }
|
|
|
},
|
|
|
// 进入练习
|
|
|
- studyques(item,index){
|
|
|
+ studyques(item){
|
|
|
let sysTime = this.$method.timest()
|
|
|
if (item.serviceStartTime && item.serviceEndTime && (sysTime <= item.serviceStartTime || sysTime >= item.serviceEndTime)) {
|
|
|
uni.showToast({
|