|
...
|
...
|
@@ -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);
|
|
|
|
}
|
...
|
...
|
|