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 @@ ...@@ -18,5 +18,5 @@
</head> </head>
<body> <body>
<div id="root"></div> <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> </html>
...@@ -134,39 +134,42 @@ export default { ...@@ -134,39 +134,42 @@ export default {
// }); // });
for (let i = 0, Length = weekdayschedules.length; i < Length; i++) { for (let i = 0, Length = weekdayschedules.length; i < Length; i++) {
const current = i; const current = i;
let next = i + 1; // let next = i + 1;
if (next == weekdayschedules.length) { // if (next == weekdayschedules.length) {
return; // return;
} // }
while (next < weekdayschedules.length) { weekdayschedules[current].relativeSchedules.sort((a, b) => {
const relativeSchedules1 = weekdayschedules[current].relativeSchedules; return a - b;
const relativeSchedules2 = weekdayschedules[next].relativeSchedules; });
let flaga = false; // while (next < weekdayschedules.length) {
relativeSchedules1.forEach((ele) => { // const relativeSchedules1 = weekdayschedules[current].relativeSchedules;
if (relativeSchedules2.indexOf(ele) != -1) { // const relativeSchedules2 = weekdayschedules[next].relativeSchedules;
flaga = true; // let flaga = false;
} // relativeSchedules1.forEach((ele) => {
}); // if (relativeSchedules2.indexOf(ele) != -1) {
if (flaga) { // flaga = true;
relativeSchedules2.forEach((ele) => { // }
if (relativeSchedules1.indexOf(ele) == -1) { // });
relativeSchedules1.push(ele); // if (flaga) {
relativeSchedules1.sort((a, b) => { // relativeSchedules2.forEach((ele) => {
return a - b; // 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) => { // relativeSchedules1.forEach((ele) => {
return a - b; // if (relativeSchedules2.indexOf(ele) == -1) {
}); // relativeSchedules2.push(ele);
} // relativeSchedules2.sort((a, b) => {
}); // return a - b;
} // });
next++; // }
} // });
// }
// next++;
// }
} }
}); });
yield put({ 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