便民通讯录地区选择
This commit is contained in:
@@ -1,5 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="AppMailList">
|
<div class="AppMailList">
|
||||||
|
<AiTopFixed>
|
||||||
|
<div class="area-content">
|
||||||
|
<AiAreaPicker :areaId="user.areaId" :value="areaId" @select="areaSelect" :name.sync="areaName">
|
||||||
|
<img src="./img/local-icon.png" alt="">
|
||||||
|
<span class="label" v-if="areaName">{{ areaName }}</span>
|
||||||
|
<span v-else>请选择</span>
|
||||||
|
<u-icon name="arrow-down" color="#666" size="24"/>
|
||||||
|
</AiAreaPicker>
|
||||||
|
</div>
|
||||||
|
</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">
|
||||||
<div v-for="(letter, index) in indexList" :key="index">
|
<div v-for="(letter, index) in indexList" :key="index">
|
||||||
@@ -41,11 +51,15 @@ export default {
|
|||||||
return {
|
return {
|
||||||
scrollTop: 0,
|
scrollTop: 0,
|
||||||
list: [],
|
list: [],
|
||||||
indexList: []
|
indexList: [],
|
||||||
|
areaId: '',
|
||||||
|
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()
|
||||||
@@ -56,13 +70,17 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
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.user.areaId,
|
areaId: this.areaId,
|
||||||
isPublic: 1,
|
isPublic: 1,
|
||||||
resource: "portal",
|
resource: "portal",
|
||||||
size: 999
|
size: 999
|
||||||
@@ -89,6 +107,23 @@ export default {
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.AppMailList {
|
.AppMailList {
|
||||||
|
::v-deep .fixed{
|
||||||
|
z-index: 9999;
|
||||||
|
}
|
||||||
|
.area-content {
|
||||||
|
width: 100%;
|
||||||
|
line-height: 64px;
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 42px;
|
||||||
|
vertical-align: middle;
|
||||||
|
margin-right: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.u-icon {
|
||||||
|
margin-left: 6px;
|
||||||
|
}
|
||||||
|
}
|
||||||
// background-color: #F3F6F9;
|
// background-color: #F3F6F9;
|
||||||
.list-content{
|
.list-content{
|
||||||
padding-bottom: 112px;
|
padding-bottom: 112px;
|
||||||
|
|||||||
BIN
src/apps/AppMailList/img/local-icon.png
Normal file
BIN
src/apps/AppMailList/img/local-icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
Reference in New Issue
Block a user