feat: 增加图书模块

This commit is contained in:
hackrobot
2024-03-21 09:30:22 +08:00
parent a637369209
commit 9691761856
10 changed files with 125 additions and 10 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
src/images/book/rework.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

View 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;

View 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;
}
}
}

View File

@@ -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,

View File

@@ -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;