Browse Source

feat:fix bugs

master
sundalingg 10 months ago
parent
commit
28fcbf30fb
  1. 18
      weapp/package/AIOTOverview/network/network.js

18
weapp/package/AIOTOverview/network/network.js

@ -27,15 +27,19 @@ Page({
},
obtainStruc(){
let promiseArr=[]
let sdatas=[]
promiseArr.push(Request.get(getProjectList()))
if(res[0].rows.length){
const filterData=res[0].rows.filter(s => s.type==='管廊' )
sdatas=filterData?.map(item=>( { value: item.id, text:item.name }))
sdatas.unshift({ text: '全部', value: 'all' })
}
this.setData({
structList:sdatas
Promise.all(promiseArr).then(res=>{
if(res[0].rows.length){
const filterData=res[0].rows.filter(s => s.type=='管廊')
sdatas=filterData?.map(item=>( { value: item.id, text:item.name }))
sdatas.unshift({ text: '全部', value: 'all' })
}
this.setData({
structList:sdatas
})
})
},
queryData(){
const {limit,page}=this.data

Loading…
Cancel
Save