许成详 6 years ago
parent
commit
531c5c7ca1
2 changed files with 9 additions and 2 deletions
  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 View File

17
             <div class="type" :class="{'un-use' : item.IsDone === 0}">{{item.IsDone === 0 ? '未使用' : '已使用'}}</div>
17
             <div class="type" :class="{'un-use' : item.IsDone === 0}">{{item.IsDone === 0 ? '未使用' : '已使用'}}</div>
18
           </div>
18
           </div>
19
         </div>
19
         </div>
20
+        <span v-if="noData" style="width:100%;display:block;text-align:center;font-size:.11rem;color:#ccc;">暂无数据</span>
20
         <!-- <noMore v-if="hasPic"></noMore> -->
21
         <!-- <noMore v-if="hasPic"></noMore> -->
21
       </div>
22
       </div>
22
     </scroll>
23
     </scroll>
32
 export default {
33
 export default {
33
   data () {
34
   data () {
34
     return {
35
     return {
36
+      noData: false,
35
       hasPic: false,
37
       hasPic: false,
36
       pullUpLoad: true,
38
       pullUpLoad: true,
37
       pullUpLoadThreshold: 40,
39
       pullUpLoadThreshold: 40,
50
     var _that = this
52
     var _that = this
51
     this.getCourseLocationList().then((res) => {
53
     this.getCourseLocationList().then((res) => {
52
       // console.log(JSON.stringify(res))
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
   computed: {
63
   computed: {

+ 1
- 1
src/store/userCenter/userCenter.js View File

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