eslint
This commit is contained in:
@@ -3,8 +3,7 @@
|
|||||||
<div class="areaSelection">
|
<div class="areaSelection">
|
||||||
<div class="area">区域选择</div>
|
<div class="area">区域选择</div>
|
||||||
<div class="select">
|
<div class="select">
|
||||||
<ai-area-picker ref="area" class="ai-area" :value="areaId" :name.sync="areaName" :areaId="$areaId"
|
<ai-area-picker ref="area" class="ai-area" :value="areaId" :name.sync="areaName" :areaId="$areaId" @select="areaSelect">
|
||||||
@select="areaSelect">
|
|
||||||
<div class="ai-area__wrapper">
|
<div class="ai-area__wrapper">
|
||||||
<span class="label" v-if="areaName">{{ areaName }}</span>
|
<span class="label" v-if="areaName">{{ areaName }}</span>
|
||||||
<span v-else>请选择</span>
|
<span v-else>请选择</span>
|
||||||
@@ -16,9 +15,8 @@
|
|||||||
<template v-if="list.length">
|
<template v-if="list.length">
|
||||||
<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">
|
||||||
<u-index-anchor :index="letter"/>
|
<u-index-anchor :index="letter" />
|
||||||
<div class="item" hover-class="bg-hover" @click="phone(item)"
|
<div class="item" hover-class="bg-hover" @click="phone(item)" v-for="(item, index) in list.filter((e) => e.nameInitials == letter)" :key="index">
|
||||||
v-for="(item, index) in list.filter(e=>e.nameInitials==letter)" :key="index">
|
|
||||||
<label>{{ item.name }}</label>
|
<label>{{ item.name }}</label>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
{{ item.type }}<span>{{ item.phone }}</span>
|
{{ item.type }}<span>{{ item.phone }}</span>
|
||||||
@@ -32,11 +30,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {mapState} from 'vuex'
|
import { mapState } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "AppAddressBook",
|
name: 'AppAddressBook',
|
||||||
appName: "便民通讯录",
|
appName: '便民通讯录',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
scrollTop: 0,
|
scrollTop: 0,
|
||||||
@@ -49,34 +47,36 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.userInfo = uni.getStorageSync("userInfo");
|
this.userInfo = uni.getStorageSync('userInfo')
|
||||||
this.areaId = this.$areaId
|
this.areaId = this.$areaId
|
||||||
this.areaName = this.$areaName
|
this.areaName = this.$areaName
|
||||||
this.getList();
|
this.getList()
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['user'])
|
...mapState(['user']),
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
phone({phone: phoneNumber}) {
|
phone({ phone: phoneNumber }) {
|
||||||
uni.makePhoneCall({phoneNumber});
|
uni.makePhoneCall({ phoneNumber })
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
this.$instance.post("/app/appconvenientaddressbook/list", null, {
|
this.$instance
|
||||||
params: {
|
.post('/app/appconvenientaddressbook/list', null, {
|
||||||
isPublic: 1,
|
params: {
|
||||||
resource: "portal",
|
isPublic: 1,
|
||||||
areaId: this.areaId,
|
resource: 'portal',
|
||||||
size: 999
|
areaId: this.areaId,
|
||||||
}
|
size: 999,
|
||||||
}).then(res => {
|
},
|
||||||
if (res?.data) {
|
})
|
||||||
this.indexList = [...new Set(res.data.records.map(e => e.nameInitials))];
|
.then((res) => {
|
||||||
this.list = res.data.records;
|
if (res?.data) {
|
||||||
}
|
this.indexList = [...new Set(res.data.records.map((e) => e.nameInitials))]
|
||||||
})
|
this.list = res.data.records
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
areaSelect(v) {
|
areaSelect(v) {
|
||||||
this.areaId = v
|
this.areaId = v
|
||||||
@@ -90,9 +90,8 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
onPageScroll(e) {
|
onPageScroll(e) {
|
||||||
this.scrollTop = e.scrollTop;
|
this.scrollTop = e.scrollTop
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -105,7 +104,7 @@ export default {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 120px;
|
height: 120px;
|
||||||
line-height: 120px;
|
line-height: 120px;
|
||||||
background-color: #FFFF;
|
background-color: #ffff;
|
||||||
|
|
||||||
.select {
|
.select {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
@@ -115,7 +114,7 @@ export default {
|
|||||||
.item {
|
.item {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 32px 48px;
|
padding: 32px 48px;
|
||||||
background: #FFFFFF;
|
background: #ffffff;
|
||||||
box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.02);
|
box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.02);
|
||||||
|
|
||||||
& > label {
|
& > label {
|
||||||
|
|||||||
Reference in New Issue
Block a user