-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
342 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +0,0 @@ | ||
.App { | ||
text-align: center; | ||
} | ||
|
||
.App-logo { | ||
height: 40vmin; | ||
pointer-events: none; | ||
} | ||
|
||
@media (prefers-reduced-motion: no-preference) { | ||
.App-logo { | ||
animation: App-logo-spin infinite 20s linear; | ||
} | ||
} | ||
|
||
.App-header { | ||
background-color: #282c34; | ||
min-height: 100vh; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
font-size: calc(10px + 2vmin); | ||
color: white; | ||
} | ||
|
||
.App-link { | ||
color: #61dafb; | ||
} | ||
|
||
@keyframes App-logo-spin { | ||
from { | ||
transform: rotate(0deg); | ||
} | ||
to { | ||
transform: rotate(360deg); | ||
} | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.tabBar{ | ||
position:fixed; | ||
bottom: 5px; | ||
width: 100%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import React from "react"; | ||
import { | ||
MessageOutline, | ||
UserOutline, | ||
UnorderedListOutline, | ||
HeartOutline, | ||
AddOutline | ||
} from "antd-mobile-icons"; | ||
import { TabBar } from "antd-mobile"; | ||
import { useNavigate, useLocation } from "react-router-dom"; | ||
import './index.css' | ||
function getItem(title, key, icon) { | ||
return { | ||
key, | ||
title, | ||
icon, | ||
}; | ||
} | ||
const items = [ | ||
getItem("首页", "/home", <UnorderedListOutline />), | ||
getItem("论坛", "/forum", <MessageOutline />), | ||
getItem("发帖", "/post", <AddOutline />), | ||
getItem("心愿单", "/like", <HeartOutline />), | ||
getItem("我的", "/me", <UserOutline />), | ||
]; | ||
|
||
export default function MenuBar() { | ||
const navigate = useNavigate(); | ||
const location = useLocation(); | ||
const setRouteActive = e => { | ||
navigate(e); | ||
window.scrollTo(0,0); | ||
}; | ||
return ( | ||
<TabBar | ||
className='tabBar' | ||
activeKey={location.pathname} | ||
onChange={value => setRouteActive(value)}> | ||
{items.map(item => ( | ||
<TabBar.Item key={item.key} icon={item.icon} title={item.title} /> | ||
))} | ||
</TabBar> | ||
); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +0,0 @@ | ||
body { | ||
margin: 0; | ||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', | ||
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', | ||
sans-serif; | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
} | ||
|
||
code { | ||
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', | ||
monospace; | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom/client'; | ||
import {BrowserRouter} from 'react-router-dom' | ||
import './index.css'; | ||
import App from './App'; | ||
import reportWebVitals from './reportWebVitals'; | ||
|
||
const root = ReactDOM.createRoot(document.getElementById('root')); | ||
root.render( | ||
<React.StrictMode> | ||
<App /> | ||
</React.StrictMode> | ||
<BrowserRouter> | ||
<App /> | ||
</BrowserRouter> | ||
); | ||
|
||
// If you want to start measuring performance in your app, pass a function | ||
// to log results (for example: reportWebVitals(console.log)) | ||
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals | ||
reportWebVitals(); |
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import React from 'react'; | ||
import MenuBar from "../../components/MenuBar"; | ||
import './index.css' | ||
export default function Forum() { | ||
return ( | ||
<div> | ||
|
||
<MenuBar></MenuBar> | ||
</div> | ||
); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from 'react'; | ||
|
||
export default function GoodDetail() { | ||
return ( | ||
<div>GoodDetail</div> | ||
); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
*{ | ||
margin: 0; | ||
padding: 0; | ||
} | ||
.container{ | ||
height: 300px; | ||
width: 90%; | ||
display: flex; | ||
flex-direction: row; | ||
margin: 5px auto; | ||
color: #d11a2d; | ||
} | ||
.left{ | ||
border-radius: 3%; | ||
/*background-color: #f8f4ed;*/ | ||
padding: 5px; | ||
box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px; | ||
} | ||
.left img{ | ||
width: 90%; | ||
height: 80%; | ||
display: block; | ||
margin: 5px auto; | ||
|
||
} | ||
.price{ | ||
display: inline-block; | ||
color: #d11a2d; | ||
} | ||
.right{ | ||
flex: 1; | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
.every{ | ||
width: 90%; | ||
flex:1; | ||
margin: 2px auto; | ||
border-radius: 3%; | ||
padding: 5px; | ||
box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px; | ||
} | ||
.every img{ | ||
width: 80px; | ||
height: 80px; | ||
|
||
} |
Oops, something went wrong.