This commit is contained in:
花有清香月有阴
2022-02-23 17:00:14 +08:00
parent c68175b312
commit e6d70a9a58

View File

@@ -14,7 +14,7 @@
<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-down" color="#666" size="24" style="margin-left:4px;" />
<u-icon name="arrow-down" color="#666" size="24" style="margin-left: 4px" />
</AiAreaPicker>
</div>
@@ -25,17 +25,18 @@
<u-index-list :scrollTop="scrollTop" :index-list="indexList">
<div v-for="(letter, index) in indexList" :key="index">
<u-index-anchor :index="letter" />
<div class="item" v-for="(item, index) in list.filter(e=>e.nameInitials==letter)" :key="index">
<div class="item" v-for="(item, index) in list.filter((e) => e.nameInitials == letter)" :key="index">
<div class="title">{{ item.label }}</div>
<div class="phone-list">
<div class="item-info">
<p>{{ item.name }}</p>
<div class="phone">
<span>{{item.type}}</span>{{item.phone}}
<span>{{ item.type }}</span
>{{ item.phone }}
</div>
</div>
</div>
<img :src="$cdn + 'common/phone.png'" alt="" @click="callPhone(item.phone)" class="phone-icon" >
<img :src="$cdn + 'common/phone.png'" alt="" @click="callPhone(item.phone)" class="phone-icon" />
</div>
</div>
</u-index-list>
@@ -53,10 +54,10 @@
<script>
import { mapState } from 'vuex'
export default {
name: "AppMailList",
appName: "便民通讯录",
name: 'AppMailList',
appName: '便民通讯录',
inject: {
root: {}
root: {},
},
data() {
return {
@@ -65,7 +66,7 @@ export default {
indexList: [],
areaId: '',
areaName: '',
keyword: ''
keyword: '',
}
},
computed: { ...mapState(['user']) },
@@ -78,7 +79,7 @@ export default {
})
},
onShow() {
document.title = "便民通讯录"
document.title = '便民通讯录'
},
methods: {
@@ -94,18 +95,20 @@ export default {
this.getList()
},
getList() {
this.$http.post(`/app/appconvenientaddressbook/list`, null, {
this.$http
.post(`/app/appconvenientaddressbook/list`, null, {
params: {
areaId: this.areaId,
isPublic: 1,
resource: "portal",
resource: 'portal',
size: 999,
name: this.keyword
}
}).then(res => {
name: this.keyword,
},
})
.then((res) => {
if (res.code == 0) {
this.indexList = [...new Set(res.data.records.map(e=>e.nameInitials))];
this.list = res.data.records;
this.indexList = [...new Set(res.data.records.map((e) => e.nameInitials))]
this.list = res.data.records
}
})
},
@@ -117,8 +120,8 @@ export default {
},
},
onPageScroll(e) {
this.scrollTop = e.scrollTop;
}
this.scrollTop = e.scrollTop
},
}
</script>
@@ -187,15 +190,15 @@ export default {
text-align: center;
height: 112px;
line-height: 112px;
background: #3975C6;
box-shadow: 0 1px 0 0 #EEEEEE;
background: #3975c6;
box-shadow: 0 1px 0 0 #eeeeee;
position: fixed;
bottom: 0;
left: 0;
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #FFF;
color: #fff;
z-index: 999;
}
::v-deep .u-index-anchor {