|
@@ -1,6 +1,6 @@
|
|
|
import { View, Text } from "@tarojs/components";
|
|
import { View, Text } from "@tarojs/components";
|
|
|
import { Plus, User } from "@nutui/icons-react-taro";
|
|
import { Plus, User } from "@nutui/icons-react-taro";
|
|
|
-import { navigateTo } from "@tarojs/taro";
|
|
|
|
|
|
|
+import { getStorageSync, navigateTo } from "@tarojs/taro";
|
|
|
import PostList from "../../components/post-list";
|
|
import PostList from "../../components/post-list";
|
|
|
|
|
|
|
|
import "./index.scss";
|
|
import "./index.scss";
|
|
@@ -10,10 +10,16 @@ import { getCircleInfoApi } from "../../api/circle";
|
|
|
|
|
|
|
|
function Index() {
|
|
function Index() {
|
|
|
const [circleData, setCircleData] = useState<any>(null);
|
|
const [circleData, setCircleData] = useState<any>(null);
|
|
|
|
|
+ const [userInfo, setUserInfo] = useState<any>(null);
|
|
|
|
|
+ const getUserInfo = () => {
|
|
|
|
|
+ const userInfo = getStorageSync("User");
|
|
|
|
|
+ setUserInfo(userInfo);
|
|
|
|
|
+ };
|
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
|
getCircleInfoApi({ id: 1 }).then((res: any) => {
|
|
getCircleInfoApi({ id: 1 }).then((res: any) => {
|
|
|
setCircleData(res.data);
|
|
setCircleData(res.data);
|
|
|
});
|
|
});
|
|
|
|
|
+ getUserInfo();
|
|
|
}, []);
|
|
}, []);
|
|
|
return (
|
|
return (
|
|
|
<View className="index">
|
|
<View className="index">
|
|
@@ -46,10 +52,22 @@ function Index() {
|
|
|
|
|
|
|
|
<View className="index-content absolute top-[60px] left-0 right-0 bottom-0 z-20 rounded-[30px] overflow-hidden">
|
|
<View className="index-content absolute top-[60px] left-0 right-0 bottom-0 z-20 rounded-[30px] overflow-hidden">
|
|
|
<View className="h-25 p-[10px] flex ">
|
|
<View className="h-25 p-[10px] flex ">
|
|
|
- <View className="w-[22%] pt-[10px] mr-[10px] pb-[10px] pl-[5px] border-[1rpx] border-solid border-[#e0e0e0] rounded-[5px] shadow-[0_15px_10px_-16px_rgba(0,0,0,0.3)]">
|
|
|
|
|
- <View className="text-[14px] font-[800] text-[#333]">福利中心</View>
|
|
|
|
|
- <View className="text-[12px] text-[#949494]">登录领奖</View>
|
|
|
|
|
- </View>
|
|
|
|
|
|
|
+ {userInfo?.is_vip ? (
|
|
|
|
|
+ <>
|
|
|
|
|
+ <View
|
|
|
|
|
+ className="w-[22%] pt-[10px] mr-[10px] pb-[10px] pl-[5px] border-[1rpx] border-solid border-[#e0e0e0] rounded-[5px] shadow-[0_15px_10px_-16px_rgba(0,0,0,0.3)]"
|
|
|
|
|
+ onClick={() => {}}
|
|
|
|
|
+ >
|
|
|
|
|
+ <View className="text-[14px] font-[800] text-[#333]">
|
|
|
|
|
+ 福利中心
|
|
|
|
|
+ </View>
|
|
|
|
|
+ <View className="text-[12px] text-[#949494]">登录领奖</View>
|
|
|
|
|
+ </View>
|
|
|
|
|
+ </>
|
|
|
|
|
+ ) : (
|
|
|
|
|
+ <></>
|
|
|
|
|
+ )}
|
|
|
|
|
+
|
|
|
{/* <View className="w-[22%] pt-[10px] pb-[10px] pl-[5px] border-[1rpx] border-solid border-[#e0e0e0] rounded-[5px] shadow-[0_15px_10px_-16px_rgba(0,0,0,0.3)]">
|
|
{/* <View className="w-[22%] pt-[10px] pb-[10px] pl-[5px] border-[1rpx] border-solid border-[#e0e0e0] rounded-[5px] shadow-[0_15px_10px_-16px_rgba(0,0,0,0.3)]">
|
|
|
<View className="text-[14px] font-[800] text-[#333]">游戏攻略</View>
|
|
<View className="text-[14px] font-[800] text-[#333]">游戏攻略</View>
|
|
|
<View className="text-[12px] text-[#949494]">最新资讯</View>
|
|
<View className="text-[12px] text-[#949494]">最新资讯</View>
|