|
@@ -1,36 +1,34 @@
|
|
<template>
|
|
<template>
|
|
<view style="padding-top: 20rpx; width: 100vw; height: 100vh; overflow: hidden">
|
|
<view style="padding-top: 20rpx; width: 100vw; height: 100vh; overflow: hidden">
|
|
<view style="width: 100%; height: 100%; overflow:scroll">
|
|
<view style="width: 100%; height: 100%; overflow:scroll">
|
|
- <view class="Wrapper">
|
|
|
|
|
|
+ <!-- <view class="Wrapper">
|
|
<image src="/static/img/Location.png" class="Wrapper-img" />
|
|
<image src="/static/img/Location.png" class="Wrapper-img" />
|
|
<span class="Wrapper-content">重庆</span>
|
|
<span class="Wrapper-content">重庆</span>
|
|
<vie class="input-container">
|
|
<vie class="input-container">
|
|
<up-input v-model="value" @click.native="goToDetail" placeholder="请输入内容" prefixIcon="search"
|
|
<up-input v-model="value" @click.native="goToDetail" placeholder="请输入内容" prefixIcon="search"
|
|
:customStyle="inputStyle"></up-input>
|
|
:customStyle="inputStyle"></up-input>
|
|
</vie>
|
|
</vie>
|
|
- </view>
|
|
|
|
|
|
+ </view> -->
|
|
<view class="tabs-container">
|
|
<view class="tabs-container">
|
|
- <view class="tabs-wrapper">
|
|
|
|
- <!-- 可滑动的 tabs 区域 -->
|
|
|
|
|
|
+ <!-- <view class="tabs-wrapper">
|
|
<scroll-view scroll-x class="tabs-scroll">
|
|
<scroll-view scroll-x class="tabs-scroll">
|
|
<up-tabs :list="list1" @change="handlTabs" keyName="businessName"
|
|
<up-tabs :list="list1" @change="handlTabs" keyName="businessName"
|
|
- class="tabs-content"></up-tabs>
|
|
|
|
|
|
+ class="tabs-content" :current="tabKey"></up-tabs>
|
|
</scroll-view>
|
|
</scroll-view>
|
|
- <!-- 固定不动的图标 -->
|
|
|
|
- <image ref="iconRef" src="/static/img/分类or广场or其他.png" class="fixed-icon" @click="toggleDropdown" />
|
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
- <view v-if="showDropdown" class="custom-dropdown">
|
|
|
|
|
|
+ <view class="custom-dropdown">
|
|
<up-tabs :list="list2" @change="clickList2" class="tabs-content" :current="currentTabs2"
|
|
<up-tabs :list="list2" @change="clickList2" class="tabs-content" :current="currentTabs2"
|
|
keyName="businessName" />
|
|
keyName="businessName" />
|
|
- <!-- <up-tabs :list="list3" @click="click" class="tabs-content" keyName="businessName" /> -->
|
|
|
|
- </view>
|
|
|
|
|
|
+ </view> -->
|
|
|
|
+
|
|
|
|
+ <Tabs :list="list1" @change="handlTabs" ref="tabRef" />
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<!-- 瀑布流 -->
|
|
<!-- 瀑布流 -->
|
|
<view v-if="userType == '1'">
|
|
<view v-if="userType == '1'">
|
|
- <up-waterfall v-model="flowList">
|
|
|
|
|
|
+ <up-waterfall v-model="flowList" v-if="pages.total >0">
|
|
<template #left>
|
|
<template #left>
|
|
<view class="demo-warter" v-for="(item, index) in leftList" :key="index"
|
|
<view class="demo-warter" v-for="(item, index) in leftList" :key="index"
|
|
@click="goToDetail(item)">
|
|
@click="goToDetail(item)">
|
|
@@ -72,10 +70,13 @@
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
</up-waterfall>
|
|
</up-waterfall>
|
|
|
|
+ <view v-else>
|
|
|
|
+ <NoneView />
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
<up-loadmore style="margin-top: 40rpx;" :status="loadmoreInfo.status"
|
|
<up-loadmore style="margin-top: 40rpx;" :status="loadmoreInfo.status"
|
|
:loadmoreText="loadmoreInfo.loadingText" :loadingText="loadmoreInfo.loadmoreText"
|
|
:loadmoreText="loadmoreInfo.loadingText" :loadingText="loadmoreInfo.loadmoreText"
|
|
- :nomoreText="loadmoreInfo.nomoreText" @loadmore="handleLoadmore" v-if="userType == 1" />
|
|
|
|
|
|
+ :nomoreText="loadmoreInfo.nomoreText" @loadmore="handleLoadmore" v-if="userType == 1 && pages.total >0" />
|
|
|
|
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -105,6 +106,9 @@
|
|
volunteerinfolist
|
|
volunteerinfolist
|
|
} from "@/api/volunteerDetailsApi/details.js"
|
|
} from "@/api/volunteerDetailsApi/details.js"
|
|
|
|
|
|
|
|
+ import Tabs from "@/pages_home/components/tabs/index.vue"
|
|
|
|
+ import NoneView from '@/components/NoneView/index.vue'
|
|
|
|
+
|
|
|
|
|
|
const value1 = ref(1)
|
|
const value1 = ref(1)
|
|
const value2 = ref(2)
|
|
const value2 = ref(2)
|
|
@@ -119,6 +123,9 @@
|
|
const leftList = ref([])
|
|
const leftList = ref([])
|
|
const showDropdown = ref(false)
|
|
const showDropdown = ref(false)
|
|
|
|
|
|
|
|
+ const tabRef = ref(null)
|
|
|
|
+
|
|
|
|
+ const businessManagementId =ref(null)
|
|
|
|
|
|
|
|
|
|
const defaultTab = ref({
|
|
const defaultTab = ref({
|
|
@@ -133,9 +140,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- function handlTabs(item, index) {
|
|
|
|
- currentTabs2.value = 0
|
|
|
|
- list2.value = item.children
|
|
|
|
|
|
+ function handlTabs(record) {
|
|
|
|
+ clearList();
|
|
|
|
+ serviceCategory.value = record.parentId;
|
|
|
|
+ businessManagementId.value = record.id;
|
|
|
|
+ getList();
|
|
}
|
|
}
|
|
|
|
|
|
function clickList2(item, index) {
|
|
function clickList2(item, index) {
|
|
@@ -216,7 +225,7 @@
|
|
const res = await volunteerinfolist({
|
|
const res = await volunteerinfolist({
|
|
pageNum: pages.value.current, // 当前页码
|
|
pageNum: pages.value.current, // 当前页码
|
|
pageSize: pages.value.pageSize, // 每页大小
|
|
pageSize: pages.value.pageSize, // 每页大小
|
|
- serviceCategory: serviceCategory.value
|
|
|
|
|
|
+ businessManagementId: businessManagementId.value
|
|
});
|
|
});
|
|
|
|
|
|
console.log(res, '>>>>>>>res');
|
|
console.log(res, '>>>>>>>res');
|
|
@@ -236,17 +245,22 @@
|
|
res.rows.forEach((item, index) => {
|
|
res.rows.forEach((item, index) => {
|
|
index % 2 !== 0 ? leftList.value.push(item) : rightList.value.push(item);
|
|
index % 2 !== 0 ? leftList.value.push(item) : rightList.value.push(item);
|
|
});
|
|
});
|
|
-
|
|
|
|
|
|
+ console.log('leftList',leftList,rightList);
|
|
|
|
+
|
|
pages.value.total = res.total;
|
|
pages.value.total = res.total;
|
|
} catch (error) {
|
|
} catch (error) {
|
|
- leftList.value = [];
|
|
|
|
- rightList.value = [];
|
|
|
|
- loadmoreInfo.value.status = 'loadmore';
|
|
|
|
- pages.value.total = 0;
|
|
|
|
|
|
+ clearList()
|
|
console.error('Error fetching data:', error);
|
|
console.error('Error fetching data:', error);
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+ const clearList = () =>{
|
|
|
|
+ leftList.value = [];
|
|
|
|
+ rightList.value = [];
|
|
|
|
+ loadmoreInfo.value.status = 'loadmore';
|
|
|
|
+ pages.value.total = 0;
|
|
|
|
+ }
|
|
|
|
+
|
|
onReachBottom(() => {
|
|
onReachBottom(() => {
|
|
if (loadmoreInfo.value.status !== 'nomore') { // 更宽松的条件
|
|
if (loadmoreInfo.value.status !== 'nomore') { // 更宽松的条件
|
|
loadmoreInfo.value.status = 'loading';
|
|
loadmoreInfo.value.status = 'loading';
|
|
@@ -258,7 +272,7 @@
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
- getList()
|
|
|
|
|
|
+ // getList()
|
|
})
|
|
})
|
|
</script>
|
|
</script>
|
|
|
|
|