From 0efe0d2c3c020ff84c050f5e7d2295b46103a11c Mon Sep 17 00:00:00 2001 From: hackrobot Date: Sun, 7 Apr 2024 13:23:39 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=96=B0=E5=A2=9E=E5=9B=BE=E4=B9=A6?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.config.js | 2 + .../index/componments/Nomadbook/index.jsx | 9 ++- .../componments/NomadbookPage/index.config.js | 3 + .../index/componments/NomadbookPage/index.jsx | 60 +++++++++++++++++++ .../componments/NomadbookPage/index.scss | 35 +++++++++++ 5 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 src/pages/index/componments/NomadbookPage/index.config.js create mode 100644 src/pages/index/componments/NomadbookPage/index.jsx create mode 100644 src/pages/index/componments/NomadbookPage/index.scss diff --git a/src/app.config.js b/src/app.config.js index 642d9a3..5685e61 100644 --- a/src/app.config.js +++ b/src/app.config.js @@ -2,6 +2,8 @@ export default defineAppConfig({ pages: [ 'pages/index/index', 'pages/index/componments/KeywordJoin/index', + 'pages/index/componments/NomadbookPage/index', + 'pages/my/index', 'pages/my/componments/Log/index', 'pages/my/componments/Quesion/index', diff --git a/src/pages/index/componments/Nomadbook/index.jsx b/src/pages/index/componments/Nomadbook/index.jsx index 9fd79f4..fb05c8d 100644 --- a/src/pages/index/componments/Nomadbook/index.jsx +++ b/src/pages/index/componments/Nomadbook/index.jsx @@ -25,7 +25,14 @@ const Nomadbook = () => { const [open, setopen] = useState(false); return ( - + { + Taro.navigateTo({ + url: "/pages/index/componments/NomadbookPage/index", + }); + }} + > {[ { imagePath: rework }, diff --git a/src/pages/index/componments/NomadbookPage/index.config.js b/src/pages/index/componments/NomadbookPage/index.config.js new file mode 100644 index 0000000..f5bc592 --- /dev/null +++ b/src/pages/index/componments/NomadbookPage/index.config.js @@ -0,0 +1,3 @@ +export default definePageConfig({ + navigationBarTitleText: '图书' +}) diff --git a/src/pages/index/componments/NomadbookPage/index.jsx b/src/pages/index/componments/NomadbookPage/index.jsx new file mode 100644 index 0000000..3acbb02 --- /dev/null +++ b/src/pages/index/componments/NomadbookPage/index.jsx @@ -0,0 +1,60 @@ +import { View, Text, Image, Button, Icon } from "@tarojs/components"; +import { useLoad } from "@tarojs/taro"; +import Taro from "@tarojs/taro"; +import { + AtAvatar, + AtTag, + AtIcon, + AtTabBar, + AtButton, + AtAccordion, + AtList, + AtListItem, +} from "taro-ui"; +import "./index.scss"; +import rework from "@/images/book/rework.jpg"; +import dangan from "@/images/book/dangan.jpg"; +import fuye from "@/images/book/fuye.jpg"; +import poquan from "@/images/book/poquan.jpg"; +import chuangye from "@/images/book/chuangye.jpg"; +import hours from "@/images/book/hours.jpg"; + +import { useEffect, useState } from "react"; + +const NomadbookPage = () => { + const [open, setopen] = useState(false); + + return ( + + {/* NomadbookPage */} + + {[ + { imagePath: rework }, + { imagePath: dangan }, + { imagePath: fuye }, + { imagePath: poquan }, + { imagePath: chuangye }, + { imagePath: hours }, + ].map((item, index) => { + return ( + + {" "} + + + ); + })} + + + ); +}; + +export default NomadbookPage; diff --git a/src/pages/index/componments/NomadbookPage/index.scss b/src/pages/index/componments/NomadbookPage/index.scss new file mode 100644 index 0000000..d58ec72 --- /dev/null +++ b/src/pages/index/componments/NomadbookPage/index.scss @@ -0,0 +1,35 @@ +.NomadbookPage { + padding: 10px; + font-size: 25px; + // width: 320px; + // height: 230px; + + display: flex; + flex-direction: column; + align-items: center; + // justify-content: center; + // background-color: red; + border-radius: 20px; + // border: solid 1px #8c8c8c; + // background-color: yellow; + + .book { + // width: 100%; + + // height: 100%; + display: flex; + flex-direction: row; + align-items: center; + justify-content: space-between; + flex-wrap: wrap; + // background-color: aquamarine; + padding: 10px; + .bookItem { + width: 200px; + height: 200px; + // background-color: yellow; + margin-top: 10px; + // margin-right: 10px; + } + } +}