Commit 5b7d0946d37aff74e62a0662b21044f8d4187237

Authored by wangfan
2 parents 6468ebb4 d8de94ca

Merge remote-tracking branch 'remotes/origin/master' into online-reserve

Showing 1 changed file with 8 additions and 14 deletions
... ... @@ -331,7 +331,7 @@ Page({
tid: form.tabid,
rid: this.reserve_id,
}).then(res => {
let tables = [], tables_tmp = [];
let tables = [];
let tablesLength = 0;
if (tableid.length > 0) {
let toastTables={...this.checkedTables}
... ... @@ -368,25 +368,19 @@ Page({
}
wx.removeStorage({key: 'tableid'})
}
console.log('tables',tables);
console.log('tables-first',tables);
if(tables.length<1){
tablesLength=0;
tables_tmp = [];
let fortids=[];
res.data.forEach((p,ri) => {
p.list.forEach(t => {
if(ri>0) tablesLength++;
//if(tables.length>=3) return true;
// if (t.tid == 2) {
// tables.push(t);
// } else {
// tables_tmp.push(t);
// }
tables.push(t);
if(fortids._indexOf(t.id)<0) {
tablesLength++;
tables.push(t);
fortids.push(t.id);
}
})
})
if (tables.length < 3) {
tables = tables.concat(tables_tmp);
}
if (tables.length >= 3) {
tables = tables.slice(0, 3);
}
... ...