Commit 0b248f93 authored by wangjie's avatar wangjie

Merge branch 'wjie-fix-7.2' into 'master'

fix

See merge request !5
parents c34dc4b4 10a10839
......@@ -18,5 +18,5 @@
</head>
<body>
<div id="root"></div>
<script type="text/javascript" src="https://cdn.s.shangjiadao.cn/qingxiao/biz/dist/main.09798f.js"></script></body>
<script type="text/javascript" src="https://cdn.s.shangjiadao.cn/qingxiao/biz/dist/main.a0040e.js"></script></body>
</html>
......@@ -134,39 +134,42 @@ export default {
// });
for (let i = 0, Length = weekdayschedules.length; i < Length; i++) {
const current = i;
let next = i + 1;
if (next == weekdayschedules.length) {
return;
}
while (next < weekdayschedules.length) {
const relativeSchedules1 = weekdayschedules[current].relativeSchedules;
const relativeSchedules2 = weekdayschedules[next].relativeSchedules;
let flaga = false;
relativeSchedules1.forEach((ele) => {
if (relativeSchedules2.indexOf(ele) != -1) {
flaga = true;
}
});
if (flaga) {
relativeSchedules2.forEach((ele) => {
if (relativeSchedules1.indexOf(ele) == -1) {
relativeSchedules1.push(ele);
relativeSchedules1.sort((a, b) => {
return a - b;
});
}
});
relativeSchedules1.forEach((ele) => {
if (relativeSchedules2.indexOf(ele) == -1) {
relativeSchedules2.push(ele);
relativeSchedules2.sort((a, b) => {
return a - b;
});
}
});
}
next++;
}
// let next = i + 1;
// if (next == weekdayschedules.length) {
// return;
// }
weekdayschedules[current].relativeSchedules.sort((a, b) => {
return a - b;
});
// while (next < weekdayschedules.length) {
// const relativeSchedules1 = weekdayschedules[current].relativeSchedules;
// const relativeSchedules2 = weekdayschedules[next].relativeSchedules;
// let flaga = false;
// relativeSchedules1.forEach((ele) => {
// if (relativeSchedules2.indexOf(ele) != -1) {
// flaga = true;
// }
// });
// if (flaga) {
// relativeSchedules2.forEach((ele) => {
// if (relativeSchedules1.indexOf(ele) == -1) {
// relativeSchedules1.push(ele);
// relativeSchedules1.sort((a, b) => {
// return a - b;
// });
// }
// });
// relativeSchedules1.forEach((ele) => {
// if (relativeSchedules2.indexOf(ele) == -1) {
// relativeSchedules2.push(ele);
// relativeSchedules2.sort((a, b) => {
// return a - b;
// });
// }
// });
// }
// next++;
// }
}
});
yield put({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment