update
This commit is contained in:
@@ -15,6 +15,7 @@ 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";
|
||||
|
||||
const SystemStore = useSystemStore();
|
||||
const BASE = [
|
||||
@@ -84,6 +85,14 @@ const deleteItem = async (id) => {
|
||||
showToast(msg);
|
||||
await getData();
|
||||
}
|
||||
|
||||
const changeStatus = async (value, item) => {
|
||||
const {msg} = await Api.system.editAccount({
|
||||
...item,
|
||||
status: value,
|
||||
});
|
||||
showToast(msg);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -122,27 +131,41 @@ const deleteItem = async (id) => {
|
||||
<view class="test-28r">{{ v.nickname }}</view>
|
||||
<view class="text-[#86909C] test-24r">{{ v.account }}</view>
|
||||
</view>
|
||||
<view class="px-[12rpx] py-[7rpx] test-24r success" v-if="v.status === 1">
|
||||
<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"
|
||||
@change="changeStatus($event, v)">
|
||||
<tui-icon size="14" name="arrowdown"></tui-icon>
|
||||
</x-select>
|
||||
</view>
|
||||
<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 }}
|
||||
</view>
|
||||
<view class="px-[12rpx] py-[7rpx] test-24r warn" v-else-if="v.status === 0 || v.status === 3">
|
||||
{{ v.status_text }}
|
||||
</view>
|
||||
<view class="px-[12rpx] py-[7rpx] test-24r error" v-else-if="v.status === -2">
|
||||
{{ v.status_text }}
|
||||
<view class="px-[12rpx] py-[7rpx] test-24r error !flex items-center gap-0.5"
|
||||
v-else-if="v.status === -2">
|
||||
<x-prompt title="封禁原因" :info="v.check_text">
|
||||
<template v-slot:button>
|
||||
<tui-icon name="about" :size="15" color="#F53F3F"></tui-icon>
|
||||
</template>
|
||||
</x-prompt>
|
||||
</view>
|
||||
<view class="px-[12rpx] py-[7rpx] test-24r error" v-else>
|
||||
{{ v.status_text }}
|
||||
<x-select 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>
|
||||
<x-prompt :title="v.status_text+'原因'" :info="v.check_text">
|
||||
<template v-slot:button>
|
||||
<tui-icon name="about" :size="15" color="#F53F3F"></tui-icon>
|
||||
</template>
|
||||
</x-prompt>
|
||||
{{ v.status_text }}
|
||||
<x-select 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>
|
||||
<view class="!w-full !h-[2rpx] bg-[#E5E6EB] !my-[20rpx]"></view>
|
||||
|
||||
@@ -77,9 +77,6 @@ const getSelect = async () => {
|
||||
<x-form-item label="昵称">
|
||||
<x-input v-model:model-value="form.nickname" height="80rpx" placeholder="请输入昵称"></x-input>
|
||||
</x-form-item>
|
||||
<x-form-item label="账号状态">
|
||||
<x-select v-model:model-value="form.status" :api="Api.system.getAccountStatus"></x-select>
|
||||
</x-form-item>
|
||||
<x-form-item label="恢复时间" v-if="form.status === 2">
|
||||
<x-date-time :type="1" v-model:model-value="form.abnormaltime"></x-date-time>
|
||||
</x-form-item>
|
||||
|
||||
@@ -50,7 +50,8 @@ const changeTab = ({index}) => {
|
||||
|
||||
<view class="!pt-[24rpx] !pb-[28rpx] !px-[32rpx] !flex gap-[32rpx] items-center">
|
||||
<view class="flex-grow">
|
||||
<x-input v-model:model-value="po.keyword" height="72rpx" placeholder="请输入要查询的内容">
|
||||
<x-input v-model:model-value="po.keyword" height="72rpx"
|
||||
:placeholder="`请输入要查询的${po.type===0?'任务编号':'标题'}`">
|
||||
<template #prefix>
|
||||
<tui-icon name="search" size="18" class="!mr-[12rpx]"></tui-icon>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user