This commit is contained in:
王一嘉
2025-07-18 20:36:00 +08:00
parent bdb05623e9
commit 50a85dd274

View File

@@ -5,6 +5,7 @@ import {getCurrentInstance, nextTick, onMounted, reactive, ref, watch} from "vue
import PlatformENUM from "../enum/PlatformENUM"; import PlatformENUM from "../enum/PlatformENUM";
import Api from "../api/index"; import Api from "../api/index";
import {showToast, toPage} from "../utils/uils"; import {showToast, toPage} from "../utils/uils";
import {debounce} from "lodash";
const emits = defineEmits(['success']); const emits = defineEmits(['success']);
const {details} = defineProps({ const {details} = defineProps({
@@ -71,7 +72,7 @@ watch(
{deep: true} {deep: true}
) )
const success = async () => { const success = debounce(async () => {
if (!selected.value) { if (!selected.value) {
showToast('请选择帐号'); showToast('请选择帐号');
return; return;
@@ -84,7 +85,7 @@ const success = async () => {
show.value = false; show.value = false;
await toPage(`/pages/taskDetails/index?id=${task_id}&task_children_id=${task_children_id}&delta=999`) await toPage(`/pages/taskDetails/index?id=${task_id}&task_children_id=${task_children_id}&delta=999`)
emits('success'); emits('success');
} }, 500);
</script> </script>
<template> <template>
@@ -112,31 +113,33 @@ const success = async () => {
<view class="!mt-[20rpx] px-[16rpx]"> <view class="!mt-[20rpx] px-[16rpx]">
<template v-if="vo.length > 0"> <template v-if="vo.length > 0">
<view <scroll-view style="height: 30vh" scroll-y>
:key="index" <view
@click="v.is_use !== 0 && po.status === 0 ? selected = v.id : null" :key="index"
v-for="(v, index) in vo" @click="v.is_use !== 0 && po.status === 0 ? selected = v.id : null"
class="!flex items-center py-[22rpx]"> v-for="(v, index) in vo"
<view class="relative"> class="!flex items-center py-[22rpx]">
<radio <view class="relative">
@focus="(e) => {console.log(e)}" <radio
:checked="selected === v.id" @focus="(e) => {console.log(e)}"
:disabled="v.is_use === 0 || po.status>0"> :checked="selected === v.id"
</radio> :disabled="v.is_use === 0 || po.status>0">
<view @click="v.is_use !== 0 && po.status === 0 ? selected = v.id : null" </radio>
class="!size-full absolute left-0 top-0"></view> <view @click="v.is_use !== 0 && po.status === 0 ? selected = v.id : null"
class="!size-full absolute left-0 top-0"></view>
</view>
<image class="!size-[80rpx] rounded-[50%] overflow-hidden !ml-[34rpx]"
:src="PlatformENUM[v.platform_id]"></image>
<view class="!flex flex-col !ml-[16rpx]">
<view class="test-28r">{{ v.nickname }}</view>
<view class="text-[#86909C] test-24r">{{ v.account }}</view>
</view>
<view class="text-[#4E5969] test-24r bg-[#F2F3F5] rounded-[4rpx] !ml-auto"
v-if="v.is_use === 0">
今日已接其他任务
</view>
</view> </view>
<image class="!size-[80rpx] rounded-[50%] overflow-hidden !ml-[34rpx]" </scroll-view>
:src="PlatformENUM[v.platform_id]"></image>
<view class="!flex flex-col !ml-[16rpx]">
<view class="test-28r">{{ v.nickname }}</view>
<view class="text-[#86909C] test-24r">{{ v.account }}</view>
</view>
<view class="text-[#4E5969] test-24r bg-[#F2F3F5] rounded-[4rpx] !ml-auto"
v-if="v.is_use === 0">
今日已接其他任务
</view>
</view>
</template> </template>
<template v-else> <template v-else>