This commit is contained in:
hackrobot
2024-07-18 11:38:07 +08:00
parent 05e0dc3511
commit e3599c3afc

View File

@@ -361,16 +361,14 @@ const Index = () => {
<View <View
className="bookPrice" className="bookPrice"
onClick={() => { onClick={() => {
if (!!wxid) { if (!!userInfo?.ebook) {
// 修改接口数据 // 已预约
// 先判断用户字段 Taro.atMessage({
if (!!userInfo?.ebook) { message: "已预约成功",
// 已预约 type: "warning",
Taro.atMessage({ });
message: "已预约成功", } else {
type: "warning", if (!!wxid) {
});
} else {
// 发起预约 // 发起预约
const userUpdateData = { const userUpdateData = {
ebook: 1, // 只更新 openid 字段 ebook: 1, // 只更新 openid 字段
@@ -402,9 +400,9 @@ const Index = () => {
// getUserinfo() // getUserinfo()
}, },
}); });
} else {
setmeetupQR(true);
} }
} else {
setmeetupQR(true);
} }
}} }}
> >
@@ -482,23 +480,20 @@ const Index = () => {
: null, : null,
}} }}
onClick={() => { onClick={() => {
if (!!wxid) { if (userInfo?.activity_status == "1") {
// window.alert(userInfo?.activity_status); // 已预约
// 修改接口数据 Taro.atMessage({
// 先判断用户字段 message: "已预约成功",
if (userInfo?.activity_status == "1") { type: "warning",
// 已预约 });
Taro.atMessage({ } else if (userInfo?.activity_status == "2") {
message: "已预约成功", // 已预约
type: "warning", Taro.atMessage({
}); message: "审核中",
} else if (userInfo?.activity_status == "2") { type: "warning",
// 已预约 });
Taro.atMessage({ } else {
message: "审核中", if (!!wxid) {
type: "warning",
});
} else {
// 发起预约 // 发起预约
const userUpdateData = { const userUpdateData = {
activity_status: "2", // 审核中 activity_status: "2", // 审核中
@@ -526,9 +521,9 @@ const Index = () => {
window.location.reload(); window.location.reload();
}, },
}); });
} else {
setmeetupQR(true);
} }
} else {
setmeetupQR(true);
} }
}} }}
> >