大喇叭

This commit is contained in:
liuye
2022-06-10 11:34:03 +08:00
parent 5705c75e14
commit deecff9904
7 changed files with 320 additions and 106 deletions

View File

@@ -13,24 +13,14 @@
</div>
</AiTopFixed>
<div class="record">
<div class="item" @click="toDetail">
<div class="item" v-for="(item, index) in list" :key="index" @click="toDetail(item)">
<img src="../img/lb@2x.png" alt="" class="voice-img">
<div class="info">
<div class="text">
<p>村头大喇叭</p>
<span>刘家河居委会</span>
<p>{{item.deviceName}}</p>
<span>{{item.orgName}}</span>
</div>
<div class="status">在线</div>
</div>
</div>
<div class="item">
<img src="../img/lb@2x.png" alt="" class="voice-img">
<div class="info">
<div class="text">
<p>村头大喇叭</p>
<span>刘家河居委会</span>
</div>
<div class="status">在线</div>
<div class="status">{{item.devStatus}}</div>
</div>
</div>
</div>
@@ -42,24 +32,46 @@ export default {
name: "AppEquipment",
data() {
return {
current: 1,
areaId: '',
areaName: '',
keyword: ''
keyword: '',
list: []
}
},
computed: { ...mapState(['user']) },
onLoad(option) {
onLoad() {
this.areaId = this.user.areaId
this.areaName = this.user.areaName
this.getList()
},
methods: {
areaSelect(e) {
this.areaId = e
// this.getList()
this.getListInit()
},
getListInit() {
this.list = []
this.current = 1
this.getList()
},
getList() {
this.$http.post(`/app/appdlbquipment/getDlbDeviceList?current=1&size=20&keyword=${this.keyword}`).then((res) => {
if (res.code == 0) {
if (this.current > 1) {
this.list = [...this.list, ...res.data.records]
} else {
this.list = res.data.records
}
}
})
},
toDetail(item) {
uni.navigateTo({url: `./detail`})
}
},
onReachBottom() {
}
}
</script>