问卷调整

This commit is contained in:
hebo 2026-01-10 10:09:08 +08:00
parent 9b8e655f3d
commit ae1ced2a0c

View File

@ -11,6 +11,14 @@
<!-- 可滚动的内容区域 -->
<view class="scrollable-content">
<!-- 加载遮罩层 -->
<view v-if="loading" class="loading-mask">
<view class="loading-content">
<view class="loading-spinner"></view>
<text class="loading-text">加载中...</text>
</view>
</view>
<!-- 就餐标准列表 -->
<view class="jc-bz-list" v-if="jcBzList.length > 0">
<view
@ -57,7 +65,7 @@
<template #bottom>
<view class="bottom-action">
<view class="cancel-btn" @click="goHome">返回首页</view>
<view class="cancel-btn" @click="goHome">返回</view>
</view>
</template>
</BasicLayout>
@ -79,8 +87,12 @@ const curXs = computed(() => getCurXs);
//
const jcBzList = ref<any[]>([]);
//
const loading = ref(false);
//
const getJcBzList = async () => {
loading.value = true;
try {
const res = await checkXsJcBmApi({
xsId: getCurXs.id
@ -130,6 +142,12 @@ const getJcBzList = async () => {
});
} catch (error) {
console.error('获取就餐标准列表失败:', error);
uni.showToast({
title: '获取数据失败,请重试',
icon: 'none'
});
} finally {
loading.value = false;
}
};
@ -401,10 +419,55 @@ onMounted(() => {
text-align: center;
border-radius: 22px;
font-size: 16px;
background-color: #fff;
color: #333;
border: 1px solid #ddd;
background-color: #2879ff;
color: #fff;
border: none;
}
}
//
.loading-mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 9999;
.loading-content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-color: #fff;
border-radius: 8px;
padding: 30px 40px;
min-width: 120px;
.loading-spinner {
width: 40px;
height: 40px;
border: 3px solid #f3f3f3;
border-top: 3px solid #2879ff;
border-radius: 50%;
animation: spin 1s linear infinite;
margin-bottom: 15px;
}
.loading-text {
font-size: 14px;
color: #666;
}
}
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
</style>