From a336c930dcd81951eef2a696dfe97effb44ddb9d Mon Sep 17 00:00:00 2001 From: eric Date: Sat, 2 Dec 2023 16:14:00 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=A6=96=E9=A1=B5=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.config.js | 3 +- src/pages/index/index.jsx | 130 +++++++++++++++++++++--------------- src/pages/index/index.scss | 60 ++++++++++++----- src/pages/meetup/index.jsx | 53 +++++++++++++++ src/pages/meetup/index.scss | 10 +++ src/pages/my/index.jsx | 10 ++- src/pages/my/index.scss | 10 +++ 7 files changed, 202 insertions(+), 74 deletions(-) create mode 100644 src/pages/meetup/index.jsx create mode 100644 src/pages/meetup/index.scss diff --git a/src/app.config.js b/src/app.config.js index cb35e55..f11204b 100644 --- a/src/app.config.js +++ b/src/app.config.js @@ -1,7 +1,8 @@ export default { pages: [ 'pages/index/index', - 'pages/my/index' + 'pages/my/index', + 'pages/meetup/index', ], window: { backgroundTextStyle: 'light', diff --git a/src/pages/index/index.jsx b/src/pages/index/index.jsx index efe628c..a5d28f6 100644 --- a/src/pages/index/index.jsx +++ b/src/pages/index/index.jsx @@ -1,6 +1,6 @@ import { Component } from "react"; -import Taro from '@tarojs/taro' -import { View, Text, Image} from "@tarojs/components"; +import Taro from "@tarojs/taro"; +import { View, Text, Image } from "@tarojs/components"; import "./index.scss"; import { AtTabBar } from "taro-ui"; import React, { useCallback, useEffect, useState } from "react"; @@ -8,6 +8,7 @@ import { AtGrid } from "taro-ui"; import { Swiper, SwiperItem } from "@tarojs/components"; import { AtCard } from "taro-ui"; import { AtImagePicker } from "taro-ui"; +import { AtButton } from 'taro-ui' // export default class Index extends Component { const Index = () => { @@ -20,56 +21,65 @@ const Index = () => { Taro.redirectTo({ url: "/pages/my/index", }); + } else if (value == 0) { + Taro.redirectTo({ + url: "/pages/index/index", + }); + } else { + Taro.redirectTo({ + url: "/pages/meetup/index", + }); } // }; return ( {/* Hello world! */} - - - - - {" "} - - - - - - {" "} - - - - - - {" "} - - - - + + {" "} + + + + {" "} + + + + + + {" "} + + + + + + {" "} + + + + + { /> - {/* 这也是内容区 可以随意定义功能 */} - + + {" "} + + {" "} + + + + [副业交流] 沙龙茶话会 + 2023/12/06 星期三 + 立即报名 + + diff --git a/src/pages/index/index.scss b/src/pages/index/index.scss index ac76fe9..b60a1dc 100644 --- a/src/pages/index/index.scss +++ b/src/pages/index/index.scss @@ -1,24 +1,54 @@ .index { - display: flex; - flex-direction: column; - // align-items: center; - justify-content: center; + display: flex; + flex-direction: column; + // align-items: center; + justify-content: center; .indexSwiper { // margin-top: 20px; - // padding: 20px; - + padding: 20px; + .demo-text { + // display: flex; + // flex-direction: column; + // align-items: center; + // justify-content: center; + background-color: yellow; + height: 300px; + width: 100%; + // padding: 20px; + // Image{ + // width: 90%; + // } + } + } + + .meetupCard { + display: flex; + flex-direction: row; + .right { + // background-color: yellow; + width: 100%; + margin-left: 20px; + display: flex; + flex-direction: column; + justify-content: space-between; + .down { + width: 200px; + // background-color: aqua; + position: relative; + bottom: 10px; + right: -120px; // display: flex; - // flex-direction: column; - // align-items: center; - // justify-content: center; - background-color: yellow; - height: 300px; - width: 100%; - // Image{ - // width: 90%; - // } + // flex-direction: column-reverse; + // justify-content:flex-end + // position: relative; + .submitBtn { + // width: 200px; + // position: absolute; + // right: 0px; + } } + } } .indexTablebar { diff --git a/src/pages/meetup/index.jsx b/src/pages/meetup/index.jsx new file mode 100644 index 0000000..4373e83 --- /dev/null +++ b/src/pages/meetup/index.jsx @@ -0,0 +1,53 @@ +import { Component } from "react"; +import { View, Text, Image } from "@tarojs/components"; +import "./index.scss"; +import { AtTabBar } from "taro-ui"; +import React, { useCallback, useEffect, useState } from "react"; +import { AtGrid } from "taro-ui"; +import { Swiper, SwiperItem } from "@tarojs/components"; +import { AtCard } from "taro-ui"; +import { AtImagePicker } from "taro-ui"; +import Taro from '@tarojs/taro' + + +// export default class Index extends Component { +const Meetup = () => { + const [current, setcurrent] = useState(1); + const handleClick = (value) => { + console.log('value',value) + setcurrent(value) + if (value == 2) { + // 跳转到目的页面,在当前页面打开 + Taro.redirectTo({ + url: "/pages/my/index", + }); + }else if(value == 0){ + Taro.redirectTo({ + url: "/pages/index/index", + }); + }else{ + Taro.redirectTo({ + url: "/pages/meetup/index", + }); + } + }; + return ( + + {/* Hello world! */} + meetup + + handleClick(value)} + current={current} + /> + + + ); +}; + +export default Meetup; diff --git a/src/pages/meetup/index.scss b/src/pages/meetup/index.scss new file mode 100644 index 0000000..2ffc6a7 --- /dev/null +++ b/src/pages/meetup/index.scss @@ -0,0 +1,10 @@ +.my{ + + + + .indexTablebar { + position: fixed; + bottom: 0; + width: 100%; + } +} \ No newline at end of file diff --git a/src/pages/my/index.jsx b/src/pages/my/index.jsx index 39038ae..023a16c 100644 --- a/src/pages/my/index.jsx +++ b/src/pages/my/index.jsx @@ -11,7 +11,7 @@ import Taro from '@tarojs/taro' // export default class Index extends Component { -const Index = () => { +const My = () => { const [current, setcurrent] = useState(2); const handleClick = (value) => { console.log('value',value) @@ -25,10 +25,14 @@ const Index = () => { Taro.redirectTo({ url: "/pages/index/index", }); + }else{ + Taro.redirectTo({ + url: "/pages/meetup/index", + }); } }; return ( - + {/* Hello world! */} my @@ -46,4 +50,4 @@ const Index = () => { ); }; -export default Index; +export default My; diff --git a/src/pages/my/index.scss b/src/pages/my/index.scss index e69de29..2ffc6a7 100644 --- a/src/pages/my/index.scss +++ b/src/pages/my/index.scss @@ -0,0 +1,10 @@ +.my{ + + + + .indexTablebar { + position: fixed; + bottom: 0; + width: 100%; + } +} \ No newline at end of file