完成 - 湖畔社区模块
This commit is contained in:
parent
7b656c7a9f
commit
e1c286058c
@ -1,53 +1,55 @@
|
|||||||
export const apiArr = {
|
export const apiArr = {
|
||||||
isShowSearch: '/api/v1/wechat/home-page/search-enable/info', // 获取搜索框是否显示
|
isShowSearch: "/api/v1/wechat/home-page/search-enable/info", // 获取搜索框是否显示
|
||||||
hotWord: '/api/v1/wechat/home-page/search-hot-word/info', // 获取搜索框热词
|
hotWord: "/api/v1/wechat/home-page/search-hot-word/info", // 获取搜索框热词
|
||||||
list: '/api/v1/wechat/community/list', // 获取社区列表
|
list: "/api/v1/wechat/community/list", // 获取社区列表
|
||||||
info: '/api/v1/wechat/community/info', // 获取单个社区信息
|
info: "/api/v1/wechat/community/info", // 获取单个社区信息
|
||||||
isJoin: '/api/v1/wechat/community/is-join', // 用户是否加入社区、楼宇、房间
|
isJoin: "/api/v1/wechat/community/is-join", // 用户是否加入社区、楼宇、房间
|
||||||
tipsList: '/api/v1/wechat/community/tips/list', // 获取全部通知列表
|
tipsList: "/api/v1/wechat/community/tips/list", // 获取全部通知列表
|
||||||
oneTips: '/api/v1/wechat/community/tips/one', // 获取单个社区通知
|
oneTips: "/api/v1/wechat/community/tips/one", // 获取单个社区通知
|
||||||
apply: '/api/v1/wechat/community/apply', // 申请加入小区
|
apply: "/api/v1/wechat/community/apply", // 申请加入小区
|
||||||
getFacilityList: '/api/v1/wechat/community/facility/list', //获取楼号,
|
getFacilityList: "/api/v1/wechat/community/facility/list", //获取楼号,
|
||||||
getRoomList: '/api/v1/wechat/community/room/list', //获取房间号
|
getRoomList: "/api/v1/wechat/community/room/list", //获取房间号
|
||||||
ownerList: '/api/v1/wechat/community/owner/list', // 获取社区业主列表
|
ownerList: "/api/v1/wechat/community/owner/list", // 获取社区业主列表
|
||||||
|
|
||||||
submit: "/api/v1/wechat/community/owner/feedback-create", //报修提交
|
submit: "/api/v1/wechat/community/owner/feedback-create", //报修提交
|
||||||
getListByRepair: "/api/v1/wechat/community/owner/feedback-list",//报事报修列表
|
getListByRepair: "/api/v1/wechat/community/owner/feedback-list", //报事报修列表
|
||||||
getInfoById: "/api/v1/wechat/community/owner/feedback-info", //报事报修根据id查询详情
|
getInfoById: "/api/v1/wechat/community/owner/feedback-info", //报事报修根据id查询详情
|
||||||
|
|
||||||
getUserCommunity: "/api/v1/wechat/community/owner/mylist",//获取用户社区信息
|
getUserCommunity: "/api/v1/wechat/community/owner/mylist", //获取用户社区信息
|
||||||
|
|
||||||
get_host_info: 'https://zhsq.hshuishang.com/Miniapi/Index/get_host_info',
|
get_host_info: "https://zhsq.hshuishang.com/Miniapi/Index/get_host_info",
|
||||||
|
|
||||||
get_community_area_list: "https://zhsq.hshuishang.com/Miniapi/Community/get_community_area_list",
|
get_community_area_list:
|
||||||
|
"https://zhsq.hshuishang.com/Miniapi/Community/get_community_area_list",
|
||||||
|
|
||||||
|
carList: "/api/v1/wechat/community/car/list", // 获取社区列表
|
||||||
|
addCar: "/api/v1/wechat/community/car/add", // 添加车辆
|
||||||
|
getCarList: "/api/v1/wechat/community/car/list", //获取车辆列表
|
||||||
|
deleteItem: "/api/v1/wechat/community/car/del", //删除车牌
|
||||||
|
|
||||||
carList: '/api/v1/wechat/community/car/list', // 获取社区列表
|
getBanner: "/api/v1/wechat/home-page/banner-list", //获取banner图
|
||||||
addCar: '/api/v1/wechat/community/car/add', // 添加车辆
|
getButton: "/api/v1/wechat/home-page/button-list", //获取button
|
||||||
getCarList: '/api/v1/wechat/community/car/list', //获取车辆列表
|
getHotWords: "/api/v1/wechat/home-page/search-hot-word/info", //搜索热词
|
||||||
deleteItem: "/api/v1/wechat/community/car/del",//删除车牌
|
|
||||||
|
|
||||||
getBanner: "/api/v1/wechat/home-page/banner-list",//获取banner图
|
getAllList: "/api/v2/wechat/community/get-all-list", //获取小区信息列表
|
||||||
getButton: "/api/v1/wechat/home-page/button-list",//获取button
|
commRoomSelect: "/api/v2/wechat/community-room/comm-room-select", //房源筛选器
|
||||||
getHotWords: "/api/v1/wechat/home-page/search-hot-word/info",//搜索热词
|
|
||||||
|
|
||||||
|
commInfo: "/api/v2/wechat/mpuser-crud/community-owner/info", //我的房产信息小区列表
|
||||||
|
create: "/api/v2/wechat/community-owners/create", //创建新的业主信息
|
||||||
|
|
||||||
getAllList: "/api/v2/wechat/community/get-all-list",//获取小区信息列表
|
communityInfo: "/api/v2/community/get-one", //获取小区信息
|
||||||
commRoomSelect: "/api/v2/wechat/community-room/comm-room-select",//房源筛选器
|
|
||||||
|
|
||||||
commInfo: "/api/v2/wechat/mpuser-crud/community-owner/info",//我的房产信息小区列表
|
workCommunityList: "/api/v2/wechat/community-worker/work-comm-list", //员工小区列表
|
||||||
create: "/api/v2/wechat/community-owners/create",//创建新的业主信息
|
|
||||||
|
|
||||||
communityInfo: "/api/v2/community/get-one",//获取小区信息
|
getOrderList: "/api/v2/wechat/community-orders/get-all-list", //获取账单
|
||||||
|
getCommunityRoomList: "/api/v2/wechat/community-room/list", //获取房源列表
|
||||||
|
getUserGovenmentMoney:
|
||||||
|
"/api/v2/wechat/government-housing-fund-flow-crud/user", //获取用户公积金
|
||||||
|
createPayOrder: "/api/v2/wechat/community-order-pay/create", //创建缴费
|
||||||
|
getPayOrderInfo: "/api/v2/wechat/community-order-pay/get-one", //根据缴费信息获取支付信息
|
||||||
|
getPayOrderList: "/api/v2/wechat/community-order-pay/get-page", //查询缴费记录
|
||||||
|
OrderPay: "/api/v2/wechat/community-order-pay/preorder", //预下单
|
||||||
|
tradeQuery: "/api/v2/wechat/community-order-pay/trade-query", //缴费查单
|
||||||
|
|
||||||
workCommunityList: "/api/v2/wechat/community-worker/work-comm-list",//员工小区列表
|
checkComm: "/api/v2/wechat/community/check-comm", //检查小区是否属于当前用户
|
||||||
|
|
||||||
getOrderList:"/api/v2/wechat/community-orders/get-all-list",//获取账单
|
|
||||||
getCommunityRoomList:"/api/v2/wechat/community-room/list", //获取房源列表
|
|
||||||
getUserGovenmentMoney:"/api/v2/wechat/government-housing-fund-flow-crud/user", //获取用户公积金
|
|
||||||
createPayOrder:"/api/v2/wechat/community-order-pay/create", //创建缴费
|
|
||||||
getPayOrderInfo:"/api/v2/wechat/community-order-pay/get-one", //根据缴费信息获取支付信息
|
|
||||||
getPayOrderList:"/api/v2/wechat/community-order-pay/get-page", //查询缴费记录
|
|
||||||
OrderPay:"/api/v2/wechat/community-order-pay/preorder",//预下单
|
|
||||||
tradeQuery:"/api/v2/wechat/community-order-pay/trade-query",//缴费查单
|
|
||||||
};
|
};
|
||||||
@ -96,7 +96,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="newsList">
|
<view class="newsList" v-if="categoryList.length > 0">
|
||||||
<view class="newsItem" v-for="item in infoList" @click="detail(item)" :key="item.id">
|
<view class="newsItem" v-for="item in infoList" @click="detail(item)" :key="item.id">
|
||||||
<view class="newsItem_left">
|
<view class="newsItem_left">
|
||||||
<view class="newsItem_left_tit">{{ item.title }}</view>
|
<view class="newsItem_left_tit">{{ item.title }}</view>
|
||||||
@ -245,10 +245,23 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
async onLoad(options) {
|
async onLoad(options) {
|
||||||
// 页面加载时执行一次
|
if (options.item) {
|
||||||
|
this.checkComm(JSON.parse(options.item));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
onHide() {
|
||||||
|
uni.removeStorageSync("is_me");
|
||||||
|
},
|
||||||
|
onUnload() {
|
||||||
|
uni.removeStorageSync("is_me");
|
||||||
},
|
},
|
||||||
|
|
||||||
async onShow() {
|
async onShow() {
|
||||||
|
const meun = menuButtonInfo();
|
||||||
|
this.top = meun.top;
|
||||||
|
// this.top = meun.height + meun.top;
|
||||||
|
this.localHeight = meun.height;
|
||||||
this.defaultFunctionList = [
|
this.defaultFunctionList = [
|
||||||
{
|
{
|
||||||
create_time: "",
|
create_time: "",
|
||||||
@ -294,52 +307,10 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
// 页面展示时执行
|
const isMe = uni.getStorageSync("is_me");
|
||||||
// if (!uni.getStorageSync("changeCommData")) {
|
// 当is_me不存在或为true时执行,存在且为false时不执行
|
||||||
// return;
|
if (isMe === true || isMe === undefined || isMe === null || isMe === '') {
|
||||||
// }
|
this.getCommunityList();
|
||||||
await request(apiArr2.commInfo, "POST", {
|
|
||||||
user_id: uni.getStorageSync("userId"),
|
|
||||||
longitude: uni.getStorageSync("location").lng,
|
|
||||||
latitude: uni.getStorageSync("location").lat,
|
|
||||||
page_num: this.page_num,
|
|
||||||
page_size: this.page_size,
|
|
||||||
}).then((res) => {
|
|
||||||
if (res.rows.length == 0) {
|
|
||||||
uni.removeStorageSync("changeCommData");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const targetItem = res.rows.find((item) => {
|
|
||||||
return item.community_id == uni.getStorageSync("changeCommData").id;
|
|
||||||
});
|
|
||||||
|
|
||||||
if (targetItem) {
|
|
||||||
//是否跳转物业缴费
|
|
||||||
this.isShowBill = targetItem.bill_front_end_display == 1;
|
|
||||||
//小区是否隐藏
|
|
||||||
if (targetItem.front_end_display == 1) {
|
|
||||||
uni.removeStorageSync("changeCommData");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
res.rows = res.rows.filter((item) => {
|
|
||||||
return item.front_end_display != 1;
|
|
||||||
});
|
|
||||||
if (!uni.getStorageSync("changeCommData")) {
|
|
||||||
uni.setStorageSync("changeCommData", { name: res.rows[0].name, id: res.rows[0].community_id })
|
|
||||||
}
|
|
||||||
this.communityList = res.rows;
|
|
||||||
});
|
|
||||||
const meun = menuButtonInfo();
|
|
||||||
this.top = meun.top;
|
|
||||||
// this.top = meun.height + meun.top;
|
|
||||||
this.localHeight = meun.height;
|
|
||||||
// this.getCommunityList()
|
|
||||||
if (this.communityList.length == 0) {
|
|
||||||
this.communityVal = "添加我的房产";
|
|
||||||
} else {
|
|
||||||
this.communityVal = uni.getStorageSync("changeCommData").name;
|
|
||||||
}
|
}
|
||||||
this.getfunctionNum();
|
this.getfunctionNum();
|
||||||
this.getAdvertising();
|
this.getAdvertising();
|
||||||
@ -379,6 +350,54 @@ export default {
|
|||||||
// desc() {
|
// desc() {
|
||||||
// NavgateTo("../communityDetail/index")
|
// NavgateTo("../communityDetail/index")
|
||||||
// },
|
// },
|
||||||
|
checkComm(item) {
|
||||||
|
if (uni.getStorageSync("is_me")) {
|
||||||
|
uni.setStorageSync("changeCommData", { name: item.name, id: item.community_id })
|
||||||
|
} else {
|
||||||
|
this.communityList = []
|
||||||
|
this.communityVal = item.name;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async getCommunityList() {
|
||||||
|
await request(apiArr2.commInfo, "POST", {
|
||||||
|
user_id: uni.getStorageSync("userId"),
|
||||||
|
longitude: uni.getStorageSync("location").lng,
|
||||||
|
latitude: uni.getStorageSync("location").lat,
|
||||||
|
page_num: this.page_num,
|
||||||
|
page_size: this.page_size,
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.rows.length == 0) {
|
||||||
|
uni.removeStorageSync("changeCommData");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const targetItem = res.rows.find((item) => {
|
||||||
|
return item.community_id == uni.getStorageSync("changeCommData").id;
|
||||||
|
});
|
||||||
|
|
||||||
|
if (targetItem) {
|
||||||
|
//是否跳转物业缴费
|
||||||
|
this.isShowBill = targetItem.bill_front_end_display == 1;
|
||||||
|
//小区是否隐藏
|
||||||
|
if (targetItem.front_end_display == 1) {
|
||||||
|
uni.removeStorageSync("changeCommData");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
res.rows = res.rows.filter((item) => {
|
||||||
|
return item.front_end_display != 1;
|
||||||
|
});
|
||||||
|
if (!uni.getStorageSync("changeCommData")) {
|
||||||
|
uni.setStorageSync("changeCommData", { name: res.rows[0].name, id: res.rows[0].community_id })
|
||||||
|
}
|
||||||
|
this.communityList = res.rows;
|
||||||
|
});
|
||||||
|
if (this.communityList.length == 0) {
|
||||||
|
this.communityVal = "添加我的房产";
|
||||||
|
} else {
|
||||||
|
this.communityVal = uni.getStorageSync("changeCommData").name;
|
||||||
|
}
|
||||||
|
},
|
||||||
apply() {
|
apply() {
|
||||||
NavgateTo("../applyOwer/index");
|
NavgateTo("../applyOwer/index");
|
||||||
},
|
},
|
||||||
|
|||||||
@ -210,7 +210,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
enterCommunity(item) {
|
enterCommunity(item) {
|
||||||
NavgateTo("/packages/community/index/index?item=" + encodeURIComponent(JSON.stringify(item)));
|
request(apiArr.checkComm, "POST", {
|
||||||
|
community_id: item.community_id,
|
||||||
|
user_id: uni.getStorageSync("userId"),
|
||||||
|
}).then((res) => {
|
||||||
|
uni.setStorageSync("is_me", res.is_me)
|
||||||
|
NavgateTo("/packages/community/index/index?item=" + JSON.stringify(item));
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 下拉加载更多
|
// 下拉加载更多
|
||||||
loadMore() {
|
loadMore() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user