chenxiong преди 3 години
родител
ревизия
50bda9289f
променени са 33 файла, в които са добавени 1528 реда и са изтрити 446 реда
  1. 13 10
      index.html
  2. 9 0
      src/apis/common.js
  3. 9 0
      src/apis/order.js
  4. 59 0
      src/apis/profileTp.js
  5. 4 3
      src/axios.js
  6. 26 3
      src/common/tools.js
  7. 42 28
      src/components/header/index.vue
  8. 17 1
      src/filters/index.js
  9. 22 6
      src/pages/bank-exam/index.vue
  10. 6 4
      src/pages/bank-list/index.vue
  11. 14 5
      src/pages/bank-report/index.vue
  12. 7 5
      src/pages/cart/index.vue
  13. 41 40
      src/pages/course-detail/index.vue
  14. 34 9
      src/pages/course-exam/index.vue
  15. 7 4
      src/pages/course-list/index.vue
  16. 9 5
      src/pages/goods-detail/bank-detail.vue
  17. 34 7
      src/pages/goods-detail/course-detail.vue
  18. 29 9
      src/pages/home/index.vue
  19. 1 1
      src/pages/person-center/my-bank/bank-detail/index.vue
  20. 3 0
      src/pages/person-center/my-bank/bank-statistics/index.vue
  21. 50 7
      src/pages/person-center/my-bank/index/index.vue
  22. 3 5
      src/pages/person-center/my-classhour/appointment-add-kp/index.vue
  23. 1 3
      src/pages/person-center/my-classhour/appointment-add/index.vue
  24. 1 0
      src/pages/person-center/my-classhour/appointment/index.vue
  25. 48 8
      src/pages/person-center/my-classhour/index/index.vue
  26. 820 173
      src/pages/person-center/my-course/index.vue
  27. 1 1
      src/pages/person-center/my-examination/index.vue
  28. 69 67
      src/pages/person-center/my-invoice/add/index.vue
  29. 39 36
      src/pages/person-center/my-invoice/index/index.vue
  30. 17 0
      src/pages/person-center/my-message/index.vue
  31. 89 5
      src/pages/person-center/my-order/index.vue
  32. 3 1
      src/request.js
  33. 1 0
      src/router/index.js

+ 13 - 10
index.html

@@ -1,12 +1,15 @@
 <!DOCTYPE html>
 <html>
-  <head>
-    <meta charset="utf-8">
-    <meta name="viewport" content="width=device-width,initial-scale=1.0">
-    <title>xiangyue_pc</title>
-  </head>
-  <body>
-    <div id="app"></div>
-    <!-- built files will be auto injected -->
-  </body>
-</html>
+
+<head>
+  <meta charset="utf-8">
+  <meta name="viewport" content="width=device-width,initial-scale=1.0">
+  <title>xiangyue_pc</title>
+</head>
+
+<body>
+  <div id="app"></div>
+  <!-- built files will be auto injected -->
+</body>
+
+</html>

+ 9 - 0
src/apis/common.js

@@ -278,4 +278,13 @@ export default {
 		})
 	},
 
+  dictList(data) {
+		return request({
+			url: '/app/common/system/dict/data/list',
+			method: 'get',
+			params: data,
+			noToken: true
+		})
+	},
+
 }

+ 9 - 0
src/apis/order.js

@@ -84,6 +84,15 @@ export default {
 			data: data
 		})
 	},
+
+  orderUserEduList(data) {
+		return request({
+			url: '/order/userEduList',
+			method: 'get',
+			params: data
+		})
+	},
+  
   
   
 }

+ 59 - 0
src/apis/profileTp.js

@@ -0,0 +1,59 @@
+import request from '@/axios'
+export default {
+	//新增资料模板
+	addbaseprofiletp(data) {
+		return request({
+			url: '/base/profile/tp',
+			method: 'post',
+			data: data
+		})
+	},
+	//修改资料模板
+	editbaseprofiletp(data) {
+		return request({
+			url: '/base/profile/tp/edit',
+			method: 'post',
+			data: data
+		})
+	},
+	//获取所有使用商品ID
+	getbaseprofiletplist(data) {
+		return request({
+			url: '/base/profile/tp/goods_list',
+			method: 'get',
+			params: data
+		})
+	},
+	//获取填写资料审核详细信息
+	getbaseprofiletpgetInfo(data) {
+		return request({
+			url: '/base/profile/tp/getInfo',
+			method: 'get',
+			params: data
+		})
+	},
+	//查询资料模板列表
+	getbaseprofiletplists(data) {
+		return request({
+			url: '/base/profile/tp/list',
+			method: 'get',
+			params: data
+		})
+	},
+	//查询填写资料审核列表
+	getbaseprofiletplistProfile(data) {
+		return request({
+			url: '/base/profile/tp/listProfile',
+			method: 'get',
+			params: data
+		})
+	},
+	//获取资料模板详细信息
+	getbaseprofiletpId(data) {
+		return request({
+			url: '/base/profile/tp/' + data,
+			method: 'get'
+		})
+	},
+
+}

+ 4 - 3
src/axios.js

@@ -1,12 +1,13 @@
 import axios from 'axios'
 import store from './store'
-export const BASE_URL = 'http://42.192.164.187:19005'    //test
+export const BASE_URL = 'https://api.xyyxt.net'   //release
+// export const BASE_URL = 'http://42.192.164.187:19005'    //test
 export const tenantId = '867735392558919680'
 
 
 //图片上传api
-// export const BASE_IMG_URL = 'https://file.xyyxt.net/'     //release
-export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/'  //test
+export const BASE_IMG_URL = 'https://file.xyyxt.net/'     //release
+// export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/'  //test
 
 import { Notification, MessageBox, Message } from 'element-ui'
 import tools from './common/tools'

+ 26 - 3
src/common/tools.js

@@ -37,12 +37,17 @@ export default {
 	},
 
   exit() {
+    
 		localStorage.removeItem('user_account')
 		localStorage.removeItem('token')
 		store.state.userInfo = null
-		router.replace({
-      path: '/'
-    })
+
+    if(router.currentRoute.path != '/home') {
+      router.replace({
+        path: '/home'
+      })
+    }
+		
 	},
 
   //当前时间距离目标时间还有多久
@@ -87,6 +92,24 @@ export default {
 		return tmp;
 	},
 
