活动详情页

This commit is contained in:
eric
2023-12-02 22:02:08 +08:00
parent c7f25cb21a
commit 6226b591ff
9 changed files with 263 additions and 58 deletions

View File

@@ -1,3 +1,3 @@
export default {
navigationBarTitleText: '首页'
navigationBarTitleText: '异度星球'
}

View File

@@ -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 (
<View className="index">
<AtToast isOpened={isOpened} text="活动暂未开始" icon="blocked"></AtToast>
{/* <Text>Hello world!</Text> */}
{/* <AtNavBar
// onClickRgIconSt={handleClick}
// onClickRgIconNd={handleClick}
// onClickLeftIcon={goBack}
// leftIconType="chevron-left"
color="#000"
title="异度星球"
// leftText='返回'
// rightFirstIconType='bullet-list'
// rightSecondIconType='user'
/> */}
<View>
<AtSearchBar
showActionButton
value={''}
onChange={()=>{}}
onActionClick={()=>{}}
/>
<AtSearchBar
showActionButton
value={""}
onChange={() => {}}
onActionClick={() => {}}
/>
</View>
<View className="indexSwiper">
{" "}
@@ -61,7 +88,7 @@ const Index = () => {
<Image
// style="width: 300px;height: 100px;background: #fff;"
src={
"https://7084298024874.huodongxing.com/file/ue/20211008/115427740E13BBD5BD7B56940467DC03B4/30435083489707317.jpeg"
"http://cdn.huodongxing.com/file/ue/20211008/115427740E13BBD5BD7B56940467DC03B4/30775083495267465.jpg"
}
/>
</View>
@@ -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);
}
}}
/>
<AtCard
@@ -129,10 +177,21 @@ const Index = () => {
/>
</View>
<View className="right">
<View className="up">[副业交流] 沙龙茶话会</View>
<View className="up">
<span style={{ color: "green" }}>[已报名]</span> 4/10
</View>
<View className="middle">2023/12/06 星期三</View>
<View className="down">
<AtButton type="primary" size="small" className="submitBtn">
<AtButton
type="primary"
size="small"
className="submitBtn"
onClick={() => {
Taro.navigateTo({
url: "/pages/meetup/Detail/index",
});
}}
>
立即报名
</AtButton>
</View>
@@ -140,7 +199,7 @@ const Index = () => {
</View>
</AtCard>
<View className="indexTablebar">
{/* <View className="indexTablebar">
<AtTabBar
tabList={[
{ title: "首页", text: "" },
@@ -150,7 +209,7 @@ const Index = () => {
onClick={(value) => handleClick(value)}
current={current}
/>
</View>
</View> */}
</View>
);
};

View File

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