// 获取日程数据
fetchList() {
const arr = [`viewid=8`];
const activityList = [];
let promiseResult = [];
const urlList = [
{ url: "activity/activitylist", arr: [`viewid=8`] },
{ url: "territorial/schedulemeetinglist", arr: [] },
{ url: "activity/schedulelist", arr: [] }
];
this.isLoading = true;
urlList.forEach(item => {
promiseResult.push(
new Promise((resolve, reject) => {
fetchPost(item.url, item.arr)
.then(result => {
const {
data: { value }
} = result;
resolve(value);
})
.catch(err => {
console.log(err);
this.isLoading = false;
});
})
);
});
Promise.all(promiseResult).then(res => {
this.isLoading = false;
this.events = res;
this.initCalendar(this.events,currentDate)
});
},