+
+
-
-
-
-
+
发起单位:
+
{{ item.fqdw }}
-
-
-
- 发起单位: {{ item.fqdw }}
-
- 项目名称: {{ item.xmmc }}
-
- 公众筹款金额(元): {{ item.gzzcje }}
-
- 捐赠支出金额: {{ item.jzzcje }}
-
- 捐赠人次: {{ item.jzrc }}
-
-
+
项目名称:
+
{{ item.xmmc }}
-
+
公众筹款金额(元):
+
{{ item.gzzcje }}
+
+
+
捐赠支出金额:
+
{{ item.jzzcje }}
+
+
+
捐赠人次:
+
{{ item.jzrc }}
@@ -235,11 +229,12 @@ const getData = async () => {
await http.get("/api/ggfwyth/succour").then((res) => {
if (res.code == 200) {
console.log(res.data);
+ data.diversification.hszhxms = res.data.diversification.hszhxms;
// 专项救助模块
- // 教育&医疗&就业
+ // 教育&医疗
data.education.data = res.data.specialAssistance.education.data;
data.education.year = res.data.specialAssistance.education.year;
- // 住房&自然灾害&临时救助
+ // 住房&临时救助
data.housing.data = res.data.specialAssistance.housing.data;
data.housing.year = res.data.specialAssistance.housing.year;
// 救助概况
@@ -258,9 +253,42 @@ const getData = async () => {
}
});
};
+
+//自动滚动
+const mainRef = ref(null);
+let isAutoScrolling = true;
+
+const stopAutoScroll = () => {
+ isAutoScrolling = false;
+};
+
+const startAutoScroll = () => {
+ isAutoScrolling = true;
+ autoScroll();
+};
+
+const autoScroll = () => {
+ if (!isAutoScrolling) return;
+
+ const mainEl = mainRef.value;
+ mainEl.scrollTop += 1; // 每次滚动的距离
+
+ if (mainEl.scrollTop + 1 >= mainEl.scrollHeight - mainEl.clientHeight) {
+ setTimeout(() => {
+ mainEl.scrollTo({ top: 0, behavior: "smooth" });
+ setTimeout(autoScroll, 2000); // 2秒后再次滚动到底部
+ }, 1000); // 暂停1秒后开始快速滚回顶部
+ } else {
+ requestAnimationFrame(autoScroll);
+ }
+};
+
onBeforeMount(() => {
getData();
});
+onMounted(() => {
+ startAutoScroll();
+});