Browse Source

对接接口

chenxiong 3 năm trước cách đây
mục cha
commit
56be03b9da

+ 51 - 0
src/apis/bank.js

@@ -0,0 +1,51 @@
+import request from '@/axios'
+export default {
+  listGoodsUserQuestion(data) {
+		return request({
+			url: '/bank/question/listGoodsUserQuestion',
+			data:data,
+			params: 'get'
+		})
+	},
+
+  
+	goodsBank(data) {
+		return request({
+			url: '/goods/bank/list',
+			method: 'get',
+			params: data,
+		})
+	},
+
+  
+	goodsBankQuestionNum(data) {
+		return request({
+			url: '/goods/bank/questionNum/'+data,
+			method: 'get',
+		})
+	},
+
+  examRecordGroupList(data) {
+		return request({
+			url: '/exam/record/group_list',
+			data:data,
+			params: 'GET',
+		})
+	},
+
+  goodsBankDolist(data) {
+		return request({
+			url: '/goods/bank/dolist',
+			method: 'get',
+			params:data
+		})
+	},
+
+  
+	goodsBankQuestionNum(data) {
+		return request({
+			url: '/goods/bank/questionNum/'+data,
+			method: 'get',
+		})
+	},
+}

+ 34 - 0
src/apis/user.js

@@ -217,7 +217,41 @@ export default {
 			data: data
 		})
 	},
+
+  //查询通知学员列表
+	getappinformUserlist(data) {
+		return request({
+			url: '/app/informUser/list',
+			method: 'get',
+			params: data
+		})
+	},
   
+  //获取通知学员详细信息
+	getappinformUserId(data) {
+		return request({
+			url: '/app/informUser/' + data,
+			method: 'get',
+		})
+	},
+
+  //获取填写资料审核详细信息
+	getbaseprofiletpgetInfo(data) {
+		return request({
+			url: '/base/profile/tp/getInfo',
+			method: 'get',
+			params: data
+		})
+	},
+
+  //修改通知学员
+	courseappinformUser(data) {
+		return request({
+			url: '/app/informUser',
+			method: 'post',
+			data: data
+		})
+	},
 
   
 }

+ 4 - 4
src/axios.js

