Преглед изворни кода

Merge branch 'tang' of http://120.79.166.78:19005/zhongzheng-edu/saas_pc into optimize

Tang пре 2 година
родитељ
комит
4f87a1d57a
2 измењених фајлова са 27 додато и 5 уклоњено
  1. 8 1
      src/apis/bank.js
  2. 19 4
      src/pages/person-center/my-other-bank/index.vue

+ 8 - 1
src/apis/bank.js

@@ -8,7 +8,14 @@ export default {
     })
   },
 
-
+  //其他题库跳转二维码
+  goocoursespecialquestionskipcodedsBank(data) {
+    return request({
+      url: '/course/special/question/skip/code',
+      method: 'get',
+      params: data,
+    })
+  },
   goodsBank(data) {
     return request({
       url: '/goods/bank/list',

+ 19 - 4
src/pages/person-center/my-other-bank/index.vue

@@ -16,7 +16,7 @@
           </p>
         </div>
         <div class="right">
-          <el-button type="primary" size="small" @click="isShow = true"
+          <el-button type="primary" size="small" @click="openCode"
             >开始做题</el-button
           >
         </div>
@@ -27,9 +27,12 @@
       title="开始做题"
       class="select-modal"
       :visible.sync="isShow"
-      width="400px"
+      width="300px"
     >
-      <p>请前往小程序做题</p>
+      <div style="text-align: center;">
+        <img :src="code" alt="" style="width:200px;height: 200px;" />
+        <p style="font-size: 18px;">请使用手机扫码前往移动端做题</p>
+      </div>
     </el-dialog>
   </div>
 </template>
@@ -44,13 +47,25 @@ export default {
         pageSize: 5
       },
       list: [],
-      total: 0
+      total: 0,
+      code: ""
     };
   },
   created() {
     this.getInit();
   },
   methods: {
+    openCode() {
+      this.code = "";
+      this.$request.goocoursespecialquestionskipcodedsBank().then(res => {
+        if (res.data) {
+          this.code = res.data.h5Base64;
+          this.isShow = true;
+        } else {
+          this.$message.error("二维码获取失败");
+        }
+      });
+    },
     getInit() {
       this.$request.coursespecialquestionlist(this.formData).then(res => {
         this.list = res.rows;