feat: 新增我的页面

This commit is contained in:
eric
2023-12-02 15:28:57 +08:00
parent 79970d9371
commit 3d6d6901b8
6 changed files with 198 additions and 16 deletions

49
src/pages/my/index.jsx Normal file
View File

@@ -0,0 +1,49 @@
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 Index = () => {
const [current, setcurrent] = useState(2);
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",
});
}
};
return (
<View className="index">
{/* <Text>Hello world!</Text> */}
my
<View className="indexTablebar">
<AtTabBar
tabList={[
{ title: "首页", text: "" },
{ title: "活动" },
{ title: "我的" },
]}
onClick={(value) => handleClick(value)}
current={current}
/>
</View>
</View>
);
};
export default Index;

0
src/pages/my/index.scss Normal file
View File