|
@@ -616,12 +616,20 @@ export default {
|
|
|
let _answer = topic.courses
|
|
|
topic.array = _answer
|
|
|
topic.courseArray = [];
|
|
|
- topic.array.forEach(async i => {
|
|
|
- let data = await this.getCourse(i)
|
|
|
- console.log(data.update_at)
|
|
|
- data.update_at = new Date(data.update_at).toLocaleString('zh-CN', {year: 'numeric',month: '2-digit',day: '2-digit',hour: '2-digit',minute: '2-digit',second: '2-digit',hour12: false}).replace(/\//g,'-')
|
|
|
- topic.courseArray.push(data)
|
|
|
- })
|
|
|
+ let params = {
|
|
|
+ cid:topic.array.join(",")
|
|
|
+ }
|
|
|
+
|
|
|
+ let data = await this.ajax.get(this.$store.state.api + 'getCourseInfoTestAll',params);
|
|
|
+ let result = data.data[0]
|
|
|
+ result.forEach(i=>i.update_at=new Date(i.update_at).toLocaleString('zh-CN', {year: 'numeric',month: '2-digit',day: '2-digit',hour: '2-digit',minute: '2-digit',second: '2-digit',hour12: false}).replace(/\//g,'-'))
|
|
|
+ topic.courseArray = result;
|
|
|
+ // topic.array.forEach(async i => {
|
|
|
+ // let data = await this.getCourse(i)
|
|
|
+ // console.log(data.update_at)
|
|
|
+ // data.update_at = new Date(data.update_at).toLocaleString('zh-CN', {year: 'numeric',month: '2-digit',day: '2-digit',hour: '2-digit',minute: '2-digit',second: '2-digit',hour12: false}).replace(/\//g,'-')
|
|
|
+ // topic.courseArray.push(data)
|
|
|
+ // })
|
|
|
} else if (topic.type == 7) {
|
|
|
for (var t = parseInt(topic.small); t <= parseInt(topic.big); t++) {
|
|
|
topic.array.push({
|