便民通讯录

This commit is contained in:
liuye
2022-01-28 09:32:09 +08:00
parent 80d6657a3b
commit f29759fd0d

View File

@@ -1,14 +1,7 @@
<template>
<div class="AppMailList">
<AiTopFixed>
<div class="header-top">
<div>区域选择</div>
<AiAreaPicker v-model="areaId" :areaId="user.areaId" @select="areaSelect" :name.sync="areaName">
<span class="label" v-if="areaName">{{ areaName }}</span>
<span v-else>请选择</span>
<u-icon name="arrow-right" color="#666" size="24" style="margin-left:4px;" />
</AiAreaPicker>
</div>
<u-search v-model="keyword" :clearabled="false" placeholder="请输入名称、类型或电话" :show-action="false" bg-color="#F5F5F5" search-icon-color="#999" color="#666" @search="getList"></u-search>
</AiTopFixed>
<div class="list-content">
<u-index-list :scrollTop="scrollTop" :index-list="indexList">
@@ -52,35 +45,27 @@ export default {
scrollTop: 0,
list: [],
indexList: [],
areaId: '',
areaName: ''
keyword: '',
}
},
computed: { ...mapState(['user']) },
mounted() {
this.areaId = this.user.areaId
this.areaName = this.user.areaName
this.getList()
uni.$on('updateList', () => {
this.getList()
})
},
onShow() {
document.title = "便民通讯录"
document.title = "通讯录"
},
methods: {
areaSelect(e) {
this.areaId = e
this.getList()
},
callPhone(phone) {
uni.makePhoneCall({phoneNumber: phone})
},
getList() {
this.$http.post(`/app/appconvenientaddressbook/list`, null, {
params: {
areaId: this.areaId,
isPublic: 1,
resource: "portal",
size: 999
@@ -193,5 +178,9 @@ export default {
top: 60px;
right: 64px;
}
::v-deep .u-search{
margin-bottom: 0!important;
}
}
</style>