wupengfei
2025-12-03 c2447e7d63e22bea1a8b6119a210b470f8aa17d4
apps/cMiniApp/src/subpackages/task/taskDetail/InnerPage.vue
@@ -126,9 +126,11 @@
  GetTaskInfoQueryResultHireButton,
  GetTaskInfoQueryResultApplyButton,
  EnumTaskCheckReceiveMethod,
  EnumReadScene,
} from '@12333/constants';
import { useAccessLogin } from '@/hooks';
import { useTaskInfo } from '@12333/hooks';
import _ from 'lodash';
defineOptions({
  name: 'InnerPage',
@@ -141,8 +143,12 @@
const router = Taro.useRouter();
const id = router.params?.id ?? '';
const from = router.params?.from ?? '';
const readScene = router.params?.readScene ?? '';
const { isLoading, isError, detail, refetch, isContainCheckIn } = useTaskInfo({ id });
const { isLoading, isError, detail, refetch, isContainCheckIn } = useTaskInfo({
  id,
  readScene: readScene,
});
const { isCollapse, setTrue } = useToggle();
@@ -162,20 +168,27 @@
  }
});
const handleApply = useAccessReal(
  async () => {
    try {
      let params: API.ApplyTaskCommand = {
        ids: [id],
      };
      let res = await taskUserServices.applyTask(params);
      if (res) {
        Message.success('报名成功');
        refetch({ type: 'inactive' });
      }
    } catch (error) {}
  },
  { message: '实名成功后才可报名,请前往实名认证' }
const handleApply = _.debounce(
  useAccessReal(
    async () => {
      try {
        let params: API.ApplyTaskCommand = {
          ids: [id],
        };
        let res = await taskUserServices.applyTask(params);
        if (res) {
          Message.success('报名成功');
          refetch({ type: 'inactive' });
        }
      } catch (error) {}
    },
    { message: '实名成功后才可报名,请前往实名认证' }
  ),
  1000,
  {
    leading: true,
    trailing: false,
  }
);
const handleAttention = useAccessLogin(async () => {