feat: 增加图书模块
This commit is contained in:
BIN
src/images/book/chuangye.jpg
Normal file
BIN
src/images/book/chuangye.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
BIN
src/images/book/dangan.jpg
Normal file
BIN
src/images/book/dangan.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 37 KiB |
BIN
src/images/book/fuye.jpg
Normal file
BIN
src/images/book/fuye.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
BIN
src/images/book/hours.jpg
Normal file
BIN
src/images/book/hours.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.9 KiB |
BIN
src/images/book/poquan.jpg
Normal file
BIN
src/images/book/poquan.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.8 KiB |
BIN
src/images/book/rework.jpg
Normal file
BIN
src/images/book/rework.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.8 KiB |
59
src/pages/index/componments/Nomadbook/index.jsx
Normal file
59
src/pages/index/componments/Nomadbook/index.jsx
Normal file
@@ -0,0 +1,59 @@
|
||||
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 Nomadbook = () => {
|
||||
const [open, setopen] = useState(false);
|
||||
|
||||
return (
|
||||
<View className="Nomadbook">
|
||||
<View className="book">
|
||||
{[
|
||||
{ imagePath: rework },
|
||||
{ imagePath: dangan },
|
||||
{ imagePath: fuye },
|
||||
{ imagePath: poquan },
|
||||
{ imagePath: chuangye },
|
||||
{ imagePath: hours },
|
||||
].map((item, index) => {
|
||||
return (
|
||||
<View className="bookItem">
|
||||
{" "}
|
||||
<Image
|
||||
style={{
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
background: " #fff",
|
||||
borderRadius: "10px",
|
||||
}}
|
||||
mode="scaleToFill"
|
||||
src={item.imagePath}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
})}
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
export default Nomadbook;
|
||||
33
src/pages/index/componments/Nomadbook/index.scss
Normal file
33
src/pages/index/componments/Nomadbook/index.scss
Normal file
@@ -0,0 +1,33 @@
|
||||
.Nomadbook {
|
||||
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;
|
||||
|
||||
.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: 80px;
|
||||
height: 80px;
|
||||
// background-color: yellow;
|
||||
margin-top: 10px;
|
||||
// margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -25,6 +25,8 @@ import a6 from "@/images/meetup/a6.jpg";
|
||||
|
||||
import TabbarCom from "@/componments/TabbarCom";
|
||||
import QrCode from "@/componments/QrCode";
|
||||
import Nomadbook from "@/pages/index/componments/Nomadbook";
|
||||
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
// import beijing from "../../images/city/beijing.jpg";
|
||||
@@ -119,6 +121,11 @@ export default function Index() {
|
||||
);
|
||||
};
|
||||
|
||||
// 图书
|
||||
// const Nomadbook = () => {
|
||||
// return <View className="Nomadbook" onClick={() => {}}>Nomadbook</View>;
|
||||
// };
|
||||
|
||||
const HomeCardItem = () => {
|
||||
return [
|
||||
{
|
||||
@@ -128,11 +135,12 @@ export default function Index() {
|
||||
customCom: "test",
|
||||
},
|
||||
// 双数插入
|
||||
|
||||
{
|
||||
cityName: "加入微信群",
|
||||
cityName: "nomad书籍",
|
||||
imagePath: shanghai,
|
||||
isCustom: true,
|
||||
customCom: <JoinWechat />,
|
||||
customCom: <Nomadbook/>,
|
||||
},
|
||||
{
|
||||
cityName: "上海",
|
||||
@@ -140,12 +148,12 @@ export default function Index() {
|
||||
isCustom: false,
|
||||
customCom: "test",
|
||||
},
|
||||
// {
|
||||
// cityName: "同城活动",
|
||||
// imagePath: shanghai,
|
||||
// isCustom: true,
|
||||
// customCom: <JoinWechat />,
|
||||
// },
|
||||
{
|
||||
cityName: "加入微信群",
|
||||
imagePath: shanghai,
|
||||
isCustom: true,
|
||||
customCom: <JoinWechat />,
|
||||
},
|
||||
{
|
||||
cityName: "广州",
|
||||
imagePath: guangzhou,
|
||||
|
||||
@@ -35,9 +35,9 @@
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
// justify-content: center;
|
||||
// background-color: red;
|
||||
// background-color: #ffe7ba;
|
||||
border-radius: 20px;
|
||||
border: solid 1px;
|
||||
border: solid 1px #8c8c8c;
|
||||
.CustomHeader {
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
@@ -64,6 +64,21 @@
|
||||
}
|
||||
}
|
||||
|
||||
.Nomadbook {
|
||||
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;
|
||||
|
||||
}
|
||||
|
||||
.homeCardItem {
|
||||
margin-top: 10px;
|
||||
width: 340px;
|
||||
|
||||
Reference in New Issue
Block a user