修改活动报名按钮状态,报修添加小区参数;访客返回数据
This commit is contained in:
@@ -107,7 +107,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, computed } from "vue";
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import { onLoad,onShow} from "@dcloudio/uni-app";
|
||||
import { getVisitorList } from "../api/api.js";
|
||||
|
||||
const activeTab = ref("waiting");
|
||||
@@ -132,9 +132,13 @@ const mapData = (list) => {
|
||||
};
|
||||
|
||||
const fetchVisitorList = async () => {
|
||||
const userId = uni.getStorageSync("userId");
|
||||
|
||||
try {
|
||||
const res = await getVisitorList({ userId });
|
||||
const params = {
|
||||
userId: uni.getStorageSync("userId"),
|
||||
villageId:uni.getStorageSync('currentVillageId')
|
||||
}
|
||||
const res = await getVisitorList(params);
|
||||
visitorList.value = mapData(res.data || []);
|
||||
} catch (err) {
|
||||
uni.showToast({ title: err.msg, icon: "none" });
|
||||
@@ -156,8 +160,11 @@ onLoad(() => {
|
||||
// 列表区域可用高度 = 窗口高度 - 状态栏 - 导航栏 - tab栏 - 底部按钮区
|
||||
scrollHeight.value = info.windowHeight - statusBarHeight.value - navPx - tabPx - btnPx;
|
||||
|
||||
fetchVisitorList();
|
||||
|
||||
});
|
||||
onShow(()=>{
|
||||
fetchVisitorList();
|
||||
})
|
||||
|
||||
const filterdList = computed(() => {
|
||||
return visitorList.value.filter((item) => item.status === activeTab.value);
|
||||
|
||||
Reference in New Issue
Block a user