1
This commit is contained in:
@@ -161,29 +161,22 @@ const ListContainer = (props) => {
|
||||
|
||||
// 渲染 banner 卡片
|
||||
const renderBanner = (item, index) => {
|
||||
if (!item?.banner_image_url) return null;
|
||||
if (!item?.banner_image_url) {
|
||||
return null;
|
||||
}
|
||||
return (
|
||||
<View
|
||||
key={item.id || `banner-${index}`}
|
||||
style={{
|
||||
maxHeight: "122px",
|
||||
height: "122px",
|
||||
overflow: "hidden",
|
||||
borderRadius: "12px",
|
||||
backgroundImage: `url(${item.banner_image_url})`,
|
||||
backgroundSize: "contain",
|
||||
backgroundPosition: "center",
|
||||
backgroundRepeat: "no-repeat",
|
||||
}}
|
||||
>
|
||||
<Image
|
||||
src={item.banner_image_url}
|
||||
mode="widthFix"
|
||||
style={{ width: "100%", display: "block", maxHeight: "122px" }}
|
||||
onClick={() => {
|
||||
const target = item.banner_detail_url;
|
||||
if (target) {
|
||||
(Taro as any).navigateTo({
|
||||
url: `/other_pages/bannerDetail/index?img=${encodeURIComponent(target)}`,
|
||||
});
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
@@ -216,7 +209,7 @@ const ListContainer = (props) => {
|
||||
}
|
||||
if (match.type === "evaluateCard") {
|
||||
return (
|
||||
<NTRPTestEntryCard key="evaluate" type={EvaluateScene.list} />
|
||||
<NTRPTestEntryCard key={`evaluate-${index}`} type={EvaluateScene.list} />
|
||||
);
|
||||
}
|
||||
return <ListCard key={match?.id || index} {...match} />;
|
||||
|
||||
@@ -193,7 +193,7 @@ const LoginPage: React.FC = () => {
|
||||
/>
|
||||
</View>
|
||||
<Text className="button_text">
|
||||
{is_loading ? "登录中..." : "授权登录"}
|
||||
{is_loading ? "登录中..." : "一键登录"}
|
||||
</Text>
|
||||
</Button>
|
||||
|
||||
|
||||
@@ -293,9 +293,9 @@ const ListPageContent: React.FC<ListPageContentProps> = ({
|
||||
currentProvince,
|
||||
});
|
||||
|
||||
// 地址发生变化或不一致,重新加载数据和球局数量
|
||||
// 先调用列表接口,然后在列表接口完成后调用数量接口
|
||||
(async () => {
|
||||
// 延迟刷新,等 tab 切换动画完成后再加载,避免切换时列表重渲染导致抖动
|
||||
const delayMs = 280;
|
||||
const timer = setTimeout(async () => {
|
||||
try {
|
||||
if (refreshBothLists) {
|
||||
await refreshBothLists();
|
||||
@@ -311,7 +311,9 @@ const ListPageContent: React.FC<ListPageContentProps> = ({
|
||||
} catch (error) {
|
||||
console.error("重新加载数据失败:", error);
|
||||
}
|
||||
})();
|
||||
}, delayMs);
|
||||
prevIsActiveRef.current = isActive;
|
||||
return () => clearTimeout(timer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,21 +21,17 @@
|
||||
top: 0;
|
||||
left: 0;
|
||||
opacity: 0;
|
||||
transform: scale(0.98);
|
||||
transition: opacity 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
|
||||
transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
||||
transition: opacity 0.25s ease-out;
|
||||
overflow-y: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
pointer-events: none;
|
||||
will-change: opacity, transform;
|
||||
backface-visibility: hidden;
|
||||
-webkit-backface-visibility: hidden;
|
||||
visibility: hidden;
|
||||
|
||||
&.active {
|
||||
opacity: 1;
|
||||
transform: scale(1);
|
||||
z-index: 1;
|
||||
pointer-events: auto;
|
||||
visibility: visible;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,16 +1,20 @@
|
||||
.banner_detail_page {
|
||||
min-height: 100vh;
|
||||
background: #ffffff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.banner_detail_content {
|
||||
padding: 12px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.banner_detail_image {
|
||||
width: 100%;
|
||||
border-radius: 12px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -10,7 +10,7 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
height: calc(100vh - 98px);
|
||||
flex: 1;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
@@ -163,7 +163,6 @@
|
||||
|
||||
&__qr_image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
&__qr_placeholder {
|
||||
|
||||
Reference in New Issue
Block a user