Tang 2 lat temu
rodzic
commit
275df6d295

+ 8 - 0
src/apis/bank.js

@@ -16,6 +16,14 @@ export default {
       params: data,
     })
   },
+  //查询用户是否拥有(山东题库) 
+  coursespecialquestioncount(data) {
+    return request({
+      url: '/course/special/question/count',
+      method: 'get',
+      params: data,
+    })
+  },
 
 
   goodsBankQuestionNum(data) {

+ 10 - 3
src/pages/person-center/index.vue

@@ -102,7 +102,7 @@
                 </router-link>
               </div>
             </div>
-            <div class="nav__section" v-if="false">
+            <div class="nav__section" v-if="hasOtherBank">
               <div class="title">其他题库</div>
               <div class="list">
                 <router-link to="/person-center/my-other-bank">
@@ -176,10 +176,11 @@ export default {
     swiperSlide,
     Footer,
     Header,
-    ToolBar,
+    ToolBar
   },
   data() {
     return {
+      hasOtherBank:false,
       activeName: "1",
       swiperOptions: {
         freeMode: false,
@@ -200,7 +201,13 @@ export default {
   computed: {
     ...mapGetters(["userInfo", "businessList", "businessItem","mobile"]),
   },
-  mounted() {},
+  mounted() {
+    this.$request.coursespecialquestioncount().then(res => {
+      if(res.data == 1){
+        this.hasOtherBank = true
+      }
+    })
+  },
   methods: {
     ...mapMutations(["setBusinessItem"]),
     handleClick(e) {

+ 13 - 1
src/pages/person-center/my-other-bank/index.vue

@@ -16,10 +16,21 @@
           </p>
         </div>
         <div class="right">
-          <el-button type="primary" size="small">开始做题</el-button>
+          <el-button type="primary" size="small" @click="isShow = true"
+            >开始做题</el-button
+          >
         </div>
       </li>
     </ul>
+
+    <el-dialog
+      title="开始做题"
+      class="select-modal"
+      :visible.sync="isShow"
+      width="400px"
+    >
+      <p>请前往小程序做题</p>
+    </el-dialog>
   </div>
 </template>
 
@@ -27,6 +38,7 @@
 export default {
   data() {
     return {
+      isShow: false,
       formData: {
         pageNum: 1,
         pageSize: 5