+      /**
+      * 
+     * @param {int} result 
+     * @returns {string}
+     * @remard 单位S转小时分钟秒
+     */
+  secondToTime(result,Diszing = true) {
+    var h = Math.floor(result / 3600) < 10 ? '0' + Math.floor(result / 3600) : Math.floor(result / 3600);
+    var m = Math.floor((result / 60 % 60)) < 10 ? '0' + Math.floor((result / 60 % 60)) : Math.floor((result / 60 % 60));
+    var s = Math.floor((result % 60)) < 10 ? '0' + Math.floor((result % 60)) : Math.floor((result % 60));
+    if (h == 0 && Diszing) {
+      result = m + ":" + s;
+    } else {
+      result = h + ':' + m + ":" + s
+    }
+    return result;
+  },
+
   /* 时间戳转换成日期
 	 * @param timestamp
 	 * @returns {*}

+ 42 - 28
src/components/header/index.vue

@@ -1,13 +1,14 @@
 <template>
   <header class="header">
     <div class="container clearfix">
-      <img
-        style="cursor: pointer; width: 162px; height: 33px"
-        v-if="header.companyLogo"
-        :src="$tools.splitImgHost(header.companyLogo)"
-        alt=""
-        @click="go('/')"
-      />
+      <div class="logo logo--no" v-if="header.companyLogo">
+        <img
+          style="cursor: pointer; width: 162px; height: 33px"
+          :src="$tools.splitImgHost(header.companyLogo)"
+          alt=""
+          @click="go('/')"
+        />
+      </div>
       <h1 class="logo" v-else @click="go('/')"></h1>
       <nav class="nav">
         <ul class="list">
@@ -19,20 +20,6 @@
           </li>
         </ul>
       </nav>
-      <div class="search">
-        <div class="search__select">
-          <select v-model="type">
-            <option value="1">课程</option>
-            <option value="2">题库</option>
-          </select>
-        </div>
-        <div class="search__input">
-          <input type="text" v-model="searchKey" />
-        </div>
-        <el-button type="primary" @click="search" class="search__btn"
-          >搜索</el-button
-        >
-      </div>
 
       <div class="userinfo" v-if="userInfo">
         <a class="msg" @click="go('/person-center/my-message')">
@@ -71,6 +58,21 @@
           <a @click="go('/login', { state: 2 })">注册</a>
         </div>
       </div>
+
+      <div class="search">
+        <div class="search__select">
+          <select v-model="type">
+            <option value="1">课程</option>
+            <option value="2">题库</option>
+          </select>
+        </div>
+        <div class="search__input">
+          <input type="text" v-model="searchKey" />
+        </div>
+        <el-button type="primary" @click="search" class="search__btn"
+          >搜索</el-button
+        >
+      </div>
     </div>
   </header>
 </template>
@@ -191,17 +193,23 @@ export default {
 
   .container {
     height: 80px;
-    display: flex;
-    align-items: center;
 
     .logo {
+      margin-top: 23px;
+      float: left;
       cursor: pointer;
       width: 162px;
       height: 33px;
       background: url("~@/assets/logo.png") no-repeat center;
+
+      &--no {
+        background: none;
+      }
     }
 
     .nav {
+      float: left;
+      margin-top: 30px;
       .list {
         margin-left: 146px;
         display: flex;
@@ -219,7 +227,8 @@ export default {
     }
 
     .search {
-      margin-left: 160px;
+      float: right;
+      margin-top: 20px;
       width: 324px;
       background: #fafbfc;
       border: 1px solid #3f8dfd;
@@ -261,11 +270,13 @@ export default {
     }
 
     .userinfo {
+      margin-top: 30px;
+      float: right;
+      white-space: nowrap;
       a {
-        float: left;
+        display: inline-block;
         margin-left: 20px;
-        display: flex;
-        align-items: center;
+        vertical-align: middle;
 
         &.msg {
           position: relative;
@@ -276,7 +287,7 @@ export default {
             color: #3f8dfd;
           }
           .pi {
-            display: block;
+            display: inline-block;
             width: 10px;
             height: 10px;
             background: #ff3b30;
@@ -292,6 +303,7 @@ export default {
           position: relative;
           img {
             width: 24px;
+            vertical-align: middle;
           }
 
           .modal-box {
@@ -325,10 +337,12 @@ export default {
     }
 
     .text-list {
+      margin-top: 30px;
       text-align: right;
       font-size: 0;
 
       a {
+        display: inline-block;
         margin: 0;
         color: #3f8dfd;
         font-size: 14px;

+ 17 - 1
src/filters/index.js

@@ -2,5 +2,21 @@
 export default {
   toFixed(val,number = 2) {
     return val.toFixed(number)
-  }
+  },
+
+  countdown(second) {
+    if (second) {
+      let h = parseInt((second / 60 / 60) % 24); //   计算小时
+      let m = parseInt((second / 60) % 60); //   计算分数
+      let s = parseInt(second % 60); //   计算当前秒数
+
+      if (h < 10) h = '0' + h;
+      if (m < 10) m = '0' + m;
+      if (s < 10) s = '0' + s;
+
+      return h + ':' + m + ':' + s;
+    } else {
+      return '';
+    }
+  },
 }

+ 22 - 6
src/pages/bank-exam/index.vue

@@ -767,7 +767,12 @@
                 </div>
               </div>
               <div class="right-box">
-                <div class="right-box__header">答题卡</div>
+                <div class="right-box__header">
+                  <div class="title">答题卡</div>
+                  <div class="time" v-if="allTimes">
+                    {{ lastTime | countDown }}
+                  </div>
+                </div>
                 <div class="right-box__body">
                   <div class="card">
                     <div class="card__note">
@@ -2243,12 +2248,23 @@ export default {
             &__header {
               height: 40px;
               line-height: 40px;
-              font-size: 16px;
-              font-family: Microsoft YaHei;
-              font-weight: bold;
-              color: #333333;
-              text-align: center;
               border-bottom: 1px solid #eeeeee;
+
+              .title {
+                float: left;
+                font-size: 16px;
+                font-family: Microsoft YaHei;
+                font-weight: bold;
+                color: #333333;
+              }
+
+              .time {
+                font-size: 16px;
+                font-family: Microsoft YaHei;
+                font-weight: 400;
+                color: #666666;
+                float: right;
+              }
             }
 
             &__body {

+ 6 - 4
src/pages/bank-list/index.vue

@@ -222,10 +222,12 @@ export default {
           });
         })
         .catch((err) => {
-          // this.$message({
-          //   message: err.msg,
-          //   type: "warning",
-          // });
+          if (err.code == 500) {
+            this.$message({
+              message: err.msg,
+              type: "warning",
+            });
+          }
         });
     },
 

+ 14 - 5
src/pages/bank-report/index.vue

@@ -5,7 +5,7 @@
       <div class="container">
         <div
           class="section__header section__header--warm"
-          v-if="examData.doType == 2 && reportdata.reportStatus !== null"
+          v-if="examData.doType == 2 && reportdata.reportStatus === null"
         >
           <div class="title">
             <span class="icon">X</span>
@@ -18,7 +18,7 @@
         </div>
         <div
           class="section__header section__header--success"
-          v-if="examData.doType == 2 && reportdata.reportStatus !== null"
+          v-if="examData.doType == 2 && reportdata.reportStatus === 1"
         >
           <div class="title">
             <span class="icon">✔</span>
@@ -55,11 +55,19 @@
             <div class="right-box">
               <div class="right-box__in">
                 <div class="title">
-                  试卷得分
+                  正确率
                   <span class="note">(客观题)</span>
                 </div>
-                <div class="desc">{{ reportdata.performance }}</div>
-                <div class="other">满分{{ reportdata.totalScore }}</div>
+                <div class="desc">
+                  {{
+                    ((reportdata.rightQuestionNum /
+                      (reportdata.rightQuestionNum + wrongRecordWrongNum) ||
+                      0) *
+                      100)
+                      | toFixed(0)
+                  }}%
+                </div>
+                <!-- <div class="other">满分{{ reportdata.totalScore }}</div> -->
               </div>
               <div class="right-box__in right-box__in--bottom">
                 <div class="child">
@@ -250,6 +258,7 @@ export default {
           chapterExamId: this.chapterId,
           examId: this.examId,
           goodsId: this.goodsId,
+          orderGoodsId: this.orderGoodsId,
           moduleExamId: this.moduleId,
         })
         .then((res) => {

+ 7 - 5
src/pages/cart/index.vue

@@ -56,14 +56,16 @@
                     <div class="title">
                       {{ scope.row.goodsName }}
 
-                      <span class="note">60学时</span>
-                      <span class="note">继续教育</span>
+                      <span class="note" v-if="scope.row.classHours"
+                        >{{ scope.row.classHours }}学时</span
+                      >
+                      <span class="note">{{ scope.row.educationName }}</span>
                     </div>
                     <div class="desc">
-                      项目类型-业务层级
-                      <span class="note">
+                      {{ scope.row.projectName }}-{{ scope.row.businessName }}
+                      <!-- <span class="note">
                         报名截止时间:{{ scope.row.date }}
-                      </span>
+                      </span> -->
                     </div>
                     <div
                       class="selection"

+ 41 - 40
src/pages/course-detail/index.vue

@@ -1544,6 +1544,11 @@ export default {
 
     this.courseCourseList();
   },
+  beforeDestroy() {
+    try {
+      this.$msgbox.close();
+    } catch (err) {}
+  },
   methods: {
     async takeOk() {
       this.loading = this.$loading({
@@ -2034,8 +2039,8 @@ export default {
           let isStop = false;
           let newRows = [];
           for (let i = 0; i < rows.length; i++) {
-            let moduleTrue = rows[i].moduleId == moduleId;
-            let chapterTrue = rows[i].chapterId == chapterId;
+            let moduleTrue = rows[i].moduleId == section.moduleId;
+            let chapterTrue = rows[i].chapterId == section.chapterId;
             if (moduleTrue && chapterTrue) {
               isStop = true;
               if (rows[i].sectionType != 2) {
@@ -2234,10 +2239,12 @@ export default {
           let newRows = [];
           for (let i = 0; i < rows.length; i++) {
             let moduleTrue =
-              rows[i].moduleId == option.menuId ||
-              rows[i].moduleId == option.moduleId;
-            let chapterTrue = rows[i].chapterId == option.chapterId;
-            let sectionTrue = rows[i].sectionId == option.sectionId;
+              rows[i].moduleId == option.moduleId || rows[i].moduleId == 0;
+            let chapterTrue =
+              rows[i].chapterId == option.chapterId || rows[i].chapterId == 0;
+            let sectionTrue =
+              rows[i].sectionId == option.sectionId ||
+              rows[i].sectionId == option.menuId;
             if (moduleTrue && chapterTrue && sectionTrue) {
               break;
             } else {
@@ -2425,6 +2432,24 @@ export default {
           teaser_show: 0,
           ts: res.data.ts,
           sign: res.data.sign,
+          adMatter: [
+            {
+              // 广告参数详细配置
+              location: 1, //广告位置: 1 片头广告,2 暂停广告,3 片尾广告,4 弹窗广告
+              adtype: 2, //广告资源类型: 1 图片广告,2 视频广告,3 swf广告(flash播放器生效)
+              matterurl: "https://www.runoob.com/try/demo_source/movie.mp4", //广告资源URL
+              timesize: 5, //广告时长,单位:秒
+              skipenabled: false, //是否显示跳过按钮
+            },
+            {
+              // 广告参数详细配置
+              location: 3, //广告位置: 1 片头广告,2 暂停广告,3 片尾广告,4 弹窗广告
+              adtype: 2, //广告资源类型: 1 图片广告,2 视频广告,3 swf广告(flash播放器生效)
+              matterurl: "https://www.runoob.com/try/demo_source/movie.mp4", //广告资源URL
+              timesize: 5, //广告时长,单位:秒
+              skipenabled: false, //是否显示跳过按钮
+            },
+          ],
           playsafe: function (vid, next) {
             next();
           },
@@ -2522,7 +2547,8 @@ export default {
 
       this.$nextTick(() => {
         if (
-          window.navigator.mediaDevices.getUserMedia ||
+          (window.navigator.mediaDevices &&
+            window.navigator.mediaDevices.getUserMedia) ||
           window.navigator.getUserMedia ||
           window.navigator.webkitGetUserMedia ||
           window.navigator.mozGetUserMedia
@@ -2540,7 +2566,7 @@ export default {
             this.photographError
           );
         } else {
-          alert("不支持访问用户媒体");
+          this.photographError();
         }
       });
     },
@@ -2594,7 +2620,7 @@ export default {
               this.photoList.push(1);
             } else if (photoNum == 3) {
               //拍3张
-              this.photoList.push(1); //开头拍一张
+              this.photoList.push(0); //开头拍一张
               let centerTime = Math.floor(totalVideoTime / 2); //获取中间时间
               let centerMinTime = centerTime - 300; //前后5分钟
               let centerMaxTime = centerTime + 300;
@@ -3192,38 +3218,13 @@ export default {
     },
 
     download(url, fileName) {
-      let xhr = new XMLHttpRequest();
-      xhr.open("get", url, true);
-      xhr.setRequestHeader("Content-Type", `application/pdf`);
-      xhr.responseType = "blob";
-      let that = this;
-      xhr.onload = function () {
-        if (this.status == 200) {
-          //接受二进制文件流
-          var blob = this.response;
-          that.downloadExportFile(blob, fileName);
-        }
-      };
-      xhr.send();
-    },
-    downloadExportFile(blob, tagFileName) {
-      let downloadElement = document.createElement("a");
-      let href = blob;
-      if (typeof blob == "string") {
-        downloadElement.target = "_blank";
-      } else {
-        href = window.URL.createObjectURL(blob); //创建下载的链接
-      }
-      downloadElement.href = href;
-      downloadElement.download = tagFileName;
-      //下载后文件名
-      document.body.appendChild(downloadElement);
-      downloadElement.click(); //点击下载
-      document.body.removeChild(downloadElement); //下载完成移除元素
-      if (typeof blob != "string") {
-        window.URL.revokeObjectURL(href); //释放掉blob对象
-      }
+      var a = document.createElement("a");
+      var event = new MouseEvent("click");
+      a.download = fileName;
+      a.href = url;
+      a.dispatchEvent(event);
     },
+
     previvew(url) {
       window.open(url, "_blank");
     },

+ 34 - 9
src/pages/course-exam/index.vue

@@ -767,7 +767,12 @@
                 </div>
               </div>
               <div class="right-box">
-                <div class="right-box__header">答题卡</div>
+                <div class="right-box__header">
+                  <div class="title">答题卡</div>
+                  <div class="time" v-if="allTimes">
+                    剩余时间 {{ lastTime | countdown }}
+                  </div>
+                </div>
                 <div class="right-box__body">
                   <div class="card">
                     <div class="card__note">
@@ -939,6 +944,12 @@ export default {
     this.goodsQuestionList();
     this.bankExam();
   },
+  beforeDestroy() {
+    clearInterval(this.timer);
+    try {
+      this.$msgbox.close();
+    } catch (err) {}
+  },
   methods: {
     ...mapMutations(["setExamResult"]),
     toFixed(num) {
@@ -1125,7 +1136,8 @@ export default {
     openPhoto() {
       this.$nextTick(() => {
         if (
-          window.navigator.mediaDevices.getUserMedia ||
+          (window.navigator.mediaDevices &&
+            window.navigator.mediaDevices.getUserMedia) ||
           window.navigator.getUserMedia ||
           window.navigator.webkitGetUserMedia ||
           window.navigator.mozGetUserMedia
@@ -1143,7 +1155,7 @@ export default {
             this.photographError
           );
         } else {
-          alert("不支持访问用户媒体");
+          this.photographError();
         }
       });
     },
@@ -2083,7 +2095,7 @@ export default {
 
             this.setExamResult(result);
             this.$router.replace({
-              path: "/bank-report",
+              path: "/course-report",
             });
           }, 1000);
         })
@@ -2425,12 +2437,25 @@ export default {
             &__header {
               height: 40px;
               line-height: 40px;
-              font-size: 16px;
-              font-family: Microsoft YaHei;
-              font-weight: bold;
-              color: #333333;
-              text-align: center;
               border-bottom: 1px solid #eeeeee;
+              padding: 0 10px;
+
+              .title {
+                float: left;
+                font-size: 16px;
+                font-family: Microsoft YaHei;
+                font-weight: bold;
+                color: #333333;
+                float: left;
+              }
+
+              .time {
+                font-size: 16px;
+                font-family: Microsoft YaHei;
+                font-weight: 400;
+                color: #666666;
+                float: right;
+              }
             }
 
             &__body {

+ 7 - 4
src/pages/course-list/index.vue

@@ -185,6 +185,7 @@ export default {
   },
   mounted() {
     this.params.searchKey = this.$route.query.searchKey || "";
+    this.params.educationTypeId = this.$route.query.educationId || "";
     this.getEducationTypeList();
     this.changeSubject();
   },
@@ -222,10 +223,12 @@ export default {
           });
         })
         .catch((err) => {
-          // this.$message({
-          //   message: err.msg,
-          //   type: "warning",
-          // });
+          if (err.code == 500) {
+            this.$message({
+              message: err.msg,
+              type: "warning",
+            });
+          }
         });
     },
 

+ 9 - 5
src/pages/goods-detail/bank-detail.vue

@@ -206,7 +206,9 @@
                       </div>
                     </div>
                   </el-tab-pane>
-                  <el-tab-pane label="学员须知" name="3">学员须知</el-tab-pane>
+                  <el-tab-pane label="学员须知" name="3">
+                    {{ goodsDetail.buyNote }}</el-tab-pane
+                  >
                 </el-tabs>
               </div>
             </div>
@@ -1625,10 +1627,12 @@ export default {
           });
         })
         .catch((err) => {
-          this.$message({
-            message: err.msg,
-            type: "warning",
-          });
+          if (err.code == 500) {
+            this.$message({
+              message: err.msg,
+              type: "warning",
+            });
+          }
         });
     },
     /**

+ 34 - 7
src/pages/goods-detail/course-detail.vue

@@ -306,7 +306,7 @@
 
     <el-dialog
       width="800px"
-      class="select-class-modal"
+      class="select-class"
       :visible.sync="selectClassModal"
     >
       <div class="select-class__content">
@@ -326,7 +326,15 @@
             <el-option
               v-for="item in gradeList"
               :key="item.gradeId"
-              :label="item.className"
+              :label="
+                item.classEndTime
+                  ? `${item.className} 有效期至:${$tools.timestampToTime(
+                      item.classEndTime
+                    )},本班还剩${$tools.GetRTime(
+                      item.classEndTime
+                    )}天将结束学习`
+                  : `${item.className}`
+              "
               :value="item.gradeId"
             >
             </el-option>
@@ -1061,7 +1069,14 @@ export default {
       };
     },
     buyNow() {
-      this.selectClassModal = true;
+      if (this.$tools.isLogin()) {
+        this.selectClassModal = true;
+      } else {
+        this.setCurrentRouter(this.$route);
+        this.$router.push({
+          path: "/login",
+        });
+      }
     },
     pay() {
       if (
@@ -1149,10 +1164,12 @@ export default {
           });
         })
         .catch((err) => {
-          this.$message({
-            message: err.msg,
-            type: "warning",
-          });
+          if (err.code == 500) {
+            this.$message({
+              message: err.msg,
+              type: "warning",
+            });
+          }
         });
     },
     /**
@@ -2201,5 +2218,15 @@ export default {
       }
     }
   }
+
+  .select-class {
+    &__content {
+      .selection {
+        .el-select {
+          width: 100%;
+        }
+      }
+    }
+  }
 }
 </style>

+ 29 - 9
src/pages/home/index.vue

@@ -313,6 +313,7 @@
         <div class="course__body">
           <p
             v-if="
+              !goodsList1[active1] ||
               !goodsList1[active1].goodsList ||
               goodsList1[active1].goodsList.length === 0
             "
@@ -324,7 +325,7 @@
             <template v-for="(item, index) in goodsList1[active1].goodsList">
               <li
                 class="course-item"
-                v-if="index < 8"
+                v-if="index < 12"
                 :key="index"
                 @click="goodsDetail(item, 1)"
               >
@@ -373,6 +374,7 @@
         <div class="bank__body">
           <p
             v-if="
+              !goodsList2[active2] ||
               !goodsList2[active2].goodsList ||
               goodsList2[active2].goodsList.length === 0
             "
@@ -384,7 +386,7 @@
             <template v-for="(item, index) in goodsList2[active2].goodsList">
               <li
                 class="bank-item"
-                v-if="index < 8"
+                v-if="index < 12"
                 :key="index"
                 @click="goodsDetail(item, 2)"
               >
@@ -626,7 +628,20 @@ export default {
     businessList(educationId, index) {
       this.$request.businessList({ educationId }).then((res) => {
         this.$set(this.slideList, index, res.rows);
-        this.$set(this.typeList[index], "list", res.rows.slice(0, 2));
+        if (res.rows.length >= 2) {
+          let newRows = res.rows.slice(0, 2);
+          let length = 0;
+          newRows.forEach((row) => {
+            let str = row.projectName + "-" + row.businessName;
+            length = length + str.length;
+          });
+
+          if (length >= 17) {
+            this.$set(this.typeList[index], "list", res.rows.slice(0, 1));
+          } else {
+            this.$set(this.typeList[index], "list", res.rows.slice(0, 2));
+          }
+        }
       });
     },
 
@@ -645,10 +660,12 @@ export default {
           }
         })
         .catch((err) => {
-          this.$message({
-            message: err.msg,
-            type: "warning",
-          });
+          if (err.code == 500) {
+            this.$message({
+              message: err.msg,
+              type: "warning",
+            });
+          }
         });
     },
     /**
@@ -829,12 +846,14 @@ export default {
       this.$request
         .getInfo()
         .then((res) => {
-          this.islogin = false;
+          this.loginForm = {};
+          this.loginSmsForm = {};
+          this.isLogin = false;
           this.isloginSms = false;
           this.setUserInfo(res.data);
         })
         .catch((err) => {
-          this.islogin = false;
+          this.isLogin = false;
           this.isloginSms = false;
           this.$message({
             message: err.msg,
@@ -1067,6 +1086,7 @@ export default {
 
       .container {
         position: relative;
+        height: 400px;
         .left-box {
           position: absolute;
           top: -40px;

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

@@ -362,7 +362,7 @@
                   <div class="selects">
                     <div class="selects__item">
                       <el-select
-                        placeholder="请选择"
+                        placeholder="请选择试卷类型"
                         v-model="wrongSelect"
                         clearable
                         @clear="getWrongData"

+ 3 - 0
src/pages/person-center/my-bank/bank-statistics/index.vue

@@ -291,6 +291,7 @@ export default {
           moduleExamId: moduleId,
           chapterExamId: chapter.chapterExamId || chapter.majorId,
           orderGoodsId: this.orderGoodsId,
+          goodsId: this.goodsId,
         })
         .then((res) => {
           chapter.showList = !chapter.showList;
@@ -307,6 +308,7 @@ export default {
         .goodsChapterDolist({
           moduleExamId: module.majorId,
           orderGoodsId: this.orderGoodsId,
+          goodsId: this.goodsId,
         })
         .then((res) => {
           res.data.forEach((item) => {
@@ -322,6 +324,7 @@ export default {
       this.$request
         .goodsBankDolist({
           orderGoodsId: this.orderGoodsId,
+          goodsId: this.goodsId,
         })
         .then((res) => {
           console.log(res);

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

@@ -1,10 +1,13 @@
 <template>
   <div class="my-bank">
     <div class="my-bank__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-tab-pane label="继续教育" name="3"></el-tab-pane>
+      <el-tabs :value="activeName" @tab-click="tabChange">
+        <el-tab-pane
+          v-for="(tab, tabIndex) in tabList"
+          :key="tabIndex"
+          :label="tab.educationName"
+          :name="tab.id"
+        ></el-tab-pane>
       </el-tabs>
     </div>
 
@@ -76,15 +79,48 @@ export default {
         pageNum: 1,
         pageSize: 10,
       },
+      tabList: [],
       list: [],
-      activeName: "1",
+      activeName: "-1",
       total: 0,
     };
   },
-  mounted() {
+  async mounted() {
+    await this.orderUserEduList();
     this.listGoodsUserQuestion();
   },
   methods: {
+    tabChange(e) {
+      if (this.activeName == e.name) {
+        return;
+      }
+
+      console.log(e.name);
+      this.activeName = e.name;
+      this.listGoodsUserQuestion();
+    },
+    orderUserEduList() {
+      return new Promise((resolve) => {
+        this.$request
+          .orderUserEduList({
+            goodsType: 2,
+          })
+          .then((res) => {
+            res.rows.forEach((row) => {
+              row.id = row.id + "";
+            });
+            this.tabList.push(
+              {
+                educationName: "全部题库",
+                id: "-1",
+              },
+              ...res.rows
+            );
+
+            resolve();
+          });
+      });
+    },
     progressText(item) {
       return () => {
         return item.doNum + "/" + item.totalNum;
@@ -95,7 +131,14 @@ export default {
       this.listGoodsUserQuestion();
     },
     listGoodsUserQuestion() {
-      this.$request.listGoodsUserQuestion(this.param).then((res) => {
+      let param = JSON.parse(JSON.stringify(this.param));
+
+      if (this.activeName == "-1") {
+        param.educationTypeId = "";
+      } else {
+        param.educationTypeId = this.activeName;
+      }
+      this.$request.listGoodsUserQuestion(param).then((res) => {
         this.list = res.rows;
         this.total = res.total;
       });

+ 3 - 5
src/pages/person-center/my-classhour/appointment-add-kp/index.vue

@@ -18,10 +18,8 @@
         label-width="100px"
       >
         <div class="appointment-content__body">
-          <el-descriptions
-            title="这是一个考试标题这是一个考试标题"
-          ></el-descriptions>
-          <el-form-item label="考试地点:">
+          <el-descriptions title="考前培训预约考试"></el-descriptions>
+          <el-form-item label="考前培训地点:">
             <el-select
               v-model="addressId"
               placeholder="请选择"
@@ -35,7 +33,7 @@
               ></el-option>
             </el-select>
           </el-form-item>
-          <el-form-item label="考时间:">
+          <el-form-item label="考前培训时间:">
             <el-select v-model="timeIndex" placeholder="请选择">
               <el-option
                 :label="

+ 1 - 3
src/pages/person-center/my-classhour/appointment-add/index.vue

@@ -18,9 +18,7 @@
         label-width="100px"
       >
         <div class="appointment-content__body">
-          <el-descriptions
-            title="这是一个考试标题这是一个考试标题"
-          ></el-descriptions>
+          <el-descriptions title="预约考试"></el-descriptions>
           <el-form-item label="考试地点:">
             <el-select
               v-model="addressId"

+ 1 - 0
src/pages/person-center/my-classhour/appointment/index.vue

@@ -106,6 +106,7 @@ export default {
       let data = {
         applyId: this.listData.applyId,
         applyStatus: this.radio,
+        orderGoodsId: this.orderGoodsId,
         goodsId: this.goodsId,
         gradeId: this.gradeId,
       };

+ 48 - 8
src/pages/person-center/my-classhour/index/index.vue

@@ -65,7 +65,22 @@
                   <div class="btns" v-if="item.periodStatus !== 2">
                     <div
                       class="btn"
-                      v-if="item.periodStatus === -1"
+                      v-if="
+                        item.periodStatus === -1 &&
+                        !(
+                          (item.interfacePushId > 0 &&
+                            item.officialStatus != 1) ||
+                          sysTime <= item.serviceStartTime ||
+                          sysTime >= item.serviceEndTime ||
+                          (item.classStartTime &&
+                            sysTime <= item.classStartTime) ||
+                          (item.classEndTime && sysTime >= item.classEndTime) ||
+                          item.learningStatus == 2 ||
+                          item.classStatus == 0 ||
+                          (item.learningStatus == 3 &&
+                            sysTime < item.learningTimeStart)
+                        )
+                      "
                       @click="goCourseDetail(item)"
                     >
                       课程学习
@@ -111,7 +126,7 @@
       </template>
 
       <template v-if="activeName == '2'">
-        <div class="no-data" v-if="listData.length == 0">
+        <div class="no-data" v-if="listData1.length == 0">
           您暂无相关学习凭证记录哦
         </div>
 
@@ -119,7 +134,7 @@
           <div class="certificate-list">
             <div
               class="certificate-item"
-              v-for="(item, index) in listData"
+              v-for="(item, index) in listData1"
               :key="index"
             >
               <div class="certificate-item__header">
@@ -191,7 +206,7 @@
                     >
                     {{ index + 1 }}、{{ item.name }}
                   </div>
-                  <div class="desc">
+                  <!-- <div class="desc">
                     <div class="imgs">
                       <div
                         class="img"
@@ -204,7 +219,7 @@
                         </div>
                       </div>
                     </div>
-                  </div>
+                  </div> -->
                   <div class="desc">
                     原因:
                     <span class="note">拍照异常/时间异常</span>
@@ -214,9 +229,9 @@
             </div>
           </div>
         </div>
-        <div class="rebuild__footer">
+        <div class="rebuild__footer" v-if="rebuildShow">
           <el-button class="confirm" @click="rebuildSubmit" type="primary"
-            >确认重学</el-button
+            >确认已阅读</el-button
           >
         </div>
       </div>
@@ -229,9 +244,11 @@ export default {
   name: "MyClasshour",
   data() {
     return {
+      rebuildShow: false,
       showDetailModal: false,
       activeName: "1",
       listData: [],
+      listData1: [],
       rebuildItems: [],
       rebuildItem: {},
       param: {
@@ -239,9 +256,11 @@ export default {
         pageSize: 10,
       },
       total: 0,
+      sysTime: 0,
     };
   },
   mounted() {
+    this.sysTime = +this.$tools.timest();
     this.getcourseperiodlistGoods();
   },
   methods: {
@@ -349,13 +368,14 @@ export default {
       this.$request
         .getUserCertificateList(this.param)
         .then((res) => {
-          this.listData = [...res.rows];
+          this.listData1 = [...res.rows];
           this.total = res.total;
         })
         .catch((err) => {});
     },
 
     getcourseperiodcheat(item) {
+      this.rebuildShow = false;
       this.rebuildItem = item;
       this.$request
         .getcourseperiodcheat({
@@ -365,6 +385,26 @@ export default {
         .then((res) => {
           this.rebuildItems = res.rows;
         });
+
+      let sysTime = this.$tools.timest();
+      if (item.serviceEndTime && item.serviceEndTime < sysTime) {
+        this.rebuildShow = true;
+      } else {
+        this.rebuildShow = false;
+        this.showDetailModal = true;
+        return;
+      }
+
+      if (item.classEndTime) {
+        if (item.classEndTime < sysTime) {
+          this.rebuildShow = true;
+        } else {
+          this.rebuildShow = false;
+          this.showDetailModal = true;
+          return;
+        }
+      } else {
+      }
       this.showDetailModal = true;
     },
 

Файловите разлики са ограничени, защото са твърде много
+ 820 - 173
src/pages/person-center/my-course/index.vue


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

@@ -82,7 +82,7 @@
                       {{ $tools.timestampToTime(item.applyEndTime) }}
                     </div>
                     <div class="desc-list__item">
-                      报考专业:<span class="note"
+                      报考专业:<span class="note" v-if="item.categoryName"
                         >{{ item.categoryName }}专业</span
                       >
                     </div>

+ 69 - 67
src/pages/person-center/my-invoice/add/index.vue

@@ -290,78 +290,80 @@ export default {
 
     submit() {
       this.$refs.form.validate((valid) => {
-        if (this.total > 10000) {
-          this.$message({
-            type: "warning",
-            message:
-              "您所选的订单总开票金额,大于10000元,超出单张发票的开票额度,请修改开票订单",
-          });
-          return;
-        }
+        if (valid) {
+          if (this.total > 10000) {
+            this.$message({
+              type: "warning",
+              message:
+                "您所选的订单总开票金额,大于10000元,超出单张发票的开票额度,请修改开票订单",
+            });
+            return;
+          }
 
-        this.loading = true;
-        let data = JSON.parse(JSON.stringify(this.form));
-        data.amount = this.total;
-        if (data.subject == "1") {
-          data.taxRegistryNumber = "";
-          data.companyAddress = "";
-          data.phone = "";
-          data.bankName = "";
-          data.bankAccount = "";
-          data.receivingAddress = "";
-          data.receivingName = "";
-          data.receivingTel = "";
-        }
-        this.$request
-          .orderInvoice(data)
-          .then((res) => {
-            this.loading = false;
-            this.orderInvoiceCanInvoiceList();
-            this.form = {
-              type: "1",
-              subject: "1",
-              invoiceTitle: "",
-              orderGoodsIds: [],
-              taxRegistryNumber: "",
-              companyAddress: "",
-              phone: "",
-              bankName: "",
-              bankAccount: "",
-              receivingAddress: "",
-              receivingName: "",
-              receivingTel: "",
-            };
-            this.total = 0;
+          this.loading = true;
+          let data = JSON.parse(JSON.stringify(this.form));
+          data.amount = this.total;
+          if (data.subject == "1") {
+            data.taxRegistryNumber = "";
+            data.companyAddress = "";
+            data.phone = "";
+            data.bankName = "";
+            data.bankAccount = "";
+            data.receivingAddress = "";
+            data.receivingName = "";
+            data.receivingTel = "";
+          }
+          this.$request
+            .orderInvoice(data)
+            .then((res) => {
+              this.loading = false;
+              this.orderInvoiceCanInvoiceList();
+              this.form = {
+                type: "1",
+                subject: "1",
+                invoiceTitle: "",
+                orderGoodsIds: [],
+                taxRegistryNumber: "",
+                companyAddress: "",
+                phone: "",
+                bankName: "",
+                bankAccount: "",
+                receivingAddress: "",
+                receivingName: "",
+                receivingTel: "",
+              };
+              this.total = 0;
 
-            const confirmText = [
-              "您本次的发票申请已经提交成功!",
-              "机构将在3-7个工作日内进行处理,处理结果会在【发票记录】显示,请留意进度。",
-            ];
-            const newDatas = [];
-            const h = this.$createElement;
-            for (const i in confirmText) {
-              newDatas.push(h("p", null, confirmText[i]));
-            }
-            this.$confirm(h("div", null, newDatas), "操作提示", {
-              confirmButtonText: "知道了",
-              closeOnClickModal: false,
-              showCancelButton: false,
-              closeOnPressEscape: false,
-              distinguishCancelAndClose: false,
-              showClose: false,
+              const confirmText = [
+                "您本次的发票申请已经提交成功!",
+                "机构将在3-7个工作日内进行处理,处理结果会在【发票记录】显示,请留意进度。",
+              ];
+              const newDatas = [];
+              const h = this.$createElement;
+              for (const i in confirmText) {
+                newDatas.push(h("p", null, confirmText[i]));
+              }
+              this.$confirm(h("div", null, newDatas), "操作提示", {
+                confirmButtonText: "知道了",
+                closeOnClickModal: false,
+                showCancelButton: false,
+                closeOnPressEscape: false,
+                distinguishCancelAndClose: false,
+                showClose: false,
+              })
+                .then((_) => {})
+                .catch((_) => {
+                  console.log(_);
+                });
             })
-              .then((_) => {})
-              .catch((_) => {
-                console.log(_);
+            .catch((err) => {
+              this.loading = false;
+              this.$message({
+                type: "error",
+                message: err.msg,
               });
-          })
-          .catch((err) => {
-            this.loading = false;
-            this.$message({
-              type: "error",
-              message: err.msg,
             });
-          });
+        }
       });
     },
 

+ 39 - 36
src/pages/person-center/my-invoice/index/index.vue

@@ -23,7 +23,10 @@
           header-align="center"
           prop="amount"
           label="开票金额"
-          >1000
+        >
+          <template slot-scope="scope">
+            ¥{{ scope.row.amount | toFixed }}
+          </template>
         </el-table-column>
         <el-table-column align="center" header-align="center" label="发票类型">
           <template slot-scope="scope">
@@ -36,7 +39,7 @@
             }}
           </template>
         </el-table-column>
-        <el-table-column align="center" header-align="center" label="开票状态"
+        <!-- <el-table-column align="center" header-align="center" label="开票状态"
           ><template slot-scope="scope">
             {{
               scope.row.invoiceStatus == 1
@@ -48,7 +51,7 @@
                 : ""
             }}
           </template>
-        </el-table-column>
+        </el-table-column> -->
         <el-table-column align="center" header-align="center" label="申请时间">
           <template slot-scope="scope">
             {{ $tools.timestampToTime(scope.row.applyTime, false, false) }}
@@ -268,6 +271,7 @@
 </template>
 
 <script>
+import axios from "@/axios";
 export default {
   name: "MyInvoice",
   data() {
@@ -353,42 +357,41 @@ export default {
       this.invoiceDetailModal = true;
     },
 
+    /**
+     ** 下载图片到本地
+     ** @param blobUrl: blob 格式的图片文件
+     ** @param name: 图片名称
+     */
     download(row) {
-      let fileName =
+      // 创建虚拟a标签
+
+      let url = this.$tools.splitImgHost(row.invoiceImg);
+      let name =
         row.invoiceImg.substring(row.invoiceImg.lastIndexOf("/")) +
         new Date().valueOf();
-      let url = this.$tools.splitImgHost(row.invoiceImg);
-      let xhr = new XMLHttpRequest();
-      xhr.open("get", url, true);
-      xhr.setRequestHeader("Content-Type", `application/pdf`);
-      xhr.responseType = "blob";
-      let that = this;
-      xhr.onload = function () {
-        if (this.status == 200) {
-          //接受二进制文件流
-          var blob = this.response;
-          that.downloadExportFile(blob, fileName);
-        }
-      };
-      xhr.send();
-    },
-    downloadExportFile(blob, tagFileName) {
-      let downloadElement = document.createElement("a");
-      let href = blob;
-      if (typeof blob == "string") {
-        downloadElement.target = "_blank";
-      } else {
-        href = window.URL.createObjectURL(blob); //创建下载的链接
-      }
-      downloadElement.href = href;
-      downloadElement.download = tagFileName;
-      //下载后文件名
-      document.body.appendChild(downloadElement);
-      downloadElement.click(); //点击下载
-      document.body.removeChild(downloadElement); //下载完成移除元素
-      if (typeof blob != "string") {
-        window.URL.revokeObjectURL(href); //释放掉blob对象
-      }
+      var a = document.createElement("a");
+      var event = new MouseEvent("click");
+      a.download = name;
+      a.href = url;
+      a.dispatchEvent(event);
+
+      // var image = new Image();
+      // // 解决跨域 Canvas 污染问题,
+      // image.setAttribute("crossorigin", "anonymous");
+      // image.onload = function () {
+      //   var canvas = document.createElement("canvas");
+      //   canvas.width = image.width;
+      //   canvas.height = image.height;
+      //   var context = canvas.getContext("2d");
+      //   context.drawImage(image, 0, 0, image.width, image.height);
+      //   var url = canvas.toDataURL("image/png"); //将图片格式转为base64
+      //   var a = document.createElement("a"); // 生成一个a元素
+      //   var event = new MouseEvent("click"); // 创建一个单击事件
+      //   a.download = name; // 设置图片名称
+      //   a.href = url; // 将生成的URL设置为a.href属性
+      //   a.dispatchEvent(event); // 触发a的单击事件
+      // };
+      // image.src = url + "?time=" + Date.now(); //注意,这里是灵魂,否则依旧会产生跨域问题
     },
   },
 };

