feat: 取消按钮

This commit is contained in:
eric
2022-12-10 20:09:03 +08:00
parent 16346c29eb
commit 8d6e7f98f7
4 changed files with 24 additions and 22 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -195,6 +195,9 @@ const details = () => {
if (status === "1") { if (status === "1") {
newstatusName = "待审核"; newstatusName = "待审核";
} }
if (status === "5") {
newstatusName = "审核不通过";
}
} else { } else {
btnStatus.forEach((item: any) => { btnStatus.forEach((item: any) => {
let status: any = dataSource?.Status; let status: any = dataSource?.Status;
@@ -460,11 +463,13 @@ const details = () => {
<Dialog <Dialog
id="vanDialog4" id="vanDialog4"
title="取消后,再次报名,会严格审核" title="取消后,再次报名,会严格审核"
// showCancelButton={false} showCancelButton={true}
// showConfirmButton={false} // showConfirmButton={false}
// confirmButtonOpenType="getUserInfo" // confirmButtonOpenType="getUserInfo"
show={canelshow} show={canelshow}
onClose={() => setShow(false)} onClose={() => setShow(false)}
cancelButtonColor={'green'}
confirmButtonColor={'red'}
onConfirm={() => { onConfirm={() => {
// 取消报名 // 取消报名
canelActive(); canelActive();

View File

@@ -29,8 +29,7 @@ import {
updateTableid, updateTableid,
} from "../../utils/index"; } from "../../utils/index";
import { type } from "../../../config"; import { type } from "../../../config";
import { Divider } from '@antmjs/vantui' import { Divider } from "@antmjs/vantui";
const my = (props: any) => { const my = (props: any) => {
// const [active, setActive] = react.useState(props?.active ?? 0); // const [active, setActive] = react.useState(props?.active ?? 0);
@@ -44,16 +43,15 @@ const my = (props: any) => {
const [isin, setisin] = useState(false); //0初始 1未登录 2有手机号 const [isin, setisin] = useState(false); //0初始 1未登录 2有手机号
const [initOK, setinitOK] = useState(false); //是否加载完成 const [initOK, setinitOK] = useState(false); //是否加载完成
useEffect(() => { useEffect(() => {
getLogin(); getLogin();
}, []); }, []);
const getLogin = async () => { const getLogin = async () => {
let isLogin: any = await phoneLogin(); let isLogin: any = await phoneLogin();
console.log('isLogin',isLogin) console.log("isLogin", isLogin);
setisin(isLogin); setisin(isLogin);
setinitOK(true) setinitOK(true);
}; };
useEffect(() => { useEffect(() => {
@@ -81,7 +79,7 @@ const my = (props: any) => {
setactiveidArr(res?.data?.activeidArr ?? []); setactiveidArr(res?.data?.activeidArr ?? []);
// 获取当前用户参与的活动 // 获取当前用户参与的活动
getDetails(openid,'1'); getDetails(openid, "1");
}, },
}; };
getTable(objParams); getTable(objParams);
@@ -160,7 +158,7 @@ const my = (props: any) => {
); );
}; };
const updateAuth =async (userRes:any) => { const updateAuth = async (userRes: any) => {
let newobj = { let newobj = {
tableName: "userInfo", tableName: "userInfo",
id: userRes?.data?.[0]?._id, id: userRes?.data?.[0]?._id,
@@ -216,7 +214,10 @@ const my = (props: any) => {
tableName: "userInfo", tableName: "userInfo",
id: userRes?.data?.[0]?._id, id: userRes?.data?.[0]?._id,
objData: { objData: {
authInfo: [...(userRes?.data?.[0]?.authInfo ?? []),AddressRes], authInfo: [
...(userRes?.data?.[0]?.authInfo ?? []),
AddressRes,
],
}, },
okFun: async (okFunres: any) => { okFun: async (okFunres: any) => {
console.log("添加用户认证信息", okFunres); console.log("添加用户认证信息", okFunres);
@@ -260,25 +261,21 @@ const my = (props: any) => {
<Tabs <Tabs
sticky={true} sticky={true}
active={currentIndex} active={currentIndex}
onClick={(e: any) => { onClick={async (e: any) => {
console.log("e", e); console.log("e", e);
getDetails(openId, e?.detail?.name);
setcurrentIndex(e?.detail?.index); setcurrentIndex(e?.detail?.index);
await getDetails(openId, e?.detail?.name);
}} }}
> >
{/* <Tab title={`待审核 ${detailsData?.length??0}`} name="1"> */} {/* <Tab title={`待审核 ${detailsData?.length??0}`} name="1"> */}
<Tab title={`待审核`} name="1"> <Tab title={`待审核`} name="1"></Tab>
{/* <Tab title="未通过" name="5"></Tab> */}
</Tab>
{/* <Tab title="已报名"> {/* <Tab title="已报名">
<View>222</View> <View>222</View>
</Tab> */} </Tab> */}
<Tab title="待参加" name="2"> <Tab title="待参加" name="2"></Tab>
<Tab title="已取消" name="4"></Tab>
</Tab>
<Tab title="已取消" name="4">
</Tab>
{/* <Tab title="已结束" name='4'>44</Tab> */} {/* <Tab title="已结束" name='4'>44</Tab> */}
</Tabs> </Tabs>
<View>{CardCom()}</View> <View>{CardCom()}</View>