|
...
|
...
|
@@ -319,7 +319,7 @@ Page({ |
|
|
|
tid:form.tabid,
|
|
|
|
rid:this.reserve_id,
|
|
|
|
}).then(res=>{
|
|
|
|
let tables=[];
|
|
|
|
let tables=[],tables_tmp=[];
|
|
|
|
let tablesLength=0;
|
|
|
|
if(tableid.length>0){
|
|
|
|
res.data.forEach(p=>{
|
|
...
|
...
|
@@ -336,13 +336,22 @@ Page({ |
|
|
|
wx.removeStorage({key:'tableid'})
|
|
|
|
}else{
|
|
|
|
res.data.forEach(p=>{
|
|
|
|
//if(tables.length>=3) return true;
|
|
|
|
p.list.forEach(t=>{
|
|
|
|
tablesLength++;
|
|
|
|
if(tables.length>=3) return true;
|
|
|
|
tables.push(t);
|
|
|
|
//if(tables.length>=3) return true;
|
|
|
|
if(t.tid==2) {
|
|
|
|
tables.push(t);
|
|
|
|
}else{
|
|
|
|
tables_tmp.push(t);
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
if(tables.length<3){
|
|
|
|
tables=tables.concat(tables_tmp);
|
|
|
|
}
|
|
|
|
if(tables.length>=3){
|
|
|
|
tables=tables.slice(0,3);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.tablesLength=tablesLength;
|
|
|
|
this.setData({
|
...
|
...
|
|