Эх сурвалжийг харах

fix: 1、随机练习做题有题目才跳转 2、随机练习结果页不展示试卷得分

xuqiaoying 2 жил өмнө
parent
commit
62e2463ed3

+ 1 - 1
pages2/bank/question_report.vue

@@ -82,7 +82,7 @@
 				<view class="btnACs" v-if="entryType != 'random' || nextExamId" @click="backBank">继续做题</view>
 			</view>
 		</view>
-		<view class="bottom">
+		<view v-show="entryType != 'random'" class="bottom">
 			<view class="circle-wrap">
 				<view class="circle-list">
 					<view class="item" v-show="reportdata.totalScore">

+ 19 - 3
pages2/randomPractice/index.vue

@@ -78,10 +78,25 @@ export default {
             })
         },
         startPractice() {
-            uni.navigateTo({
-                url:'/pages2/bank/questionBank?orderGoodsId='+ this.orderGoodsId + '&id=""' + '&goodsid=' + this.goodsId 
-                +'&moduleId=0' + '&chapterId=0' + '&entryType=random' + '&bankNum=' + this.number
+            this.$http({
+                url: '/bank/exam/temp',
+                method: 'post',
+                data: {
+                    goodsId: this.goodsId,
+                    orderGoodsId: this.orderGoodsId,
+                    number: this.number
+                }
+            }).then((res) => {
+                if(res.data.code == 200) {
+                    uni.navigateTo({
+                        url:'/pages2/bank/questionBank?orderGoodsId='+ this.orderGoodsId + '&id=""' + '&goodsid=' + this.goodsId 
+                        +'&moduleId=0' + '&chapterId=0' + '&entryType=random' + '&bankNum=' + this.number
+                    })
+                } else {
+                    this.$u.toast(res.data.msg)
+                }
             })
+            
         }
     },
 }
@@ -143,6 +158,7 @@ export default {
     text-align: center;
     background-color: #fff;
     margin-bottom: 178rpx;
+    border-radius: 24rpx;
     .title {
         font-size: 36rpx;
         font-family: PingFang SC-Medium, PingFang SC;