|
@@ -2,9 +2,9 @@
|
|
|
<view class="container">
|
|
|
<view v-show="menuCurrent === 0">
|
|
|
<view class="menus-box">
|
|
|
- <view class="menus-item-box"
|
|
|
- @click="toReportList(key, data.value)"
|
|
|
- v-for="(data,key) in categoryList"
|
|
|
+ <view class="menus-item-box"
|
|
|
+ @click="toReportList(key, data.value)"
|
|
|
+ v-for="(data,key) in categoryList"
|
|
|
:key="key">
|
|
|
<view class="icon-box">
|
|
|
<view class="iconfont icon-hetong"></view>
|
|
@@ -48,13 +48,15 @@
|
|
|
bg-color="#E5E5E5"
|
|
|
:input-style="searchInputStyle"
|
|
|
placeholder="搜索您想要的内容"
|
|
|
+ @search="searchHistory(searchForm.keyword, 1)"
|
|
|
+ @custom="searchHistory(searchForm.keyword, 1)"
|
|
|
></u-search>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="list-box">
|
|
|
<view class="list-item-box" v-for="item in list" :key="item.id" @click="onClickReport(item)">
|
|
|
<view class="image-box">
|
|
|
- <image :src="item.image" mode="aspectFill"></image>
|
|
|
+ <image :src="item.imgUrl" mode="aspectFill"></image>
|
|
|
</view>
|
|
|
<view class="info-box">
|
|
|
<view class="title">
|
|
@@ -72,7 +74,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <u-loadmore :status="status" margin-top="20" margin-bottom="20" @loadmore="loadmore"/>
|
|
|
+ <!-- <u-loadmore :status="status" margin-top="20" margin-bottom="20"/> -->
|
|
|
</view>
|
|
|
<view v-show="menuCurrent === 2">
|
|
|
<view class="header-box">
|
|
@@ -83,13 +85,15 @@
|
|
|
bg-color="#E5E5E5"
|
|
|
:input-style="searchInputStyle"
|
|
|
placeholder="搜索您想要的内容"
|
|
|
+ @search="searchMy(searchForm.keyword, 1)"
|
|
|
+ @custom="searchMy(searchForm.keyword, 1)"
|
|
|
></u-search>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="list-box">
|
|
|
<view class="list-item-box" v-for="item in list2" :key="item.id" @click="onClickReport(item)">
|
|
|
<view class="image-box">
|
|
|
- <image :src="item.image" mode="aspectFill"></image>
|
|
|
+ <image :src="item.imgUrl" mode="aspectFill"></image>
|
|
|
</view>
|
|
|
<view class="info-box">
|
|
|
<view class="title">
|
|
@@ -104,8 +108,8 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <u-loadmore :status="status" margin-top="20" margin-bottom="20" @loadmore="loadmore"/>
|
|
|
</view>
|
|
|
+ <u-loadmore v-if="menuCurrent !== 0" :status="status" margin-top="20" margin-bottom="20" @loadmore="loadMore"/>
|
|
|
<view class="bottom-block"></view>
|
|
|
<view class="bottom-box">
|
|
|
<view class="menu-box">
|
|
@@ -134,15 +138,19 @@
|
|
|
loadReportHistory,
|
|
|
loadMyReport
|
|
|
} from '@/api/report.js'
|
|
|
-
|
|
|
+
|
|
|
import { useReportStore } from '@/store/reportStore.js'
|
|
|
-
|
|
|
+
|
|
|
const reportStore = useReportStore();
|
|
|
-
|
|
|
+
|
|
|
const categoryList = ref({});
|
|
|
const pageNum = ref(1);
|
|
|
- const status = ref('loadmore');
|
|
|
-
|
|
|
+ const status = ref('nomore');
|
|
|
+ const list = ref([]);
|
|
|
+ const list2 = ref([]);
|
|
|
+ const listCount = ref(0);
|
|
|
+ const listCount2 = ref(0);
|
|
|
+
|
|
|
const customButtonStyle = {
|
|
|
height: '40rpx',
|
|
|
lineHeight: '40rpx',
|
|
@@ -155,8 +163,9 @@
|
|
|
keyword: '',
|
|
|
type: 0
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
const menuCurrent = ref(0)
|
|
|
+
|
|
|
function onMenuClick(index) {
|
|
|
menuCurrent.value = index;
|
|
|
searchForm.value.keyword = ""
|
|
@@ -169,34 +178,62 @@
|
|
|
searchMy("", 1)
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- function searchHistory(keyword, pageNum, pageSize){
|
|
|
+
|
|
|
+ function searchHistory(keyword, pageNumber, pageSize){
|
|
|
+ status.value = 'loading'
|
|
|
loadReportHistory({
|
|
|
keyword,
|
|
|
- pageNumber: pageNum,
|
|
|
+ pageNumber: pageNumber,
|
|
|
pageSize: pageSize?pageSize:10
|
|
|
}).then(res=>{
|
|
|
- console.log(res, "历史记录")
|
|
|
+ if(res.code===0){
|
|
|
+ if(pageNumber===1){
|
|
|
+ list.value = res.data
|
|
|
+ }else{
|
|
|
+ list.value = [...list.value, ...res.data]
|
|
|
+ }
|
|
|
+ listCount.value = res.count
|
|
|
+ if(list.value.length === res.count){
|
|
|
+ status.value = 'nomore'
|
|
|
+ }else{
|
|
|
+ status.value = 'loadmore'
|
|
|
+ }
|
|
|
+ pageNum.value = pageNumber + 1;
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
- function searchMy(keyword, pageNum, pageSize){
|
|
|
+
|
|
|
+ function searchMy(keyword, pageNumber, pageSize){
|
|
|
+ status.value = 'loading'
|
|
|
loadMyReport({
|
|
|
keyword,
|
|
|
- pageNumber: pageNum,
|
|
|
+ pageNumber: pageNumber,
|
|
|
pageSize: pageSize?pageSize:10
|
|
|
}).then(res=>{
|
|
|
- console.log(res, "我的报告")
|
|
|
+ if(res.code===0){
|
|
|
+ if(pageNumber===1){
|
|
|
+ list2.value = res.data
|
|
|
+ }else{
|
|
|
+ list2.value = [...list2.value, ...res.data]
|
|
|
+ }
|
|
|
+ listCount2.value = res.count
|
|
|
+ if(list2.value.length === res.count){
|
|
|
+ status.value = 'nomore'
|
|
|
+ }else{
|
|
|
+ status.value = 'loadmore'
|
|
|
+ }
|
|
|
+ pageNum.value = pageNumber + 1;
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
function toReportList(model, val) {
|
|
|
uni.setStorageSync("reportCate", categoryList.value[model].child);
|
|
|
uni.navigateTo({
|
|
|
url: `/pages/researchReport/reportList/reportList?model=${model}&value=${val}`
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
async function init(){
|
|
|
const cateRes = await getReportCate();
|
|
|
if (cateRes.code === 0) {
|
|
@@ -220,148 +257,24 @@
|
|
|
reportStore.setReportCate(result);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
- const list = [
|
|
|
- {
|
|
|
- id: '01',
|
|
|
- title: '2024年11月广州市中介促成二手住宅市场交易简报',
|
|
|
- time: '2023年8月8日',
|
|
|
- image: 'https://img.shetu66.com/2023/10/21/1697901453723364.png',
|
|
|
- free: 0, // 是否免费
|
|
|
- memberFree: 0, // 是否会员免费
|
|
|
- status: 0, // 是否购买
|
|
|
- },
|
|
|
- {
|
|
|
- id: '02',
|
|
|
- title: '2024年11月广州市中介促成二手住宅市场交易简报',
|
|
|
- time: '2023年8月8日',
|
|
|
- image: 'https://img.shetu66.com/2023/12/13/1702403646894275.png',
|
|
|
- free: 0, // 是否免费
|
|
|
- memberFree: 0, // 是否会员免费
|
|
|
- status: 1, // 是否购买
|
|
|
- },
|
|
|
- {
|
|
|
- id: '03',
|
|
|
- title: '2024年11月广州市中介促成二手住宅市场交易简报',
|
|
|
- time: '2023年8月8日',
|
|
|
- image: 'https://img.shetu66.com/2023/10/16/1697397333933789.png',
|
|
|
- free: 1, // 是否免费
|
|
|
- memberFree: 0, // 是否会员免费
|
|
|
- status: 0, // 是否购买
|
|
|
- },
|
|
|
- {
|
|
|
- id: '04',
|
|
|
- title: '2024年11月广州市中介促成二手住宅市场交易简报',
|
|
|
- time: '2023年8月8日',
|
|
|
- image: 'https://img.shetu66.com/2023/10/24/1698106006242859.png',
|
|
|
- free: 0, // 是否免费
|
|
|
- memberFree: 1, // 是否会员免费
|
|
|
- status: 0, // 是否购买
|
|
|
- },
|
|
|
- {
|
|
|
- id: '05',
|
|
|
- title: '2024年11月广州市中介促成二手住宅市场交易简报',
|
|
|
- time: '2023年8月8日',
|
|
|
- image: 'https://static.fxbaogao.com/subject/cover/prod/361.jpg',
|
|
|
- free: 0, // 是否免费
|
|
|
- memberFree: 1, // 是否会员免费
|
|
|
- status: 0, // 是否购买
|
|
|
- },
|
|
|
- {
|
|
|
- id: '06',
|
|
|
- title: '2024年11月广州市中介促成二手住宅市场交易简报',
|
|
|
- time: '2023年8月8日',
|
|
|
- image: 'https://img.shetu66.com/2023/10/16/1697387221220874.png',
|
|
|
- free: 0, // 是否免费
|
|
|
- memberFree: 1, // 是否会员免费
|
|
|
- status: 1, // 是否购买
|
|
|
- },
|
|
|
- {
|
|
|
- id: '07',
|
|
|
- title: '2024年11月广州市中介促成二手住宅市场交易简报',
|
|
|
- time: '2023年8月8日',
|
|
|
- image: 'https://img.shetu66.com/2023/10/21/1697901453723364.png',
|
|
|
- free: 0, // 是否免费
|
|
|
- memberFree: 0, // 是否会员免费
|
|
|
- status: 0, // 是否购买
|
|
|
- },
|
|
|
- {
|
|
|
- id: '08',
|
|
|
- title: '2024年11月广州市中介促成二手住宅市场交易简报',
|
|
|
- time: '2023年8月8日',
|
|
|
- image: 'https://img.shetu66.com/2023/12/13/1702403646894275.png',
|
|
|
- free: 0, // 是否免费
|
|
|
- memberFree: 0, // 是否会员免费
|
|
|
- status: 0, // 是否购买
|
|
|
- },
|
|
|
- ]
|
|
|
-
|
|
|
- const list2 = [
|
|
|
- {
|
|
|
- id: '01',
|
|
|
- title: '2024年11月广州市中介促成二手住宅市场交易简报',
|
|
|
- time: '2023年8月8日',
|
|
|
- image: 'https://img.shetu66.com/2023/10/21/1697901453723364.png',
|
|
|
- price: '9.9'
|
|
|
- },
|
|
|
- {
|
|
|
- id: '02',
|
|
|
- title: '2024年11月广州市中介促成二手住宅市场交易简报',
|
|
|
- time: '2023年8月8日',
|
|
|
- image: 'https://img.shetu66.com/2023/12/13/1702403646894275.png',
|
|
|
- price: '9.9'
|
|
|
- },
|
|
|
- {
|
|
|
- id: '03',
|
|
|
- title: '2024年11月广州市中介促成二手住宅市场交易简报',
|
|
|
- time: '2023年8月8日',
|
|
|
- image: 'https://img.shetu66.com/2023/10/16/1697397333933789.png',
|
|
|
- price: '9.9'
|
|
|
- },
|
|
|
- {
|
|
|
- id: '04',
|
|
|
- title: '2024年11月广州市中介促成二手住宅市场交易简报',
|
|
|
- time: '2023年8月8日',
|
|
|
- image: 'https://img.shetu66.com/2023/10/24/1698106006242859.png',
|
|
|
- price: '9.9'
|
|
|
- },
|
|
|
- {
|
|
|
- id: '05',
|
|
|
- title: '2024年11月广州市中介促成二手住宅市场交易简报',
|
|
|
- time: '2023年8月8日',
|
|
|
- image: 'https://static.fxbaogao.com/subject/cover/prod/361.jpg',
|
|
|
- price: '9.9'
|
|
|
- },
|
|
|
- {
|
|
|
- id: '06',
|
|
|
- title: '2024年11月广州市中介促成二手住宅市场交易简报',
|
|
|
- time: '2023年8月8日',
|
|
|
- image: 'https://img.shetu66.com/2023/10/16/1697387221220874.png',
|
|
|
- price: '9.9'
|
|
|
- },
|
|
|
- {
|
|
|
- id: '07',
|
|
|
- title: '2024年11月广州市中介促成二手住宅市场交易简报',
|
|
|
- time: '2023年8月8日',
|
|
|
- image: 'https://img.shetu66.com/2023/10/21/1697901453723364.png',
|
|
|
- price: '9.9'
|
|
|
- },
|
|
|
- {
|
|
|
- id: '08',
|
|
|
- title: '2024年11月广州市中介促成二手住宅市场交易简报',
|
|
|
- time: '2023年8月8日',
|
|
|
- image: 'https://img.shetu66.com/2023/12/13/1702403646894275.png',
|
|
|
- price: '9.9'
|
|
|
- },
|
|
|
- ]
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
function onClickReport(report) {
|
|
|
uni.navigateTo({
|
|
|
url: `/pages/reportDetail/reportDetail?id=${report.id}&title=${report.title}`
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ function loadMore(){
|
|
|
+ if(menuCurrent.value === 1){
|
|
|
+ searchHistory(searchForm.value.keyword, pageNum.value)
|
|
|
+ }else{
|
|
|
+ searchMy(searchForm.value.keyword, pageNum.value)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
onLoad((load) => {
|
|
|
// console.log(load,"reporthome")
|
|
|
if (load.menuCurrent) {
|
|
@@ -374,24 +287,24 @@
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
$image-width: 230rpx;
|
|
|
-
|
|
|
+
|
|
|
.container {
|
|
|
height: 100vh;
|
|
|
width: 100vw;
|
|
|
background-color: $uni-text-color-inverse;
|
|
|
-
|
|
|
+
|
|
|
.header-box {
|
|
|
padding: 0 20rpx;
|
|
|
background-color: $uni-text-color-inverse;
|
|
|
@include topMagnet();
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.search-box {
|
|
|
margin-bottom: 20rpx;
|
|
|
::v-deep(.u-search) {
|
|
|
background-color: #e5e5e5;
|
|
|
border-radius: 50rpx;
|
|
|
-
|
|
|
+
|
|
|
.u-action {
|
|
|
width: 18%;
|
|
|
background-color: $uni-color-primary;
|
|
@@ -405,7 +318,7 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.list-box {
|
|
|
padding: 0 20rpx;
|
|
|
.list-item-box {
|
|
@@ -476,7 +389,7 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.menus-box {
|
|
|
padding: 0 20rpx;
|
|
|
.menus-item-box {
|
|
@@ -513,7 +426,7 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.bottom-block {
|
|
|
// height: 112rpx;
|
|
|
height: calc(112rpx + env(safe-area-inset-bottom, 0));
|
|
@@ -524,7 +437,7 @@
|
|
|
border: 1rpx solid #E9E9E9;
|
|
|
padding-bottom: calc(5rpx + env(safe-area-inset-bottom, 0));
|
|
|
@include bottomMagnet();
|
|
|
-
|
|
|
+
|
|
|
.menu-box {
|
|
|
height: 100rpx;
|
|
|
display: flex;
|