Browse Source

统计数据接口

wolyshaw 4 years ago
parent
commit
5029015ebc
2 changed files with 14 additions and 4 deletions
  1. 8 0
      src/views/main/api.js
  2. 6 4
      src/views/main/index.vue

+ 8 - 0
src/views/main/api.js

@@ -0,0 +1,8 @@
+import request2 from '@/utils/request2'
+
+// 填加学员接口
+export const getIndex = data => request2({
+  url: '/api-web/newIndex',
+  data,
+  method: 'get',
+})

+ 6 - 4
src/views/main/index.vue

@@ -16,7 +16,7 @@
   </div>
 </template>
 <script>
-import { getIndex } from '@/api/user'
+import { getIndex } from './api'
 import baseinfo from './baseinfo'
 import abnormal from './abnormal'
 export default {
@@ -31,12 +31,14 @@ export default {
     }
   },
   mounted () {
-    this.__init();
+    this.FetchDetail();
 
   },
   methods: {
-    __init () {
-
+    async FetchDetail() {
+      try {
+        await getIndex()
+      } catch (error) {}
     }
   }
 }