1 Commits

Author SHA1 Message Date
hackrobot
15d8704089 fix: 详情页白屏bug 2024-04-07 14:45:41 +08:00
3 changed files with 39 additions and 39 deletions

View File

@@ -20,6 +20,8 @@ import { AtIcon } from "taro-ui";
// export default class Index extends Component {
const Index = () => {
const [current, setcurrent] = useState(0);
const [openId, setopenId] = useState(null);
const [isOpened, setisOpened] = useState(false);
const [joinMeetup, setjoinMeetup] = useState(false);
@@ -44,6 +46,7 @@ const Index = () => {
// window.alert(hashopenid)
let newOpenid = window.localStorage.getItem("openid");
// window.alert(newOpenid)
if (
@@ -55,6 +58,7 @@ const Index = () => {
// window.alert(newOpenid);
window.localStorage.setItem("openid", hashopenid);
setopenId(hashopenid)
} else {
// window.alert('不存在')
let nowUrl = window.location.href;
@@ -210,9 +214,9 @@ const Index = () => {
<AtCard
onClick={() => {
Taro.navigateTo({
url: "/pages/meetup/Detail/index?id=20231206",
});
// Taro.navigateTo({
// url: "/pages/meetup/Detail/index?id=20231206",
// });
}}
note=""
extra=""
@@ -232,7 +236,7 @@ const Index = () => {
</View>
<View className="right">
<View className="up">
<span style={{ color: "green" }}>[报名]</span> 4/10
<span style={{ color: "green" }}>[报名]</span> 4/10
</View>
<View className="middle">2023/12/06 星期三</View>
<View className="down">
@@ -242,6 +246,8 @@ const Index = () => {
className="submitBtn"
disabled={joinMeetup}
onClick={() => {
// window.alert(window.location.href)
// return false
Taro.navigateTo({
url: "/pages/meetup/Detail/index?id=20231206",
});

View File

@@ -31,24 +31,24 @@ const Detail = () => {
setjoinMeetup(newjoinMeetup)
}, []);
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",
});
}
};
// 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",
// });
// }
// };
const onBridgeReady = () => {
WeixinJSBridge.call("hideOptionMenu");

View File

@@ -12,17 +12,13 @@ import { AtButton } from "taro-ui";
import { Picker } from "@tarojs/components";
import { AtList, AtListItem } from "taro-ui";
import { AtNavBar } from 'taro-ui'
import { AtNavBar } from "taro-ui";
// export default class Index extends Component {
const Meetup = () => {
const [current, setcurrent] = useState(1);
const [joinMeetup, setjoinMeetup] = useState(false);
const [pickData, setpickData] = useState({
selector: ["美国", "中国", "巴西", "日本"],
selectorChecked: "美国",
@@ -47,20 +43,20 @@ const Meetup = () => {
});
}
};
const goBack=()=>{
const goBack = () => {
// window.history.back();
Taro.navigateBack({
// delta: 2
})
}
});
};
useEffect(()=>{
let newjoinMeetup=window.localStorage.getItem('joinMeetup')
setjoinMeetup(newjoinMeetup)
useEffect(() => {
let newjoinMeetup = window.localStorage.getItem("joinMeetup");
setjoinMeetup(newjoinMeetup);
// window.localStorage.removeItem("joinMeetup");
// setjoinMeetup(false)
},[])
}, []);
return (
<View className="my">
@@ -100,7 +96,7 @@ const Meetup = () => {
</View>
</View> */}
<AtCard
<AtCard
note=""
extra=""
title="[副业交流] 沙龙茶话会"
@@ -127,16 +123,14 @@ const Meetup = () => {
type="primary"
size="small"
className="submitBtn"
disabled={joinMeetup}
disabled={joinMeetup}
onClick={() => {
Taro.navigateTo({
url: "/pages/meetup/Detail/index",
});
}}
>
{!!joinMeetup?'已报名':'立即报名'}
{!!joinMeetup ? "已报名" : "立即报名"}
</AtButton>
</View>
</View>