@@ -68,10 +68,10 @@ request.interceptors.response.use(async (response) => {
         return res
       }
     } else if (code == 500) {
-      Message({
-        message: res.msg,
-        type: "error",
-      });
+      // Message({
+      //   message: res.msg,
+      //   type: "error",
+      // });
       return Promise.reject(res)
     } else {
       return Promise.reject(res)

+ 12 - 3
src/components/header/index.vue

@@ -43,8 +43,17 @@
           <i class="el-icon-message-solid icon"></i>
         </a>
         <a class="name" @click="go('/person-center')">
-          <img src="@/assets/ava.png" alt="" />
-          <span>倪虹洁</span>
+          <img
+            :src="
+              userInfo
+                ? userInfo.avatar
+                  ? $tools.splitImgHost(userInfo.avatar, true)
+                  : '@/assets/qrcode.png'
+                : ''
+            "
+            alt=""
+          />
+          <span>{{ userInfo && userInfo.realname }}</span>
         </a>
       </div>
     </div>
@@ -59,7 +68,7 @@ export default {
     return {};
   },
   computed: {
-    ...mapGetters(["header"]),
+    ...mapGetters(["header", "userInfo"]),
     showNav: function () {
       return function (list) {
         var newList = [];

+ 1 - 1
src/pages/cart/index.vue

@@ -373,7 +373,7 @@ export default {
           // 	});
           // 	return false;
           // }
-          if (!item.applyAreas.areaName) {
+          if (!item.educationId) {
             this.$message({
               message: "请选择考期",
               type: "warning",

+ 13 - 2
src/pages/goods-detail/bank-detail.vue

@@ -31,7 +31,7 @@
                     ${{ goodsDetail.standPrice | toFixed }}
                   </div>
                   <div class="btns">
-                    <div class="buynow">立即购买</div>
+                    <div class="buynow" @click="buyNow">立即购买</div>
                     <div class="add" @click="addCart()">加入购物车</div>
                   </div>
                 </div>
@@ -992,6 +992,7 @@
 import Footer from "@/components/footer/index";
 import Header from "@/components/header/index";
 import ToolBar from "@/components/toolbar/index";
+import { mapMutations } from "vuex";
 export default {
   name: "GoodsDetail",
   components: {
@@ -1009,7 +1010,7 @@ export default {
       checked: false,
       textarea: "",
       questionModalShow: false,
-      activeName: "2",
+      activeName: "1",
       questionModalData: {
         activeName: "0",
         num: 0, //试做题数
@@ -1025,6 +1026,7 @@ export default {
     this.getGoodsBankList();
   },
   methods: {
+    ...mapMutations(["setCheckGoodsList"]),
     /**
      * @param {Object}
      * 单选点击确认
@@ -1589,6 +1591,15 @@ export default {
           chapter.list = res.data;
         });
     },
+    buyNow() {
+      let selectGoodsList = JSON.parse(JSON.stringify([this.goodsDetail]));
+
+      this.setCheckGoodsList(selectGoodsList);
+
+      this.$router.push({
+        path: "/payment",
+      });
+    },
     addCart() {
       if (!this.$tools.isLogin()) {
         this.$router.push({

+ 223 - 2
src/pages/goods-detail/course-detail.vue

@@ -31,7 +31,7 @@
                     ${{ goodsDetail.standPrice | toFixed }}
                   </div>
                   <div class="btns">
-                    <div class="buynow">立即购买</div>
+                    <div class="buynow" @click="buyNow()">立即购买</div>
                     <div class="add" @click="addCart()">加入购物车</div>
                   </div>
                 </div>
@@ -304,6 +304,73 @@
       </div>
     </el-dialog>
 
+    <el-dialog
+      width="800px"
+      class="select-class-modal"
+      :visible.sync="selectClassModal"
+    >
+      <div class="select-class__content">
+        <div
+          class="selection"
+          v-if="
+            goodsDetail.templateType == 'class' && goodsDetail.goodsType == 1
+          "
+        >
+          <el-select
+            class="select"
+            v-model="gradeId"
+            placeholder="请选择班级"
+            size="small"
+            @click.native="selectClick(goodsDetail, 'class')"
+          >
+            <el-option
+              v-for="item in gradeList"
+              :key="item.gradeId"
+              :label="item.className"
+              :value="item.gradeId"
+            >
+            </el-option>
+          </el-select>
+        </div>
+
+        <div
+          class="selection"
+          v-if="
+            goodsDetail.templateType == 'apply' && goodsDetail.goodsType == 1
+          "
+        >
+          <el-select
+            v-model="educationId"
+            placeholder="请选择考期"
+            size="small"
+            @click.native="selectClick(goodsDetail, 'exam')"
+          >
+            <el-option
+              v-for="item in examineList"
+              :key="item.educationId"
+              :label="item.examineName"
+              :value="item.educationId"
+            >
+            </el-option>
+          </el-select>
+          <el-cascader
+            size="small"
+            :props="props"
+            ref="cascader"
+            :options="provinceList"
+            v-model="examArea"
+            @change="areaChange(goodsDetail)"
+            clearable
+            placeholder="请选择报考地区"
+          ></el-cascader>
+        </div>
+      </div>
+
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="pay">确 定</el-button>
+      </div>
+    </el-dialog>
+
     <ToolBar></ToolBar>
     <Footer></Footer>
   </div>
@@ -313,6 +380,7 @@
 import Footer from "@/components/footer/index";
 import Header from "@/components/header/index";
 import ToolBar from "@/components/toolbar/index";
+import { mapMutations } from "vuex";
 export default {
   name: "GoodsDetail",
   components: {
@@ -329,8 +397,9 @@ export default {
       goodsId: "",
       checked: false,
       textarea: "",
+      selectClassModal: false,
       videoModalShow: false,
-      activeName: "2",
+      activeName: "1",
       questionModalData: {
         activeName: "0",
         num: 0, //试做题数
@@ -349,14 +418,27 @@ export default {
       playerJs:
         "https://player.polyv.net/resp/live-h5-player/latest/liveplayer.min.js",
       uidzb: "egsxlptzdq",
+      gradeList: [],
+      gradeId: "",
+      examineList: [],
+      examArea: [],
+      educationId: "",
+      props: {
+        lazy: true,
+        lazyLoad: this.lazyLoad,
+      },
+      applyAreas: [],
+      provinceList: [],
     };
   },
   mounted() {
     this.goodsId = this.$route.params.goodsId;
     this.getGoodsDetail();
     this.goodsCourseList();
+    this.getProvinceList();
   },
   methods: {
+    ...mapMutations(["setCheckGoodsList"]),
     /**
      * 点击课程大目录
      */
@@ -894,6 +976,22 @@ export default {
       }
     },
 
+    lazyLoad(node, resolve) {
+      const { level } = node;
+      console.log(node);
+      if (level == 0) {
+      } else if (level == 1) {
+        this.$request.getCityList({ parentId: node.value }).then((res) => {
+          const nodes = res.rows.map((item) => ({
+            value: item.areaId,
+            label: `${item.areaName}`,
+            leaf: level >= 1,
+          }));
+          resolve(nodes);
+        });
+      }
+    },
+
     getSectionList(chapter) {
       this.$request.sectionList(chapter.id).then((res) => {
         for (let i = 0; i < res.data.length; i++) {
@@ -909,6 +1007,129 @@ export default {
         chapter.list = res.data;
       });
     },
+    selectClick(goodsDetail, type) {
+      if (type == "class") {
+        //选择班级
+        if (!this.gradeList.length) {
+          this.$request
+            .goodsGradeList({ goodsId: goodsDetail.goodsId })
+            .then((res) => {
+              this.gradeList = res.rows;
+              if (this.gradeList.length == 0) {
+                let item = {
+                  className: "系统分班",
+                  gradeId: 0,
+                };
+
+                this.gradeList.push(item);
+              }
+            });
+        }
+      } else if (type == "apply") {
+        //选择考试地点
+      } else if (type == "exam") {
+        //选择考期
+        this.$request
+          .getExamineList({ projectId: goodsDetail.projectId })
+          .then((res) => {
+            this.examineList = res.rows;
+          });
+      }
+    },
+    /**
+     * 获取所有省份
+     */
+    getProvinceList() {
+      this.$request.getProvinceList().then((res) => {
+        this.provinceList = res.rows.map((item) => ({
+          value: item.areaId,
+          label: `${item.areaName}`,
+          leaf: false,
+        }));
+      });
+    },
+    areaChange() {
+      let node = this.$refs["cascader"].getCheckedNodes()[0]; //选中的根节点
+      console.log(node);
+      this.applyAreas = {
+        areaName: node.parent.label,
+        areaId: node.parent.value,
+        cityId: node.value,
+        cityName: node.label,
+      };
+    },
+    buyNow() {
+      this.selectClassModal = true;
+    },
+    pay() {
+      if (
+        this.goodsDetail.templateType == "class" &&
+        this.goodsDetail.goodsType == 1
+      ) {
+        if (!this.gradeId && this.gradeId !== 0) {
+          this.$message({
+            message: "请选择班级",
+            type: "warning",
+          });
+          return;
+        }
+      }
+
+      if (
+        this.goodsDetail.templateType == "apply" &&
+        this.goodsDetail.goodsType == 1
+      ) {
+        // if (!item.applyAreas.areaName) {
+        // 	uni.showModal({
+        // 		title: '提示',
+        // 		content: '请选择报考地区',
+        // 		showCancel: false
+        // 	});
+        // 	return false;
+        // }
+        if (!this.educationId) {
+          this.$message({
+            message: "请选择考期",
+            type: "warning",
+          });
+          return false;
+        }
+      }
+
+      let selectGoodsList = JSON.parse(JSON.stringify([this.goodsDetail]));
+      selectGoodsList.forEach((item) => {
+        if (item.goodsType == 1) {
+          if (item.templateType == "class") {
+            let goodsInputData = {
+              type: "class",
+              gradeId: this.gradeId,
+              gradeJson: JSON.stringify(
+                this.gradeList.find((grade) => grade.gradeId == this.gradeId)
+              ),
+            };
+            item.goodsInputData = goodsInputData;
+          }
+          if (item.templateType == "apply") {
+            let goodsInputData = {
+              type: "apply",
+              applyAreasJson: JSON.stringify(this.applyAreas),
+              examDateJson: JSON.stringify(
+                this.examineList.find(
+                  (exam) => exam.educationId == this.educationId
+                )
+              ),
+            };
+            item.goodsInputData = goodsInputData;
+          }
+        }
+      });
+
+      this.setCheckGoodsList(selectGoodsList);
+
+      this.$router.push({
+        path: "/payment",
+      });
+    },
     addCart() {
       if (!this.$tools.isLogin()) {
         this.$router.push({

+ 13 - 3
src/pages/payment/index.vue

@@ -125,10 +125,20 @@ export default {
             console.log(res);
           })
           .catch((err) => {
-            console.log(err);
+            if (err.code == 510) {
+              this.$confirm(err.msg + ",点击确定跳转待支付订单列表", "提示", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+              })
+                .then((_) => {
+                  this.$router.push({
+                    path: "/person-center/my-order",
+                  });
+                })
+                .catch((_) => {});
+              // this.qrCodeShow = true;
+            }
           });
-        // this.qrCodeShow = true;
-
         // setTimeout(() => {
         //   this.qrCodeShow = false;
         //   this.$router.push({

+ 78 - 17
src/pages/person-center/bank-record/index.vue

@@ -2,30 +2,60 @@
   <div class="bank-record">
     <div class="bank-record__header">做题记录</div>
     <div class="bank-record__body">
-      <div class="bank-item" v-for="(item, index) in 2" :key="index">
+      <div class="bank-item" v-for="(record, index) in recordList" :key="index">
         <div class="bank-item__header">
-          <div class="note">模拟卷</div>
-          <div class="note">真题</div>
-          这是最后一次做的试卷名称1
+          <div class="note">{{ record.paperName }}</div>
+          {{ record.examName }}
         </div>
         <div class="bank-item__body">
           <div class="list">
-            <div class="exam-item" v-for="(item, index) in 2" :key="index">
+            <div class="exam-item">
               <div class="exam-item__body">
                 <div class="text">
-                  <span class="title">2022-05-20 17:09:00</span>
-                  <span class="desc">总95题/对20题</span>
+                  <span class="title">{{
+                    $tools.timestampToTime(record.updateTime, false)
+                  }}</span>
+                  <span class="desc"
+                    >总{{ record.totalQuestionNum }}题/对{{
+                      record.rightQuestionNum
+                    }}题</span
+                  >
                 </div>
                 <div class="btns-wrap">
                   <div class="btns">
-                    <div class="btn" v-if="index % 2 == 0">继续答题</div>
-                    <div class="btn-line" v-if="index % 2 != 0">
+                    <el-button
+                      type="primary"
+                      class="btn"
+                      v-if="record.status == 1"
+                      >重做</el-button
+                    >
+                    <el-button
+                      type="primary"
+                      class="btn"
+                      v-if="record.status == 1"
+                      >解析</el-button
+                    >
+                    <el-button
+                      type="primary"
+                      class="btn"
+                      v-if="record.status == 1"
+                      >报告</el-button
+                    >
+                    <el-button
+                      type="primary"
+                      class="btn"
+                      v-if="record.status == 0 && record.historyExamJson"
+                      >继续答题</el-button
+                    >
+                    <el-button type="primary" class="btn">更多记录</el-button>
+
+                    <!-- <div class="btn-line" v-if="index % 2 != 0">
                       <div class="btn-line__in">重新做题</div>
                       <div class="btn-line__in">全部解析</div>
                       <div class="btn-line__in btn-line__in--noborder">
                         做题报告
                       </div>
-                    </div>
+                    </div> -->
                   </div>
                 </div>
               </div>
@@ -34,6 +64,19 @@
         </div>
       </div>
     </div>
+
+    <div class="bank-record__footer">
+      <div class="pagination">
+        <el-pagination
+          @current-change="currentChange"
+          background
+          layout="prev, pager, next"
+          :total="total"
+          :pager-count="5"
+        >
+        </el-pagination>
+      </div>
+    </div>
   </div>
 </template>
 
@@ -42,14 +85,26 @@ export default {
   name: "BankRecord",
   data() {
     return {
-      activeName: "1",
+      param: {
+        pageNum: 1,
+        pageSize: 10,
+      },
+      recordList: [],
+      total: 0,
     };
   },
-  mounted() {},
+  mounted() {
+    this.getExamRecordList();
+  },
   methods: {
-    pay() {
-      this.$router.push({
-        path: "payment-success",
+    currentChange(e) {
+      this.param.pageNum = e;
+      this.getExamRecordList();
+    },
+    getExamRecordList() {
+      this.$request.examRecordGroupList(this.param).then((res) => {
+        this.recordList = res.rows;
+        this.total = res.total;
       });
     },
   },
@@ -131,12 +186,11 @@ export default {
                     margin: 2px 0;
                     width: 122px;
                     height: 32px;
-                    background: #3f8dfd;
+                    padding: 0;
                     border-radius: 16px;
                     display: inline-block;
                     text-align: center;
                     line-height: 32px;
-                    color: #fff;
                   }
 
                   .btn-line {
@@ -172,5 +226,12 @@ export default {
       }
     }
   }
+
+  &__footer {
+    .pagination {
+      padding: 30px 0;
+      text-align: center;
+    }
+  }
 }
 </style>

+ 64 - 5
src/pages/person-center/my-bank/bank-detail/index.vue

@@ -7,7 +7,7 @@
             <el-tab-pane label="章节练习" name="1">
               <div class="goods-menu">
                 <div class="goods-menu__header">
-                  <div class="title">这是题库的第一个模块标题</div>
+                  <div class="title">{{ goodsDetail.goodsName }}</div>
                   <span class="question-num">已做/总数</span>
                   <span class="question-do"></span>
                 </div>
@@ -39,18 +39,35 @@
         <div class="right-box">
           <div class="right-box__header">
             <div class="title">
-              <router-link to="/person-center/my-bank/bank-statistics/123"
+              <router-link
+                :to="'/person-center/my-bank/bank-statistics/' + goodsId"
                 >做题统计></router-link
               >
             </div>
             <div class="content">
               <div class="left">
                 <div class="title">总进度</div>
-                <div class="note">2.5%</div>
+                <div class="note">
+                  {{
+                    goodsCount.totalNum > 0
+                      ? (
+                          (goodsCount.doNum / goodsCount.totalNum) *
+                          100
+                        ).toFixed(
+                          (goodsCount.doNum / goodsCount.totalNum) * 100 == 100
+                            ? 0
+                            : 1
+                        )
+                      : 0
+                  }}%
+                </div>
               </div>
               <div class="right">
                 <div class="title"><span class="blue">已答题</span>/未答题</div>
-                <div class="note"><span class="blue">25</span>/1000</div>
+                <div class="note">
+                  <span class="blue">{{ goodsCount.doNum }}</span
+                  >/{{ goodsCount.totalNum - goodsCount.doNum }}
+                </div>
               </div>
             </div>
           </div>
@@ -153,13 +170,55 @@ export default {
         children: "children",
         label: "label",
       },
+      goodsId: "",
+      goodsDetail: {},
+      goodsCount: {},
+      bankList: [],
     };
   },
-  mounted() {},
+  mounted() {
+    this.goodsId = this.$route.params.goodsId;
+    this.goodsBankQuestionNum();
+    this.goodsBank();
+    this.getDetail();
+  },
   methods: {
     handleNodeClick(data) {
       console.log(data);
     },
+
+    /**
+     * 获取用户商品统计数据
+     */
+    goodsBankQuestionNum() {
+      this.$request.goodsBankQuestionNum(this.goodsId).then((res) => {
+        this.goodsCount = res.data;
+      });
+    },
+
+    getDetail() {
+      this.$request.commonGoodsDetail(this.goodsId).then((res) => {
+        console.log(res);
+        this.goodsDetail = res.data;
+      });
+    },
+
+    /**
+     * 获取课程目录
+     */
+    goodsBank() {
+      this.$request
+        .goodsBank({
+          goodsId: this.goodsId,
+        })
+        .then((res) => {
+          this.bankList = res.data;
+          if (this.firstEnter) {
+            // this.showAllCharpter();
+            // this.firstEnter = false;
+          }
+        });
+    },
   },
 };
 </script>

+ 49 - 7
src/pages/person-center/my-bank/bank-statistics/index.vue

@@ -21,15 +21,19 @@
                   <div class="circle">
                     <el-progress
                       type="circle"
-                      :percentage="25"
+                      :percentage="
+                        toFixed(
+                          (goodsCount.rightNum / goodsCount.doNum) * 100
+                        ) || 0
+                      "
                       color="#34C759"
                       :stroke-width="10"
                     ></el-progress>
                   </div>
                 </div>
                 <div class="text">
-                  <div class="green">正确:72</div>
-                  <div class="normal">已做:100</div>
+                  <div class="green">正确:{{ goodsCount.rightNum }}</div>
+                  <div class="normal">已做:{{ goodsCount.doNum }}</div>
                 </div>
               </div>
             </div>
@@ -40,7 +44,11 @@
                   <div class="circle">
                     <el-progress
                       type="circle"
-                      :percentage="25"
+                      :percentage="
+                        toFixed(
+                          (goodsCount.doNum / goodsCount.totalNum) * 100
+                        ) || 0
+                      "
                       color="#3F8DFD"
                       :stroke-width="10"
                     ></el-progress>
@@ -48,8 +56,8 @@
                 </div>
 
                 <div class="text">
-                  <div class="blue">已做:72</div>
-                  <div class="normal">总数:100</div>
+                  <div class="blue">已做:{{ goodsCount.doNum }}</div>
+                  <div class="normal">总数:{{ goodsCount.totalNum }}</div>
                 </div>
               </div>
             </div>
@@ -145,12 +153,30 @@ export default {
         children: "children",
         label: "label",
       },
+      goodsCount: {},
+      bankList: [],
+      goodsId: 0,
     };
   },
   mounted() {
-    console.log(this.$route);
+    this.goodsId = this.$route.params.goodsId;
+    this.goodsBankQuestionNum();
+    this.goodsBankDolist();
   },
   methods: {
+    toFixed(num) {
+      if (num) {
+        let str = String(num).indexOf(".");
+
+        if (str != -1) {
+          return +num.toFixed(2);
+        } else {
+          return num;
+        }
+      } else {
+        return 0;
+      }
+    },
     handleNodeClick(data) {
       console.log(data);
     },
@@ -159,6 +185,22 @@ export default {
         path: "/person-center/my-bank/bank-explain-detail/123",
       });
     },
+
+    goodsBankDolist() {
+      this.$request
+        .goodsBankDolist({
+          goodsId: this.goodsId,
+        })
+        .then((res) => {
+          console.log(res);
+          this.bankList = res.data;
+        });
+    },
+    goodsBankQuestionNum() {
+      this.$request.goodsBankQuestionNum(this.goodsId).then((res) => {
+        this.goodsCount = res.data;
+      });
+    },
   },
 };
 </script>

+ 94 - 18
src/pages/person-center/my-bank/index/index.vue

@@ -9,36 +9,59 @@
     </div>
 
     <div class="my-bank__body">
-      <div class="list">
-        <div class="bank-item" v-for="(item, index) in 5" :key="index">
+      <div class="no-data" v-if="list.length == 0">暂无可以学习的题库哦~</div>
+      <div class="list" v-else>
+        <div class="bank-item" v-for="(item, index) in list" :key="index">
           <div class="bank-item__header">
-            二级建造师建设工程施工管理
-            <div class="time">学习有效期:2022-12-1 至 2022-12-31</div>
+            {{ item.goodsName }}
+            <div
+              class="time"
+              v-if="item.serviceStartTime && item.serviceEndTime"
+            >
+              学习服务期:{{
+                $tools.timestampToTime(item.serviceStartTime, true, true)
+              }}-{{ $tools.timestampToTime(item.serviceEndTime, true, true) }}
+            </div>
           </div>
-          <div class="bank-item__body">
-            <div class="img"></div>
+          <div class="bank-item__body clearfix">
+            <div class="img">
+              <img :src="$tools.splitImgHost(item.coverUrl, true)" alt="" />
+            </div>
             <div class="text">
-              <div class="title">
+              <!-- <div class="title">
                 <div class="note">60学时</div>
-              </div>
+              </div> -->
               <div class="progress">
                 学习进度
                 <el-progress
                   class="progress-line"
-                  :text-inside="true"
                   :stroke-width="16"
-                  :percentage="70"
+                  :format="progressText(item)"
+                  :percentage="(item.doNum / item.totalNum) * 100"
                 ></el-progress>
               </div>
             </div>
             <div class="btns-wrap">
               <div class="btns">
-                <div class="btn" @click="goStudy">进入学习</div>
+                <el-button type="primary" class="btn" @click="goStudy(item)"
+                  >进入学习</el-button
+                >
               </div>
             </div>
           </div>
         </div>
       </div>
+
+      <div class="pagination">
+        <el-pagination
+          @current-change="currentChange"
+          background
+          layout="prev, pager, next"
+          :total="total"
+          :pager-count="5"
+        >
+        </el-pagination>
+      </div>
     </div>
   </div>
 </template>
@@ -48,19 +71,49 @@ export default {
   name: "Mybank",
   data() {
     return {
+      param: {
+        pageNum: 1,
+        pageSize: 10,
+      },
+      list: [],
       activeName: "1",
+      total: 0,
     };
   },
-  mounted() {},
+  mounted() {
+    this.listGoodsUserQuestion();
+  },
   methods: {
+    progressText(item) {
+      return () => {
+        return item.doNum + "/" + item.totalNum;
+      };
+    },
+    currentChange(e) {
+      this.param.pageNum = e;
+      this.listGoodsUserQuestion();
+    },
+    listGoodsUserQuestion() {
+      this.$request.listGoodsUserQuestion(this.param).then((res) => {
+        this.list = res.rows;
+        this.total = res.total;
+      });
+    },
+    studyIn(item, index) {
+      this.itemIndex = index;
+      uni.navigateTo({
+        url: "/pages2/bank/question_detail?id=" + item.goodsId,
+      });
+    },
+
     pay() {
       this.$router.push({
         path: "payment-success",
       });
     },
-    goStudy() {
+    goStudy(item) {
       this.$router.push({
-        path: "/person-center/my-bank/bank-detail/123",
+        path: "/person-center/my-bank/bank-detail/" + item.goodsId,
       });
     },
   },
@@ -109,7 +162,14 @@ export default {
             float: left;
             width: 160px;
             height: 90px;
-            background: #3f8dfd;
+            display: table-cell;
+
+            img {
+              max-width: 100%;
+              max-height: 100%;
+              display: inline-block;
+              vertical-align: middle;
+            }
           }
 
           .text {
@@ -143,9 +203,14 @@ export default {
               color: #333333;
 
               &-line {
-                width: 200px;
+                width: 220px;
                 display: inline-block;
               }
+
+              /deep/ .el-progress-bar {
+                padding-right: 70px;
+                margin-right: -70px;
+              }
             }
           }
 
@@ -165,18 +230,29 @@ export default {
                 margin: 2px 0;
                 width: 122px;
                 height: 32px;
-                background: #3f8dfd;
                 border-radius: 16px;
                 display: inline-block;
                 text-align: center;
                 line-height: 32px;
-                color: #fff;
+                padding: 0;
               }
             }
           }
         }
       }
     }
+
+    .no-data {
+      text-align: center;
+      padding: 50px 0;
+      color: #666;
+      font-size: 16px;
+    }
+
+    .pagination {
+      padding: 30px 0;
+      text-align: center;
+    }
   }
 }
 </style>

+ 6 - 1
src/pages/person-center/my-course/index.vue

@@ -859,9 +859,14 @@ export default {
               color: #333333;
 
               &-line {
-                width: 200px;
+                width: 220px;
                 display: inline-block;
               }
+
+              /deep/ .el-progress-bar {
+                padding-right: 70px;
+                margin-right: -70px;
+              }
             }
           }
 

+ 768 - 34
src/pages/person-center/my-message/index.vue

@@ -1,9 +1,13 @@
 <template>
   <div class="my-message">
     <div class="my-message__header">
-      <el-tabs v-model="activeName">
-        <el-tab-pane label="系统消息" name="1"></el-tab-pane>
-        <el-tab-pane label="教务消息" name="2"></el-tab-pane>
+      <el-tabs :value="formData.systemStatus" @tab-click="tabChange">
+        <el-tab-pane
+          :label="item.label"
+          :name="item.systemStatus"
+          v-for="(item, index) in tabList"
+          :key="index"
+        ></el-tab-pane>
       </el-tabs>
     </div>
 
@@ -20,20 +24,56 @@
           <div class="btn">全部标为已读</div>
         </div>
         <div class="content__body">
-          <div class="message-list">
-            <div
-              class="message-list__item"
-              v-for="(item, index) in 5"
-              :key="index"
-            >
-              <div class="icon"></div>
-              <div class="text">
-                <div class="desc">2022-02-23 12:30</div>
-                <div class="title">学时机构审核通过提醒</div>
+          <div class="no-data" v-if="list.length == 0">暂无消息</div>
+          <template v-else>
+            <div class="message-list">
+              <div
+                class="message-list__item"
+                v-for="(item, index) in list"
+                :key="index"
+              >
+                <div
+                  class="icon"
+                  :class="{ 'icon--blue': item.systemStatus === 1 ? '' : true }"
+                >
+                  <i
+                    v-if="item.systemStatus === 1"
+                    class="el-icon-message-solid"
+                  ></i>
+
+                  <i v-else class="el-icon-s-custom"></i>
+                </div>
+                <div class="text">
+                  <div class="desc">
+                    {{ $tools.timestampToTime(item.sendTime, false) }}
+                  </div>
+                  <div class="title">
+                    {{
+                      item.systemStatus === 2
+                        ? item.informVo.informName
+                        : item.systemStatus === 1
+                        ? item.text
+                        : "接口异常"
+                    }}
+                  </div>
+                </div>
+                <el-button type="primary" class="btn" @click="showDetail(item)"
+                  >查看详情</el-button
+                >
               </div>
-              <div class="btn" @click="showDetailModal = true">查看详情</div>
             </div>
-          </div>
+
+            <div class="pagination">
+              <el-pagination
+                @current-change="currentChange"
+                background
+                layout="prev, pager, next"
+                :total="total"
+                :pager-count="5"
+              >
+              </el-pagination>
+            </div>
+          </template>
         </div>
       </div>
     </div>
@@ -54,21 +94,139 @@
         <div class="my-message-modal__body">
           <div class="content">
             <div class="content__body">
-              <div class="title">通知标题</div>
-              <div class="desc">202-02-11 12:30:30</div>
-              <div class="list">
-                <div class="item">
-                  课程商品名称/科目/类目标题/章标题/节标题 16:52
+              <div class="title">
+                {{
+                  listData.systemStatus === 2
+                    ? listData.informVo.informName
+                    : listData.systemStatus === 1
+                    ? listData.remind
+                    : ""
+                }}
+              </div>
+              <div class="desc">
+                {{ $tools.timestampToTime(listData.sendTime, false) }}
+              </div>
+              <div class="list" v-if="listData.informVo">
+                <div
+                  class="item"
+                  v-for="(item, index) in listData.informVo.informCourseVo"
+                  :key="index"
+                >
+                  123
                 </div>
-                <div class="item">
-                  课程商品名称/科目/类目标题/章标题/节标题 16:52
+                <div
+                  class="item"
+                  v-for="(item, index) in listData.informVo.informExamVo"
+                  :key="index"
+                >
+                  123123
                 </div>
               </div>
             </div>
           </div>
         </div>
-        <div class="my-message-modal__footer">
-          <div class="confirm" @click="showDetailModal = false">我知道了</div>
+        <div
+          class="my-message-modal__footer"
+          v-if="
+            (statusGO &&
+              listData.systemStatus === 1 &&
+              getNames(listData.remindId) !== '') ||
+            (listData.systemStatus === 2 && listData.receiptStatus === 0)
+          "
+        >
+          <el-button
+            type="primary"
+            class="confirm"
+            @click="isOk"
+            v-if="listData.systemStatus === 2 && listData.receiptStatus === 0"
+          >
+            我已阅读
+          </el-button>
+          <el-button
+            type="primary"
+            class="confirm"
+            @click="jumpFuns(goodsData, listData.remindId)"
+            v-if="
+              statusGO &&
+              listData.systemStatus === 1 &&
+              getNames(listData.remindId) !== ''
+            "
+          >
+            {{ getNames(listData.remindId) }}
+          </el-button>
+        </div>
+      </div>
+    </el-dialog>
+
+    <el-dialog
+      width="800px"
+      class="rebuild"
+      :visible.sync="showRebuildDetailModal"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
+      :show-close="false"
+    >
+      <div class="rebuild__content">
+        <div class="rebuild__close" @click="showRebuildDetailModal = false">
+          X
+        </div>
+        <div class="rebuild__header">审核详情</div>
+        <div class="rebuild__body">
+          <div class="content">
+            <div class="content__header">
+              <div class="title">重要提示:</div>
+              <div class="desc">
+                如对审核结果有异议,请勿点击确认重学。致电020-87085982咨询
+              </div>
+            </div>
+
+            <div class="content__body">
+              <div class="list">
+                <div
+                  class="list__item"
+                  v-for="(item, index) in rebuildItems"
+                  :key="index"
+                >
+                  <div class="title">
+                    <span class="note" v-if="item.type == 0"> 测试 </span>
+                    <span class="note note--yellow" v-if="item.type == 1"
+                      >录播</span
+                    >
+                    <span class="note note--yellow" v-if="item.type == 2"
+                      >直播</span
+                    >
+                    <span class="note note--yellow" v-if="item.type == 3"
+                      >回放</span
+                    >
+                    {{ index + 1 }}、{{ item.name }}
+                  </div>
+                  <div class="desc">
+                    <div class="imgs">
+                      <div
+                        class="img"
+                        v-for="(items, indexs) in item.userStudyRecordPhoto"
+                        :key="indexs"
+                      >
+                        <img :src="$tools.splitImgHost(items.photo)" />
+                        <div class="note">
+                          {{ $tools.timestampToTime(items.createTime, false) }}
+                        </div>
+                      </div>
+                    </div>
+                  </div>
+                  <div class="desc">
+                    原因:
+                    <span class="note">拍照异常/时间异常</span>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+        <div class="rebuild__footer">
+          <el-button class="confirm" @click="rebuildSubmit" type="primary"
+            >确认重学</el-button
+          >
         </div>
       </div>
     </el-dialog>
@@ -80,12 +238,429 @@ export default {
   name: "MyMessage",
   data() {
     return {
+      showRebuildDetailModal: false,
       showDetailModal: false,
-      activeName: "1",
+      tabList: [
+        {
+          label: "系统消息",
+          systemStatus: "1",
+        },
+        {
+          label: "教务消息",
+          systemStatus: "2",
+        },
+      ],
+      formData: {
+        systemStatus: "1",
+        pageNum: 1,
+        pageSize: 10,
+      },
+      goodsData: {},
+      list: [],
+      listData: {},
+      messageId: 0,
+      sysTime: 0,
+      statusGO: true,
+      total: 0,
+      rebuildItems: {},
     };
   },
-  mounted() {},
-  methods: {},
+  mounted() {
+    this.getappinformUserlist();
+  },
+  methods: {
+    currentChange(e) {
+      this.formData.pageNum = e;
+      this.getappinformUserlist();
+    },
+    tabChange(e) {
+      if (this.activeName == e.name) return;
+      this.formData.systemStatus = e.name;
+      this.formData.pageNum = 1;
+      this.getappinformUserlist();
+    },
+    getappinformUserlist() {
+      this.$request.getappinformUserlist(this.formData).then((res) => {
+        this.list = res.rows;
+        this.total = res.total;
+      });
+    },
+
+    getNames(int) {
+      var arsty = "";
+      switch (int) {
+        case 1:
+        case 3:
+        case 5:
+        case 6:
+        case 7:
+        case 19:
+        case 21:
+        case 22:
+        case 23:
+          arsty = "立刻学习";
+          break;
+        case 2:
+        case 4:
+        case 24:
+          arsty = "马上填写";
+          break;
+        case 10:
+        case 12:
+        case 18:
+          arsty = "立即重学";
+          break;
+        case 11:
+          arsty = "立即预约";
+          break;
+        case 13:
+          arsty = "预约考试";
+          break;
+        case 20:
+          arsty = "重新购买";
+          break;
+        default:
+          break;
+      }
+      return arsty;
+    },
+
+    //跳转页面
+    async jumpFuns(item, remindId) {
+      switch (remindId) {
+        case 1:
+        case 3:
+        case 5:
+        case 6:
+        case 7:
+        case 19:
+        case 21:
+        case 22:
+        case 23:
+        case 10:
+        case 12:
+        case 18:
+          //课程
+          if (item.goodsType == 1) {
+            let currentTime = this.$tools.timest();
+            console.log(currentTime);
+            console.log(item);
+            console.log(item.studyStartTime);
+            console.log(item.studyEndTime);
+            console.log(
+              currentTime < item.studyStartTime ||
+                currentTime > item.studyEndTime
+            );
+            if (
+              currentTime < item.studyStartTime ||
+              currentTime > item.studyEndTime
+            ) {
+              this.$message({
+                type: "warning",
+                message: "不在学习有效期,不可以学习了哦",
+              });
+              return;
+            }
+
+            if (
+              (item.classStartTime && currentTime <= item.classStartTime) ||
+              (item.classEndTime && currentTime >= item.classEndTime)
+            ) {
+              this.$message({
+                type: "warning",
+                message: "不在班级有效期,不能进入学习",
+              });
+              return;
+            }
+
+            if (item.learningStatus == 2) {
+              this.$message({
+                type: "warning",
+                message: "开放学习时间待定,不能进入学习",
+              });
+              return;
+            }
+
+            if (item.classStatus == 0) {
+              this.$message({
+                type: "warning",
+                message: "尚未开班,不能进入学习",
+              });
+              return;
+            }
+
+            if (
+              item.learningStatus == 3 &&
+              currentTime < item.learningTimeStart
+            ) {
+              this.$message({
+                type: "warning",
+                message: "不在开放学习时间,不能进入学习",
+              });
+              return;
+            }
+
+            if (
+              item.gradeStatus == 1 &&
+              item.status == 1 &&
+              item.studyEndTime > currentTime &&
+              item.classEndTime &&
+              item.classEndTime < currentTime &&
+              (item.periodStatus == 0 || item.periodStatus == -1) &&
+              item.studyCount > 0
+            ) {
+              this.$confirm("班级已过期,需要重新选班", "提示", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                closeOnClickModal: false,
+                closeOnPressEscape: false,
+                distinguishCancelAndClose: false,
+                showClose: false,
+              })
+                .then((_) => {
+                  this.$router.push({
+                    path: "/person-center/my-course",
+                  });
+                })
+                .catch((_) => {});
+            }
+
+            let rebuildStatus = await this.courseGoodsRebuildStatus(
+              item.goodsId,
+              item.gradeId
+            );
+
+            if (rebuildStatus == 0) {
+              this.rebuildItem = item;
+              this.$request
+                .getcourseperiodcheat({
+                  goodsId: item.goodsId,
+                  gradeId: item.gradeId,
+                })
+                .then((res) => {
+                  this.rebuildItems = res.rows;
+                });
+              this.showRebuildDetailModal = true;
+              return;
+            }
+
+            if (item.courseNum == 1) {
+              this.$request
+                .courseCourseList({
+                  pageNum: 1,
+                  pageSize: 1,
+                  goodsId: item.goodsId,
+                  gradeId: item.gradeId,
+                })
+                .then((res) => {
+                  this.$router.push({
+                    path: "/my-course-detail/" + item.goodsId,
+                    query: {
+                      id: res.rows[0].courseId,
+                    },
+                  });
+                });
+              return;
+            }
+
+            this.$router.push({
+              path: "/person-center/my-course",
+            });
+            // arsty = '立刻学习';
+
+            //题库
+          } else if (item.goodsType == 2) {
+            this.$router.push({
+              path: "/person-center/my-bank",
+            });
+          }
+
+          break;
+        case 2:
+        case 4:
+          this.$navTo.togo("/pages2/verify/input", {
+            id: item.goodsId,
+          });
+          break;
+        case 24:
+          this.$navTo.togo("/pages2/verify/input2", {
+            id: item.goodsId,
+          });
+          break;
+        case 11:
+        case 13:
+          var data = {
+            goodsId: item.goodsId,
+            gradeId: item.gradeId,
+          };
+          this.$request
+            .getApplysubscribe(data)
+            .then((res) => {
+              this.$router.push({
+                path: "/person-center/my-classhour/appointment",
+                query: {
+                  goodsId: item.goodsId,
+                  gradeId: item.gradeId,
+                },
+              });
+            })
+            .catch((err) => {
+              this.$message({
+                type: "warning",
+                message: err.msg,
+              });
+            });
+          break;
+        case 20:
+          this.$router.push({
+            path: "/my-course-detail/" + item.goodsId,
+            query: {
+              gradeId: item.gradeId,
+            },
+          });
+          break;
+        default:
+          break;
+      }
+    },
+
+    /**
+     * @param {Object} goodsId 商品id
+     * 查询商品重修状态
+     */
+    courseGoodsRebuildStatus(goodsId, gradeId) {
+      return new Promise((resolve) => {
+        this.$request
+          .courseGoodsRebuildStatus({
+            goodsId: goodsId,
+            gradeId: gradeId,
+          })
+          .then((res) => {
+            resolve(res.data);
+          });
+      });
+    },
+
+    rebuildSubmit() {
+      this.$confirm(
+        "如对审核结果有异议,请勿点击确认重学。致电020-87085982咨询",
+        "注意",
+        {
+          confirmButtonText: "确认重学",
+          cancelButtonText: "取消",
+          closeOnClickModal: false,
+          closeOnPressEscape: false,
+          distinguishCancelAndClose: false,
+          showClose: false,
+        }
+      )
+        .then((_) => {
+          this.$request
+            .courseperiodrebuild({
+              goodsId: this.rebuildItem.goodsId,
+              gradeId: this.rebuildItem.gradeId,
+            })
+            .then((res) => {
+              this.showRebuildDetailModal = false;
+              this.$router.push({
+                path: `/my-course-detail/${this.rebuildItem.goodsId}`,
+                query: {
+                  gradeId: this.rebuildItem.gradeId,
+                  orderGoodsId: this.rebuildItem.orderGoodsId,
+                },
+              });
+            });
+        })
+        .catch((_) => {});
+    },
+
+    showDetail(item) {
+      this.sysTime = this.$tools.timest();
+      this.messageId = item.id;
+      this.getMessage();
+      this.showDetailModal = true;
+    },
+    isOk() {
+      this.$request
+        .courseappinformUser({ id: this.listData.id, receiptStatus: 1 })
+        .then((res) => {
+          this.getappinformUserlist();
+        });
+
+      this.showDetailModal = false;
+    },
+    getMessage() {
+      this.$request.getappinformUserId(this.messageId).then((res) => {
+        if (
+          res.data.receiptStatus === 1 &&
+          (res.data.remindId === 2 ||
+            res.data.remindId === 4 ||
+            res.data.remindId === 24)
+        ) {
+          this.$request
+            .getbaseprofiletpgetInfo({ goodsId: res.data.goodsId })
+            .then((k) => {
+              if (
+                (k.data.status === 3 && k.data.changeStatus === 2) ||
+                k.data.status === 2 ||
+                k.data.status === 1
+              ) {
+                this.statusGO = false;
+              }
+            });
+        }
+        if (!res.data.receiptStatus) {
+          this.$request
+            .courseappinformUser({ id: res.data.id, receiptStatus: 1 })
+            .then((res) => {});
+        }
+        if (res.data.informVo && res.data.informVo.affiche) {
+          res.data.informVo.affiche = res.data.informVo.affiche.replace(
+            /<img/gi,
+            '<img style="max-width:100%;"'
+          );
+        }
+        this.listData = res.data;
+        if (res.data.goodsId) {
+          if (res.data.gradeId) {
+            this.$request.goodsDetail(res.data.goodsId).then((rs) => {
+              this.goodsData = rs.data;
+              if (
+                rs.data.goodsType === 3 &&
+                (res.data.remindId === 1 ||
+                  res.data.remindId === 3 ||
+                  res.data.remindId === 5 ||
+                  res.data.remindId === 6 ||
+                  res.data.remindId === 7 ||
+                  res.data.remindId === 19 ||
+                  res.data.remindId === 21 ||
+                  res.data.remindId === 22)
+              ) {
+                this.statusGO = false;
+              }
+            });
+          } else {
+            this.$request.commonGoodsDetail(res.data.goodsId).then((rs) => {
+              this.goodsData = rs.data;
+              if (
+                rs.data.goodsType === 3 &&
+                (res.data.remindId === 1 ||
+                  res.data.remindId === 3 ||
+                  res.data.remindId === 5 ||
+                  res.data.remindId === 6 ||
+                  res.data.remindId === 7 ||
+                  res.data.remindId === 19 ||
+                  res.data.remindId === 21 ||
+                  res.data.remindId === 22)
+              ) {
+                this.statusGO = false;
+              }
+            });
+          }
+        }
+      });
+    },
+  },
 };
 </script>
 
@@ -153,6 +728,17 @@ export default {
               height: 40px;
               background: rgba(255, 209, 0, 1);
               border-radius: 50%;
+              display: flex;
+              align-items: center;
+              justify-content: center;
+              center &--blue {
+                background: rgba(0, 122, 255, 1);
+              }
+
+              i {
+                font-size: 24px;
+                color: #fff;
+              }
             }
 
             .text {
@@ -178,15 +764,164 @@ export default {
               cursor: pointer;
               width: 122px;
               height: 32px;
-              background: #3f8dfd;
+              padding: 0;
               border-radius: 16px;
               text-align: center;
               line-height: 32px;
-              color: #fff;
               font-size: 16px;
             }
           }
         }
+
+        .no-data {
+          text-align: center;
+          padding: 50px 0;
+          color: #666;
+          font-size: 16px;
+        }
+
+        .pagination {
+          padding: 30px 0;
+          text-align: center;
+        }
+      }
+    }
+  }
+
+  .rebuild {
+    /deep/ .el-dialog__header {
+      display: none;
+    }
+    /deep/ .el-dialog__body {
+      padding: 0;
+      overflow: unset;
+    }
+
+    &__close {
+      cursor: pointer;
+      position: absolute;
+      right: 0;
+      top: -28px;
+      width: 24px;
+      height: 24px;
+      line-height: 24px;
+      text-align: center;
+      color: #eee;
+      border: 1px solid #eee;
+      border-radius: 50%;
+    }
+
+    &__header {
+      height: 40px;
+      border-bottom: 1px solid #eee;
+      line-height: 40px;
+      font-size: 16px;
+      font-family: Microsoft YaHei;
+      font-weight: bold;
+      color: #333333;
+      padding-left: 24px;
+    }
+
+    &__body {
+      height: 400px;
+      padding: 0 24px;
+
+      .content {
+        height: 100%;
+        overflow-y: auto;
+
+        &__header {
+          padding: 16px 0;
+          border-bottom: 1px solid #eee;
+
+          .title {
+            font-size: 16px;
+            font-family: Microsoft YaHei;
+            font-weight: bold;
+            color: #ff3b30;
+            line-height: 24px;
+          }
+
+          .desc {
+            margin-top: 10px;
+            font-size: 16px;
+            font-family: Microsoft YaHei;
+            font-weight: 400;
+            color: #ff3b30;
+            line-height: 24px;
+          }
+        }
+
+        &__body {
+          .list {
+            &__item {
+              padding: 16px 0;
+              border-bottom: 1px solid #eee;
+
+              .title {
+                font-size: 14px;
+                font-family: Microsoft YaHei;
+                font-weight: 400;
+                color: #333333;
+
+                .note {
+                  width: 32px;
+                  height: 20px;
+                  border: 1px solid #3f8dfd;
+                  border-radius: 4px;
+                  color: #3f8dfd;
+                  font-size: 12px;
+
+                  &--yellow {
+                    border: 1px solid #ff9500;
+                    color: #ff9500;
+                  }
+                }
+              }
+
+              .desc {
+                margin-top: 10px;
+                font-size: 14px;
+                font-family: Microsoft YaHei;
+                font-weight: 400;
+                color: #333333;
+
+                .note {
+                  color: #ff3b30;
+                  line-height: 20px;
+                }
+
+                .img {
+                  width: 100px;
+                  height: 100px;
+                  display: inline-block;
+                  text-align: center;
+
+                  img {
+                    max-width: 100%;
+                    max-height: 100%;
+                  }
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+
+    &__footer {
+      height: 90px;
+      border-top: 1px solid #eee;
+      text-align: center;
+      .confirm {
+        width: 200px;
+        height: 40px;
+        padding: 0;
+        border-radius: 20px;
+        text-align: center;
+        line-height: 40px;
+        color: #fff;
+        margin: 24px auto;
       }
     }
   }
@@ -226,8 +961,8 @@ export default {
     }
 
     &__body {
-      height: 200px;
-      padding: 0 24px;
+      height: auto;
+      padding: 0 24px 24px;
 
       .content {
         &__body {
@@ -269,15 +1004,14 @@ export default {
       overflow: hidden;
       border-top: 1px solid #eee;
       .confirm {
+        display: block;
         margin: 25px auto 0;
-        cursor: pointer;
         width: 200px;
         height: 40px;
-        background: #3f8dfd;
+        padding: 0;
         border-radius: 20px;
         text-align: center;
         line-height: 40px;
-        color: #fff;
       }
     }
   }

+ 1 - 1
src/pages/person-center/my-order/index.vue

@@ -145,7 +145,7 @@ export default {
   data() {
     return {
       orderList: [],
-      activeName: "2",
+      activeName: "1",
       formData: {
         status: "0,1",
         pageNum: 1,

+ 4 - 2
src/request.js

@@ -6,8 +6,9 @@ import course from '@/apis/course' //课程模块
 import answer from '@/apis/answer' //答疑模块
 import note from '@/apis/note' //笔记模块
 import polvy from '@/apis/polvy' //保利威模块
-import order from '@/apis/order' //保利威模块
+import order from '@/apis/order' //订单模块
 import apply from '@/apis/apply' //考试模块
+import bank from '@/apis/bank' //题库模块
 
 
 
@@ -23,5 +24,6 @@ export default {
     ...note,
     ...polvy,
     ...order,
-    ...apply
+    ...apply,
+    ...bank
 }

+ 3 - 3
src/router/index.js

@@ -118,17 +118,17 @@ const router =  new Router({
               name: '我的题库',
             },
             {
-              path: 'bank-detail/:bankId',
+              path: 'bank-detail/:goodsId',
               component: resolve => require(['@/pages/person-center/my-bank/bank-detail/index'],resolve),
               name: '题库详情'
             },
             {
-              path: 'bank-statistics/:bankId',
+              path: 'bank-statistics/:goodsId',
               component: resolve => require(['@/pages/person-center/my-bank/bank-statistics/index'],resolve),
               name: '做题统计'
             },
             {
-              path: 'bank-explain-detail/:bankId',
+              path: 'bank-explain-detail/:goodsId',
               component: resolve => require(['@/pages/person-center/my-bank/bank-explain-detail/index'],resolve),
               name: '详情'
             },