谢杰标 2 年 前
コミット
723b3f263e

+ 1 - 0
common/httpList/goods.js

@@ -278,6 +278,7 @@ export default {
       url: "/collect/question/getInfo",
       data: data,
       method: "get",
+      noLoading: true,
     });
   },
 

+ 1 - 55
components/common/BankBom.vue

@@ -15,10 +15,6 @@
         <view class="tab up" @click="prev">上一题</view>
         <view class="tab down" @click="next">下一题</view>
       </view>
-      <view class="collect" @click="collect" v-if="isShowCollect">
-        <image v-if="true" src="/static/icon_star.png"></image>
-        <image v-else src="/static/icon_star_sel.png"></image>
-      </view>
     </view>
     <u-popup v-model="show" mode="bottom" border-radius="14" height="680rpx">
       <view class="popupView">
@@ -56,14 +52,6 @@
 export default {
   name: "SaasMiniprogramBankBom",
   props: {
-    isShowCollect: {
-      type: Boolean,
-      default: true,
-    },
-    isCollect: {
-      type: Boolean,
-      default: false,
-    },
     questionList: {
       type: Array,
       default: () => {
@@ -107,43 +95,6 @@ export default {
       }
       this.changeIndex(this.current + 1);
     },
-    collect() {
-      if (!this.isCollect) {
-        this.$api
-          .collectQuestion({
-            examId: this.id,
-            questionId: this.questionList[index].questionId,
-            goodsId: this.goodsId || "",
-            orderGoodsId: this.orderGoodsId,
-            doMode: 1, //做题模式 1章卷 2随机练习
-          })
-          .then((res) => {
-            if (res.data.code == 200) {
-              this.$set(this.collectList, index, true);
-              uni.showToast({
-                title: "收藏成功",
-                duration: 2000,
-                icon: "none",
-              });
-              this.getCollectInfo(index);
-            }
-          });
-      } else {
-        this.$api
-          .deleteCollectQuestion(this.collectList[index].collectQuestionId)
-          .then((res) => {
-            if (res.data.code == 200) {
-              this.$set(this.collectList, index, false);
-              uni.showToast({
-                title: "取消收藏成功",
-                duration: 2000,
-                icon: "none",
-              });
-            }
-          });
-      }
-      return;
-    },
     openFooterTab() {
       this.show = true;
     },
@@ -278,7 +229,7 @@ export default {
 <style lang="scss" scoped>
 .bank-control {
   background-color: #fff;
-  z-index: 10078;
+  z-index: 78;
   position: fixed;
   bottom: 0rpx;
   width: 100%;
@@ -318,11 +269,6 @@ export default {
     color: #ffffff;
     margin-left: 28rpx;
   }
-  .collect {
-    position: fixed;
-    top: 50rpx;
-    right: 42rpx;
-  }
 }
 .popupView {
   height: 100%;

+ 26 - 64
pages2/class/questionBank.vue

@@ -25,7 +25,17 @@
               <view style="color: #666; font-size: 28rpx">{{
                 countdown(lastTime)
               }}</view>
-              <view class="leftLetters"></view>
+              <view
+                class="leftLetters"
+                @click="collect(collectList[bankIndex], bankIndex)"
+                style="justify-content: flex-end"
+              >
+                <image
+                  v-if="collectList[bankIndex]"
+                  src="/static/icon_star_sel.png"
+                ></image>
+                <image v-else src="/static/icon_star.png"></image>
+              </view>
             </view>
             <view class="titles">
               <rich-text :nodes="bank.content"></rich-text>
@@ -662,44 +672,16 @@
               </template>
             </view>
           </template>
-
-          <view class="footer_btn">
-            <!-- <view class="collect">
-              <view v-if="collectList[bankIndex]">
-                <image src="/static/icon/collected.png" mode=""></image>
-                <view>取消收藏</view>
-              </view>
-            </view> -->
-            <view
-              class="collect show"
-              @click="collect(collectList[bankIndex], bankIndex)"
-            >
-              <view v-if="collectList[bankIndex]">
-                <image src="/static/icon/collected.png" mode=""></image>
-                <view>取消收藏</view>
-              </view>
-              <view v-if="!collectList[bankIndex]">
-                <image src="/static/icon/collect.png" mode=""></image>
-                <view>收藏</view>
-              </view>
-            </view>
-            <view class="flex_center" @click="openFooterTab">
-              <view class="up-icon">
-                <image src="/static/up.png"></image>
-              </view>
-              答题卡
-            </view>
-            <view class="collect show" @click="pdsubmit">
-              <view>
-                <image src="/static/jj.png" mode=""></image>
-                <view>交卷</view>
-              </view>
-            </view>
-          </view>
         </view>
       </swiper-item>
     </swiper>
-
+    <bank-bom
+      v-if="questionList.length"
+      :questionList="questionList"
+      :bankType="bankType"
+      :current.sync="current"
+      @submit="pdsubmit"
+    ></bank-bom>
     <u-popup v-model="show" mode="bottom" border-radius="14" height="680rpx">
       <view class="popupView">
         <view class="popupTops">
@@ -911,9 +893,11 @@
 
 <script>
 import PopupPhoto from "@/components/popup/index.vue";
+import BankBom from "../../components/common/BankBom.vue";
 export default {
   components: {
     PopupPhoto,
+    BankBom,
   },
   data() {
     return {
@@ -983,7 +967,7 @@ export default {
   async onLoad(option) {
     this.examType = option.type;
     this.id = option.id;
-    this.goodsId = option.goodsid;
+    this.goodsId = option.goodsid || "";
     this.chapterId = option.chapterId;
     this.courseId = option.courseId;
     this.sectionId = option.sectionId;
@@ -3135,6 +3119,11 @@ export default {
     color: #007aff;
     margin-right: 15rpx;
   }
+  image {
+    width: 40rpx;
+    height: 40rpx;
+    padding-right: 8rpx;
+  }
 }
 
 .firstLetter {
@@ -3239,33 +3228,6 @@ export default {
       }
     }
   }
-
-  .collect {
-    visibility: hidden;
-    width: 100rpx;
-
-    &.show {
-      visibility: visible;
-    }
-
-    > view {
-      display: flex;
-      flex-direction: column;
-      align-items: center;
-      justify-content: center;
-
-      image {
-        width: 32rpx;
-        height: 32rpx;
-        margin-bottom: 6rpx;
-      }
-
-      view {
-        font-size: 24rpx;
-        color: #999999;
-      }
-    }
-  }
 }
 
 .boxSty {

+ 1 - 1
pages2/class/question_report.vue

@@ -424,7 +424,7 @@ export default {
       // answerNum==0没有答题次数限制
       if (answerNum == 0 || (answerNum - count > 0 && answerNum > 0)) {
         const { courseId, gradeId, sectionId } = this.reportdata;
-        uni.navigateTo({
+        uni.redirectTo({
           url:
             "/pages2/class/questionBank?courseId=" +
             courseId +