diff --git a/.env.development b/.env.development index da0a3b9..705b440 100644 --- a/.env.development +++ b/.env.development @@ -2,10 +2,10 @@ ENV = development # 本地环境接口地址 -VITE_API_URL = http://123.60.153.169:8040/apih5 +# VITE_API_URL = http://123.60.153.169:8040/apih5 # VITE_API_URL = http://4155gf93ll13.vicp.fun/apih5 # VITE_API_URL = http://123.60.79.143:8041/apih5 # VITE_API_URL =http://192.168.0.135:8040/apih5 -# VITE_API_URL = https://cankao.cs.com.cn/apih5 +VITE_API_URL = https://cankao.cs.com.cn/apih5 VITE_API_DATAV_URL = https://cankao.cs.com.cn/zzck_datav \ No newline at end of file diff --git a/src/pages/realtimeInfo/indexEtf.vue b/src/pages/realtimeInfo/indexEtf.vue index 35eb3ac..af8a7e7 100644 --- a/src/pages/realtimeInfo/indexEtf.vue +++ b/src/pages/realtimeInfo/indexEtf.vue @@ -76,7 +76,8 @@ :show="LoginShow" @handlePopupClose="handlePopupClose" @handlePopupSuccessCallback="handlePopupSuccessCallback" - @handlePopupErrorCallback="handlePopupErrorCallback" /> + @handlePopupErrorCallback="handlePopupErrorCallback" + /> @@ -128,13 +129,30 @@ async function getData() { uni.hideLoading(); if (code == 200) { - if (form.value.page == 1) { - listData.value = []; - listData.value = data.list; - } else { - listData.value = [...listData.value, ...data.list]; + if (form.value.page == 1) { + listData.value = []; + listData.value = data.list; + } else { + // 处理可能的day字段重复,合并相同day的list数据 + const newList = [...data.list]; + const updatedList = [...listData.value]; + + newList.forEach(newItem => { + // 检查是否存在相同day的条目 + const existingItemIndex = updatedList.findIndex(item => item.day === newItem.day); + + if (existingItemIndex !== -1) { + // 如果存在相同day,合并list数据 + updatedList[existingItemIndex].list = [...updatedList[existingItemIndex].list, ...newItem.list]; + } else { + // 如果不存在相同day,直接添加 + updatedList.push(newItem); + } + }); + + listData.value = updatedList; + } } - } } const LoginShow = ref(false);