|
@@ -150,7 +150,7 @@ export default {
|
|
result = data.data[0];
|
|
result = data.data[0];
|
|
this.coursesList = result;
|
|
this.coursesList = result;
|
|
this.loading = false;
|
|
this.loading = false;
|
|
- }
|
|
|
|
|
|
+ },
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
depthCopy(s) {
|
|
depthCopy(s) {
|
|
@@ -183,16 +183,11 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
- // if (!this.cJson || Object.keys(this.cJson).length == 0) {
|
|
|
|
- // this.checkJson = {
|
|
|
|
- // title: "标题",
|
|
|
|
- // detail: "",
|
|
|
|
- // courses: []
|
|
|
|
- // };
|
|
|
|
- // } else {
|
|
|
|
- // this.checkJson = this.depthCopy(this.cJson2);
|
|
|
|
- // this.courses = this.checkJson.courses;
|
|
|
|
- // }
|
|
|
|
|
|
+ if (Object.keys(this.cJson).length != 0) {
|
|
|
|
+ if( this.cJson.courses && this.cJson.courses.length != 0){
|
|
|
|
+ this.courses = this.cJson.courses;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|