style: 风云榜样式调整

This commit is contained in:
2026-06-26 13:33:38 +08:00
parent 2b54995709
commit 655eceafbc
5 changed files with 190 additions and 227 deletions
+43 -4
View File
@@ -6,7 +6,7 @@
:showLeftButton="false"
>
<view class="ai-store-page h100 flex-column">
<view class="top-area">
<view class="top-area" :class="{'top-area1': index === 1}">
<view class="tab-header">
<view
v-for="(tab, i) in nav"
@@ -182,6 +182,23 @@
const timeRound = ref([]);
const selectedTimeId = ref(null);
const navName = ref('');
const timeRoundNameMap = computed(() => {
const arr = Array.isArray(timeRound.value) ? timeRound.value : [];
const map = {};
arr.forEach((it) => {
const id = it?.id;
if (id === null || id === undefined) return;
map[String(id)] = String(it?.name || '').trim();
});
return map;
});
const attachShoppingPlazaName = (item) => {
const map = timeRoundNameMap.value;
const id = item?.shoppingPlazaId ?? item?.roundTimeId;
const name = id === null || id === undefined ? '' : map[String(id)] || '';
return { ...item, shoppingPlazaName: name };
};
function changeTimeRound(e) {
navName.value = e.name;
@@ -340,7 +357,7 @@
pageNo: mescroll?.num || 1,
pageSize: mescroll?.size || 10,
keyWord: searchText.value,
timeId: selectedTimeId.value,
// timeId: selectedTimeId.value,
...mescroll.params,
});
}
@@ -381,7 +398,8 @@
};
});
} else {
curPageData = res.data?.list || [];
const raw = Array.isArray(res.data?.list) ? res.data.list : [];
curPageData = raw.map(attachShoppingPlazaName);
}
if (mescroll?.num === 1) dataList.value = [];
@@ -389,6 +407,22 @@
pageCommodity.value?.getState(true, curPageData.length);
};
watch(
timeRound,
() => {
if (index.value !== 0) return;
if (!Array.isArray(dataList.value) || !dataList.value.length) return;
const map = timeRoundNameMap.value;
dataList.value = dataList.value.map((it) => {
const id = it?.shoppingPlazaId ?? it?.roundTimeId;
const name = id === null || id === undefined ? '' : map[String(id)] || '';
if (name === it?.shoppingPlazaName) return it;
return { ...it, shoppingPlazaName: name };
});
},
{ deep: true },
);
const paymentRef = ref(null);
const addCar = (data) => {
paymentRef.value?.addCar(data);
@@ -442,8 +476,13 @@
.top-area {
padding: 0 24rpx 24rpx;
background: #2556ec;
background: url('/static/ai_bg.png') no-repeat center top;
background-size: cover;
// border-radius: 0 0 30rpx 30rpx;
}
.top-area1{
border-radius: 0 0 30rpx 30rpx;
background: #2556ec;
}
.tab-header {