This commit is contained in:
王一嘉
2025-07-21 11:28:03 +08:00
parent b15962dd65
commit 422d082d72
11 changed files with 125 additions and 23 deletions

View File

@@ -163,7 +163,7 @@ const system = {
} else {
return request({
method: MethodsENUM.POST,
url: "/task/getAllExchangeLog",
url: "/task/getNewExchangeLog",
data: data,
});
}
@@ -439,6 +439,20 @@ const system = {
data: {id}
});
},
setAccountStatus: async (data) => {
return request({
method: MethodsENUM.POST,
url: "/user/setAccountStatus",
data: data
});
},
getPlatformImages: async (data) => {
return request({
method: MethodsENUM.POST,
url: "/Task/getPlatformImages",
data: data
});
},
}
export default system;

View File

@@ -77,11 +77,11 @@ const success = debounce(async () => {
showToast('请选择帐号');
return;
}
const {msg, data: {task_children_id, task_id}} = await Api.system.acceptTask({
const {data: {task_children_id, task_id}} = await Api.system.acceptTask({
id: details.id,
account: selected.value,
});
showToast(msg);
showToast('任务接受成功');
show.value = false;
await toPage(`/pages/taskDetails/index?id=${task_id}&task_children_id=${task_children_id}&delta=999`)
emits('success');

View File

@@ -71,7 +71,7 @@ onMounted(() => {
@success="selectActionsheet"
:itemList="itemList">
<view
@click.stop="type === 0 ? toPage(`/pages/taskDetails/index?id=${data.task_id}&task_children_id=${data.task_children_id}&tab=3`) : openOpenTypeFun()"
@click.stop="type === 0 ? toPage(`/pages/taskDetails/index?id=${data.task_id}&task_children_id=${data.id}&tab=3`) : openOpenTypeFun()"
class="!py-[30rpx] !px-[24rpx] bg-[#fff] rounded-[8rpx] !flex items-center gap-[20rpx] overflow-hidden relative !mb-[20rpx]">
<view class="relative">
<image class="!size-[72rpx] flex-shrink-0" mode="aspectFill" :src="messageIcon"></image>

View File

@@ -0,0 +1,40 @@
<script setup>
import {ref} from "vue";
const {type} = defineProps({
type: {
type: Number,
default: 2
}
});
const {promise, resolve, reject} = Promise.withResolvers();
const value = ref();
const DateTimeRef = ref();
const open = () => {
DateTimeRef.value.show();
return promise;
}
const success = ({result}) => {
value.value = result;
resolve(result);
}
const cancel = () => {
reject("取消了选择");
}
defineExpose({
open,
});
</script>
<template>
<tui-datetime ref="DateTimeRef" :type="type" @confirm="success" @cancel="cancel"></tui-datetime>
</template>
<style scoped lang="scss">
</style>

View File

@@ -20,7 +20,7 @@ const modelValue = defineModel();
const change = ({detail: {value}}) => {
modelValue.value = list.filter(v => !v.hidden)[value].id;
emits('change', modelValue.value);
emits('change', list.filter(v => !v.hidden)[value].id);
}
onMounted(() => {

View File

@@ -10,12 +10,13 @@ import PLUSICON from "../../static/icons/plus.png";
import XNav from "../../components/XNav.vue";
import XNoticeBar from "../../components/XNoticeBar.vue";
import {showToast, toPage} from "../../utils/uils.js";
import {reactive} from "vue";
import {reactive, ref} from "vue";
import Api from "../../api/index.js";
import {onShow} from "@dcloudio/uni-app";
import {useSystemStore} from "../../pinia/SystemStore/index.js";
import XPrompt from "../../components/XPrompt.vue";
import XSelect from "../../components/XSelect.vue";
import SelectTimeAsync from "../../components/SelectTimeAsync.vue";
const SystemStore = useSystemStore();
const BASE = [
@@ -45,6 +46,7 @@ const BASE = [
icon: TTICON,
},
];
const SelectTimeAsyncRef = ref();
const list = reactive([]);
const dataList = reactive([]);
@@ -87,11 +89,20 @@ const deleteItem = async (id) => {
}
const changeStatus = async (value, item) => {
const {msg} = await Api.system.editAccount({
...item,
status: value,
});
showToast(msg);
let abnormaltime = null;
if (value === 2) {
abnormaltime = await SelectTimeAsyncRef.value.open();
}
try {
const {msg} = await Api.system.setAccountStatus({
...item,
status: value,
abnormaltime: abnormaltime,
});
showToast(msg);
} finally {
await getData();
}
}
</script>
@@ -99,6 +110,7 @@ const changeStatus = async (value, item) => {
<!--账号管理-->
<x-nav></x-nav>
<x-notice-bar status="success" :text="['提示:左滑查看更多,点击可查看该平台所有的账号']"></x-notice-bar>
<SelectTimeAsync ref="SelectTimeAsyncRef"></SelectTimeAsync>
<view class="p-[36rpx] bg-[#fff] !flex justify-around items-center">
<template v-for="(item, index) in list" :key="item.id">
@@ -133,7 +145,8 @@ const changeStatus = async (value, item) => {
</view>
<view class="px-[12rpx] py-[7rpx] test-24r success !flex items-center gap-0.5" v-if="v.status === 1">
{{ v.status_text }}
<x-select v-model:model-value="v.status" :api="Api.system.getAccountStatus"
<x-select v-if="[1,2,3].includes(v.status)" v-model:model-value="v.status"
:api="Api.system.getAccountStatus"
@change="changeStatus($event, v)">
<tui-icon size="14" name="arrowdown"></tui-icon>
</x-select>
@@ -141,6 +154,11 @@ const changeStatus = async (value, item) => {
<view class="px-[12rpx] py-[7rpx] test-24r warn !flex items-center gap-0.5"
v-else-if="v.status === 0 || v.status === 3">
{{ v.status_text }}
<x-select v-if="[1,2,3].includes(v.status)" v-model:model-value="v.status"
:api="Api.system.getAccountStatus"
@change="changeStatus($event, v)">
<tui-icon size="14" name="arrowdown"></tui-icon>
</x-select>
</view>
<view class="px-[12rpx] py-[7rpx] test-24r error !flex items-center gap-0.5"
v-else-if="v.status === -2">
@@ -150,7 +168,8 @@ const changeStatus = async (value, item) => {
</template>
</x-prompt>
{{ v.status_text }}
<x-select v-model:model-value="v.status" :api="Api.system.getAccountStatus"
<x-select v-if="[1,2,3].includes(v.status)" v-model:model-value="v.status"
:api="Api.system.getAccountStatus"
@change="changeStatus($event, v)">
<tui-icon size="14" name="arrowdown"></tui-icon>
</x-select>
@@ -162,7 +181,8 @@ const changeStatus = async (value, item) => {
</template>
</x-prompt>
{{ v.status_text }}
<x-select v-model:model-value="v.status" :api="Api.system.getAccountStatus"
<x-select v-if="[1,2,3].includes(v.status)" v-model:model-value="v.status"
:api="Api.system.getAccountStatus"
@change="changeStatus($event, v)">
<tui-icon size="14" name="arrowdown"></tui-icon>
</x-select>

View File

@@ -11,6 +11,8 @@ import {backPage, showToast} from "../../utils/uils.js";
import {onLoad} from "@dcloudio/uni-app";
import XDateTime from "../../components/XDateTime.vue";
import {useSystemStore} from "../../pinia/SystemStore/index.js";
import XImage from "../../components/XImage.vue";
import XLink from "../../components/XLink.vue";
const SystemStore = useSystemStore();
@@ -60,6 +62,14 @@ const getSelect = async () => {
data: data,
}
}
const ZYObj = reactive({
images1: [],
images2: [],
});
const changeP = async () => {
const {data} = await Api.system.getPlatformImages({id: form.pid});
Object.assign(ZYObj, data);
}
</script>
<template>
@@ -69,7 +79,7 @@ const getSelect = async () => {
<view class="min-h-[calc(100vh-100rpx)] bg-[#fff] px-[30rpx] py-[25rpx]">
<x-form>
<x-form-item label="宣发平台">
<x-select v-model:model-value="form.pid" :api="getSelect"></x-select>
<x-select v-model:model-value="form.pid" :api="getSelect" @change="changeP"></x-select>
</x-form-item>
<x-form-item label="账号">
<x-input v-model:model-value="form.account" height="80rpx" placeholder="请输入帐号"></x-input>
@@ -81,9 +91,27 @@ const getSelect = async () => {
<x-date-time :type="1" v-model:model-value="form.abnormaltime"></x-date-time>
</x-form-item>
<x-form-item label="主页截图">
<template v-slot:label>
<view class="!flex justify-between">
<view>主页截图</view>
<x-image v-if="form.pid && ZYObj.images1.length > 0" :src="ZYObj.images1[0]"
:list="ZYObj.images1">
<x-link>查看指引</x-link>
</x-image>
</view>
</template>
<x-upload v-model:files="form.homepage" single></x-upload>
</x-form-item>
<x-form-item label="主页二维码">
<template v-slot:label>
<view class="!flex justify-between">
<view>主页二维码</view>
<x-image v-if="form.pid && ZYObj.images2.length > 0" :src="ZYObj.images2[0]"
:list="ZYObj.images2">
<x-link>查看指引</x-link>
</x-image>
</view>
</template>
<x-upload v-model:files="form.qrcode" single></x-upload>
</x-form-item>
</x-form>

View File

@@ -44,7 +44,7 @@ const saveM = () => {
<tui-tabs v-if="tabs.length>0" :tabs="tabs" :currentTab="current" @change="({index})=>current=index"></tui-tabs>
<template v-if="detail.id">
<view class="block" v-if="detail.material_type?.title_limit > 0">
<view class="block" v-if="detail.material_type?.title_limit > 0 && detail.children.material[current].title">
<view class="title">标题</view>
<view class="info">
{{ detail.children.material[current].title }}
@@ -53,7 +53,8 @@ const saveM = () => {
</view>
</view>
<view class="block" v-if="detail.material_type?.tags_limit > 0">
<view class="block"
v-if="detail.material_type?.tags_limit > 0 && detail.children?.material[current].tags_arr.length > 0">
<view class="title">
话题
<view class="!ml-auto">
@@ -70,7 +71,7 @@ const saveM = () => {
</view>
</view>
<view class="block" v-if="detail.material_type?.desc_limit > 0">
<view class="block" v-if="detail.material_type?.desc_limit > 0 && detail.children?.material[current].content">
<view class="title">正文</view>
<view class="info">
{{ detail.children?.material[current].content }}

View File

@@ -10,7 +10,7 @@ const UserStore = useUserStore();
const form = reactive({
mobile: '17502997128',
password: '123456',
password: '654321',
});
const rules = {
mobile: {

View File

@@ -73,7 +73,6 @@ const changeTab = ({index}) => {
<scroll-view
@refresherpulling="initFetchData()"
@scrolltolower="() => {
console.log('进来了???')
pagination.page++;
}"
class="h-[calc(100vh-500rpx)]"

View File

@@ -327,13 +327,13 @@ const scroll = ({detail: {scrollTop}}) => {
</x-prompt>
</view>
</view>
<view class="block items-center">
<view class="block items-center" v-if="details.duration">
<view class="block-title">每次间隔时长:</view>
<view class="block-info">
{{ details.duration }}分钟
</view>
</view>
<view class="block">
<view class="block" v-if="details.special_images_arr.length">
<view class="block-title">特殊要求:</view>
<view class="block-info gap-[20rpx]">
<view>{{ details.special_text }}</view>
@@ -345,7 +345,7 @@ const scroll = ({detail: {scrollTop}}) => {
</view>
</view>
</view>
<view class="block items-center">
<view class="block items-center" v-if="details.choose_area_arr.length">
<view class="block-title">ip限制:</view>
<view class="block-info">
{{ details.choose_area_arr.join(',') }}