diff --git a/src/components/ListLoadError/index.tsx b/src/components/ListLoadError/index.tsx index 551053f..1f131c5 100644 --- a/src/components/ListLoadError/index.tsx +++ b/src/components/ListLoadError/index.tsx @@ -8,19 +8,22 @@ interface IProps { errorImg?: string; btnText?: string; btnImg?: string; - height?: string + wrapperHeight?: string; + width?: string; + height?: string; } const ListLoadError = (props: IProps) => { - const { reload, text, errorImg, btnText, btnImg, height = "unset" } = props; + const { reload, text, errorImg, btnText, btnImg, wrapperHeight="", width = "", height = "" } = props; const handleReload = () => { reload && typeof reload === "function" && reload(); }; return ( - + {text && {text}} diff --git a/src/config/images.js b/src/config/images.js index 4a8f4c0..2dc8e5c 100644 --- a/src/config/images.js +++ b/src/config/images.js @@ -50,6 +50,7 @@ export default { ICON_LIST_LOAD_ERROR: require('@/static/list/icon-load-error.svg'), ICON_LIST_RELOAD: require('@/static/list/icon-reload.svg'), ICON_LIST_EMPTY: require('@/static/emptyStatus/publish-empty.png'), + ICON_LIST_EMPTY_CARD: require('@/static/emptyStatus/publish-empty-card.png'), ICON_LIST_SEARCH_SEARCH: require('@/static/search/icon-search.svg'), ICON_LIST_SEARCH_BACK: require('@/static/search/icon-back.svg'), ICON_LIST_SEARCH_CLEAR: require('@/static/search/icon-search-clear.svg'), diff --git a/src/container/listContainer/index.tsx b/src/container/listContainer/index.tsx index ecff04b..5dabdc3 100644 --- a/src/container/listContainer/index.tsx +++ b/src/container/listContainer/index.tsx @@ -29,6 +29,8 @@ const ListContainer = (props) => { collapse = false, defaultShowNum, evaluateFlag, + listLoadErrorWrapperHeight, + listLoadErrorWidth, listLoadErrorHeight, } = props; const timerRef = useRef(null); @@ -163,6 +165,8 @@ const ListContainer = (props) => { btnText={btnText} btnImg={btnImg} text={emptyText || "暂无数据"} + wrapperHeight={listLoadErrorWrapperHeight || ""} + width={listLoadErrorWidth || ""} height={listLoadErrorHeight || ""} /> ); diff --git a/src/main_pages/components/MyselfPageContent.module.scss b/src/main_pages/components/MyselfPageContent.module.scss index fd134a8..54b06be 100644 --- a/src/main_pages/components/MyselfPageContent.module.scss +++ b/src/main_pages/components/MyselfPageContent.module.scss @@ -34,7 +34,7 @@ // MyselfPageContent 组件使用的类名 .myselfPageContentMain { - min-height: calc(100vh + 5px); + // min-height: calc(100vh + 5px); animation: backgroundGradient 0s ease-in-out forwards; z-index: 5; flex: 1; diff --git a/src/main_pages/components/MyselfPageContent.tsx b/src/main_pages/components/MyselfPageContent.tsx index 2269b2f..022919a 100644 --- a/src/main_pages/components/MyselfPageContent.tsx +++ b/src/main_pages/components/MyselfPageContent.tsx @@ -144,13 +144,13 @@ const MyselfPageContent: React.FC = () => { setActiveTab(tab); }; - const handleScroll = (event: any) => { - const scrollData = event.detail; - setCollapseProfile(scrollData.scrollTop > 1); - }; + // const handleScroll = (event: any) => { + // const scrollData = event.detail; + // setCollapseProfile(scrollData.scrollTop > 1); + // }; return ( - + { recommendList={[]} loading={loading} error={null} - errorImg="ICON_LIST_EMPTY" - emptyText="暂未发布球局" + errorImg="ICON_LIST_EMPTY_CARD" + emptyText="还没有发布过球局" btnText="去发布" btnImg="ICON_ADD" reload={goPublish} @@ -234,7 +234,9 @@ const MyselfPageContent: React.FC = () => { loadMoreMatches={() => {}} collapse={true} style={{ paddingBottom: 0, overflow: "hidden" }} - listLoadErrorHeight="320px" + listLoadErrorWrapperHeight="267px" + listLoadErrorWidth="100%" + listLoadErrorHeight="152px" defaultShowNum={3} /> @@ -248,12 +250,14 @@ const MyselfPageContent: React.FC = () => { recommendList={[]} loading={loading} error={null} - errorImg="ICON_LIST_EMPTY" + errorImg="ICON_LIST_EMPTY_CARD" isShowNoData={ended_game_records.length === 0} loadMoreMatches={() => {}} collapse={true} style={{ paddingBottom: "90px", overflow: "hidden" }} - listLoadErrorHeight="320px" + listLoadErrorWrapperHeight="220px" + listLoadErrorWidth="100%" + listLoadErrorHeight="152px" defaultShowNum={3} /> diff --git a/src/static/emptyStatus/publish-empty-card.png b/src/static/emptyStatus/publish-empty-card.png new file mode 100644 index 0000000..6cba41c Binary files /dev/null and b/src/static/emptyStatus/publish-empty-card.png differ diff --git a/src/user_pages/other/index.scss b/src/user_pages/other/index.scss index 44b2f32..ec4b1a0 100644 --- a/src/user_pages/other/index.scss +++ b/src/user_pages/other/index.scss @@ -68,7 +68,7 @@ // 主要内容区域 .other_main_content { - min-height: calc(100vh + 5px); + // min-height: calc(100vh + 5px); position: relative; z-index: 5; flex: 1; diff --git a/src/user_pages/other/index.tsx b/src/user_pages/other/index.tsx index db6e27c..a595836 100644 --- a/src/user_pages/other/index.tsx +++ b/src/user_pages/other/index.tsx @@ -237,7 +237,7 @@ const OtherUserPage: React.FC = () => { // }; return ( - + {/* Taro.navigateBack()}> @@ -301,12 +301,14 @@ const OtherUserPage: React.FC = () => { loading={loading} error={null} isShowNoData={game_records.length === 0} - errorImg="ICON_LIST_EMPTY" + errorImg="ICON_LIST_EMPTY_CARD" emptyText="暂无球局信息" loadMoreMatches={() => { }} collapse={true} style={{ paddingBottom: 0, overflow: "hidden" }} - listLoadErrorHeight="320px" + listLoadErrorWrapperHeight="267px" + listLoadErrorWidth="100%" + listLoadErrorHeight="152px" defaultShowNum={3} /> @@ -342,12 +344,14 @@ const OtherUserPage: React.FC = () => { loading={loading} error={null} isShowNoData={ended_game_records.length === 0} - errorImg="ICON_LIST_EMPTY" + errorImg="ICON_LIST_EMPTY_CARD" emptyText="暂无球局信息" loadMoreMatches={() => { }} collapse={true} style={{ paddingBottom: "90px", overflow: "hidden" }} - listLoadErrorHeight="320px" + listLoadErrorWrapperHeight="220px" + listLoadErrorWidth="100%" + listLoadErrorHeight="152px" defaultShowNum={3} />