This commit is contained in:
2025-06-23 14:44:05 +08:00
parent 56caa92801
commit 534adf126a
5 changed files with 28 additions and 12 deletions

View File

@@ -4,7 +4,7 @@ import XModal from "./XModal.vue";
import {getCurrentInstance, nextTick, onMounted, reactive, ref, watch} from "vue"; 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} from "../utils/uils"; import {showToast, toPage} from "../utils/uils";
const emits = defineEmits(['success']); const emits = defineEmits(['success']);
const {details} = defineProps({ const {details} = defineProps({
@@ -76,12 +76,13 @@ const success = async () => {
showToast('请选择帐号'); showToast('请选择帐号');
return; return;
} }
const {msg} = await Api.system.acceptTask({ const {msg, data} = await Api.system.acceptTask({
id: details.id, id: details.id,
account: selected.value, account: selected.value,
}); });
showToast(msg); showToast(msg);
show.value = false; show.value = false;
await toPage(`/pages/taskDetails/index?id=${data[1]}&task_children_id=${0}&delta=999`)
emits('success'); emits('success');
} }
</script> </script>
@@ -134,7 +135,7 @@ const success = async () => {
<template v-else> <template v-else>
<view class="!flex flex-col items-center pb-[50rpx]"> <view class="!flex flex-col items-center pb-[50rpx]">
<image class="!size-[260rpx]" :src="NULLICON"></image> <image class="!size-[260rpx]" :src="NULLICON"></image>
<view class="test-28r"> <view class="test-28r" v-if="po.status===0">
可在我的账号管理中添加自媒体账号 可在我的账号管理中添加自媒体账号
</view> </view>
</view> </view>

View File

@@ -36,7 +36,6 @@ defineExpose({
</script> </script>
<template> <template>
<template v-if="!$slots.default"> <template v-if="!$slots.default">
<!-- #ifndef MP-WEIXIN --> <!-- #ifndef MP-WEIXIN -->
<image @click="open" v-bind="$attrs" :src="src" mode="aspectFill"></image> <image @click="open" v-bind="$attrs" :src="src" mode="aspectFill"></image>
@@ -70,6 +69,8 @@ defineExpose({
</template> </template>
<template v-else> <template v-else>
<image class="!size-full" :src="src" mode="aspectFit"></image> <image class="!size-full" :src="src" mode="aspectFit"></image>
<image v-if="sy" class="!size-full !absolute left-0 top-0" :src="SY_ICON"
mode="aspectFit"></image>
</template> </template>

View File

@@ -2,10 +2,14 @@
import {ref} from 'vue'; import {ref} from 'vue';
import {backPage, isWXWeb} from "../utils/uils.js"; import {backPage, isWXWeb} from "../utils/uils.js";
const {showBack} = defineProps({ const {showBack, delta} = defineProps({
showBack: { showBack: {
type: Boolean, type: Boolean,
default: true default: true
},
delta: {
type: Number,
default: 1,
} }
}); });
@@ -17,7 +21,7 @@ const title = ref(document.title);
<view class="!flex justify-center items-center w-full h-[100rpx] bg-[#f9f9f9] fixed left-0 top-0 z-[1000]"> <view class="!flex justify-center items-center w-full h-[100rpx] bg-[#f9f9f9] fixed left-0 top-0 z-[1000]">
<image <image
v-if="showBack" v-if="showBack"
@click="backPage()" @click="backPage(delta)"
class="!w-[9px] !h-[17px] cursor-pointer !absolute left-[50rpx]" class="!w-[9px] !h-[17px] cursor-pointer !absolute left-[50rpx]"
src="/static/icons/back.png"> src="/static/icons/back.png">
</image> </image>

View File

@@ -9,7 +9,7 @@ import XImage from "../../components/XImage.vue";
import Api from "../../api/index.js"; import Api from "../../api/index.js";
import dayjs from "dayjs"; import dayjs from "dayjs";
import XPrompt from "../../components/XPrompt.vue"; import XPrompt from "../../components/XPrompt.vue";
import {numberToCharacter} from "../../utils/uils.js"; import {numberToCharacter, toPage} from "../../utils/uils.js";
import AcceptAssignmentModal from "../../components/AcceptAssignmentModal.vue"; import AcceptAssignmentModal from "../../components/AcceptAssignmentModal.vue";
import ICON from "../../static/icons/prompt.png"; import ICON from "../../static/icons/prompt.png";
import XConfirmModal from "../../components/XConfirmModal.vue"; import XConfirmModal from "../../components/XConfirmModal.vue";
@@ -49,6 +49,7 @@ const tabs = computed(() => [
isDot: details.value?.children.is_read > 0, isDot: details.value?.children.is_read > 0,
}, },
]); ]);
const delta = ref(1);
const getData = async (id, task_children_id) => { const getData = async (id, task_children_id) => {
const {data} = await Api.system.getTaskinfo(id || details.value.id, task_children_id || details.value?.children?.id); const {data} = await Api.system.getTaskinfo(id || details.value.id, task_children_id || details.value?.children?.id);
@@ -56,9 +57,10 @@ const getData = async (id, task_children_id) => {
} }
onLoad((options) => { onLoad((options) => {
const {id, home: _home, tab, task_children_id} = options; const {id, home: _home, tab, task_children_id, delta: _delta} = options;
home.value = _home === '1'; home.value = _home === '1';
if (tab) currentTabs.value = Number(tab); if (tab) currentTabs.value = Number(tab);
if (delta) delta.value = _delta
getData(id, task_children_id); getData(id, task_children_id);
}); });
@@ -73,13 +75,13 @@ onMounted(() => {
mainDetailWidth.value = result[0].width; mainDetailWidth.value = result[0].width;
}) })
}); });
showInitModal.value = true; if (home.value) showInitModal.value = true;
}) })
</script> </script>
<template> <template>
<!--任务详情--> <!--任务详情-->
<XNav></XNav> <XNav :delta="delta"></XNav>
<x-notice-bar></x-notice-bar> <x-notice-bar></x-notice-bar>
<view class="!p-[20rpx] !flex flex-col gap-[20rpx] box-border" v-if="details"> <view class="!p-[20rpx] !flex flex-col gap-[20rpx] box-border" v-if="details">
@@ -243,6 +245,12 @@ onMounted(() => {
</view> </view>
</view> </view>
</view> </view>
<view class="block items-center">
<view class="block-title">ip限制:</view>
<view class="block-info">
{{ details.choose_area_arr.join(',') }}
</view>
</view>
</view> </view>
</view> </view>

View File

@@ -34,8 +34,10 @@ export const clearObject = (obj) => {
}); });
}; };
export const backPage = () => { export const backPage = (delta) => {
uni.navigateBack().then(); uni.navigateBack({
delta: delta || 1
}).then();
} }
export const copy = (context) => { export const copy = (context) => {