|
@@ -73,58 +73,35 @@
|
|
|
ref,
|
|
|
onMounted,
|
|
|
reactive,
|
|
|
- nextTick
|
|
|
} from 'vue';
|
|
|
import {
|
|
|
onLoad,
|
|
|
- onShow,
|
|
|
onReachBottom
|
|
|
} from "@dcloudio/uni-app";
|
|
|
|
|
|
import {
|
|
|
- typeOptionSelect,
|
|
|
- volunteerInfoList,
|
|
|
- getDetailsvolunteerId,
|
|
|
- dictListlrRstudy,
|
|
|
- dictListlrData,
|
|
|
- volunteerSeachgetTreeList,
|
|
|
volunteerinfolist
|
|
|
} from "@/api/volunteerDetailsApi/details.js"
|
|
|
-
|
|
|
+ import store from '@/store'
|
|
|
import Tabs from "@/pages_home/components/tabs/index.vue"
|
|
|
import NoneView from '@/components/NoneView/index.vue'
|
|
|
|
|
|
-
|
|
|
- const value1 = ref(1)
|
|
|
- const value2 = ref(2)
|
|
|
const list1 = ref([])
|
|
|
const list2 = ref([])
|
|
|
const flowList = ref([]); //list数据
|
|
|
- const listData = ref([])
|
|
|
const rightList = ref([])
|
|
|
const currentTabs2 = ref(0)
|
|
|
- const total = ref(0)
|
|
|
const serviceCategory = ref('')
|
|
|
const leftList = ref([])
|
|
|
const showDropdown = ref(false)
|
|
|
-
|
|
|
const tabRef = ref(null)
|
|
|
-
|
|
|
const businessManagementId = ref(null)
|
|
|
-
|
|
|
-
|
|
|
- const defaultTab = ref({
|
|
|
- dictValue: 1
|
|
|
- });
|
|
|
-
|
|
|
+ const data = reactive({
|
|
|
+ address: store.state.user.addressInfo,
|
|
|
+ })
|
|
|
|
|
|
const userType = uni.getStorageSync('userType') //读取本地存储
|
|
|
|
|
|
- // 用户/志愿者 识别标识
|
|
|
- const userOrWorker = uni.getStorageSync('storage_data').vuex_userOrWorker //读取本地存储
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
function handlTabs(record) {
|
|
|
clearList();
|
|
|
serviceCategory.value = record.parentId;
|
|
@@ -136,14 +113,6 @@
|
|
|
getList();
|
|
|
}
|
|
|
|
|
|
- function clickList2(item, index) {
|
|
|
- currentTabs2.value = index
|
|
|
- }
|
|
|
-
|
|
|
- function toggleDropdown() {
|
|
|
- showDropdown.value = !showDropdown.value
|
|
|
- }
|
|
|
-
|
|
|
const goToDetail = async (item) => {
|
|
|
const params = {
|
|
|
volunteerId: item.volunteerId, // 获取 volunteerId
|
|
@@ -155,13 +124,7 @@
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- const inputStyle = { //input輸入框樣式設置
|
|
|
- borderRadius: '140rpx',
|
|
|
- border: '1rpx solid #ccc',
|
|
|
- height: '70rpx',
|
|
|
- paddingLeft: '30rpx',
|
|
|
- width: '600rpx',
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
onLoad((options) => {
|
|
|
const dataList = JSON.parse(decodeURIComponent(options.dataList));
|
|
@@ -205,11 +168,6 @@
|
|
|
}
|
|
|
|
|
|
|
|
|
- // const getListAdderss = async () => {
|
|
|
- // const res = await volunteerDataList()
|
|
|
- // console.log(res, 'volunteerDataList>>>>>>>>>>')
|
|
|
- // }
|
|
|
-
|
|
|
|
|
|
const getList = async () => {
|
|
|
try {
|
|
@@ -220,12 +178,21 @@
|
|
|
console.log('No businessManagementId selected');
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
+ const { address } = data
|
|
|
+ const { cityCode, latitude, longitude } = address
|
|
|
// 请求时传递分页参数
|
|
|
const res = await volunteerinfolist({
|
|
|
pageNum: pages.value.current, // 当前页码
|
|
|
pageSize: pages.value.pageSize, // 每页大小
|
|
|
- businessManagementId: businessManagementId.value
|
|
|
+ businessManagementId: businessManagementId.value,
|
|
|
+ provinceName: cityCode.data[0], // 省
|
|
|
+ provinceCode: cityCode.code[0],
|
|
|
+ cityName: cityCode.data[1], // 市
|
|
|
+ cityCode: cityCode.code[1],
|
|
|
+ districtName: cityCode.data[2],
|
|
|
+ districtCode: cityCode.code[2],
|
|
|
+ latitude,
|
|
|
+ longitude,
|
|
|
});
|
|
|
|
|
|
if (!res || !res.rows) {
|
|
@@ -267,6 +234,7 @@
|
|
|
if (pages.value.current < Math.ceil(pages.value.total / pages.value.pageSize)) {
|
|
|
pages.value.current += 1;
|
|
|
loadmoreInfo.value.status = 'loading';
|
|
|
+
|
|
|
getList();
|
|
|
}
|
|
|
})
|
|
@@ -278,6 +246,7 @@
|
|
|
if (list1.value.length > 0) {
|
|
|
const defaultTab = list1.value[0];
|
|
|
businessManagementId.value = defaultTab.id;
|
|
|
+
|
|
|
getList();
|
|
|
}
|
|
|
})
|