李志伟 před 3 roky
rodič
revize
39b916fe20

+ 1
- 1
src/App.vue Zobrazit soubor

@@ -9,7 +9,7 @@
9 9
 import { UserLogin } from './util/api'
10 10
 import { mapState } from 'vuex'
11 11
 
12
-import Tabber from './components/Tabber.vue'
12
+import Tabber from './views/Tabber.vue'
13 13
 
14 14
 export default {
15 15
   name: 'App',

+ 1
- 1
src/components/Question/Title.vue Zobrazit soubor

@@ -1,6 +1,6 @@
1 1
 <template>
2 2
   <div class="question-title">
3
-    <span>{{`第${this.serialNo}题:`}}</span>
3
+    <span>{{`第${this.serialNo+1}题:`}}</span>
4 4
     <span>{{title}}</span>
5 5
     <span>({{ formatType(qType) }})</span>
6 6
   </div>

+ 1
- 1
src/components/Questionnaire.vue Zobrazit soubor

@@ -65,7 +65,7 @@ import { getQuestion, getQuestionInfo, getQuestionAnswer } from '../util/api'
65 65
 import query from '../util/query'
66 66
 
67 67
 export default {
68
-  name: 'HelloWorld',
68
+  name: 'QuestionDetail',
69 69
   components: {
70 70
     Question: () => import('./Question'),
71 71
     Popup: () => import('./Questionnaire/Popup.vue'),

+ 1
- 1
src/layout/index.vue Zobrazit soubor

@@ -40,7 +40,7 @@ export default {
40 40
         },
41 41
         {
42 42
           path: '/UserCenter',
43
-          text: '个人中心1',
43
+          text: '个人中心',
44 44
           icon: 'volume-o'
45 45
         }
46 46
       ]

+ 7
- 7
src/router/index.js Zobrazit soubor

@@ -6,13 +6,13 @@ import Router from 'vue-router'
6 6
 import store from '../store'
7 7
 
8 8
 import Course from '@/views/Course.vue'//课程
9
-import MyCollection from '../components/MyCollection.vue'//收藏
10
-import signIn from '../components/signIn.vue'//打卡
11
-import ClassInfo from '../components/ClassInfo.vue'//课堂详情
12
-import StrongPhoto from '../components/StrongPhoto.vue'//精彩集锦
13
-import UserCenter from '../components/UserCenter.vue'//我的页面
14
-import Questionnaire from '../components/Questionnaire.vue'
15
-import SetUser from '../components/userPages/SetUser.vue'//修改个人信息
9
+import MyCollection from '@/components/MyCollection.vue'//收藏
10
+import signIn from '@/components/signIn.vue'//打卡
11
+import ClassInfo from '@/components/ClassInfo.vue'//课堂详情
12
+import StrongPhoto from '@/views/StrongPhoto.vue'//精彩集锦
13
+import UserCenter from '@/views/UserCenter.vue'//我的页面
14
+import Questionnaire from '@/components/Questionnaire.vue'
15
+import SetUser from '@/components/userPages/SetUser.vue'//修改个人信息
16 16
 // // import Login from '../Login.vue'
17 17
 
18 18
 

+ 4
- 1
src/util/request.js Zobrazit soubor

@@ -3,6 +3,7 @@
3 3
 
4 4
 import axios from 'axios'
5 5
 import store from '../store'
6
+export const domain = process.env.NODE_ENV === 'development' ? '' : 'http://colmo-service.dianyang.njyunzhi.com'
6 7
 
7 8
 export default function (url, options) {
8 9
   const { params, header, ...leftOptions } = options || {}
@@ -14,13 +15,15 @@ export default function (url, options) {
14 15
     }
15 16
     axios.request({
16 17
       ...leftOptions,
17
-      url: url,
18
+      url: `${domain}${url}`,
18 19
       // header: header,
19 20
       headers: header,
20 21
     }).then(res => {
21 22
       const { code, data, message } = res.data
22 23
       if (code === 1000) {
23 24
         resolve(data)
25
+      } else {
26
+        reject(res.data)
24 27
       }
25 28
     }).catch(err => {
26 29
       const message = err.message || err.errMsg || err

+ 20
- 20
src/views/Course.vue Zobrazit soubor

@@ -75,25 +75,25 @@ export default {
75 75
         index: this.currentPage, //页数
76 76
         size: this.pageSize //每页个数
77 77
       }
78
-      xxxxxxx(params).then((res) => {
79
-        console.log(res)
80
-        this.dataTotal = res.total
81
-        //进行判断
82
-        if (this.dataTotal <= this.pageSize) {
83
-          this.Array = res.data.list
84
-          console.log(this.Array)
85
-        } else {
86
-          this.currentPage++
87
-          let arr = res.data.data.list
88
-          this.Array = this.Array.concat(arr)
89
-        }
90
-        // 加载状态结束
91
-        this.loading = false
92
-        // 数据全部加载完成
93
-        if (this.Array.length >= this.dataTotal) {
94
-          this.finished = true //结束,显示我也是有底线的
95
-        }
96
-      })
78
+      // xxxxxxx(params).then((res) => {
79
+      //   console.log(res)
80
+      //   this.dataTotal = res.total
81
+      //   //进行判断
82
+      //   if (this.dataTotal <= this.pageSize) {
83
+      //     this.Array = res.data.list
84
+      //     console.log(this.Array)
85
+      //   } else {
86
+      //     this.currentPage++
87
+      //     let arr = res.data.data.list
88
+      //     this.Array = this.Array.concat(arr)
89
+      //   }
90
+      //   // 加载状态结束
91
+      //   this.loading = false
92
+      //   // 数据全部加载完成
93
+      //   if (this.Array.length >= this.dataTotal) {
94
+      //     this.finished = true //结束,显示我也是有底线的
95
+      //   }
96
+      // })
97 97
     }
98 98
   }
99 99
 }
@@ -108,10 +108,10 @@ export default {
108 108
 
109 109
 .Course-box {
110 110
   width: 100vw;
111
+  padding-top: 10px;
111 112
 
112 113
   .banner-box-top {
113 114
     position: relative;
114
-    margin-top: 10px;
115 115
     width: calc(100% - 20px);
116 116
 
117 117
     .banner-swipe {

src/components/StrongPhoto.vue → src/views/StrongPhoto.vue Zobrazit soubor


src/components/Tabber.vue → src/views/Tabber.vue Zobrazit soubor


src/components/UserCenter.vue → src/views/UserCenter.vue Zobrazit soubor