增加全部/个人页签

This commit is contained in:
aixianling
2022-03-15 17:04:28 +08:00
parent cd8aa29239
commit c39b0aabcf

View File

@@ -1,7 +1,9 @@
<template> <template>
<div class="AppMailList"> <div class="AppMailList">
<AiTopFixed> <AiTopFixed>
<u-search v-model="keyword" :clearabled="false" placeholder="请输入名称、类型或电话" :show-action="false" bg-color="#F5F5F5" search-icon-color="#999" color="#666" @search="getList"></u-search> <u-search v-model="keyword" :clearabled="false" placeholder="请输入名称、类型或电话" :show-action="false" bg-color="#F5F5F5"
search-icon-color="#999" color="#666" @search="getList"></u-search>
<u-tabs :list="tabs" :current="currentTab" @change="handleCurrentTab"/>
</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">
@@ -32,6 +34,7 @@
<script> <script>
import {mapState} from 'vuex' import {mapState} from 'vuex'
export default { export default {
name: "AppMailList", name: "AppMailList",
appName: "电话簿", appName: "电话簿",
@@ -44,27 +47,38 @@ export default {
list: [], list: [],
indexList: [], indexList: [],
keyword: '', keyword: '',
currentTab: 0
} }
}, },
computed: { ...mapState(['user']) }, computed: {
mounted() { ...mapState(['user']),
this.getList() tabs() {
uni.$on('updateList', () => { return [
this.getList() {name: "全部", search: {isPublic: 1}},
}) {name: "个人", search: {isPublic: 0, createUserId: this.user.id}}
]
},
currentSearch() {
return this.tabs?.[this.currentTab]?.search || {}
}
}, },
onShow() { onShow() {
document.title = "电话簿" document.title = "电话簿"
this.getList()
}, },
methods: { methods: {
handleCurrentTab(i) {
this.currentTab = i
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: {
isPublic: 1, ...this.currentSearch,
resource: "portal", resource: "portal",
size: 999, size: 999,
name: this.keyword name: this.keyword
@@ -97,6 +111,7 @@ export default {
::v-deep .fixed { ::v-deep .fixed {
z-index: 9999; z-index: 9999;
} }
.header-top { .header-top {
display: flex; display: flex;
background: #fff; background: #fff;
@@ -104,6 +119,7 @@ export default {
align-items: center; align-items: center;
padding-top: 16px; padding-top: 16px;
} }
// background-color: #F3F6F9; // background-color: #F3F6F9;
.list-content { .list-content {
padding-bottom: 112px; padding-bottom: 112px;
@@ -118,14 +134,17 @@ export default {
.item { .item {
position: relative; position: relative;
} }
.phone-list { .phone-list {
background-color: #fff; background-color: #fff;
width: 100%; width: 100%;
.item-info { .item-info {
width: 680px; width: 680px;
padding: 32px 48px; padding: 32px 48px;
box-sizing: border-box; box-sizing: border-box;
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.02); box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.02);
p { p {
font-size: 32px; font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
@@ -136,6 +155,7 @@ export default {
margin-bottom: 8px; margin-bottom: 8px;
width: 100%; width: 100%;
} }
.phone { .phone {
font-size: 26px; font-size: 26px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
@@ -143,6 +163,7 @@ export default {
line-height: 36px; line-height: 36px;
width: 100%; width: 100%;
word-break: break-all; word-break: break-all;
span { span {
display: inline-block; display: inline-block;
margin-right: 16px; margin-right: 16px;
@@ -152,6 +173,7 @@ export default {
} }
} }
} }
.footer-btn { .footer-btn {
width: 100%; width: 100%;
text-align: center; text-align: center;
@@ -168,9 +190,11 @@ export default {
color: #FFF; color: #FFF;
z-index: 999; z-index: 999;
} }
::v-deep .u-index-anchor { ::v-deep .u-index-anchor {
top: 0 !important; top: 0 !important;
} }
.phone-icon { .phone-icon {
width: 40px; width: 40px;
height: 40px; height: 40px;
@@ -183,6 +207,7 @@ export default {
::v-deep .u-search { ::v-deep .u-search {
margin-bottom: 0 !important; margin-bottom: 0 !important;
} }
.addBtn { .addBtn {
width: 96px; width: 96px;
height: 96px; height: 96px;