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

@@ -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(',') }}