diff --git a/src/app.config.js b/src/app.config.js index f11204b..4ac0c7f 100644 --- a/src/app.config.js +++ b/src/app.config.js @@ -3,6 +3,8 @@ export default { 'pages/index/index', 'pages/my/index', 'pages/meetup/index', + 'pages/meetup/Detail/index', + ], window: { backgroundTextStyle: 'light', diff --git a/src/pages/index/index.config.js b/src/pages/index/index.config.js index be3ab00..e17eab8 100644 --- a/src/pages/index/index.config.js +++ b/src/pages/index/index.config.js @@ -1,3 +1,3 @@ export default { - navigationBarTitleText: '首页' + navigationBarTitleText: '异度星球' } diff --git a/src/pages/index/index.jsx b/src/pages/index/index.jsx index 26a260a..66c9e72 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 { View, Text, Image, Button } from "@tarojs/components"; import "./index.scss"; import { AtTabBar } from "taro-ui"; import React, { useCallback, useEffect, useState } from "react"; @@ -9,41 +9,68 @@ import { Swiper, SwiperItem } from "@tarojs/components"; import { AtCard } from "taro-ui"; import { AtImagePicker } from "taro-ui"; import { AtButton } from "taro-ui"; -import { AtSearchBar } from 'taro-ui' +import { AtSearchBar } from "taro-ui"; +import { Picker } from "@tarojs/components"; +import { AtList, AtListItem } from "taro-ui"; +import { AtNavBar } from "taro-ui"; +import { AtModal, AtModalHeader, AtModalContent, AtModalAction } from "taro-ui"; +import { AtToast } from "taro-ui"; +import { AtIcon } from "taro-ui"; // export default class Index extends Component { const Index = () => { const [current, setcurrent] = useState(0); + const [isOpened, setisOpened] = useState(false); + const handleClick = (value) => { console.log("value", value); setcurrent(value); if (value == 2) { // 跳转到目的页面,在当前页面打开 - Taro.redirectTo({ + Taro.navigateTo({ url: "/pages/my/index", }); } else if (value == 0) { - Taro.redirectTo({ + Taro.navigateTo({ url: "/pages/index/index", }); } else { - Taro.redirectTo({ + Taro.navigateTo({ url: "/pages/meetup/index", }); } // }; + + const goBack = () => { + // window.history.back(); + Taro.navigateBack({ + // delta: 2 + }); + }; return ( + {/* Hello world! */} + {/* */} - {}} - onActionClick={()=>{}} - /> + {}} + onActionClick={() => {}} + /> {" "} @@ -61,7 +88,7 @@ const Index = () => { @@ -96,7 +123,7 @@ const Index = () => { { image: "https://img12.360buyimg.com/jdphoto/s72x72_jfs/t6160/14/2008729947/2754/7d512a86/595c3aeeNa89ddf71.png", - value: "打卡", + value: "签到", }, { image: @@ -109,6 +136,27 @@ const Index = () => { value: "视频", }, ]} + onClick={(item, index) => { + console.log("item", item); + console.log("index", index); + if (index == 0) { + setisOpened(true); + setTimeout(() => { + setisOpened(false); + }, 3500); + } + if (index == 1) { + Taro.navigateTo({ + url: "/pages/meetup/index", + }); + } + if (index == 2) { + setisOpened(true); + setTimeout(() => { + setisOpened(false); + }, 3500); + } + }} /> { /> - [副业交流] 沙龙茶话会 + + [已报名] 4/10 + 2023/12/06 星期三 - + { + Taro.navigateTo({ + url: "/pages/meetup/Detail/index", + }); + }} + > 立即报名 @@ -140,7 +199,7 @@ const Index = () => { - + {/* { onClick={(value) => handleClick(value)} current={current} /> - + */} ); }; diff --git a/src/pages/index/index.scss b/src/pages/index/index.scss index b60a1dc..b2421aa 100644 --- a/src/pages/index/index.scss +++ b/src/pages/index/index.scss @@ -12,7 +12,7 @@ // flex-direction: column; // align-items: center; // justify-content: center; - background-color: yellow; + // background-color: yellow; height: 300px; width: 100%; // padding: 20px; diff --git a/src/pages/meetup/Detail/index.jsx b/src/pages/meetup/Detail/index.jsx new file mode 100644 index 0000000..f1a827e --- /dev/null +++ b/src/pages/meetup/Detail/index.jsx @@ -0,0 +1,72 @@ +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"; +import { AtAvatar } from "taro-ui"; + +import { AtList, AtListItem } from "taro-ui"; + +// export default class Index extends Component { +const Detail = () => { + const [current, setcurrent] = useState(2); + const handleClick = (value) => { + console.log("value", value); + setcurrent(value); + if (value == 2) { + // 跳转到目的页面,在当前页面打开 + Taro.navigateTo({ + url: "/pages/my/index", + }); + } else if (value == 0) { + Taro.navigateTo({ + url: "/pages/index/index", + }); + } else { + Taro.navigateTo({ + url: "/pages/meetup/index", + }); + } + }; + return ( + + {/* Hello world! */} + {/* */} + + + + + + + {/* + handleClick(value)} + current={current} + /> + */} + + ); +}; + +export default Detail; diff --git a/src/pages/meetup/Detail/index.scss b/src/pages/meetup/Detail/index.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/pages/meetup/index.jsx b/src/pages/meetup/index.jsx index 99f66c3..4b1e63e 100644 --- a/src/pages/meetup/index.jsx +++ b/src/pages/meetup/index.jsx @@ -7,34 +7,86 @@ 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' +import Taro from "@tarojs/taro"; import { AtButton } from "taro-ui"; +import { Picker } from "@tarojs/components"; +import { AtList, AtListItem } from "taro-ui"; +import { AtNavBar } from 'taro-ui' + // export default class Index extends Component { const Meetup = () => { const [current, setcurrent] = useState(1); + const [pickData, setpickData] = useState({ + selector: ["美国", "中国", "巴西", "日本"], + selectorChecked: "美国", + timeSel: "12:01", + dateSel: "2018-04-22", + }); const handleClick = (value) => { - console.log('value',value) - setcurrent(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", - }); - } + // 跳转到目的页面,在当前页面打开 + Taro.navigateTo({ + url: "/pages/my/index", + }); + } else if (value == 0) { + Taro.navigateTo({ + url: "/pages/index/index", + }); + } else { + Taro.navigateTo({ + url: "/pages/meetup/index", + }); + } }; + const goBack=()=>{ + // window.history.back(); + Taro.navigateBack({ + // delta: 2 + }) + } + return ( + {/* */} {/* Hello world! */} + + {/* + + {}}> + + + + + + + {}}> + + + + + + */} + { - - + {/* { onClick={(value) => handleClick(value)} current={current} /> - + */} ); }; diff --git a/src/pages/meetup/index.scss b/src/pages/meetup/index.scss index ed9b95c..8cf1ff1 100644 --- a/src/pages/meetup/index.scss +++ b/src/pages/meetup/index.scss @@ -1,5 +1,10 @@ .my{ +margin-top: 20px; + .page-section{ + display: flex; + flex-direction: row; + } .meetupCard { display: flex; diff --git a/src/pages/my/index.jsx b/src/pages/my/index.jsx index b986412..4ade1b4 100644 --- a/src/pages/my/index.jsx +++ b/src/pages/my/index.jsx @@ -7,38 +7,54 @@ 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' -import { AtAvatar } from 'taro-ui' +import Taro from "@tarojs/taro"; +import { AtAvatar } from "taro-ui"; +import { AtList, AtListItem } from "taro-ui"; // export default class Index extends Component { const My = () => { const [current, setcurrent] = useState(2); const handleClick = (value) => { - console.log('value',value) - setcurrent(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", - }); - } + // 跳转到目的页面,在当前页面打开 + Taro.navigateTo({ + url: "/pages/my/index", + }); + } else if (value == 0) { + Taro.navigateTo({ + url: "/pages/index/index", + }); + } else { + Taro.navigateTo({ + url: "/pages/meetup/index", + }); + } }; return ( {/* Hello world! */} - + {/* */} + + + + - + {/* { onClick={(value) => handleClick(value)} current={current} /> - + */} ); };