update
This commit is contained in:
@@ -376,6 +376,13 @@ const system = {
|
|||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
interventionV2: async (data) => {
|
||||||
|
return request({
|
||||||
|
method: MethodsENUM.POST,
|
||||||
|
url: "/Task/addIntervention",
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
},
|
||||||
complaint: async (data) => {
|
complaint: async (data) => {
|
||||||
return request({
|
return request({
|
||||||
method: MethodsENUM.POST,
|
method: MethodsENUM.POST,
|
||||||
@@ -418,6 +425,13 @@ const system = {
|
|||||||
data: {id}
|
data: {id}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
checkDownload: async (id) => {
|
||||||
|
return request({
|
||||||
|
method: MethodsENUM.POST,
|
||||||
|
url: "/Task/checkDownload",
|
||||||
|
data: {id}
|
||||||
|
});
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
export default system;
|
export default system;
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import CLOSE_ICON from "../static/icons/close2.png";
|
|||||||
import ADDICON from "../static/icons/add.png";
|
import ADDICON from "../static/icons/add.png";
|
||||||
import {uploadFile} from "../utils/uils";
|
import {uploadFile} from "../utils/uils";
|
||||||
import XImage from "./XImage.vue";
|
import XImage from "./XImage.vue";
|
||||||
|
import useUploadLength from "../hooks/useUploadLength.js";
|
||||||
|
|
||||||
const {size, single, del} = defineProps({
|
const {size, single, del} = defineProps({
|
||||||
size: {
|
size: {
|
||||||
@@ -21,12 +22,21 @@ const {size, single, del} = defineProps({
|
|||||||
const emits = defineEmits(['success']);
|
const emits = defineEmits(['success']);
|
||||||
const files = defineModel('files');
|
const files = defineModel('files');
|
||||||
|
|
||||||
|
if (single) useUploadLength({
|
||||||
|
array: files.value,
|
||||||
|
length: 1,
|
||||||
|
})
|
||||||
|
|
||||||
const upload = async () => {
|
const upload = async () => {
|
||||||
uploadFile({
|
uploadFile({
|
||||||
count: 1,
|
count: 1,
|
||||||
}).then(([res]) => {
|
}).then(([res]) => {
|
||||||
const {data} = res;
|
const {data} = res;
|
||||||
files.value?.push(data);
|
if (!single) {
|
||||||
|
files.value?.push(data);
|
||||||
|
} else {
|
||||||
|
files.value = [data];
|
||||||
|
}
|
||||||
emits('success', data);
|
emits('success', data);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
17
src/hooks/useUploadLength.js
Normal file
17
src/hooks/useUploadLength.js
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
import {watch} from "vue";
|
||||||
|
import {showToast} from "../utils/uils.js";
|
||||||
|
|
||||||
|
const useUploadLength = ({array, length}) => {
|
||||||
|
watch(
|
||||||
|
() => array,
|
||||||
|
(val) => {
|
||||||
|
if (val.length > length) {
|
||||||
|
showToast(`最多可上传${length}个`);
|
||||||
|
val.length = length;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{deep: true,}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default useUploadLength;
|
||||||
@@ -28,6 +28,11 @@ onLoad((options) => {
|
|||||||
})));
|
})));
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const saveM = () => {
|
||||||
|
download(detail.children?.material[current].material_arr);
|
||||||
|
Api.system.checkDownload(detail.children.id);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -86,7 +91,7 @@ onLoad((options) => {
|
|||||||
</x-image>
|
</x-image>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="copy-button" @click="download(detail.children?.material[current].material_arr)">批量保存
|
<view class="copy-button" @click="saveM">批量保存
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -101,8 +106,8 @@ onLoad((options) => {
|
|||||||
}}
|
}}
|
||||||
</view>
|
</view>
|
||||||
<view class="!ml-auto" v-if="v.pid !== 0">
|
<view class="!ml-auto" v-if="v.pid !== 0">
|
||||||
<x-image :src="detail.task_content[current].ts_images_arr[0]"
|
<x-image :src="detail.comment_video"
|
||||||
:list="detail.task_content[current].ts_images_arr">
|
:list="[detail.comment_video]">
|
||||||
<x-link show-description>查看引导</x-link>
|
<x-link show-description>查看引导</x-link>
|
||||||
</x-image>
|
</x-image>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import XUpload from "../../../components/XUpload.vue";
|
|||||||
import XInput from "../../../components/XInput.vue";
|
import XInput from "../../../components/XInput.vue";
|
||||||
import Api from "../../../api/index.js";
|
import Api from "../../../api/index.js";
|
||||||
import {showToast} from "../../../utils/uils.js";
|
import {showToast} from "../../../utils/uils.js";
|
||||||
|
import {debounce} from "lodash";
|
||||||
|
|
||||||
const emits = defineEmits(['success']);
|
const emits = defineEmits(['success']);
|
||||||
const {data, current} = defineProps({
|
const {data, current} = defineProps({
|
||||||
@@ -37,7 +38,7 @@ watch(
|
|||||||
{deep: true}
|
{deep: true}
|
||||||
)
|
)
|
||||||
|
|
||||||
const success = async () => {
|
const success = debounce(async () => {
|
||||||
const {msg} = await Api.system.addTaskBackfill({
|
const {msg} = await Api.system.addTaskBackfill({
|
||||||
id: data.children.id,
|
id: data.children.id,
|
||||||
cid: current + 1,
|
cid: current + 1,
|
||||||
@@ -47,7 +48,7 @@ const success = async () => {
|
|||||||
showToast(msg);
|
showToast(msg);
|
||||||
emits('success');
|
emits('success');
|
||||||
show.value = false;
|
show.value = false;
|
||||||
}
|
}, 1000);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ const {loading, pagination, initFetchData, fetchData} = useTableQuery({
|
|||||||
scroll-y>
|
scroll-y>
|
||||||
<view class="chat-box">
|
<view class="chat-box">
|
||||||
<view v-for="v in vo.rows" class="!mb-[24rpx]">
|
<view v-for="v in vo.rows" class="!mb-[24rpx]">
|
||||||
<view :class="['!flex gap-[12rpx]', v.right === 1 ? 'right-box' : '' ]">
|
<view v-if="v.pattern !== 2" :class="['!flex gap-[12rpx]', v.right === 1 ? 'right-box' : '' ]">
|
||||||
<image class="!size-[80rpx] flex-shrink-0 rounded-[50%] overflow-hidden" mode="aspectFill"
|
<image class="!size-[80rpx] flex-shrink-0 rounded-[50%] overflow-hidden" mode="aspectFill"
|
||||||
:src="v.people.avatar"></image>
|
:src="v.people.avatar"></image>
|
||||||
<view class="flex-grow content !flex flex-col">
|
<view class="flex-grow content !flex flex-col">
|
||||||
@@ -61,7 +61,7 @@ const {loading, pagination, initFetchData, fetchData} = useTableQuery({
|
|||||||
</view>
|
</view>
|
||||||
<view class="px-[24rpx] py-[16rpx] bg-[#fff] rounded-[8rpx] test-24r text-[#4E5969]" v-else>
|
<view class="px-[24rpx] py-[16rpx] bg-[#fff] rounded-[8rpx] test-24r text-[#4E5969]" v-else>
|
||||||
<view v-html="v.content"></view>
|
<view v-html="v.content"></view>
|
||||||
<view v-if="v.image_arr.length > 0">
|
<view v-if="v.image_arr.length > 0" class="!flex flex-wrap gap-2 justify-end">
|
||||||
<x-image v-for="k in v.image_arr" :src="k" :list="v.image_arr"
|
<x-image v-for="k in v.image_arr" :src="k" :list="v.image_arr"
|
||||||
style="width: 70rpx;height: 70rpx"></x-image>
|
style="width: 70rpx;height: 70rpx"></x-image>
|
||||||
</view>
|
</view>
|
||||||
@@ -76,34 +76,44 @@ const {loading, pagination, initFetchData, fetchData} = useTableQuery({
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="!flex justify-center !mt-[24rpx]" v-if="v.operate !== 0">
|
<view v-else class="w-full bg-white p-[24rpx] !mt-[24rpx] rounded-[8rpx]">
|
||||||
<QuickOperation :item="v" :operate="v.operate" :data="data"
|
<view class="test-28r text-[#1D2129] text-center">
|
||||||
@success="fetchData"></QuickOperation>
|
{{ v.type === 1 ? '达人' : '商家' }}发起了平台介入
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="w-full bg-white p-[24rpx] !mt-[24rpx] rounded-[8rpx]" v-if="vo.intervention?.id">
|
|
||||||
<view class="test-28r text-[#1D2129] text-center">达人发起了平台介入</view>
|
|
||||||
<view class="bg-[#F7F8FA] px-[24rpx] py-[15rpx] !mt-[20rpx]">
|
|
||||||
<view class="test-28r text-[#1D2129]">申诉原因</view>
|
|
||||||
<view class="bg-[#E5E6EB] w-2/3 h-[2rpx] !my-[8rpx]"></view>
|
|
||||||
<view class="text-[#4E5969] test-28r">
|
|
||||||
{{ vo.intervention.remark }}
|
|
||||||
</view>
|
</view>
|
||||||
<view class="!grid !grid-cols-5 gap-[20rpx]">
|
<view class="bg-[#F7F8FA] px-[24rpx] py-[15rpx] !mt-[20rpx]">
|
||||||
<view class="!w-full aspect-square border border-[#E5E6EB] p-[4rpx]"
|
<view class="test-28r text-[#1D2129]">申诉原因</view>
|
||||||
v-for="v in vo.intervention.image_arr">
|
<view class="bg-[#E5E6EB] w-2/3 h-[2rpx] !my-[8rpx]"></view>
|
||||||
<x-image class="!size-full" :src="v">
|
<view class="text-[#4E5969] test-28r">
|
||||||
</x-image>
|
{{ v.content }}
|
||||||
|
</view>
|
||||||
|
<view class="!grid !grid-cols-5 gap-[20rpx]">
|
||||||
|
<view class="!w-full aspect-square border border-[#E5E6EB] p-[4rpx]"
|
||||||
|
v-for="v in v.image_arr">
|
||||||
|
<x-image class="!size-full" :src="v">
|
||||||
|
</x-image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="bg-[#F7F8FA] px-[24rpx] py-[15rpx] !mt-[20rpx]"
|
||||||
|
v-if="v.is_handle === 1">
|
||||||
|
<view class="test-28r text-[#1D2129]">平台处理结果</view>
|
||||||
|
<view class="bg-[#E5E6EB] w-2/3 h-[2rpx] !my-[8rpx]"></view>
|
||||||
|
<view class="text-[#4E5969] test-28r">
|
||||||
|
{{ v.reply_conyent }}
|
||||||
|
</view>
|
||||||
|
<view class="!grid !grid-cols-5 gap-[20rpx]">
|
||||||
|
<view class="!w-full aspect-square border border-[#E5E6EB] p-[4rpx]"
|
||||||
|
v-for="v in v.reply_image_arr">
|
||||||
|
<x-image class="!size-full" :src="v">
|
||||||
|
</x-image>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="bg-[#F7F8FA] px-[24rpx] py-[15rpx] !mt-[20rpx]" v-if="vo.intervention.status === 1">
|
|
||||||
<view class="test-28r text-[#1D2129]">平台处理结果</view>
|
<view class="!flex justify-center !mt-[24rpx]" v-if="v.operate !== 0">
|
||||||
<view class="bg-[#E5E6EB] w-2/3 h-[2rpx] !my-[8rpx]"></view>
|
<QuickOperation :item="v" :operate="v.operate" :data="data"
|
||||||
<view class="text-[#4E5969] test-28r">
|
@success="fetchData"></QuickOperation>
|
||||||
{{ vo.intervention.intro }}
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import {ref, reactive, defineEmits} from "vue";
|
import {defineEmits, reactive, ref} from "vue";
|
||||||
import XModal from "../../../components/XModal.vue";
|
import XModal from "../../../components/XModal.vue";
|
||||||
import rback from "../../../static/icons/rout-back.png";
|
import rback from "../../../static/icons/rout-back.png";
|
||||||
import XButton from "../../../components/XButton.vue";
|
import XButton from "../../../components/XButton.vue";
|
||||||
import {showToast, uploadFile} from "../../../utils/uils.js";
|
import {showToast, uploadFile} from "../../../utils/uils.js";
|
||||||
import Api from "../../../api/index.js";
|
import Api from "../../../api/index.js";
|
||||||
|
import {debounce} from "lodash";
|
||||||
|
import useUploadLength from "../../../hooks/useUploadLength.js";
|
||||||
|
|
||||||
const emits = defineEmits(['success']);
|
const emits = defineEmits(['success']);
|
||||||
const {data, backId, intervention, pattern, logId} = defineProps({
|
const {data, backId, intervention, pattern, logId} = defineProps({
|
||||||
@@ -38,14 +40,19 @@ const form = reactive({
|
|||||||
|
|
||||||
const upload = async () => {
|
const upload = async () => {
|
||||||
const res = await uploadFile({
|
const res = await uploadFile({
|
||||||
count: 9,
|
count: 5,
|
||||||
});
|
});
|
||||||
const data = res.map(v => v.data);
|
const data = res.map(v => v.data);
|
||||||
form.images.push(...data);
|
form.images.push(...data);
|
||||||
}
|
}
|
||||||
|
|
||||||
const success = async () => {
|
useUploadLength({
|
||||||
const api = intervention ? Api.system.intervention : Api.system.addExchangeLog;
|
array: form.images,
|
||||||
|
length: 5,
|
||||||
|
})
|
||||||
|
|
||||||
|
const success = debounce(async () => {
|
||||||
|
const api = intervention ? Api.system.interventionV2 : Api.system.addExchangeLog;
|
||||||
const {msg} = await api({...form, backfill_id: backId, pattern: pattern, log_id: logId});
|
const {msg} = await api({...form, backfill_id: backId, pattern: pattern, log_id: logId});
|
||||||
showToast(msg);
|
showToast(msg);
|
||||||
form.images.length = 0;
|
form.images.length = 0;
|
||||||
@@ -53,7 +60,7 @@ const success = async () => {
|
|||||||
form.pattern = 0;
|
form.pattern = 0;
|
||||||
show.value = false;
|
show.value = false;
|
||||||
emits('success');
|
emits('success');
|
||||||
}
|
}, 1000);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -85,9 +92,12 @@ const success = async () => {
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="!mt-[20rpx] bg-[#F2F3F5] rounded-[4rpx] py-[16rpx] px-[30rpx]">
|
<view class="!mt-[20rpx] bg-[#F2F3F5] rounded-[4rpx] py-[16rpx] px-[30rpx] w-full">
|
||||||
<textarea v-model="form.content"
|
<textarea
|
||||||
:placeholder="intervention ? '请输入申诉内容' : '请输入内容'"></textarea>
|
v-model="form.content"
|
||||||
|
class="!w-full"
|
||||||
|
:placeholder="intervention ? '请输入申诉内容' : '请输入内容'">
|
||||||
|
</textarea>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="text-[#86909C] test-24r !mt-[20rpx]">提示:请确认内容无误后提交,提交虚假回复会封号</view>
|
<view class="text-[#86909C] test-24r !mt-[20rpx]">提示:请确认内容无误后提交,提交虚假回复会封号</view>
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ export default defineConfig({
|
|||||||
defineModel: true,
|
defineModel: true,
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
// UnifiedViteWeappTailwindcssPlugin({
|
UnifiedViteWeappTailwindcssPlugin({
|
||||||
// rem2rpx: true,
|
rem2rpx: true,
|
||||||
// })
|
})
|
||||||
],
|
],
|
||||||
css: {
|
css: {
|
||||||
postcss: {
|
postcss: {
|
||||||
|
|||||||
Reference in New Issue
Block a user