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