diff --git a/src/components/ListLoadError/index.tsx b/src/components/ListLoadError/index.tsx index 6583dc5..9fa0415 100644 --- a/src/components/ListLoadError/index.tsx +++ b/src/components/ListLoadError/index.tsx @@ -5,10 +5,13 @@ import img from "@/config/images"; interface IProps { reload?: () => void; text?: string; + errorImg?: string; + btnText?: string; + btnImg?: string; } const ListLoadError = (props: IProps) => { - const { reload, text } = props; + const { reload, text, errorImg, btnText, btnImg } = props; const handleReload = () => { reload && typeof reload === "function" && reload(); }; @@ -17,13 +20,13 @@ const ListLoadError = (props: IProps) => { {text && {text}} {reload && ( )} diff --git a/src/components/UploadCover/upload-source-popup.scss b/src/components/UploadCover/upload-source-popup.scss index 6e455e3..30a1469 100644 --- a/src/components/UploadCover/upload-source-popup.scss +++ b/src/components/UploadCover/upload-source-popup.scss @@ -107,7 +107,7 @@ } .upload-popup-image-list-empty-image { - width: 80%; + width: 52%; aspect-ratio: 4/3; height: auto; } diff --git a/src/config/images.js b/src/config/images.js index ff26b3b..b61abfb 100644 --- a/src/config/images.js +++ b/src/config/images.js @@ -49,6 +49,7 @@ export default { ICON_LIST_PLAYING_GAME: require('@/static/list/icon-paying-game.svg'), 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_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 b7b730c..8bb582c 100644 --- a/src/container/listContainer/index.tsx +++ b/src/container/listContainer/index.tsx @@ -18,6 +18,10 @@ const ListContainer = (props) => { reload, // recommendList, loadMoreMatches, + errorImg, + emptyText, + btnText, + btnImg, } = props; const timerRef = useRef(null); @@ -78,7 +82,7 @@ const ListContainer = (props) => { const renderList = (list) => { // 请求数据为空 if (!loading && (!list || list?.length === 0)) { - return ; + return ; } // 渲染数据 diff --git a/src/order_pages/orderList/index.module.scss b/src/order_pages/orderList/index.module.scss index 69263e8..4d2f470 100644 --- a/src/order_pages/orderList/index.module.scss +++ b/src/order_pages/orderList/index.module.scss @@ -392,6 +392,10 @@ justify-content: center; gap: 12px; + Image { + width: 52vw; + } + .emptyTip { color: rgba(0, 0, 0, 0.85); font-feature-settings: "liga" off, "clig" off; diff --git a/src/order_pages/orderList/index.tsx b/src/order_pages/orderList/index.tsx index 7872d25..1f6017e 100644 --- a/src/order_pages/orderList/index.tsx +++ b/src/order_pages/orderList/index.tsx @@ -403,7 +403,7 @@ const OrderList = () => { )} {flatList.length === 0 && ( - + 暂时没有订单 )} diff --git a/src/static/emptyStatus/publish-empty.png b/src/static/emptyStatus/publish-empty.png index 8b41a26..d6461aa 100644 Binary files a/src/static/emptyStatus/publish-empty.png and b/src/static/emptyStatus/publish-empty.png differ diff --git a/src/user_pages/myself/index.tsx b/src/user_pages/myself/index.tsx index 19137d0..b5d4f7a 100644 --- a/src/user_pages/myself/index.tsx +++ b/src/user_pages/myself/index.tsx @@ -255,6 +255,10 @@ const MyselfPage: React.FC = () => { recommendList={[]} loading={loading} error={null} + errorImg="ICON_LIST_EMPTY" + emptyText="暂未发布球局" + btnText="去发布" + btnImg="ICON_ADD" reload={load_game_data} loadMoreMatches={() => {}} /> @@ -278,7 +282,7 @@ const MyselfPage: React.FC = () => { recommendList={[]} loading={loading} error={null} - reload={load_game_data} + errorImg="ICON_LIST_EMPTY" loadMoreMatches={() => {}} /> diff --git a/src/user_pages/other/index.tsx b/src/user_pages/other/index.tsx index a2388e4..360fbf7 100644 --- a/src/user_pages/other/index.tsx +++ b/src/user_pages/other/index.tsx @@ -72,9 +72,8 @@ const OtherUserPage: React.FC = () => { nickname: userData.nickname || "", avatar: userData.avatar_url || "", join_date: userData.subscribe_time - ? `${new Date(userData.subscribe_time).getFullYear()}年${ - new Date(userData.subscribe_time).getMonth() + 1 - }月加入` + ? `${new Date(userData.subscribe_time).getFullYear()}年${new Date(userData.subscribe_time).getMonth() + 1 + }月加入` : "", stats: { following: userData.stats?.following_count || 0, @@ -237,16 +236,17 @@ const OtherUserPage: React.FC = () => { {/* 球局列表 */} {/* */} - - {}} - /> - + + { }} + /> + {/* */} {/* 球局卡片 */} @@ -272,16 +272,17 @@ const OtherUserPage: React.FC = () => { {/* 球局列表 */} {/* */} - - {}} - /> - + + { }} + /> + {/* */} {/* 球局卡片 */}