物业缴费-v1
This commit is contained in:
commit
a44b8dc457
39
README-zh.md
Normal file
39
README-zh.md
Normal file
@ -0,0 +1,39 @@
|
||||
Git 提交规范
|
||||
- feat 新增功能
|
||||
- fix 修复 Bug
|
||||
- docs 文档更新(如 README、CHANGELOG 等)
|
||||
- style 代码样式调整(如空格、格式化等,不涉及功能变更)
|
||||
- refactor 代码重构(既不修复 Bug 也不新增功能)
|
||||
- perf 性能优化
|
||||
- test 添加或修改测试代码
|
||||
- chore 构建过程或辅助工具的变动(如依赖更新、配置文件修改等)
|
||||
- revert 回滚之前的提交
|
||||
|
||||
|
||||
代码规范
|
||||
- 使用v-for时必须添加:key
|
||||
- 组件props必须定义类型和默认值
|
||||
- 复杂逻辑必须添加注释
|
||||
- 敏感信息不硬编码
|
||||
- 变量/函数:小驼峰式命名 (camelCase)
|
||||
- 组件/类:小驼峰式命名 (pascalCase)
|
||||
- 合理使用缓存
|
||||
- 避免不必要的重渲染
|
||||
- 工具函数放在/utils目录
|
||||
- 公共组件放在/components目录
|
||||
|
||||
|
||||
常见 class 命名规范
|
||||
- container 用于页面最外层容器
|
||||
- header 头部区域
|
||||
- main 主要内容区域
|
||||
- footer 底部区域
|
||||
- left 左侧区域
|
||||
- right 右侧区域
|
||||
- title 标题
|
||||
- nav 导航区域
|
||||
- banner 轮播图/广告 区域
|
||||
- tabs 标签区域
|
||||
- list 列表区域
|
||||
|
||||
|
||||
@ -14,6 +14,8 @@ export const apiArr = {
|
||||
navPage: '/api/v2/wechat/community-navigation-crud/page', // 小区图标导航信息分页
|
||||
advPage: '/api/v2/wechat/community-advertisement-crud/page', // 小区广告信息分页
|
||||
|
||||
commInfo: '/api/v2/wechat/nav-display-crud/comm/info', // 小区导航设置信息详情
|
||||
|
||||
categoryPage: '/api/v2/wechat/announcement-category-crud/page', // 公告分类信息分页
|
||||
infoPage: '/api/v2/wechat/announcement-crud/page', // 公告信息分页
|
||||
getAnnounceInfo:"/api/v2/wechat/announcement-crud/info" ,//公告详情
|
||||
|
||||
@ -145,8 +145,8 @@ export default {
|
||||
|
||||
// 点击确定传递当前选中省市区信息给父方法
|
||||
onOk() {
|
||||
const { confirmProv, confirmCity, confirmDist } = this;
|
||||
this.$emit('selectArea', { confirmProv, confirmCity, confirmDist });
|
||||
const { confirmProv1, confirmProv, xsq, confirmCity, confirmDist } = this;
|
||||
this.$emit('selectArea', { confirmProv: confirmProv1, confirmCity: xsq.ad_name ? xsq : confirmCity, confirmDist });
|
||||
},
|
||||
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<div class="currentAdd">
|
||||
<div class="currentAdd_left">河北省衡水市桃城区</div>
|
||||
<div class="currentAdd_left">{{city.region}}</div>
|
||||
<div class="currentAdd_right" @click="changeAddress">
|
||||
切换城市
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_choseAddress.png"></image>
|
||||
@ -158,7 +158,7 @@
|
||||
searchQuery: '',
|
||||
filteredFloorsList: [],
|
||||
searchList: [],
|
||||
|
||||
city: uni.getStorageSync('location'),
|
||||
currentCommunity:""
|
||||
}
|
||||
},
|
||||
@ -169,8 +169,13 @@
|
||||
close() {
|
||||
this.show = false
|
||||
},
|
||||
selectArea(e1) {
|
||||
console.log(e1);
|
||||
selectArea(val) {
|
||||
console.log(val);
|
||||
this.city = {
|
||||
region: val.confirmDist.ad_name.split(',').join(''),
|
||||
...val.confirmDist
|
||||
}
|
||||
this.searchByName();
|
||||
this.show = false
|
||||
},
|
||||
async searchByName() {
|
||||
@ -179,7 +184,7 @@
|
||||
community_id: '',
|
||||
name: this.communityName,
|
||||
comm_code: '',
|
||||
ad_code: uni.getStorageSync('ad_code'),
|
||||
ad_code: this.city.ad_code ? this.city.ad_code : uni.getStorageSync('ad_code'),
|
||||
page_num: this.page_num,
|
||||
page_size: this.page_size
|
||||
}).then(res => {
|
||||
|
||||
@ -144,6 +144,9 @@ image {
|
||||
margin: 0 auto;
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
.ads_first{
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.tabs {
|
||||
margin-top: 32rpx;
|
||||
@ -296,4 +299,10 @@ image {
|
||||
justify-content: center;
|
||||
font-size: 36rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.grid_Pic {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
@ -39,14 +39,23 @@
|
||||
</swiper>
|
||||
</div>
|
||||
|
||||
<div class="funcList">
|
||||
<!-- <div class="funcList">
|
||||
<div class="funcItem" v-for="item in functionList" @click="jump(item.mini_program_url)">
|
||||
<image :src="item.nav_icon"></image>
|
||||
{{ item.nav_name }}
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div v-for="(item, index) in tileList" :key="index" class="ads" @click="headerServerClick(item)">
|
||||
<view class="funcList">
|
||||
<u-grid :col="rowNum" :border="false">
|
||||
<u-grid-item v-for="(item, index) in functionList" @click="jump(iteitem.mini_program_urlm)" :key="index">
|
||||
<image class="grid_Pic" :src="item.nav_icon" mode=""></image>
|
||||
<text>{{ item.nav_name }}</text>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
</view>
|
||||
|
||||
<div v-for="(item, index) in tileList" :key="index" :class="['ads', index == 0 ? 'ads_first' : '']" @click="headerServerClick(item)">
|
||||
<image :src="item.ad_picture" mode="aspectFill" />
|
||||
</div>
|
||||
|
||||
@ -58,7 +67,7 @@
|
||||
</div>
|
||||
|
||||
<div class="newsList">
|
||||
<div class="newsItem" v-for="item in infoList" @click="detail(item)">
|
||||
<div class="newsItem" v-for="item in infoList" @click="detail(item)" :key="item.id">
|
||||
<div class="newsItem_left">
|
||||
<div class="newsItem_left_tit">{{item.title}}</div>
|
||||
<div class="newsItem_left_sub">{{item.author}}</div>
|
||||
@ -82,7 +91,8 @@
|
||||
</swiper>
|
||||
</div>
|
||||
<div class="close" @click="closeAds">
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_close.png"></image>
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_close.png">
|
||||
</image>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -151,7 +161,10 @@
|
||||
infoList: [],
|
||||
selectedTab: 0,
|
||||
|
||||
currentAdIndex: 0
|
||||
currentAdIndex: 0,
|
||||
|
||||
rowNum: 0,
|
||||
colNum: 0,
|
||||
}
|
||||
},
|
||||
async onLoad(options) {
|
||||
@ -165,7 +178,7 @@
|
||||
}
|
||||
|
||||
this.communityVal = uni.getStorageSync('changeCommData').name
|
||||
await this.getfunctionList()
|
||||
await this.getfunctionNum()
|
||||
this.getAdvertising()
|
||||
this.getCategoryList()
|
||||
|
||||
@ -187,7 +200,10 @@
|
||||
this.ads2Show = false
|
||||
},
|
||||
jump(e) {
|
||||
console.log(e);
|
||||
if(!e) {
|
||||
this.NotOpen();
|
||||
return;
|
||||
}
|
||||
NavgateTo(e)
|
||||
},
|
||||
|
||||
@ -217,19 +233,47 @@
|
||||
// 获取当前轮播图索引
|
||||
this.currentIdx = event.detail.current;
|
||||
},
|
||||
|
||||
async getfunctionNum() {
|
||||
const res = await request(apiArr.commInfo, "POST", {}, {
|
||||
slice: false
|
||||
});
|
||||
this.rowNum = res.nav_row_num_comm
|
||||
this.colNum = res.nav_row_total_comm
|
||||
return await this.getfunctionList()
|
||||
},
|
||||
|
||||
// async getfunctionList() {
|
||||
// const res = await request(apiArr.navPage, "POST", {
|
||||
// community_id: Number(uni.getStorageSync('changeCommData').id),
|
||||
// page_num: 1,
|
||||
// page_size: 50
|
||||
// })
|
||||
// this.functionList = res.rows.map(item => {
|
||||
// return {
|
||||
// ...item,
|
||||
// nav_icon: picUrl + item.nav_icon
|
||||
// };
|
||||
// });
|
||||
// console.log(this.functionList)
|
||||
// },
|
||||
async getfunctionList() {
|
||||
const res = await request(apiArr.navPage, "POST", {
|
||||
community_id: Number(uni.getStorageSync('changeCommData').id),
|
||||
page_num: 1,
|
||||
page_size: 50
|
||||
})
|
||||
this.functionList = res.rows.map(item => {
|
||||
});
|
||||
// 获取 rowNum 和 colNum 的乘积
|
||||
const totalItems = this.rowNum * this.colNum;
|
||||
// 使用 slice 方法截取前 totalItems 个元素
|
||||
this.functionList = res.rows.slice(0, totalItems).map(item => {
|
||||
return {
|
||||
...item,
|
||||
nav_icon: picUrl + item.nav_icon
|
||||
};
|
||||
});
|
||||
console.log(this.functionList)
|
||||
|
||||
console.log('functionList', this.functionList);
|
||||
},
|
||||
|
||||
async getAdvertising() {
|
||||
|
||||
@ -7,10 +7,10 @@
|
||||
</view>
|
||||
|
||||
|
||||
<div class="Tit">再生资源回收,让我们一起行动起来!</div>
|
||||
<div class="subTit">衡水繁花似锦物业管理有限公司 2025年6月6日10:37:27</div>
|
||||
<div class="Tit">{{Info.title}}</div>
|
||||
<div class="subTit">{{Info.author}} {{Info.publish_time}}</div>
|
||||
<div class="Con">
|
||||
再生资源回收是一项对我们社会和小区都有益的活动。通过回收再利用废纸、废金属、废塑料、废玻璃和废电子产品等再生资源,我们不仅可以保护环境,还能为我们的小区带来诸多好处。
|
||||
<rich-text :nodes="Info.content"></rich-text>
|
||||
</div>
|
||||
|
||||
</view>
|
||||
@ -35,7 +35,8 @@ export default {
|
||||
return {
|
||||
top: "",
|
||||
localHeight: "",
|
||||
id:""
|
||||
id:"",
|
||||
Info:""
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
@ -55,6 +56,7 @@ export default {
|
||||
id:Number(this.id)
|
||||
}).then(res=>{
|
||||
console.log(res);
|
||||
this.Info = res
|
||||
})
|
||||
},
|
||||
back() {
|
||||
|
||||
@ -90,7 +90,7 @@
|
||||
show: false,
|
||||
show2: false,
|
||||
baseList: [{
|
||||
image: "",
|
||||
image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/page_user_Group_1568.png",
|
||||
name: "订单",
|
||||
url: "",
|
||||
}],
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
<!-- 宫格列表 -->
|
||||
<view class="tabList">
|
||||
<u-grid col="5" :border="false">
|
||||
<u-grid :col="rowNum" :border="false">
|
||||
<u-grid-item v-for="(item, index) in tabList" @click="headerServerClick(item)" :key="index">
|
||||
<image class="grid_Pic" :src="item.icon_src" mode=""></image>
|
||||
<text>{{ item.title }}</text>
|
||||
@ -191,6 +191,7 @@ export default {
|
||||
// 精确到xx路 信息
|
||||
let preciseLocation = {
|
||||
cityName: address_component.city, // 市区
|
||||
region: address_component.province + address_component.city + address_component.district, // 省市区
|
||||
// 无街道xx号的地方,则定位到xx街道附近 无精确到xx号
|
||||
district: address_component.district + `${address_component.street_number ? address_component.street_number : address_component.street}`, // 详细地址
|
||||
address: address_component.city + address_component.district + address_component.street_number, // 详细地址
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -6719,6 +6719,9 @@ var apiArr = {
|
||||
advPage: '/api/v2/wechat/community-advertisement-crud/page',
|
||||
// 小区广告信息分页
|
||||
|
||||
commInfo: '/api/v2/wechat/nav-display-crud/comm/info',
|
||||
// 小区导航设置信息详情
|
||||
|
||||
categoryPage: '/api/v2/wechat/announcement-category-crud/page',
|
||||
// 公告分类信息分页
|
||||
infoPage: '/api/v2/wechat/announcement-crud/page',
|
||||
|
||||
@ -351,6 +351,8 @@ var _default = {
|
||||
preciseLocation = {
|
||||
cityName: address_component.city,
|
||||
// 市区
|
||||
region: address_component.province + address_component.city + address_component.district,
|
||||
// 省市区
|
||||
// 无街道xx号的地方,则定位到xx街道附近 无精确到xx号
|
||||
district: address_component.district + "".concat(address_component.street_number ? address_component.street_number : address_component.street),
|
||||
// 详细地址
|
||||
|
||||
@ -1 +1 @@
|
||||
<block wx:if="{{loading}}"><view class="container" style="{{'margin-top:'+(top+'px')+';'}}"><view class="white_container"><view class="searchBox" style="{{'height:'+(localHeight+'px')+';'}}"><view data-event-opts="{{[['tap',[['map',['$event']]]]]}}" class="searchBox_add" bindtap="__e"><image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/Index_add.png" mode="widthFix"></image><view>{{''+(currentCity.cityName||'选择城市')+''}}</view></view></view><view class="swiper"><swiper autoplay="{{true}}" circular="{{true}}" data-event-opts="{{[['animationfinish',[['swipers',['$event']]]]]}}" bindanimationfinish="__e"><block wx:for="{{bannerList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><swiper-item data-event-opts="{{[['tap',[['headerServerClick',['$0'],[[['bannerList','',index]]]]]]]}}" bindtap="__e"><image src="{{item.pic_src}}" mode="aspectFill"></image></swiper-item></block></swiper><view class="cirList"><block wx:for="{{bannerList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="{{['cir',currentIdx==index?'active':'']}}"></view></block></view></view><view class="tabList"><u-grid vue-id="8dd740cc-1" col="5" border="{{false}}" bind:__l="__l" vue-slots="{{['default']}}"><block wx:for="{{tabList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><u-grid-item bind:click="__e" vue-id="{{('8dd740cc-2-'+index)+','+('8dd740cc-1')}}" data-event-opts="{{[['^click',[['headerServerClick',['$0'],[[['tabList','',index]]]]]]]}}" bind:__l="__l" vue-slots="{{['default']}}"><image class="grid_Pic" src="{{item.icon_src}}" mode></image><text>{{item.title}}</text></u-grid-item></block></u-grid></view></view><view class="white_container margin_top20 padding_bottom32"><block wx:if="{{!currentCity.district}}"><view class="Tit">定位错误 未知区域</view></block><block wx:else><view class="Tit"><view class="local">{{currentCity.district}}</view>附近<view class="Tit_desc">公积金补贴商户</view></view></block><view class="serverList"><view class="serverList_left"><swiper><block wx:for="{{homeLeftList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><swiper-item><image src="{{item.pic_src}}" alt mode="aspectFit"></image></swiper-item></block></swiper></view><view class="serverList_right"><block wx:for="{{homeRightList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['headerServerClick',['$0'],[[['homeRightList','',index]]]]]]]}}" class="{{['serverItem','serverItem'+(index+1)]}}" bindtap="__e"><view class="serverTit">{{item.title}}</view><image src="{{item.pic_src}}" mode></image></view></block></view></view><view data-event-opts="{{[['tap',[['headershopEnterClick',['$event']]]]]}}" class="merchant" bindtap="__e">商户申请入驻</view></view><view class="white_container margin_top20 main padding_bottom32"><block wx:for="{{bottomList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><image class="list_pic" src="{{item.pic_src}}" mode></image></block></view><block wx:if="{{flag}}"><view class="more">{{"下拉加载后续10条,共计"+bottomTotal+"条"}}</view></block><nav-footer vue-id="8dd740cc-3" data-com-type="wx" bind:__l="__l"></nav-footer></view></block>
|
||||
<block wx:if="{{loading}}"><view class="container" style="{{'margin-top:'+(top+'px')+';'}}"><view class="white_container"><view class="searchBox" style="{{'height:'+(localHeight+'px')+';'}}"><view data-event-opts="{{[['tap',[['map',['$event']]]]]}}" class="searchBox_add" bindtap="__e"><image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/Index_add.png" mode="widthFix"></image><view>{{''+(currentCity.cityName||'选择城市')+''}}</view></view></view><view class="swiper"><swiper autoplay="{{true}}" circular="{{true}}" data-event-opts="{{[['animationfinish',[['swipers',['$event']]]]]}}" bindanimationfinish="__e"><block wx:for="{{bannerList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><swiper-item data-event-opts="{{[['tap',[['headerServerClick',['$0'],[[['bannerList','',index]]]]]]]}}" bindtap="__e"><image src="{{item.pic_src}}" mode="aspectFill"></image></swiper-item></block></swiper><view class="cirList"><block wx:for="{{bannerList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="{{['cir',currentIdx==index?'active':'']}}"></view></block></view></view><view class="tabList"><u-grid vue-id="8dd740cc-1" col="{{rowNum}}" border="{{false}}" bind:__l="__l" vue-slots="{{['default']}}"><block wx:for="{{tabList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><u-grid-item bind:click="__e" vue-id="{{('8dd740cc-2-'+index)+','+('8dd740cc-1')}}" data-event-opts="{{[['^click',[['headerServerClick',['$0'],[[['tabList','',index]]]]]]]}}" bind:__l="__l" vue-slots="{{['default']}}"><image class="grid_Pic" src="{{item.icon_src}}" mode></image><text>{{item.title}}</text></u-grid-item></block></u-grid></view></view><view class="white_container margin_top20 padding_bottom32"><block wx:if="{{!currentCity.district}}"><view class="Tit">定位错误 未知区域</view></block><block wx:else><view class="Tit"><view class="local">{{currentCity.district}}</view>附近<view class="Tit_desc">公积金补贴商户</view></view></block><view class="serverList"><view class="serverList_left"><swiper><block wx:for="{{homeLeftList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><swiper-item><image src="{{item.pic_src}}" alt mode="aspectFit"></image></swiper-item></block></swiper></view><view class="serverList_right"><block wx:for="{{homeRightList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['headerServerClick',['$0'],[[['homeRightList','',index]]]]]]]}}" class="{{['serverItem','serverItem'+(index+1)]}}" bindtap="__e"><view class="serverTit">{{item.title}}</view><image src="{{item.pic_src}}" mode></image></view></block></view></view><view data-event-opts="{{[['tap',[['headershopEnterClick',['$event']]]]]}}" class="merchant" bindtap="__e">商户申请入驻</view></view><view class="white_container margin_top20 main padding_bottom32"><block wx:for="{{bottomList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><image class="list_pic" src="{{item.pic_src}}" mode></image></block></view><block wx:if="{{flag}}"><view class="more">{{"下拉加载后续10条,共计"+bottomTotal+"条"}}</view></block><nav-footer vue-id="8dd740cc-3" data-com-type="wx" bind:__l="__l"></nav-footer></view></block>
|
||||
Loading…
x
Reference in New Issue
Block a user