便民通讯录

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