Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
15d8704089 |
@@ -20,6 +20,8 @@ import { AtIcon } from "taro-ui";
|
|||||||
// export default class Index extends Component {
|
// export default class Index extends Component {
|
||||||
const Index = () => {
|
const Index = () => {
|
||||||
const [current, setcurrent] = useState(0);
|
const [current, setcurrent] = useState(0);
|
||||||
|
const [openId, setopenId] = useState(null);
|
||||||
|
|
||||||
const [isOpened, setisOpened] = useState(false);
|
const [isOpened, setisOpened] = useState(false);
|
||||||
const [joinMeetup, setjoinMeetup] = useState(false);
|
const [joinMeetup, setjoinMeetup] = useState(false);
|
||||||
|
|
||||||
@@ -44,6 +46,7 @@ const Index = () => {
|
|||||||
|
|
||||||
// window.alert(hashopenid)
|
// window.alert(hashopenid)
|
||||||
let newOpenid = window.localStorage.getItem("openid");
|
let newOpenid = window.localStorage.getItem("openid");
|
||||||
|
|
||||||
// window.alert(newOpenid)
|
// window.alert(newOpenid)
|
||||||
|
|
||||||
if (
|
if (
|
||||||
@@ -55,6 +58,7 @@ const Index = () => {
|
|||||||
// window.alert(newOpenid);
|
// window.alert(newOpenid);
|
||||||
|
|
||||||
window.localStorage.setItem("openid", hashopenid);
|
window.localStorage.setItem("openid", hashopenid);
|
||||||
|
setopenId(hashopenid)
|
||||||
} else {
|
} else {
|
||||||
// window.alert('不存在')
|
// window.alert('不存在')
|
||||||
let nowUrl = window.location.href;
|
let nowUrl = window.location.href;
|
||||||
@@ -210,9 +214,9 @@ const Index = () => {
|
|||||||
|
|
||||||
<AtCard
|
<AtCard
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
Taro.navigateTo({
|
// Taro.navigateTo({
|
||||||
url: "/pages/meetup/Detail/index?id=20231206",
|
// url: "/pages/meetup/Detail/index?id=20231206",
|
||||||
});
|
// });
|
||||||
}}
|
}}
|
||||||
note=""
|
note=""
|
||||||
extra=""
|
extra=""
|
||||||
@@ -232,7 +236,7 @@ const Index = () => {
|
|||||||
</View>
|
</View>
|
||||||
<View className="right">
|
<View className="right">
|
||||||
<View className="up">
|
<View className="up">
|
||||||
<span style={{ color: "green" }}>[已报名]</span> 4/10
|
<span style={{ color: "green" }}>[报名中]</span> 4/10
|
||||||
</View>
|
</View>
|
||||||
<View className="middle">2023/12/06 星期三</View>
|
<View className="middle">2023/12/06 星期三</View>
|
||||||
<View className="down">
|
<View className="down">
|
||||||
@@ -242,6 +246,8 @@ const Index = () => {
|
|||||||
className="submitBtn"
|
className="submitBtn"
|
||||||
disabled={joinMeetup}
|
disabled={joinMeetup}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
// window.alert(window.location.href)
|
||||||
|
// return false
|
||||||
Taro.navigateTo({
|
Taro.navigateTo({
|
||||||
url: "/pages/meetup/Detail/index?id=20231206",
|
url: "/pages/meetup/Detail/index?id=20231206",
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -31,24 +31,24 @@ const Detail = () => {
|
|||||||
setjoinMeetup(newjoinMeetup)
|
setjoinMeetup(newjoinMeetup)
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const handleClick = (value) => {
|
// const handleClick = (value) => {
|
||||||
console.log("value", value);
|
// console.log("value", value);
|
||||||
setcurrent(value);
|
// setcurrent(value);
|
||||||
if (value == 2) {
|
// if (value == 2) {
|
||||||
// 跳转到目的页面,在当前页面打开
|
// // 跳转到目的页面,在当前页面打开
|
||||||
Taro.navigateTo({
|
// Taro.navigateTo({
|
||||||
url: "/pages/my/index",
|
// url: "/pages/my/index",
|
||||||
});
|
// });
|
||||||
} else if (value == 0) {
|
// } else if (value == 0) {
|
||||||
Taro.navigateTo({
|
// Taro.navigateTo({
|
||||||
url: "/pages/index/index",
|
// url: "/pages/index/index",
|
||||||
});
|
// });
|
||||||
} else {
|
// } else {
|
||||||
Taro.navigateTo({
|
// Taro.navigateTo({
|
||||||
url: "/pages/meetup/index",
|
// url: "/pages/meetup/index",
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
};
|
// };
|
||||||
|
|
||||||
const onBridgeReady = () => {
|
const onBridgeReady = () => {
|
||||||
WeixinJSBridge.call("hideOptionMenu");
|
WeixinJSBridge.call("hideOptionMenu");
|
||||||
|
|||||||
@@ -12,17 +12,13 @@ import { AtButton } from "taro-ui";
|
|||||||
|
|
||||||
import { Picker } from "@tarojs/components";
|
import { Picker } from "@tarojs/components";
|
||||||
import { AtList, AtListItem } from "taro-ui";
|
import { AtList, AtListItem } from "taro-ui";
|
||||||
import { AtNavBar } from 'taro-ui'
|
import { AtNavBar } from "taro-ui";
|
||||||
|
|
||||||
|
|
||||||
// export default class Index extends Component {
|
// export default class Index extends Component {
|
||||||
const Meetup = () => {
|
const Meetup = () => {
|
||||||
const [current, setcurrent] = useState(1);
|
const [current, setcurrent] = useState(1);
|
||||||
const [joinMeetup, setjoinMeetup] = useState(false);
|
const [joinMeetup, setjoinMeetup] = useState(false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const [pickData, setpickData] = useState({
|
const [pickData, setpickData] = useState({
|
||||||
selector: ["美国", "中国", "巴西", "日本"],
|
selector: ["美国", "中国", "巴西", "日本"],
|
||||||
selectorChecked: "美国",
|
selectorChecked: "美国",
|
||||||
@@ -51,16 +47,16 @@ const Meetup = () => {
|
|||||||
// window.history.back();
|
// window.history.back();
|
||||||
Taro.navigateBack({
|
Taro.navigateBack({
|
||||||
// delta: 2
|
// delta: 2
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
let newjoinMeetup=window.localStorage.getItem('joinMeetup')
|
let newjoinMeetup = window.localStorage.getItem("joinMeetup");
|
||||||
setjoinMeetup(newjoinMeetup)
|
setjoinMeetup(newjoinMeetup);
|
||||||
|
|
||||||
// window.localStorage.removeItem("joinMeetup");
|
// window.localStorage.removeItem("joinMeetup");
|
||||||
// setjoinMeetup(false)
|
// setjoinMeetup(false)
|
||||||
},[])
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View className="my">
|
<View className="my">
|
||||||
@@ -128,15 +124,13 @@ const Meetup = () => {
|
|||||||
size="small"
|
size="small"
|
||||||
className="submitBtn"
|
className="submitBtn"
|
||||||
disabled={joinMeetup}
|
disabled={joinMeetup}
|
||||||
|
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
Taro.navigateTo({
|
Taro.navigateTo({
|
||||||
url: "/pages/meetup/Detail/index",
|
url: "/pages/meetup/Detail/index",
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{!!joinMeetup?'已报名':'立即报名'}
|
{!!joinMeetup ? "已报名" : "立即报名"}
|
||||||
|
|
||||||
</AtButton>
|
</AtButton>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
Reference in New Issue
Block a user