+ 17 - 0
src/pages/person-center/my-message/index.vue

@@ -107,6 +107,16 @@
               <div class="desc">
                 {{ $tools.timestampToTime(listData.sendTime, false) }}
               </div>
+
+              <div
+                class="content"
+                v-if="listData.systemStatus === 2"
+                v-html="listData.informVo.affiche"
+              ></div>
+              <div class="content" v-if="listData.systemStatus === 1">
+                {{ listData.text }}
+              </div>
+
               <div class="list" v-if="listData.informVo">
                 <div
                   class="item"
@@ -850,6 +860,13 @@ export default {
                 font-weight: 400;
                 color: #999999;
               }
+
+              .content {
+                font-size: 14px;
+                font-family: Microsoft YaHei;
+                font-weight: 400;
+                color: #666;
+              }
             }
 
             .btn {

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

@@ -2,10 +2,12 @@
   <div class="my-order">
     <div class="my-order__header">
       <el-tabs :value="activeName" @tab-click="tabChange">
-        <el-tab-pane label="待支付" name="1"></el-tab-pane>
-        <el-tab-pane label="已支付" name="2"></el-tab-pane>
-        <el-tab-pane label="已取消" name="3"></el-tab-pane>
-        <el-tab-pane label="已退款" name="4"></el-tab-pane>
+        <el-tab-pane
+          v-for="(tab, tabIndex) in list"
+          :key="tabIndex"
+          :label="tab.count ? `${tab.label}(${tab.count})` : `${tab.label}`"
+          :name="tab.name"
+        ></el-tab-pane>
       </el-tabs>
     </div>
 
@@ -60,6 +62,7 @@
                   >
                     申请退款
                   </div>
+                  <div class="state" v-if="items.refundStatus == 2">已退款</div>
                 </div>
               </div>
               <div class="price-wrap">
@@ -164,16 +167,83 @@ export default {
       },
       total: 0,
       loading: null,
+      list: [
+        {
+          label: "待支付",
+          count: 0,
+          name: "1",
+        },
+        {
+          label: "已支付",
+          count: 0,
+          name: "2",
+        },
+        {
+          label: "已取消",
+          count: 0,
+          name: "3",
+        },
+        {
+          label: "已退款",
+          count: 0,
+          name: "4",
+        },
+      ],
     };
   },
   mounted() {
     if (this.$route.query.state) {
       this.activeName = this.$route.query.state;
     }
+    this.getOrderNum();
     this.getOrderList();
   },
   methods: {
     ...mapMutations(["setCheckGoodsList"]),
+    getOrderNum() {
+      this.$request
+        .getorderlists({
+          status: "0,1",
+          pageNum: 1,
+          pageSize: 1,
+          orderStatus: "0",
+        })
+        .then((res) => {
+          this.list[0].count = res.total;
+        });
+
+      this.$request
+        .getorderlists({
+          status: "0,1",
+          pageNum: 1,
+          pageSize: 1,
+          orderStatus: "1,2,3,4",
+        })
+        .then((res) => {
+          this.list[1].count = res.total;
+        });
+
+      this.$request
+        .getorderlists({
+          status: "0,1",
+          pageNum: 1,
+          pageSize: 1,
+          orderStatus: "-1,-2",
+        })
+        .then((res) => {
+          this.list[2].count = res.total;
+        });
+
+      this.$request
+        .orderRefundList({
+          pageNum: 1,
+          pageSize: 1,
+        })
+        .then((res) => {
+          this.list[3].count = res.total;
+        })
+        .catch(this.hideLoading);
+    },
     currentChange(e) {
       this.formData.pageNum = e;
 
@@ -237,6 +307,7 @@ export default {
                 type: "success",
                 message: "退款成功",
               });
+              this.getOrderNum();
               this.getOrderList();
             })
             .catch((err) => {
@@ -269,9 +340,11 @@ export default {
                 message: "订单删除成功",
               });
               this.hideLoading();
+              this.getOrderNum();
               this.getOrderList();
             })
             .catch((err) => {
+              this.hideLoading();
               this.$message({
                 type: "warning",
                 message: err.msg,
@@ -315,6 +388,7 @@ export default {
             .eddOrder({ orderId: item.orderId, orderStatus: -1 })
             .then((res) => {
               this.hideLoading();
+              this.getOrderNum();
               this.$message({
                 type: "success",
                 message: "订单取消成功",
@@ -356,7 +430,7 @@ export default {
         this.formData.orderStatus = "1,2,3,4";
       }
       if (this.activeName == "3") {
-        this.formData.orderStatus = "-1,-2,4";
+        this.formData.orderStatus = "-1,-2";
       }
       this.$request
         .getorderlists(this.formData)
@@ -479,6 +553,16 @@ export default {
                 }
               }
 
+              .state {
+                font-size: 14px;
+                margin: 30px 0 0 0;
+                float: right;
+                width: 122px;
+                height: 32px;
+                line-height: 32px;
+                text-align: center;
+              }
+
               .btn {
                 float: right;
                 cursor: pointer;

+ 3 - 1
src/request.js

@@ -9,6 +9,7 @@ import polvy from '@/apis/polvy' //保利威模块
 import order from '@/apis/order' //订单模块
 import apply from '@/apis/apply' //考试模块
 import bank from '@/apis/bank' //题库模块
+import profileTp from '@/apis/profileTp'
 
 
 
@@ -25,5 +26,6 @@ export default {
     ...polvy,
     ...order,
     ...apply,
-    ...bank
+    ...bank,
+    ...profileTp
 }

+ 1 - 0
src/router/index.js

@@ -5,6 +5,7 @@ Vue.use(Router)
 
 const router =  new Router({
   mode:'history',
+  scrollBehavior: () => ({ y: 0 }),
   routes: [
     {
       path: '*',

Някои файлове не бяха показани, защото твърде много файлове са промени