feat: 物业公积金静态页面开发And城市选择列表接口联调
This commit is contained in:
parent
91e503a159
commit
20a324aeec
@ -6,5 +6,5 @@ export const apiArr = {
|
||||
getArea:"/api/v2/administrative-division/child-list",//新版获取省市区
|
||||
getParArea:"/api/v2/administrative-division/info",//新版获取省市区
|
||||
|
||||
getRegionList: '/api/v2/wechat/administrative-division-crud/page', // 行政区划信息分页
|
||||
getRegionList: '/api/v2/wechat/administrative-division-crud/list', // 行政区划信息分页
|
||||
}
|
||||
@ -141,7 +141,7 @@ export default {
|
||||
},
|
||||
{
|
||||
name: "物业公积",
|
||||
link: "",
|
||||
link: "/packages/community/providentFund/index",
|
||||
url: "http://192.168.0.172:5500/com_homeIcon3.png",
|
||||
},
|
||||
{
|
||||
|
||||
145
packages/community/providentFund/index.scss
Normal file
145
packages/community/providentFund/index.scss
Normal file
@ -0,0 +1,145 @@
|
||||
page {
|
||||
background-color: #f6f7fb;
|
||||
}
|
||||
.container {
|
||||
.container_body {
|
||||
background: url("http://127.0.0.1:5500/assets/community_providentFund_Group_1523.png") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
.title {
|
||||
margin-top: 11rpx;
|
||||
margin-bottom: 20rpx;
|
||||
text-align: center;
|
||||
font-size: 36rpx;
|
||||
color: #ffffff;
|
||||
}
|
||||
.title_bottom {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: baseline;
|
||||
font-size: 60rpx;
|
||||
color: #ffffff;
|
||||
margin-bottom: 24rpx;
|
||||
view {
|
||||
margin-right: 19rpx;
|
||||
}
|
||||
}
|
||||
.name {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
font-size: 28rpx;
|
||||
color: #ffffff;
|
||||
padding-bottom: 68rpx;
|
||||
text {
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
.main {
|
||||
margin: 20rpx 20rpx 0;
|
||||
.person_info {
|
||||
background: #FFFFFF;
|
||||
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
||||
padding: 26rpx 32rpx 20rpx 20rpx;
|
||||
margin-top: 20rpx;
|
||||
&:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
.item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20rpx;
|
||||
.label {
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
position: relative;
|
||||
.popup {
|
||||
position: absolute;
|
||||
padding: 20rpx;
|
||||
width: 542rpx;
|
||||
top: -200rpx;
|
||||
background: rgba(0,0,0,0.7);
|
||||
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
||||
font-size: 28rpx;
|
||||
color: #FFFFFF;
|
||||
.angle {
|
||||
position: absolute;
|
||||
bottom: -10px; /* 调整箭头位置 */
|
||||
left: 128px;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 10px solid transparent;
|
||||
border-right: 10px solid transparent;
|
||||
border-top: 10px solid rgba(0,0,0,0.7);
|
||||
}
|
||||
}
|
||||
}
|
||||
.fix {
|
||||
display: flex;
|
||||
text {
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
.desc {
|
||||
font-size: 28rpx;
|
||||
color: #222222;
|
||||
}
|
||||
&:last-child{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
width: 600rpx;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
background: linear-gradient( 91deg, #FF7658 0%, #FF370B 100%);
|
||||
border-radius: 100rpx 100rpx 100rpx 100rpx;
|
||||
text-align: center;
|
||||
font-size: 36rpx;
|
||||
color: #FFFFFF;
|
||||
margin: 77rpx auto 0;
|
||||
}
|
||||
.select_Popup {
|
||||
.header {
|
||||
margin: 0 33rpx;
|
||||
height: 93rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.title {
|
||||
font-size: 32rpx;
|
||||
color: #222222;
|
||||
}
|
||||
.close {
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
.line {
|
||||
height: 20rpx;
|
||||
background: #F6F7FB;
|
||||
}
|
||||
.main {
|
||||
max-height: 420rpx;
|
||||
overflow: scroll;
|
||||
margin: 0 20rpx;
|
||||
.item {
|
||||
height: 103rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 1rpx solid #EBEBEB;;
|
||||
text {
|
||||
font-size: 32rpx;
|
||||
color: #222222;
|
||||
}
|
||||
.pic {
|
||||
width: 34rpx;
|
||||
height: 34rpx;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
209
packages/community/providentFund/index.vue
Normal file
209
packages/community/providentFund/index.vue
Normal file
@ -0,0 +1,209 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="container_body" :style="{ paddingTop: top + 'px' }">
|
||||
<view class="title">物业公积金</view>
|
||||
<view class="title_bottom">
|
||||
<view>¥{{ moeny }}</view>
|
||||
<u-icon name="info-circle" size="30rpx" color="linear-gradient( 180deg, #FFFFFF 0%, #FFD7D7 100%);" />
|
||||
</view>
|
||||
<view class="name" @click="headerSwitchClick">
|
||||
<text>{{defaultName.name}}</text>
|
||||
<u-icon name="arrow-right" color="#FFFFFF" size="30rpx" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="main">
|
||||
<view class="person_info" v-for="(item,index) in list" :key="index">
|
||||
<view class="item">
|
||||
<view class="label">姓名</view>
|
||||
<view class="desc">{{ item.name }}</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="label">身份</view>
|
||||
<view class="desc">{{ item.identity }}</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="label">手机号</view>
|
||||
<view class="desc">{{item.mobile}}</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="label">房产总数</view>
|
||||
<view class="desc">{{ item.houseNum }}</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="label fix">
|
||||
<text>物业费公积金总余额</text>
|
||||
<u-icon name="info-circle-fill" size="30rpx" color="red" @click="headerIconClick(index)" />
|
||||
<view class="popup" v-if="item.popupShow" @click="headerIconClick(index)">
|
||||
{{ item.identity == '业主' ? ownerDesc : desc }}
|
||||
<view class="angle"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="desc">¥{{item.fund}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn">去抵扣物业账单</view>
|
||||
|
||||
<u-popup :show="show" :round="50" @close="close">
|
||||
<view class="select_Popup">
|
||||
<view class="header">
|
||||
<view></view>
|
||||
<view class="title">选择房源</view>
|
||||
<view class="close">取消</view>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
<view class="main">
|
||||
<view class="item" v-for="(item,index) in houseList" :key="index" @click="headerConfirmClick(item)">
|
||||
<text>{{ item.name }}</text>
|
||||
<image
|
||||
v-if="item.checked"
|
||||
class="pic"
|
||||
src="http://127.0.0.1:5500/assets/community_providentFund_Group_1444.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
<image
|
||||
v-else
|
||||
class="pic"
|
||||
src="http://127.0.0.1:5500/assets/community_providentFund_Ellipse_160.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
request,
|
||||
picUrl,
|
||||
uniqueByField,
|
||||
menuButtonInfo,
|
||||
} from '../../../utils';
|
||||
|
||||
import { apiArr } from '../../../api/v2Community';
|
||||
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
top: '',
|
||||
moeny: 0.00,
|
||||
show: false,
|
||||
ownerDesc: '本房产的物业公积金为该房产的所有成员物业公积金总和。无需经过成员同意便可用于本房产的物业费抵扣,一旦成功抵扣,成员所拥有的物业公积金将自动进行扣除。',
|
||||
desc: '物业公积金可通用至您加入的所有房产,任一房产的物业相关费用均可用该物业公积金抵扣。',
|
||||
defaultName: '',
|
||||
list: [
|
||||
{
|
||||
name: '高尚',
|
||||
identity: '业主',
|
||||
mobile: '15931111111',
|
||||
houseNum: '9',
|
||||
fund: '50.00',
|
||||
popupShow: false
|
||||
},
|
||||
{
|
||||
name: '李明',
|
||||
identity: '家属',
|
||||
mobile: '15931111122',
|
||||
houseNum: '6',
|
||||
fund: '50.00',
|
||||
popupShow: false
|
||||
},
|
||||
{
|
||||
name: '王五',
|
||||
identity: '租户',
|
||||
mobile: '15931111316',
|
||||
houseNum: '2',
|
||||
fund: '50.00',
|
||||
popupShow: false
|
||||
}
|
||||
],
|
||||
houseList: [
|
||||
{
|
||||
name: '2323世纪名城1号楼1单元101室',
|
||||
checked: false,
|
||||
},
|
||||
{
|
||||
name: '2323世纪名城1号楼1单元102室',
|
||||
checked: false,
|
||||
},
|
||||
{
|
||||
name: '2323世纪名城1号楼1单元103室',
|
||||
checked: false,
|
||||
},
|
||||
{
|
||||
name: '2323世纪名城1号楼1单元104室',
|
||||
checked: false,
|
||||
},
|
||||
{
|
||||
name: '2323世纪名城1号楼1单元105室',
|
||||
checked: false,
|
||||
},
|
||||
{
|
||||
name: '2323世纪名城1号楼1单元201室',
|
||||
checked: false,
|
||||
},
|
||||
{
|
||||
name: '2323世纪名城1号楼1单元202室',
|
||||
checked: false,
|
||||
},
|
||||
{
|
||||
name: '2323世纪名城1号楼1单元203室',
|
||||
checked: false,
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.defaultName = {
|
||||
...this.houseList[0],
|
||||
checked: true
|
||||
};
|
||||
const meun = menuButtonInfo();
|
||||
this.top = meun.height + meun.top;
|
||||
},
|
||||
|
||||
|
||||
methods: {
|
||||
headerConfirmClick(item) {
|
||||
this.defaultName = {
|
||||
...item,
|
||||
checked: true
|
||||
};
|
||||
this.show = false;
|
||||
},
|
||||
headerSwitchClick() {
|
||||
this.show = true;
|
||||
const newRes = this.houseList.map(item => {
|
||||
if (item.name === this.defaultName.name) {
|
||||
return {
|
||||
...item,
|
||||
checked: true
|
||||
}
|
||||
}
|
||||
return {
|
||||
...item,
|
||||
checked: false
|
||||
}
|
||||
});
|
||||
console.log('newResnewRes', newRes);
|
||||
this.houseList = newRes;
|
||||
},
|
||||
|
||||
headerIconClick(ind) {
|
||||
this.list[ind].popupShow = !this.list[ind].popupShow
|
||||
},
|
||||
|
||||
close() {
|
||||
this.show = false;
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import './index.scss';
|
||||
|
||||
</style>
|
||||
@ -220,6 +220,14 @@
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "providentFund/index",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "ownerList/index",
|
||||
"style": {}
|
||||
|
||||
@ -93,18 +93,13 @@
|
||||
|
||||
<script>
|
||||
import { apiArr } from "../../api/area.js";
|
||||
import { apiArr as areaApi } from "../../api/area.js";
|
||||
import { util, picUrl, request, menuButtonInfo } from "../../utils/index.js";
|
||||
|
||||
import { pinyin } from "pinyin-pro";
|
||||
console.log(pinyin("汉语拼音"), "zz");
|
||||
import { request } from "../../utils/index.js";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
location: {},
|
||||
searchValue: "",
|
||||
currentCity: "衡水",
|
||||
hotCities: [
|
||||
"上海",
|
||||
"北京",
|
||||
@ -123,62 +118,7 @@ export default {
|
||||
"武汉",
|
||||
"无锡",
|
||||
],
|
||||
rawData: [
|
||||
{
|
||||
id: 1,
|
||||
name: "阿巴嘎旗",
|
||||
letters: "A",
|
||||
lat: "39.908823",
|
||||
long: "116.39747",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "阿坝",
|
||||
letters: "A",
|
||||
lat: "31.196322",
|
||||
long: "121.339841",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: "阿坝县",
|
||||
letters: "A",
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: "阿城区",
|
||||
letters: "A",
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: "阿尔山市",
|
||||
letters: "B",
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
name: "阿合奇县",
|
||||
letters: "B",
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
name: "阿克塞哈萨克族自治县",
|
||||
letters: "B",
|
||||
},
|
||||
{
|
||||
id: 8,
|
||||
name: "阿克苏地区",
|
||||
letters: "C",
|
||||
},
|
||||
{
|
||||
id: 9,
|
||||
name: "阿克苏市",
|
||||
letters: "D",
|
||||
},
|
||||
{
|
||||
id: 10,
|
||||
name: "阿拉尔",
|
||||
letters: "E",
|
||||
},
|
||||
],
|
||||
// 右侧字母列表
|
||||
letters: [
|
||||
"A",
|
||||
"B",
|
||||
@ -207,7 +147,6 @@ export default {
|
||||
"Y",
|
||||
"Z",
|
||||
],
|
||||
groupedData: [], // 分组后的数据
|
||||
activeId: "", // 当前高亮的字母区域 ID
|
||||
activeLetter: "", // 当前高亮的字母
|
||||
searchRes: [
|
||||
@ -231,13 +170,14 @@ export default {
|
||||
},
|
||||
],
|
||||
|
||||
proviceList: [],
|
||||
cityList: [],
|
||||
cityList: [], // 接口请求返回参数信息
|
||||
groupedData: [], // 分组后的数据
|
||||
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
onLoad() {
|
||||
this.location = uni.getStorageSync("location");
|
||||
this.getArea();
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
headerSelectMapClick(item) {
|
||||
@ -282,6 +222,7 @@ export default {
|
||||
this.searchValue = e;
|
||||
console.log("搜ee索:", e);
|
||||
},
|
||||
|
||||
groupData() {
|
||||
const map = {};
|
||||
this.letters.forEach((letter) => {
|
||||
@ -296,15 +237,13 @@ export default {
|
||||
map[item.letters].list.push(item);
|
||||
}
|
||||
});
|
||||
console.log(
|
||||
"112312313",
|
||||
Object.values(map).filter((group) => group.list.length > 0)
|
||||
);
|
||||
|
||||
// 过滤掉没有数据的字母
|
||||
this.groupedData = Object.values(map).filter(
|
||||
(group) => group.list.length > 0
|
||||
);
|
||||
},
|
||||
|
||||
// 点击字母滚动到对应区域
|
||||
scrollToLetter(letter) {
|
||||
this.$nextTick(() => {
|
||||
@ -312,6 +251,21 @@ export default {
|
||||
this.activeLetter = letter;
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
async init() {
|
||||
const res = await request(apiArr.getRegionList, 'POST', {
|
||||
page_num: 1,
|
||||
page_size: 100,
|
||||
});
|
||||
console.log('111111', res);
|
||||
this.cityList = res.rows;
|
||||
const hotsList = res.rows.filter((item) => item.hot === 2);
|
||||
console.log('热门城市信息', hotsList);
|
||||
|
||||
await this.groupData();
|
||||
},
|
||||
|
||||
// 滚动时监听当前位置
|
||||
handleScroll(e) {
|
||||
const query = uni.createSelectorQuery().in(this);
|
||||
@ -333,59 +287,6 @@ export default {
|
||||
this.activeLetter = activeLetter;
|
||||
}
|
||||
},
|
||||
|
||||
async getArea() {
|
||||
let that = this;
|
||||
const res = await request(apiArr.getRegionList, 'POST', {
|
||||
page_num: 1,
|
||||
page_size: 100,
|
||||
});
|
||||
console.log('111111', res);
|
||||
this.cityList = res.rows;
|
||||
await this.groupData();
|
||||
return
|
||||
request(areaApi.getArea, "POST", {}).then((res) => {
|
||||
this.proviceList = res.rows;
|
||||
this.proviceList.forEach((item) => {
|
||||
that.getCity(item.ad_code);
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
getCity(e) {
|
||||
request(areaApi.getArea, "POST", { parent_ad_code: e }).then((res) => {
|
||||
const citiesWithLetters = res.rows.map((city) => {
|
||||
const firstChar = city.ad_name.charAt(0);
|
||||
// 检查是否是英文字母
|
||||
if (/^[A-Za-z]$/.test(firstChar)) {
|
||||
return { ...city, letters: firstChar.toUpperCase() };
|
||||
}
|
||||
// 使用 pinyin-pro 获取首个拼音并转为大写
|
||||
const firstPinyin = pinyin(firstChar, {
|
||||
pattern: "first",
|
||||
type: "array",
|
||||
toneType: "none",
|
||||
});
|
||||
const firstPinyinChar = firstPinyin[0]
|
||||
? firstPinyin[0].toUpperCase()
|
||||
: "#";
|
||||
// 验证转换结果是否为有效字母,无效则标记为 '#'
|
||||
|
||||
const letter = /^[A-Z]$/.test(firstPinyinChar)
|
||||
? firstPinyinChar
|
||||
: "#";
|
||||
if (letter === "#") {
|
||||
console.log("当前城市", city.short_name);
|
||||
}
|
||||
return { ...city, letters: letter };
|
||||
});
|
||||
this.cityList = this.cityList.concat(citiesWithLetters);
|
||||
console.log(
|
||||
"this.cityList.concat(citiesWithLetters);this.cityList.concat(citiesWithLetters);",
|
||||
this.cityList.concat(citiesWithLetters)
|
||||
);
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
File diff suppressed because one or more lines are too long
1
unpackage/dist/dev/mp-weixin/app.json
vendored
1
unpackage/dist/dev/mp-weixin/app.json
vendored
@ -53,6 +53,7 @@
|
||||
"chooseMsg/index",
|
||||
"chooseMsgInfo/index",
|
||||
"serverList/index",
|
||||
"providentFund/index",
|
||||
"ownerList/index",
|
||||
"propertyPayment/index"
|
||||
]
|
||||
|
||||
10480
unpackage/dist/dev/mp-weixin/common/vendor.js
vendored
10480
unpackage/dist/dev/mp-weixin/common/vendor.js
vendored
File diff suppressed because it is too large
Load Diff
@ -8,11 +8,32 @@
|
||||
"miniprogram": {
|
||||
"list": [
|
||||
{
|
||||
"name": "pages/shopcity/shopcity",
|
||||
"pathName": "pages/shopcity/shopcity",
|
||||
"name": "省市区联动",
|
||||
"pathName": "packages/communityService/reservationApply/index",
|
||||
"query": "",
|
||||
"scene": null,
|
||||
"launchMode": "default"
|
||||
},
|
||||
{
|
||||
"name": "packages/community/providentFund/index",
|
||||
"pathName": "packages/community/providentFund/index",
|
||||
"query": "",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "packages/community/index/index",
|
||||
"pathName": "packages/community/index/index",
|
||||
"query": "",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "pages/shopcity/shopcity",
|
||||
"pathName": "pages/shopcity/shopcity",
|
||||
"query": "",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user