许成详 6 år sedan
förälder
incheckning
531c5c7ca1
2 ändrade filer med 9 tillägg och 2 borttagningar
  1. 8
    1
      src/pages/user/lessonOrder/index.vue
  2. 1
    1
      src/store/userCenter/userCenter.js

+ 8
- 1
src/pages/user/lessonOrder/index.vue Visa fil

@@ -17,6 +17,7 @@
17 17
             <div class="type" :class="{'un-use' : item.IsDone === 0}">{{item.IsDone === 0 ? '未使用' : '已使用'}}</div>
18 18
           </div>
19 19
         </div>
20
+        <span v-if="noData" style="width:100%;display:block;text-align:center;font-size:.11rem;color:#ccc;">暂无数据</span>
20 21
         <!-- <noMore v-if="hasPic"></noMore> -->
21 22
       </div>
22 23
     </scroll>
@@ -32,6 +33,7 @@ const { mapActions: mapUserActions, mapState: mapUserState } = createNamespacedH
32 33
 export default {
33 34
   data () {
34 35
     return {
36
+      noData: false,
35 37
       hasPic: false,
36 38
       pullUpLoad: true,
37 39
       pullUpLoadThreshold: 40,
@@ -50,7 +52,12 @@ export default {
50 52
     var _that = this
51 53
     this.getCourseLocationList().then((res) => {
52 54
       // console.log(JSON.stringify(res))
53
-      this.getCourseOrderList({ page: this.page })
55
+      this.getCourseOrderList({ page: this.page }).then((res) => {
56
+        // console.log(JSON.stringify(res))
57
+        if(res.list === null){
58
+          this.noData = true
59
+        }
60
+      })
54 61
     })
55 62
   },
56 63
   computed: {

+ 1
- 1
src/store/userCenter/userCenter.js Visa fil

@@ -101,7 +101,7 @@ export default {
101 101
     }
102 102
   },
103 103
   actions: {
104
-    getCourseOrderDetail (context, payload) { // 获取课程类型列表
104
+    getCourseOrderDetail (context, payload) { // 获取课程类型详情
105 105
       return new Promise((resolve) => {
106 106
         Ajax(api.user.getCourseOrderDetail.url, {
107 107
           method: api.user.getCourseOrderDetail.method,