feat:调用物业公积金接口-未完成
This commit is contained in:
parent
a44b8dc457
commit
5bf36b96e9
@ -19,4 +19,7 @@ export const apiArr = {
|
||||
categoryPage: '/api/v2/wechat/announcement-category-crud/page', // 公告分类信息分页
|
||||
infoPage: '/api/v2/wechat/announcement-crud/page', // 公告信息分页
|
||||
getAnnounceInfo:"/api/v2/wechat/announcement-crud/info" ,//公告详情
|
||||
|
||||
getGovernmentByRoom:"/api/v2/wechat/government-housing-fund-flow-crud/room", //根据房源获取公积金信息
|
||||
|
||||
};
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<div class="container">
|
||||
<div class="searchBox" :style="{ height: localHeight + 'px', paddingTop: top + 'px' }">
|
||||
<div class="searchBox_add">
|
||||
<div class="emptyCommunity" @click="addCommunity"> {{communityVal}} </div>
|
||||
<div class="emptyCommunity" @click="addCommunity"> {{ communityVal }} </div>
|
||||
<!-- <div class="MyCommunity" v-if="false">
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/community/community_mycommunity.png"
|
||||
mode="aspectFill"></image>
|
||||
@ -48,14 +48,15 @@
|
||||
|
||||
<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">
|
||||
<u-grid-item v-for="(item, index) in functionList" @click="jump(item.mini_program_url)" :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)">
|
||||
<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>
|
||||
|
||||
@ -69,8 +70,8 @@
|
||||
<div class="newsList">
|
||||
<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>
|
||||
<div class="newsItem_left_tit">{{ item.title }}</div>
|
||||
<div class="newsItem_left_sub">{{ item.author }}</div>
|
||||
</div>
|
||||
<div class="newsItem_right">
|
||||
<image :src="item.list_image" mode="aspectFill" />
|
||||
@ -118,364 +119,361 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
request,
|
||||
picUrl,
|
||||
uniqueByField,
|
||||
menuButtonInfo,
|
||||
NavgateTo
|
||||
} from '../../../utils';
|
||||
import {
|
||||
request,
|
||||
picUrl,
|
||||
uniqueByField,
|
||||
menuButtonInfo,
|
||||
NavgateTo
|
||||
} from '../../../utils';
|
||||
|
||||
import {
|
||||
apiArr
|
||||
} from '../../../api/v2Community';
|
||||
import {
|
||||
apiArr
|
||||
} from '../../../api/v2Community';
|
||||
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
communityVal: '添加我的房产',
|
||||
picUrl,
|
||||
top: "",
|
||||
localHeight: "",
|
||||
queryPage: {
|
||||
page_num: 1,
|
||||
page_size: 10,
|
||||
},
|
||||
communityList: [],
|
||||
flag: false,
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
communityVal: '添加我的房产',
|
||||
picUrl,
|
||||
top: "",
|
||||
localHeight: "",
|
||||
queryPage: {
|
||||
page_num: 1,
|
||||
page_size: 10,
|
||||
},
|
||||
communityList: [],
|
||||
flag: false,
|
||||
|
||||
functionList: [],
|
||||
functionList: [],
|
||||
|
||||
ads1Show: false,
|
||||
ads2Show: false,
|
||||
ads1Show: false,
|
||||
ads2Show: false,
|
||||
|
||||
bannerList: [], //轮播图广告
|
||||
currentIdx: 0,
|
||||
streamerList: [], //横幅广告
|
||||
tileList: [], //平铺广告
|
||||
largePopList: [], //巨幅弹屏广告
|
||||
popList: [], //弹屏广告
|
||||
bannerList: [], //轮播图广告
|
||||
currentIdx: 0,
|
||||
streamerList: [], //横幅广告
|
||||
tileList: [], //平铺广告
|
||||
largePopList: [], //巨幅弹屏广告
|
||||
popList: [], //弹屏广告
|
||||
categoryList: [],
|
||||
infoList: [],
|
||||
selectedTab: 0,
|
||||
currentAdIndex: 0,
|
||||
|
||||
categoryList: [],
|
||||
infoList: [],
|
||||
selectedTab: 0,
|
||||
rowNum: 0,
|
||||
colNum: 0,
|
||||
|
||||
currentAdIndex: 0,
|
||||
page_size:10,
|
||||
page_num:1,
|
||||
flag:false
|
||||
}
|
||||
},
|
||||
async onLoad(options) {
|
||||
const meun = menuButtonInfo();
|
||||
this.top = meun.top;
|
||||
// this.top = meun.height + meun.top;
|
||||
this.localHeight = meun.height;
|
||||
// this.getCommunityList()
|
||||
if (!uni.getStorageSync('changeCommData').id) {
|
||||
uni.setStorageSync("changeCommData", { name: "森呼吸二期", id: 14 })
|
||||
}
|
||||
|
||||
rowNum: 0,
|
||||
colNum: 0,
|
||||
}
|
||||
},
|
||||
async onLoad(options) {
|
||||
const meun = menuButtonInfo();
|
||||
this.top = meun.top;
|
||||
// this.top = meun.height + meun.top;
|
||||
this.localHeight = meun.height;
|
||||
// this.getCommunityList()
|
||||
if(!uni.getStorageSync('changeCommData').id){
|
||||
uni.setStorageSync("changeCommData",{name:"森呼吸二期",id:14})
|
||||
}
|
||||
this.communityVal = uni.getStorageSync('changeCommData').name
|
||||
this.getfunctionNum()
|
||||
this.getAdvertising()
|
||||
this.getCategoryList()
|
||||
},
|
||||
|
||||
this.communityVal = uni.getStorageSync('changeCommData').name
|
||||
await this.getfunctionNum()
|
||||
this.getAdvertising()
|
||||
//上拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.communityVal = uni.getStorageSync('changeCommData').name
|
||||
this.bannerList = []
|
||||
this.currentIdx = 0
|
||||
this.streamerList = [] //横幅广告
|
||||
this.tileList = [] //平铺广告
|
||||
this.largePopList = [] //巨幅弹屏广告
|
||||
this.popList = [] //弹屏广告
|
||||
this.categoryList = []
|
||||
this.infoList = []
|
||||
this.selectedTab = 0
|
||||
this.currentAdIndex = 0
|
||||
this.getfunctionNum()
|
||||
this.getAdvertising()
|
||||
this.getCategoryList()
|
||||
uni.stopPullDownRefresh();
|
||||
|
||||
},
|
||||
//下拉加载
|
||||
onReachBottom() {
|
||||
if(this.flag){
|
||||
this.page_num++
|
||||
this.getCategoryList()
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
methods: {
|
||||
// desc() {
|
||||
// NavgateTo("../communityDetail/index")
|
||||
// },
|
||||
apply() {
|
||||
NavgateTo("../applyOwer/index")
|
||||
},
|
||||
closeAds() {
|
||||
this.ads1Show = false
|
||||
},
|
||||
closeAds2() {
|
||||
this.ads2Show = false
|
||||
},
|
||||
jump(e) {
|
||||
if (!e) {
|
||||
this.NotOpen();
|
||||
return;
|
||||
}
|
||||
NavgateTo(e)
|
||||
},
|
||||
|
||||
addCommunity() {
|
||||
NavgateTo("/packages/community/myCommunity/index")
|
||||
},
|
||||
|
||||
methods: {
|
||||
// desc() {
|
||||
// NavgateTo("../communityDetail/index")
|
||||
// },
|
||||
apply() {
|
||||
NavgateTo("../applyOwer/index")
|
||||
},
|
||||
closeAds() {
|
||||
this.ads1Show = false
|
||||
},
|
||||
closeAds2() {
|
||||
this.ads2Show = false
|
||||
},
|
||||
jump(e) {
|
||||
if(!e) {
|
||||
this.NotOpen();
|
||||
return;
|
||||
}
|
||||
NavgateTo(e)
|
||||
},
|
||||
swipers(event) {
|
||||
// 获取当前轮播图索引
|
||||
this.currentIdx = event.detail.current;
|
||||
},
|
||||
|
||||
addCommunity() {
|
||||
NavgateTo("/packages/community/myCommunity/index")
|
||||
},
|
||||
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()
|
||||
},
|
||||
|
||||
// getCommunityList() {
|
||||
// let that = this
|
||||
// request(apiArr.getCommunityList, 'POST', {
|
||||
// page_num: that.queryPage.page_num,
|
||||
// page_size: that.queryPage.page_size,
|
||||
// user_id:""
|
||||
// }).then(res => {
|
||||
// console.log(res)
|
||||
// if (res.rows.length == that.queryPage.page_size) {
|
||||
// that.queryPage.page_num++
|
||||
// that.flag = true
|
||||
// that.communityList = that.communityList.concat(res.rows)
|
||||
// }else{
|
||||
// that.flag = false
|
||||
// that.communityList = that.communityList.concat(res.rows)
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
swipers(event) {
|
||||
// 获取当前轮播图索引
|
||||
this.currentIdx = event.detail.current;
|
||||
},
|
||||
async getfunctionList() {
|
||||
const res = await request(apiArr.navPage, "POST", {
|
||||
community_id: Number(uni.getStorageSync('changeCommData').id),
|
||||
page_num: 1,
|
||||
page_size: 50
|
||||
});
|
||||
console.log(res, 'xx');
|
||||
|
||||
async getfunctionNum() {
|
||||
const res = await request(apiArr.commInfo, "POST", {}, {
|
||||
slice: false
|
||||
// 获取 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('functionList', this.functionList);
|
||||
},
|
||||
|
||||
async getAdvertising() {
|
||||
const res = await request(apiArr.advPage, "POST", {
|
||||
community_id: Number(uni.getStorageSync('changeCommData').id),
|
||||
ad_position: 1,
|
||||
page_num: 1,
|
||||
page_size: 50
|
||||
})
|
||||
this.bannerList = res.rows.map(item => {
|
||||
return {
|
||||
...item,
|
||||
ad_picture: picUrl + item.ad_picture
|
||||
};
|
||||
});
|
||||
|
||||
const res2 = await request(apiArr.advPage, "POST", {
|
||||
community_id: Number(uni.getStorageSync('changeCommData').id),
|
||||
ad_position: 2,
|
||||
page_num: 1,
|
||||
page_size: 50
|
||||
})
|
||||
this.streamerList = res2.rows.map(item => {
|
||||
return {
|
||||
...item,
|
||||
ad_picture: picUrl + item.ad_picture
|
||||
};
|
||||
});
|
||||
|
||||
const res3 = await request(apiArr.advPage, "POST", {
|
||||
community_id: Number(uni.getStorageSync('changeCommData').id),
|
||||
ad_position: 3,
|
||||
page_num: 1,
|
||||
page_size: 50
|
||||
})
|
||||
this.tileList = res3.rows.map(item => {
|
||||
return {
|
||||
...item,
|
||||
ad_picture: picUrl + item.ad_picture
|
||||
};
|
||||
});
|
||||
|
||||
const res4 = await request(apiArr.advPage, "POST", {
|
||||
community_id: Number(uni.getStorageSync('changeCommData').id),
|
||||
ad_position: 4,
|
||||
page_num: 1,
|
||||
page_size: 50
|
||||
})
|
||||
this.largePopList = res4.rows.map(item => {
|
||||
return {
|
||||
...item,
|
||||
ad_picture: picUrl + item.ad_picture
|
||||
};
|
||||
});
|
||||
this.ads1Show = res4.rows.length !== 0 ? true : false;
|
||||
|
||||
const res5 = await request(apiArr.advPage, "POST", {
|
||||
community_id: Number(uni.getStorageSync('changeCommData').id),
|
||||
ad_position: 5,
|
||||
page_num: 1,
|
||||
page_size: 50
|
||||
})
|
||||
this.popList = res5.rows.map(item => {
|
||||
return {
|
||||
...item,
|
||||
ad_picture: picUrl + item.ad_picture
|
||||
};
|
||||
});
|
||||
this.ads2Show = res5.rows.length !== 0 ? true : false;
|
||||
},
|
||||
|
||||
headerServerClick(e) {
|
||||
console.log('当前点击内容', e);
|
||||
if (!e.link_url) {
|
||||
this.NotOpen();
|
||||
return
|
||||
}
|
||||
if (e.link_url) {
|
||||
// #ifdef APP-PLUS
|
||||
uni.navigateTo({
|
||||
url: '/pages/webview/webview?url=' + encodeURIComponent(e.link_url)
|
||||
});
|
||||
this.rowNum = res.nav_row_num_comm
|
||||
this.colNum = res.nav_row_total_comm
|
||||
return await this.getfunctionList()
|
||||
},
|
||||
// #endif
|
||||
|
||||
// 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
|
||||
});
|
||||
// 获取 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('functionList', this.functionList);
|
||||
},
|
||||
|
||||
async getAdvertising() {
|
||||
// bannerList
|
||||
// streamerList
|
||||
// tileList
|
||||
// largePopList
|
||||
// popList
|
||||
const res = await request(apiArr.advPage, "POST", {
|
||||
community_id: Number(uni.getStorageSync('changeCommData').id),
|
||||
ad_position: 1,
|
||||
page_num: 1,
|
||||
page_size: 50
|
||||
})
|
||||
this.bannerList = res.rows.map(item => {
|
||||
return {
|
||||
...item,
|
||||
ad_picture: picUrl + item.ad_picture
|
||||
};
|
||||
});
|
||||
|
||||
const res2 = await request(apiArr.advPage, "POST", {
|
||||
community_id: Number(uni.getStorageSync('changeCommData').id),
|
||||
ad_position: 2,
|
||||
page_num: 1,
|
||||
page_size: 50
|
||||
})
|
||||
this.streamerList = res2.rows.map(item => {
|
||||
return {
|
||||
...item,
|
||||
ad_picture: picUrl + item.ad_picture
|
||||
};
|
||||
});
|
||||
|
||||
const res3 = await request(apiArr.advPage, "POST", {
|
||||
community_id: Number(uni.getStorageSync('changeCommData').id),
|
||||
ad_position: 3,
|
||||
page_num: 1,
|
||||
page_size: 50
|
||||
})
|
||||
this.tileList = res3.rows.map(item => {
|
||||
return {
|
||||
...item,
|
||||
ad_picture: picUrl + item.ad_picture
|
||||
};
|
||||
});
|
||||
|
||||
const res4 = await request(apiArr.advPage, "POST", {
|
||||
community_id: Number(uni.getStorageSync('changeCommData').id),
|
||||
ad_position: 4,
|
||||
page_num: 1,
|
||||
page_size: 50
|
||||
})
|
||||
this.largePopList = res4.rows.map(item => {
|
||||
return {
|
||||
...item,
|
||||
ad_picture: picUrl + item.ad_picture
|
||||
};
|
||||
});
|
||||
this.ads1Show = res4.rows.length !== 0 ? true : false;
|
||||
|
||||
const res5 = await request(apiArr.advPage, "POST", {
|
||||
community_id: Number(uni.getStorageSync('changeCommData').id),
|
||||
ad_position: 5,
|
||||
page_num: 1,
|
||||
page_size: 50
|
||||
})
|
||||
this.popList = res5.rows.map(item => {
|
||||
return {
|
||||
...item,
|
||||
ad_picture: picUrl + item.ad_picture
|
||||
};
|
||||
});
|
||||
this.ads2Show = res5.rows.length !== 0 ? true : false;
|
||||
},
|
||||
|
||||
headerServerClick(e) {
|
||||
console.log('当前点击内容', e);
|
||||
if (!e.link_url) {
|
||||
this.NotOpen();
|
||||
return
|
||||
}
|
||||
if (e.link_url) {
|
||||
// #ifdef APP-PLUS
|
||||
uni.navigateTo({
|
||||
url: '/pages/webview/webview?url=' + encodeURIComponent(e.link_url)
|
||||
});
|
||||
// #endif
|
||||
|
||||
// #ifdef H5
|
||||
window.open(e.link_url, '_blank');
|
||||
// #endif
|
||||
|
||||
// #ifdef MP-WEIXIN || MP-ALIPAY || MP-BAIDU
|
||||
if (e.appid) {
|
||||
uni.navigateToMiniProgram({
|
||||
appId: e.appid,
|
||||
path: e.link_url,
|
||||
//需要传递给目标小程序的数据
|
||||
extraData: {
|
||||
'data1': 'test'
|
||||
},
|
||||
success(res) {
|
||||
console.log('打开成功', res)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
NavgateTo(e.link_url)
|
||||
// NavgateTo('/packages/localLife/index/index')
|
||||
}
|
||||
// 小程序中可能需要用户手动复制链接或使用web-view
|
||||
// uni.showModal({
|
||||
// title: '提示',
|
||||
// content: '即将打开外部链接,请复制后在浏览器中打开: ' + e.link_url,
|
||||
// confirmText: '复制链接',
|
||||
// success(res) {
|
||||
// if (res.confirm) {
|
||||
// uni.setClipboardData({
|
||||
// data: e.link_url,
|
||||
// success() {
|
||||
// uni.showToast({
|
||||
// title: '复制成功',
|
||||
// icon: 'success'
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
onSwiperChange(e) {
|
||||
this.currentAdIndex = e.detail.current;
|
||||
},
|
||||
onDetailClick() {
|
||||
console.log('1111');
|
||||
// 获取当前显示的广告项
|
||||
const currentAd = this.popList[this.currentAdIndex];
|
||||
if (currentAd) {
|
||||
this.headerServerClick(currentAd);
|
||||
} else if (this.popList.length > 0) {
|
||||
// 如果当前索引无效,默认使用第一项
|
||||
this.headerServerClick(this.popList[0]);
|
||||
}
|
||||
},
|
||||
|
||||
NotOpen() {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '此功能暂未开通!',
|
||||
showCancel: false,
|
||||
complete: (res) => {
|
||||
if (res.cancel) {
|
||||
// #ifdef H5
|
||||
window.open(e.link_url, '_blank');
|
||||
// #endif
|
||||
|
||||
// #ifdef MP-WEIXIN || MP-ALIPAY || MP-BAIDU
|
||||
if (e.appid) {
|
||||
uni.navigateToMiniProgram({
|
||||
appId: e.appid,
|
||||
path: e.link_url,
|
||||
//需要传递给目标小程序的数据
|
||||
extraData: {
|
||||
'data1': 'test'
|
||||
},
|
||||
success(res) {
|
||||
console.log('打开成功', res)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
NavgateTo(e.link_url)
|
||||
// NavgateTo('/packages/localLife/index/index')
|
||||
}
|
||||
// 小程序中可能需要用户手动复制链接或使用web-view
|
||||
// uni.showModal({
|
||||
// title: '提示',
|
||||
// content: '即将打开外部链接,请复制后在浏览器中打开: ' + e.link_url,
|
||||
// confirmText: '复制链接',
|
||||
// success(res) {
|
||||
// if (res.confirm) {
|
||||
// uni.setClipboardData({
|
||||
// data: e.link_url,
|
||||
// success() {
|
||||
// uni.showToast({
|
||||
// title: '复制成功',
|
||||
// icon: 'success'
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
onSwiperChange(e) {
|
||||
this.currentAdIndex = e.detail.current;
|
||||
},
|
||||
onDetailClick() {
|
||||
// 获取当前显示的广告项
|
||||
const currentAd = this.popList[this.currentAdIndex];
|
||||
if (currentAd) {
|
||||
this.headerServerClick(currentAd);
|
||||
} else if (this.popList.length > 0) {
|
||||
// 如果当前索引无效,默认使用第一项
|
||||
this.headerServerClick(this.popList[0]);
|
||||
}
|
||||
},
|
||||
|
||||
NotOpen() {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '此功能暂未开通!',
|
||||
showCancel: false,
|
||||
complete: (res) => {
|
||||
if (res.cancel) {
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
async getCategoryList() {
|
||||
const res = await request(apiArr.categoryPage, "POST", {
|
||||
community_id: Number(uni.getStorageSync('changeCommData').id),
|
||||
category_code: "",
|
||||
category_name: "",
|
||||
page_num: 1,
|
||||
page_size: 30
|
||||
})
|
||||
this.categoryList = res.rows
|
||||
this.selectTab(0, res.rows[0])
|
||||
},
|
||||
async getCategoryList() {
|
||||
const res = await request(apiArr.categoryPage, "POST", {
|
||||
community_id: Number(uni.getStorageSync('changeCommData').id),
|
||||
category_code: "",
|
||||
category_name: "",
|
||||
page_num: 1,
|
||||
page_size: 30
|
||||
})
|
||||
this.categoryList = res.rows
|
||||
this.selectTab(0, res.rows[0])
|
||||
},
|
||||
|
||||
async selectTab(index, item) {
|
||||
this.selectedTab = index;
|
||||
console.log('选中的tab:', index);
|
||||
const res = await request(apiArr.infoPage, "POST", {
|
||||
community_id: Number(uni.getStorageSync('changeCommData').id),
|
||||
announcement_category_id: item.id,
|
||||
title: '',
|
||||
category_name: '',
|
||||
page_num: 1,
|
||||
page_size: 10,
|
||||
})
|
||||
this.infoList = res.rows.map(item => {
|
||||
return {
|
||||
...item,
|
||||
list_image: picUrl + item.list_image,
|
||||
};
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
detail(e){
|
||||
console.log(e);
|
||||
NavgateTo('../noticeDesc/index?id=' + e.id)
|
||||
},
|
||||
async selectTab(index, item) {
|
||||
this.selectedTab = index;
|
||||
console.log('选中的tab:', index);
|
||||
const res = await request(apiArr.infoPage, "POST", {
|
||||
community_id: Number(uni.getStorageSync('changeCommData').id),
|
||||
announcement_category_id: item.id,
|
||||
title: '',
|
||||
category_name: '',
|
||||
page_num: this.page_num,
|
||||
page_size: this.page_size,
|
||||
})
|
||||
if(res.rows && res.rows.length == this.page_size){
|
||||
this.flag= true
|
||||
}else{
|
||||
this.flag= false
|
||||
}
|
||||
res.rows = res.rows.map(item => {
|
||||
return {
|
||||
...item,
|
||||
list_image: picUrl + item.list_image,
|
||||
};
|
||||
});
|
||||
this.infoList = this.infoList.concat(res.rows)
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
detail(e) {
|
||||
console.log(e);
|
||||
NavgateTo('../noticeDesc/index?id=' + e.id)
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("./index.css");
|
||||
@import url("./index.css");
|
||||
</style>
|
||||
@ -13,14 +13,17 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="main">
|
||||
<view class="person_info" v-for="(item,index) in list" :key="index">
|
||||
<view class="person_info" v-for="(item,index) in list.owners" :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 class="desc" v-if="item.type == 1">业主</view>
|
||||
<view class="desc" v-if="item.type == 2">家属</view>
|
||||
<view class="desc" v-if="item.type == 3">租户</view>
|
||||
<view class="desc" v-if="item.type == 4">访客</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="label">手机号</view>
|
||||
@ -28,7 +31,7 @@
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="label">房产总数</view>
|
||||
<view class="desc">{{ item.houseNum }}</view>
|
||||
<view class="desc">{{ item.count_of_rooms }}</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="label fix">
|
||||
@ -39,7 +42,7 @@
|
||||
<view class="angle"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="desc">¥{{item.fund}}</view>
|
||||
<view class="desc">¥{{item.property_fund_balance}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -50,7 +53,7 @@
|
||||
<view class="header">
|
||||
<view></view>
|
||||
<view class="title">选择房源</view>
|
||||
<view class="close">取消</view>
|
||||
<view class="close" @click="close">取消</view>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
<view class="main">
|
||||
@ -96,74 +99,23 @@ export default {
|
||||
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,
|
||||
},
|
||||
]
|
||||
|
||||
],
|
||||
roomList:[]
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
async onLoad(options) {
|
||||
this.defaultName = {
|
||||
...this.houseList[0],
|
||||
checked: true
|
||||
};
|
||||
const meun = menuButtonInfo();
|
||||
this.top = meun.height + meun.top;
|
||||
await this.getRoomList()
|
||||
await this.getInfo()
|
||||
},
|
||||
|
||||
|
||||
@ -174,10 +126,12 @@ export default {
|
||||
checked: true
|
||||
};
|
||||
this.show = false;
|
||||
this.getInfo()
|
||||
},
|
||||
//选择房产
|
||||
headerSwitchClick() {
|
||||
this.show = true;
|
||||
const newRes = this.houseList.map(item => {
|
||||
const newRes = this.roomList.map(item => {
|
||||
if (item.name === this.defaultName.name) {
|
||||
return {
|
||||
...item,
|
||||
@ -192,14 +146,37 @@ export default {
|
||||
console.log('newResnewRes', newRes);
|
||||
this.houseList = newRes;
|
||||
},
|
||||
|
||||
// 业主点击弹出层
|
||||
headerIconClick(ind) {
|
||||
this.list[ind].popupShow = !this.list[ind].popupShow
|
||||
this.list.owners[ind].popupShow = !this.list.owners[ind].popupShow
|
||||
},
|
||||
|
||||
close() {
|
||||
this.show = false;
|
||||
},
|
||||
|
||||
async getRoomList(){
|
||||
await request(apiArr.getCommunityList,"POST",{
|
||||
page_num:1,
|
||||
page_size:50,
|
||||
community_id:uni.getStorageSync("changeCommData").id
|
||||
}).then(res=>{
|
||||
res.rows.forEach(item=>{
|
||||
item.checked = false
|
||||
})
|
||||
this.roomList = res.rows
|
||||
this.defaultName = res.rows[0]
|
||||
})
|
||||
},
|
||||
async getInfo(){
|
||||
await request(apiArr.getGovernmentByRoom,"POST",{
|
||||
room_id:this.defaultName.room_id
|
||||
}).then(res=>{
|
||||
res.owners.forEach(item => {
|
||||
item.popupShow = false
|
||||
});
|
||||
this.list = res
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -168,3 +168,22 @@ page {
|
||||
margin: 0 auto;
|
||||
margin-top: 200rpx;
|
||||
}
|
||||
|
||||
|
||||
.empty {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-weight: normal;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
margin-top: 110rpx;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.empty image {
|
||||
width: 366rpx;
|
||||
height: 226rpx;
|
||||
margin-bottom: 27rpx;
|
||||
}
|
||||
|
||||
@ -1,18 +1,9 @@
|
||||
<template>
|
||||
<view class="box">
|
||||
<div
|
||||
class="searchBox"
|
||||
:style="{ height: localHeight + 'px', paddingTop: top + 'px' }"
|
||||
>
|
||||
<div class="searchBox" :style="{ height: localHeight + 'px', paddingTop: top + 'px' }">
|
||||
<div class="searchBox_add">
|
||||
<div class="searchBox_left">
|
||||
<u-icon
|
||||
bold
|
||||
color="#000"
|
||||
size="40"
|
||||
name="arrow-left"
|
||||
@click="back"
|
||||
></u-icon>
|
||||
<u-icon bold color="#000" size="40" name="arrow-left" @click="back"></u-icon>
|
||||
</div>
|
||||
<div class="searchBox_mid">我的报修</div>
|
||||
<div class="searchBox_right"></div>
|
||||
@ -20,33 +11,21 @@
|
||||
</div>
|
||||
|
||||
<div class="tabList">
|
||||
<div
|
||||
:class="active == 1 ? 'tab active' : 'tab'"
|
||||
@click="headerTabsClick(1)"
|
||||
>
|
||||
待指派 <span>({{awaitingNumb}})</span>
|
||||
<div :class="active == 1 ? 'tab active' : 'tab'" @click="headerTabsClick(1)">
|
||||
待指派 <span>({{ awaitingNumb }})</span>
|
||||
</div>
|
||||
<div
|
||||
:class="active == 2 ? 'tab active' : 'tab'"
|
||||
@click="headerTabsClick(2)"
|
||||
>
|
||||
<div :class="active == 2 ? 'tab active' : 'tab'" @click="headerTabsClick(2)">
|
||||
进行中 <span>({{ underwayNum }})</span>
|
||||
</div>
|
||||
<div
|
||||
:class="active == 4 ? 'tab active' : 'tab'"
|
||||
@click="headerTabsClick(4)"
|
||||
>
|
||||
<div :class="active == 4 ? 'tab active' : 'tab'" @click="headerTabsClick(4)">
|
||||
已作废 <span>({{ discardNum }})</span>
|
||||
</div>
|
||||
<div
|
||||
:class="active == 3 ? 'tab active' : 'tab'"
|
||||
@click="headerTabsClick(3)"
|
||||
>
|
||||
<div :class="active == 3 ? 'tab active' : 'tab'" @click="headerTabsClick(3)">
|
||||
已完成 <span>({{ doneNum }})</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="orderList" v-for="(item, index) in list" :key="index">
|
||||
<div v-if="list.length !== 0" class="orderList" v-for="(item, index) in list" :key="index">
|
||||
<div class="orderItem" @click="handlerDetailClick(item.id)">
|
||||
<div :class="['orderItemTit', statusType[item.status].style]">
|
||||
<div class="orderItemTit_left">工单编号:{{ item.order_code }}</div>
|
||||
@ -90,6 +69,12 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="list.length == 0" class="empty">
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_nearbyList_empty.png"
|
||||
mode="aspectFill"></image>
|
||||
暂无数据
|
||||
</div>
|
||||
|
||||
<div class="addBtn" @click="oneRepair">在线报修</div>
|
||||
</view>
|
||||
</template>
|
||||
@ -107,11 +92,11 @@ export default {
|
||||
page_size: 10,
|
||||
flag: false, // 是否下拉请求接口
|
||||
list: [], // 列表数组
|
||||
awaitingNumb: '', // 待维修工单数量
|
||||
underwayNum: '', // 进行中工单数量
|
||||
doneNum: '', // 已完成工单数量
|
||||
discardNum: '', // 已废弃工单数量
|
||||
// 状态枚举类型
|
||||
awaitingNumb: '', // 待维修工单数量
|
||||
underwayNum: '', // 进行中工单数量
|
||||
doneNum: '', // 已完成工单数量
|
||||
discardNum: '', // 已废弃工单数量
|
||||
// 状态枚举类型
|
||||
statusType: {
|
||||
1: {
|
||||
desc: "待指派",
|
||||
@ -151,18 +136,18 @@ export default {
|
||||
this.page_num = 1;
|
||||
this.getTabsList();
|
||||
},
|
||||
async init() {
|
||||
const [awaitingNumb, underwayNum, doneNum, discardNum] = await Promise.all([
|
||||
this.awaitingRes(),
|
||||
this.underwayRes(),
|
||||
this.doneRes(),
|
||||
this.discardRes(),
|
||||
]);
|
||||
this.awaitingNumb = awaitingNumb;
|
||||
this.underwayNum = underwayNum;
|
||||
this.discardNum = discardNum;
|
||||
this.doneNum = doneNum;
|
||||
},
|
||||
async init() {
|
||||
const [awaitingNumb, underwayNum, doneNum, discardNum] = await Promise.all([
|
||||
this.awaitingRes(),
|
||||
this.underwayRes(),
|
||||
this.doneRes(),
|
||||
this.discardRes(),
|
||||
]);
|
||||
this.awaitingNumb = awaitingNumb;
|
||||
this.underwayNum = underwayNum;
|
||||
this.discardNum = discardNum;
|
||||
this.doneNum = doneNum;
|
||||
},
|
||||
async getTabsList() {
|
||||
const res = await request(apiArr.getWorkOrderCrudList, "POST", {
|
||||
status: this.active,
|
||||
@ -182,42 +167,42 @@ export default {
|
||||
this.page_num = this.page_num + 1;
|
||||
}
|
||||
},
|
||||
// 待维修工单数量
|
||||
async awaitingRes() {
|
||||
const res = await request(apiArr.getWorkOrderCrudList, "POST", {
|
||||
// 待维修工单数量
|
||||
async awaitingRes() {
|
||||
const res = await request(apiArr.getWorkOrderCrudList, "POST", {
|
||||
status: 1,
|
||||
page_num: this.page_num,
|
||||
page_size: this.page_size,
|
||||
});
|
||||
return res.total;
|
||||
},
|
||||
// 进行中工单数量
|
||||
async underwayRes() {
|
||||
const res = await request(apiArr.getWorkOrderCrudList, "POST", {
|
||||
return res.total;
|
||||
},
|
||||
// 进行中工单数量
|
||||
async underwayRes() {
|
||||
const res = await request(apiArr.getWorkOrderCrudList, "POST", {
|
||||
status: 2,
|
||||
page_num: this.page_num,
|
||||
page_size: this.page_size,
|
||||
});
|
||||
return res.total;
|
||||
},
|
||||
// 已废弃工单数量
|
||||
async discardRes() {
|
||||
const res = await request(apiArr.getWorkOrderCrudList, "POST", {
|
||||
return res.total;
|
||||
},
|
||||
// 已废弃工单数量
|
||||
async discardRes() {
|
||||
const res = await request(apiArr.getWorkOrderCrudList, "POST", {
|
||||
status: 3,
|
||||
page_num: this.page_num,
|
||||
page_size: this.page_size,
|
||||
});
|
||||
return res.total;
|
||||
},
|
||||
// 已完成工单数量
|
||||
async doneRes() {
|
||||
const res = await request(apiArr.getWorkOrderCrudList, "POST", {
|
||||
return res.total;
|
||||
},
|
||||
// 已完成工单数量
|
||||
async doneRes() {
|
||||
const res = await request(apiArr.getWorkOrderCrudList, "POST", {
|
||||
status: 4,
|
||||
page_num: this.page_num,
|
||||
page_size: this.page_size,
|
||||
});
|
||||
return res.total;
|
||||
},
|
||||
return res.total;
|
||||
},
|
||||
|
||||
back() {
|
||||
uni.navigateBack({
|
||||
@ -231,13 +216,21 @@ export default {
|
||||
this.top = meun.top;
|
||||
this.localHeight = meun.height;
|
||||
this.init();
|
||||
this.getTabsList();
|
||||
this.getTabsList();
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.flag) {
|
||||
this.init();
|
||||
}
|
||||
},
|
||||
|
||||
onPullDownRefresh() {
|
||||
this.list = [];
|
||||
this.flag = false;
|
||||
this.page_num = 1;
|
||||
this.getTabsList();
|
||||
uni.stopPullDownRefresh();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@ -139,7 +139,8 @@
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {
|
||||
"nav-footer": "/components/nav/nav"
|
||||
}
|
||||
},
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -212,7 +213,8 @@
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "",
|
||||
"navigationBarBackgroundColor": "#F9F9F9"
|
||||
"navigationBarBackgroundColor": "#F9F9F9",
|
||||
"enablePullDownRefresh":true
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
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
@ -6726,7 +6726,10 @@ var apiArr = {
|
||||
// 公告分类信息分页
|
||||
infoPage: '/api/v2/wechat/announcement-crud/page',
|
||||
// 公告信息分页
|
||||
getAnnounceInfo: "/api/v2/wechat/announcement-crud/info" //公告详情
|
||||
getAnnounceInfo: "/api/v2/wechat/announcement-crud/info",
|
||||
//公告详情
|
||||
|
||||
getGovernmentByRoom: "/api/v2/wechat/government-housing-fund-flow-crud/room" //根据房源获取公积金信息
|
||||
};
|
||||
exports.apiArr = apiArr;
|
||||
|
||||
|
||||
@ -3,5 +3,18 @@
|
||||
"projectname": "uniapp-ZHSQ",
|
||||
"setting": {
|
||||
"compileHotReLoad": true
|
||||
},
|
||||
"condition": {
|
||||
"miniprogram": {
|
||||
"list": [
|
||||
{
|
||||
"name": "packages/community/providentFund/index",
|
||||
"pathName": "packages/community/providentFund/index",
|
||||
"query": "",
|
||||
"scene": null,
|
||||
"launchMode": "default"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user